From: Lennart Poettering Date: Mon, 23 Jun 2025 12:40:21 +0000 (+0200) Subject: bootspec: ensure memory free in one error path X-Git-Tag: v258-rc1~269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bd9a3c916a26522ee1b26e08374282df66f734b;p=thirdparty%2Fsystemd.git bootspec: ensure memory free in one error path --- diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index 980c8c53ad5..bac00c5b3ca 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -836,9 +836,9 @@ static int pe_load_headers_and_sections( IMAGE_SECTION_HEADER **ret_sections, PeHeader **ret_pe_header) { + _cleanup_free_ IMAGE_SECTION_HEADER *sections = NULL; _cleanup_free_ IMAGE_DOS_HEADER *dos_header = NULL; - IMAGE_SECTION_HEADER *sections; - PeHeader *pe_header; + _cleanup_free_ PeHeader *pe_header = NULL; int r; assert(fd >= 0);