Commit 09e5d870 authored by Jonathan Beck's avatar Jonathan Beck

fix missing free in dispatch_AFC_packet

parent a885ca9d
...@@ -179,6 +179,7 @@ static int dispatch_AFC_packet(AFClient *client, const char *data, int length) { ...@@ -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) fwrite(buffer, 1, client->afc_packet->this_length, stdout);
if (debug) fprintf(stderr, "\n"); if (debug) fprintf(stderr, "\n");
bytes = mux_send(client->connection, buffer, client->afc_packet->this_length); bytes = mux_send(client->connection, buffer, client->afc_packet->this_length);
if (buffer) free(buffer);
return bytes; return bytes;
} }
return -1; return -1;
......
...@@ -63,6 +63,8 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) { ...@@ -63,6 +63,8 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) {
stbuf->st_blocks = file->blocks; stbuf->st_blocks = file->blocks;
stbuf->st_uid = getuid(); stbuf->st_uid = getuid();
stbuf->st_gid = getgid(); stbuf->st_gid = getgid();
afc_close_file(afc,file);
} }
return res; return res;
...@@ -205,7 +207,7 @@ void *ifuse_init(struct fuse_conn_info *conn) { ...@@ -205,7 +207,7 @@ void *ifuse_init(struct fuse_conn_info *conn) {
port = lockdownd_start_service(control, "com.apple.afc"); port = lockdownd_start_service(control, "com.apple.afc");
if (!port) { if (!port) {
lockdownd_close(control); lockdownd_close(control);
free_iphone(phone); free_iPhone(phone);
fprintf(stderr, "Something went wrong when starting AFC."); fprintf(stderr, "Something went wrong when starting AFC.");
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment