diff options
author | Jonathan Beck | 2009-10-11 12:53:49 +0200 |
---|---|---|
committer | Jonathan Beck | 2009-10-11 12:53:49 +0200 |
commit | 120b7348e7b9d4c92e463590de5a4de4e6bc1228 (patch) | |
tree | e65bb41ba079923233a37515c084c816e926e7b5 /src | |
parent | 5a7a91d4eb2263d2c9fd63d51bce9a4738b072d9 (diff) | |
download | libplist-120b7348e7b9d4c92e463590de5a4de4e6bc1228.tar.gz libplist-120b7348e7b9d4c92e463590de5a4de4e6bc1228.tar.bz2 |
Protect plist_free against NULL nodes.
Diffstat (limited to 'src')
-rw-r--r-- | src/plist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plist.c b/src/plist.c index 5ef3144..3b0387e 100644 --- a/src/plist.c +++ b/src/plist.c @@ -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) |