From 720c4860f9da1099f11e91ddd7f4d0edaf46c20a Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 19 Dec 2018 18:40:41 +0000 Subject: 10135 picl plugins need smatch fixes Reviewed by: Andy Fiddaman Reviewed by: Gergő Doma Approved by: Dan McDonald MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/src/cmd/picl/plugins/common/devtree/picldevtree.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr/src/cmd/picl/plugins/common/devtree/picldevtree.c') diff --git a/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c b/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c index 3a0327af3f..ab02d9091b 100644 --- a/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c +++ b/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2018, Joyent, Inc. + */ + /* * PICL plug-in that creates device tree nodes for all platforms */ @@ -1770,7 +1774,7 @@ static int is_snapshot_stale(di_node_t root) { snapshot_stale = 0; - di_walk_node(root, DI_WALK_CLDFIRST, NULL, check_stale_node); + (void) di_walk_node(root, DI_WALK_CLDFIRST, NULL, check_stale_node); return (snapshot_stale); } @@ -2546,8 +2550,8 @@ get_asr_export_list(char **exportlist, int *exportlistlen) return (0); } (void) memcpy(*exportlist, opp->oprom_array, opp->oprom_size); - free(opp); *exportlistlen = opp->oprom_size; + free(opp); (void) close(d); return (1); } -- cgit v1.2.3