From: Sam Smith Date: Sun, 24 Apr 2022 21:28:59 +0000 (-0700) Subject: Fixed possible double free X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=adf3f23f7b9607037a17ef846a3244fb43af3781;p=patchyircd.git Fixed possible double free --- diff --git a/net.c b/net.c index 70c2cc0..e226102 100644 --- a/net.c +++ b/net.c @@ -54,7 +54,7 @@ void recvProc(struct client_data *cl) { char tmp; while(1){ // I hate you - if(cl->bufLen == cl->bufCap) killConnection(cl); + if(cl->bufLen == cl->bufCap) { killConnection(cl); return; } bytesRead = recv_log(cl->FD,cl->buf + cl->bufLen,cl->bufCap - cl->bufLen, 0); switch(bytesRead){ // Disconnect