summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2017-02-06 18:22:10 +0100
committerGravatar Nikias Bassen2017-02-06 18:22:10 +0100
commitc98451f9eabb68df3dfabaedc9e5fee81fec2fd7 (patch)
tree110c36fe1b3ce52ec7981b3d8856f875ef83aad6 /src
parente17a493d51a69804836528983d24bbc1d75dd9e5 (diff)
downloadlibplist-c98451f9eabb68df3dfabaedc9e5fee81fec2fd7.tar.gz
libplist-c98451f9eabb68df3dfabaedc9e5fee81fec2fd7.tar.bz2
bplist: Plug memory leak in case parsing a dictionary key fails
Diffstat (limited to 'src')
-rw-r--r--src/bplist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bplist.c b/src/bplist.c
index ecc0684..81bd716 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -444,6 +444,7 @@ static plist_t parse_dict_node(struct bplist_data *bplist, const char** bnode, u
if (plist_get_data(key)->type != PLIST_STRING) {
PLIST_BIN_ERR("%s: dict entry %" PRIu64 ": invalid node type for key\n", __func__, j);
+ plist_free(key);
plist_free(node);
return NULL;
}