mirror of
https://github.com/libimobiledevice/libplist
synced 2026-06-08 15:29:34 +00:00
Protect plist_free against NULL nodes.
This commit is contained in:
+4
-2
@@ -148,8 +148,10 @@ plist_t plist_new_date(int32_t sec, int32_t usec)
|
||||
|
||||
void plist_free(plist_t plist)
|
||||
{
|
||||
plist_free_node(plist, NULL);
|
||||
g_node_destroy(plist);
|
||||
if (plist) {
|
||||
plist_free_node(plist, NULL);
|
||||
g_node_destroy(plist);
|
||||
}
|
||||
}
|
||||
|
||||
static void plist_copy_node(GNode * node, gpointer parent_node_ptr)
|
||||
|
||||
Reference in New Issue
Block a user