Commit 877fd508 authored by Christophe Fergeau's avatar Christophe Fergeau Committed by Jonathan Beck

Fix leak in dispatch_AFC_packet

parent 09e5d870
......@@ -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;
......
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