Selaa lähdekoodia

Don't leak fd when malloc fails (coverity)

tags/v0.99.beta19
Pascal Terjan pterjan 11 vuotta sitten
vanhempi
commit
c80bd429bd
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. +3
    -0
      src/cacaserver.c

+ 3
- 0
src/cacaserver.c Näytä tiedosto

@@ -321,7 +321,10 @@ static void manage_connections(struct server *server)
{
server->clients = malloc(sizeof(struct client));
if(server->clients == NULL)
{
close(fd);
return;
}
}
else
{


Ladataan…
Peruuta
Tallenna