From 09e5d87069f16e60918d71a8d00b891e2981f166 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Tue, 12 Aug 2008 22:02:18 +0200 Subject: fix missing free in dispatch_AFC_packet --- src/AFC.c | 1 + src/ifuse.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/AFC.c b/src/AFC.c index 3ad31d2..01e8497 100644 --- a/src/AFC.c +++ b/src/AFC.c @@ -179,6 +179,7 @@ static int dispatch_AFC_packet(AFClient *client, const char *data, int length) { if (debug) fwrite(buffer, 1, client->afc_packet->this_length, stdout); if (debug) fprintf(stderr, "\n"); bytes = mux_send(client->connection, buffer, client->afc_packet->this_length); + if (buffer) free(buffer); return bytes; } return -1; diff --git a/src/ifuse.c b/src/ifuse.c index 2a33405..a9d1c9a 100644 --- a/src/ifuse.c +++ b/src/ifuse.c @@ -63,6 +63,8 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) { stbuf->st_blocks = file->blocks; stbuf->st_uid = getuid(); stbuf->st_gid = getgid(); + + afc_close_file(afc,file); } return res; @@ -205,7 +207,7 @@ void *ifuse_init(struct fuse_conn_info *conn) { port = lockdownd_start_service(control, "com.apple.afc"); if (!port) { lockdownd_close(control); - free_iphone(phone); + free_iPhone(phone); fprintf(stderr, "Something went wrong when starting AFC."); return NULL; } -- cgit v1.1-32-gdbae