diff options
author | Christophe Fergeau | 2008-08-12 21:54:58 +0200 |
---|---|---|
committer | Jonathan Beck | 2008-08-21 18:51:02 +0200 |
commit | 877fd5089abaa58273c6b251f9ca30c4303e3632 (patch) | |
tree | 316bdb61aaceee2637847f3cd28361dd5a757498 | |
parent | 09e5d87069f16e60918d71a8d00b891e2981f166 (diff) | |
download | libimobiledevice-877fd5089abaa58273c6b251f9ca30c4303e3632.tar.gz libimobiledevice-877fd5089abaa58273c6b251f9ca30c4303e3632.tar.bz2 |
Fix leak in dispatch_AFC_packet
-rw-r--r-- | src/AFC.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -179,7 +179,11 @@ 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); + + if (buffer) { + free(buffer); + buffer = NULL; + } return bytes; } return -1; |