libfetch: Plug leak in 304 Not Modified case

When we get a 304 Not Modified response, we need to go through the error
path to properly free any resources we've allocated instead of just
returning NULL directly.

MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D60016
This commit is contained in:
Dag-Erling Smørgrav committed 2026-09-30 18:55:18 +02:00
1 parent cd2fca49d3
commit b212f565fb
1 file changed
+1 -1
+1 -1
View File
@@ -1986,7 +1986,7 @@ http_request_body(struct url *URL, const char *op, struct url_stat *us,
if (conn->err == HTTP_NOT_MODIFIED) {
http_seterr(HTTP_NOT_MODIFIED);
return (NULL);
goto ouch;
}
/* check for inconsistencies */