diff options
author | Peter Hoepfner | 2011-10-19 20:40:09 +0200 |
---|---|---|
committer | Nikias Bassen | 2011-10-19 20:40:09 +0200 |
commit | d2db9b97b0487e3e0c65cca0e0dd02a747a61113 (patch) | |
tree | 665ce8e695b271cc4193af155441898f167c108d | |
parent | d51431edc3987cb9e595fdec874cdf869935d21d (diff) | |
download | libimobiledevice-d2db9b97b0487e3e0c65cca0e0dd02a747a61113.tar.gz libimobiledevice-d2db9b97b0487e3e0c65cca0e0dd02a747a61113.tar.bz2 |
Fix memory leak in idevice_device_list_free
-rw-r--r-- | src/idevice.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/idevice.c b/src/idevice.c index 3676b5c..cad1431 100644 --- a/src/idevice.c +++ b/src/idevice.c @@ -134,8 +134,9 @@ idevice_error_t idevice_device_list_free(char **devices) { if (devices) { int i = 0; - while (devices[i++]) { + while (devices[i]) { free(devices[i]); + i++; } free(devices); } |