summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Aumueller2008-08-04 11:54:04 +0200
committerGravatar Matt Colyer2008-08-04 23:00:37 -0700
commit279222bdb5b8a0ae430a2f553659407f9c8c2236 (patch)
tree1fa54811a01f5c2d3a6c3133b549b42301c2ec59
parent07fcebbb5e8a741237815507f77ecc4caf264bb9 (diff)
downloadlibimobiledevice-279222bdb5b8a0ae430a2f553659407f9c8c2236.tar.gz
libimobiledevice-279222bdb5b8a0ae430a2f553659407f9c8c2236.tar.bz2
Don't use iPhone after freeing it.
Signed-off-by: Matt Colyer <matt@colyer.name>
-rw-r--r--src/ifuse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ifuse.c b/src/ifuse.c
index 4ea91af..e4d14e5 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -157,8 +157,9 @@ void *ifuse_init(struct fuse_conn_info *conn) {
void ifuse_cleanup(AFClient *afc) {
if (afc) {
- free_iPhone(afc->phone);
+ iPhone *phone = afc->phone;
afc_disconnect(afc);
+ free_iPhone(phone);
}
}