summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bplist.c1
-rw-r--r--src/xplist.c3
2 files changed, 1 insertions, 3 deletions
diff --git a/src/bplist.c b/src/bplist.c
index 5789f26..91d5578 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -251,6 +251,7 @@ static plist_t parse_real_node(char *bnode, uint8_t size)
data->realval = *(double *) buf;
break;
default:
+ free(buf);
free(data);
return NULL;
}
diff --git a/src/xplist.c b/src/xplist.c
index 96539a6..a889cb5 100644
--- a/src/xplist.c
+++ b/src/xplist.c
@@ -120,9 +120,6 @@ static xmlDocPtr new_xml_plist(void)
char *plist = strdup(plist_base);
xmlDocPtr plist_xml = xmlParseMemory(plist, strlen(plist));
- if (!plist_xml)
- return NULL;
-
free(plist);
return plist_xml;