summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Peter Hoepfner2011-10-19 20:40:09 +0200
committerGravatar Nikias Bassen2011-10-19 20:40:09 +0200
commitd2db9b97b0487e3e0c65cca0e0dd02a747a61113 (patch)
tree665ce8e695b271cc4193af155441898f167c108d
parentd51431edc3987cb9e595fdec874cdf869935d21d (diff)
downloadlibimobiledevice-d2db9b97b0487e3e0c65cca0e0dd02a747a61113.tar.gz
libimobiledevice-d2db9b97b0487e3e0c65cca0e0dd02a747a61113.tar.bz2
Fix memory leak in idevice_device_list_free
-rw-r--r--src/idevice.c3
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);
}