summaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-12-26 12:23:52 +0100
committerGravatar Martin Szulecki2015-01-13 00:14:55 +0100
commitf3c4db4f30731f6cfc2c37a39d5ce3501d42f45e (patch)
treecaa0ffcfdd84a31c945408e9e7ccd56b72318e2e /dev
parentaa14c053bc909c56d31c12799f13013f845ddb71 (diff)
downloadlibimobiledevice-f3c4db4f30731f6cfc2c37a39d5ce3501d42f45e.tar.gz
libimobiledevice-f3c4db4f30731f6cfc2c37a39d5ce3501d42f45e.tar.bz2
thread: Introduce thread_new and thread_free to cover handle leaks on WIN32
Diffstat (limited to 'dev')
-rw-r--r--dev/afccheck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c
index 3eb53c8..c534000 100644
--- a/dev/afccheck.c
+++ b/dev/afccheck.c
@@ -132,11 +132,12 @@ int main(int argc, char *argv[])
for (i = 0; i < NB_THREADS; i++) {
data[i].afc = afc;
data[i].id = i + 1;
- thread_create(&threads[i], check_afc, data + i);
+ thread_new(&threads[i], check_afc, data + i);
}
for (i = 0; i < NB_THREADS; i++) {
thread_join(threads[i]);
+ thread_free(threads[i]);
}
lockdownd_client_free(client);