summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/AFC.c1
-rw-r--r--src/ifuse.c4
2 files changed, 4 insertions, 1 deletions
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) {
179 if (debug) fwrite(buffer, 1, client->afc_packet->this_length, stdout); 179 if (debug) fwrite(buffer, 1, client->afc_packet->this_length, stdout);
180 if (debug) fprintf(stderr, "\n"); 180 if (debug) fprintf(stderr, "\n");
181 bytes = mux_send(client->connection, buffer, client->afc_packet->this_length); 181 bytes = mux_send(client->connection, buffer, client->afc_packet->this_length);
182 if (buffer) free(buffer);
182 return bytes; 183 return bytes;
183 } 184 }
184 return -1; 185 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) {
63 stbuf->st_blocks = file->blocks; 63 stbuf->st_blocks = file->blocks;
64 stbuf->st_uid = getuid(); 64 stbuf->st_uid = getuid();
65 stbuf->st_gid = getgid(); 65 stbuf->st_gid = getgid();
66
67 afc_close_file(afc,file);
66 } 68 }
67 69
68 return res; 70 return res;
@@ -205,7 +207,7 @@ void *ifuse_init(struct fuse_conn_info *conn) {
205 port = lockdownd_start_service(control, "com.apple.afc"); 207 port = lockdownd_start_service(control, "com.apple.afc");
206 if (!port) { 208 if (!port) {
207 lockdownd_close(control); 209 lockdownd_close(control);
208 free_iphone(phone); 210 free_iPhone(phone);
209 fprintf(stderr, "Something went wrong when starting AFC."); 211 fprintf(stderr, "Something went wrong when starting AFC.");
210 return NULL; 212 return NULL;
211 } 213 }