Print this page
10135 picl plugins need smatch fixes
*** 22,31 ****
--- 22,35 ----
* 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,1778 ****
*/
static int
is_snapshot_stale(di_node_t root)
{
snapshot_stale = 0;
! di_walk_node(root, DI_WALK_CLDFIRST, NULL, check_stale_node);
return (snapshot_stale);
}
/*
* This function processes the data from libdevinfo and creates nodes
--- 1772,1782 ----
*/
static int
is_snapshot_stale(di_node_t root)
{
snapshot_stale = 0;
! (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,2555 ****
free(opp);
(void) close(d);
return (0);
}
(void) memcpy(*exportlist, opp->oprom_array, opp->oprom_size);
- free(opp);
*exportlistlen = opp->oprom_size;
(void) close(d);
return (1);
}
/*
--- 2548,2559 ----
free(opp);
(void) close(d);
return (0);
}
(void) memcpy(*exportlist, opp->oprom_array, opp->oprom_size);
*exportlistlen = opp->oprom_size;
+ free(opp);
(void) close(d);
return (1);
}
/*