diff options
| author | 2008-08-12 22:28:12 +0200 | |
|---|---|---|
| committer | 2008-08-21 19:00:31 +0200 | |
| commit | e9e663d5979163daa9f7f34fe47305a03694b619 (patch) | |
| tree | f69189c18df198e47e8b1a9c3360b8099cc56ff3 | |
| parent | 216c9e808957c996c17f9ca46707decbbafed6fe (diff) | |
| download | libimobiledevice-e9e663d5979163daa9f7f34fe47305a03694b619.tar.gz libimobiledevice-e9e663d5979163daa9f7f34fe47305a03694b619.tar.bz2 | |
Don't leak r_packet in receive_AFC_data in the "false alarm" case
| -rw-r--r-- | src/AFC.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -234,6 +234,7 @@ static int receive_AFC_data(AFClient *client, char **dump_here) { | |||
| 234 | if (debug) fprintf(stderr, "Oops? Bad operation code received: 0x%X, operation=0x%X, param1=%d\n", | 234 | if (debug) fprintf(stderr, "Oops? Bad operation code received: 0x%X, operation=0x%X, param1=%d\n", |
| 235 | r_packet->operation, client->afc_packet->operation, param1); | 235 | r_packet->operation, client->afc_packet->operation, param1); |
| 236 | recv_len = r_packet->entire_length - r_packet->this_length; | 236 | recv_len = r_packet->entire_length - r_packet->this_length; |
| 237 | free(r_packet); | ||
| 237 | if (debug) fprintf(stderr, "recv_len=%d\n", recv_len); | 238 | if (debug) fprintf(stderr, "recv_len=%d\n", recv_len); |
| 238 | if(param1 == 0) { | 239 | if(param1 == 0) { |
| 239 | if (debug) fprintf(stderr, "... false alarm, but still\n"); | 240 | if (debug) fprintf(stderr, "... false alarm, but still\n"); |
| @@ -241,7 +242,6 @@ static int receive_AFC_data(AFClient *client, char **dump_here) { | |||
| 241 | return 0; | 242 | return 0; |
| 242 | } | 243 | } |
| 243 | else { if (debug) fprintf(stderr, "Errno %i\n", param1); } | 244 | else { if (debug) fprintf(stderr, "Errno %i\n", param1); } |
| 244 | free(r_packet); | ||
| 245 | *dump_here = NULL; | 245 | *dump_here = NULL; |
| 246 | return -1; | 246 | return -1; |
| 247 | } else { | 247 | } else { |
