summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
181 plist_t props = plist_dict_get_item(plist, "Properties"); 181 plist_t props = plist_dict_get_item(plist, "Properties");
182 if (!props) { 182 if (!props) {
183 DEBUG(1, "%s: Could not get properties for message '%s' from plist!\n", __func__, message); 183 DEBUG(1, "%s: Could not get properties for message '%s' from plist!\n", __func__, message);
184 free(message);
184 plist_free(plist); 185 plist_free(plist);
185 return -EBADMSG; 186 return -EBADMSG;
186 } 187 }
@@ -222,9 +223,11 @@ static int receive_packet(int sfd, struct usbmuxd_header *header, void **payload
222 } 223 }
223 } else { 224 } else {
224 DEBUG(1, "%s: Unexpected message '%s' in plist!\n", __func__, message); 225 DEBUG(1, "%s: Unexpected message '%s' in plist!\n", __func__, message);
226 free(message);
225 plist_free(plist); 227 plist_free(plist);
226 return -EBADMSG; 228 return -EBADMSG;
227 } 229 }
230 free(message);
228 } 231 }
229 plist_free(plist); 232 plist_free(plist);
230 } else 233 } else