Print this page
10135 picl plugins need smatch fixes
@@ -22,10 +22,14 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+/*
* PICL plug-in that creates device tree nodes for all platforms
*/
#include <stdio.h>
#include <string.h>
@@ -1768,11 +1772,11 @@
*/
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);
}
/*
* This function processes the data from libdevinfo and creates nodes
@@ -2544,12 +2548,12 @@
free(opp);
(void) close(d);
return (0);
}
(void) memcpy(*exportlist, opp->oprom_array, opp->oprom_size);
- free(opp);
*exportlistlen = opp->oprom_size;
+ free(opp);
(void) close(d);
return (1);
}
/*