summaryrefslogtreecommitdiffstats
path: root/libusbmuxd/libusbmuxd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libusbmuxd/libusbmuxd.c')
-rw-r--r--libusbmuxd/libusbmuxd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libusbmuxd/libusbmuxd.c b/libusbmuxd/libusbmuxd.c
index 956dd90..31d1c7c 100644
--- a/libusbmuxd/libusbmuxd.c
+++ b/libusbmuxd/libusbmuxd.c
@@ -181,6 +181,7 @@ static int receive_packet(int sfd, struct usbmuxd_header *header, void **payload
plist_t props = plist_dict_get_item(plist, "Properties");
if (!props) {
DEBUG(1, "%s: Could not get properties for message '%s' from plist!\n", __func__, message);
+ free(message);
plist_free(plist);
return -EBADMSG;
}
@@ -222,9 +223,11 @@ static int receive_packet(int sfd, struct usbmuxd_header *header, void **payload
}
} else {
DEBUG(1, "%s: Unexpected message '%s' in plist!\n", __func__, message);
+ free(message);
plist_free(plist);
return -EBADMSG;
}
+ free(message);
}
plist_free(plist);
} else