From 985d74161967803db6ef51ddabeff3686f7bacae Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 17 Jan 2024 17:35:53 +0100 Subject: [PATCH] nhlt-dmic-info: fix simple memory leak issue Signed-off-by: Jaroslav Kysela --- nhlt/nhlt-dmic-info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nhlt/nhlt-dmic-info.c b/nhlt/nhlt-dmic-info.c index f08dc85..7726c3c 100644 --- a/nhlt/nhlt-dmic-info.c +++ b/nhlt/nhlt-dmic-info.c @@ -248,6 +248,7 @@ static int nhlt_to_json(FILE *out, const char *nhlt_file) if (fd < 0) { _errno = errno; fprintf(stderr, "Unable to open file '%s': %s\n", nhlt_file, strerror(errno)); + free(buf); return _errno; } pos = 0; -- 2.47.1