about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--html.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/html.c b/html.c index 1104f97..8c45ba6 100644 --- a/html.c +++ b/html.c
@@ -6,6 +6,7 @@
6 * (see COPYING for full license text) 6 * (see COPYING for full license text)
7 */ 7 */
8 8
9#include "cgit.h"
9#include "html.h" 10#include "html.h"
10#include <unistd.h> 11#include <unistd.h>
11#include <stdio.h> 12#include <stdio.h>
@@ -307,11 +308,7 @@ int http_parse_querystring(const char *txt_, void (*fn)(const char *name, const
307 if (!txt_) 308 if (!txt_)
308 return 0; 309 return 0;
309 310
310 o = t = txt = strdup(txt_); 311 o = t = txt = xstrdup(txt_);
311 if (t == NULL) {
312 printf("Out of memory\n");
313 exit(1);
314 }
315 while ((c=*t) != '\0') { 312 while ((c=*t) != '\0') {
316 if (c == '=') { 313 if (c == '=') {
317 *t = '\0'; 314 *t = '\0';