summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Aaron Burghardt2013-06-30 20:43:35 -0400
committerGravatar Aaron Burghardt2013-06-30 21:28:20 -0400
commit9ed89569eaa4da350e45c2446413f048c398a1f7 (patch)
tree7ec9c6dac29edacff2aa67bbd0f5a38a31a42e50
parent361cefb7d2725e83dc0ce6558967ccbde99138ab (diff)
downloadlibimobiledevice-9ed89569eaa4da350e45c2446413f048c398a1f7.tar.gz
libimobiledevice-9ed89569eaa4da350e45c2446413f048c398a1f7.tar.bz2
Fixed memory leak in mb2_status_check_snapshot_state() by freeing the string returned from plist_get_string_val().
-rw-r--r--tools/idevicebackup2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index 8921403..fe2efdc 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -470,6 +470,7 @@ static int mb2_status_check_snapshot_state(const char *path, const char *udid, c
plist_get_string_val(node, &sval);
if (sval) {
ret = (strcmp(sval, matches) == 0) ? 1 : 0;
+ free(sval);
}
} else {
printf("%s: ERROR could not get SnapshotState key from Status.plist!\n", __func__);