aboutsummaryrefslogtreecommitdiff
path: root/handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'handler.c')
-rw-r--r--handler.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/handler.c b/handler.c
index f30cfc3..455832b 100644
--- a/handler.c
+++ b/handler.c
@@ -75,6 +75,9 @@ static int on_payload(const struct http_payload *const p,
s->payload = r->step.payload;
c->args = r->args;
}
+ else
+ /* Avoid calling r->free again on exit. */
+ *r = (const struct http_response){0};
return ret;
}