summaryrefslogtreecommitdiffstats
path: root/src/idevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/idevice.c')
-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);
}