Reported by Clang Analyzer: is_customizable_type.c:36:3: warning: Potential leak of memory pointed to by 'buf' [unix.Malloc] 36 | fclose(fp); | ^~~~~~ Fixes: 9911f2ac6f77 ("libselinux: check for stream rewind failures") Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> --- libselinux/src/is_customizable_type.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libselinux/src/is_customizable_type.c b/libselinux/src/is_customizable_type.c index 9be50174..da301c60 100644 --- a/libselinux/src/is_customizable_type.c +++ b/libselinux/src/is_customizable_type.c @@ -33,6 +33,7 @@ static void customizable_init(void) } if (fseek(fp, 0L, SEEK_SET) == -1) { + free(buf); fclose(fp); return; } -- 2.42.0