Print this page
10105 libproject needs smatch fixes

*** 18,28 **** * * CDDL HEADER END */ /* * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ #include <sys/task.h> #include <sys/types.h> --- 18,28 ---- * * CDDL HEADER END */ /* * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2018, Joyent, Inc. */ #include <sys/task.h> #include <sys/types.h>
*** 499,518 **** /* * Bind to the pool with 'pool.default' = 'true' if * 'system.bind-default' = 'true'. */ if ((pvals[0] = pool_value_alloc()) == NULL) { ! pool_conf_close(conf); pool_conf_free(conf); return (-1); } if (!force && pool_get_property(conf, pool_conf_to_elem(conf), "system.bind-default", pvals[0]) != POC_BOOL || pool_value_get_bool(pvals[0], &bval) != PO_SUCCESS || bval == PO_FALSE) { pool_value_free(pvals[0]); ! pool_conf_close(conf); pool_conf_free(conf); errno = pool_name == NULL ? EACCES : ESRCH; return (-1); } (void) pool_value_set_name(pvals[0], "pool.default"); --- 499,518 ---- /* * Bind to the pool with 'pool.default' = 'true' if * 'system.bind-default' = 'true'. */ if ((pvals[0] = pool_value_alloc()) == NULL) { ! (void) pool_conf_close(conf); pool_conf_free(conf); return (-1); } if (!force && pool_get_property(conf, pool_conf_to_elem(conf), "system.bind-default", pvals[0]) != POC_BOOL || pool_value_get_bool(pvals[0], &bval) != PO_SUCCESS || bval == PO_FALSE) { pool_value_free(pvals[0]); ! (void) pool_conf_close(conf); pool_conf_free(conf); errno = pool_name == NULL ? EACCES : ESRCH; return (-1); } (void) pool_value_set_name(pvals[0], "pool.default");
*** 520,530 **** if ((pools = pool_query_pools(conf, &nelem, pvals)) == NULL) { /* * No default pools exist. */ pool_value_free(pvals[0]); ! pool_conf_close(conf); pool_conf_free(conf); errno = pool_name == NULL ? EACCES : ESRCH; return (-1); } if (nelem != 1 || --- 520,530 ---- if ((pools = pool_query_pools(conf, &nelem, pvals)) == NULL) { /* * No default pools exist. */ pool_value_free(pvals[0]); ! (void) pool_conf_close(conf); pool_conf_free(conf); errno = pool_name == NULL ? EACCES : ESRCH; return (-1); } if (nelem != 1 ||