git: 624e410e8b73 - stable/14 - libfetch: Plug leak in 304 Not Modified case
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 05 Nov 2026 15:12:35 UTC
The branch stable/14 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=624e410e8b736d24afe756070f7295f18158e849
commit 624e410e8b736d24afe756070f7295f18158e849
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-09-30 16:55:18 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-11-05 15:11:58 +0000
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
(cherry picked from commit b212f565fb1a34fdcd2f5c9530164ff4718a1a9f)
---
lib/libfetch/http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index c5415b875155..8fe98c57446d 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -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 */