diff options
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r-- | src/daemon/daemon.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 6a0e4ab2..93017ae3 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -596,6 +596,11 @@ MHD_start_daemon (unsigned int options, | |||
596 | return NULL; | 596 | return NULL; |
597 | } | 597 | } |
598 | retVal = malloc (sizeof (struct MHD_Daemon)); | 598 | retVal = malloc (sizeof (struct MHD_Daemon)); |
599 | if (retVal == NULL) | ||
600 | { | ||
601 | CLOSE(socket_fd); | ||
602 | return NULL; | ||
603 | } | ||
599 | memset (retVal, 0, sizeof (struct MHD_Daemon)); | 604 | memset (retVal, 0, sizeof (struct MHD_Daemon)); |
600 | retVal->options = options; | 605 | retVal->options = options; |
601 | retVal->port = port; | 606 | retVal->port = port; |