diff options
| -rw-r--r-- | main.c | 13 | ||||
| m--------- | slweb | 0 |
2 files changed, 2 insertions, 11 deletions
@@ -208,23 +208,16 @@ static int get_forms(const struct http_payload *const pl, { int ret = -1; const struct http_post *const p = &pl->u.post; - const char *const ref = p->data; - char *dup = NULL; struct form *f = NULL; - if (!ref) + if (!p->data) { fprintf(stderr, "%s: expected non-NULL buffer\n", __func__); ret = 1; goto end; } - else if (!(dup = strndup(ref, p->n))) - { - fprintf(stderr, "%s: strndup(3): %s\n", __func__, strerror(errno)); - goto end; - } - const char *s = dup; + const char *s = p->data; *outn = 0; @@ -241,8 +234,6 @@ static int get_forms(const struct http_payload *const pl, ret = 0; end: - free(dup); - if (ret) forms_free(f, *outn); diff --git a/slweb b/slweb -Subproject 34d716082a0136056373f3d0c6ed7abce45484b +Subproject 5be3ffdd3bfd96b314509f6f03e211e309d0fef |
