Browse Source

Don't leak fd when malloc fails (coverity)

tags/v0.99.beta19
Pascal Terjan pterjan 11 years ago
parent
commit
c80bd429bd
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/cacaserver.c

+ 3
- 0
src/cacaserver.c View File

@@ -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
{


Loading…
Cancel
Save