diff options
Diffstat (limited to 'src/daemon/response.c')
-rw-r--r-- | src/daemon/response.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/daemon/response.c b/src/daemon/response.c index 648b36a2..160246eb 100644 --- a/src/daemon/response.c +++ b/src/daemon/response.c | |||
@@ -53,16 +53,18 @@ MHD_add_response_header (struct MHD_Response *response, | |||
53 | if (hdr == NULL) | 53 | if (hdr == NULL) |
54 | return MHD_NO; | 54 | return MHD_NO; |
55 | hdr->header = strdup (header); | 55 | hdr->header = strdup (header); |
56 | if (hdr->header == NULL) { | 56 | if (hdr->header == NULL) |
57 | free(hdr); | 57 | { |
58 | return MHD_NO; | 58 | free (hdr); |
59 | } | 59 | return MHD_NO; |
60 | } | ||
60 | hdr->value = strdup (content); | 61 | hdr->value = strdup (content); |
61 | if (hdr->value == NULL) { | 62 | if (hdr->value == NULL) |
62 | free(hdr->header); | 63 | { |
63 | free(hdr); | 64 | free (hdr->header); |
64 | return MHD_NO; | 65 | free (hdr); |
65 | } | 66 | return MHD_NO; |
67 | } | ||
66 | hdr->kind = MHD_HEADER_KIND; | 68 | hdr->kind = MHD_HEADER_KIND; |
67 | hdr->next = response->first_header; | 69 | hdr->next = response->first_header; |
68 | response->first_header = hdr; | 70 | response->first_header = hdr; |