From: Karel Zak Date: Thu, 10 Jun 2021 11:44:25 +0000 (+0200) Subject: dmesg: fix possible memory leak [coverity scan] X-Git-Tag: v2.38-rc1~465 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb9ed3b409c05752a06619b2a5f02f5a21b3bb62;p=thirdparty%2Futil-linux.git dmesg: fix possible memory leak [coverity scan] Signed-off-by: Karel Zak --- diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index ba9a749b2e..b3b9ef786e 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -1085,10 +1085,10 @@ full_output: mesg_size = strlen(line); goto full_output; } - free(mesg_copy); } done: + free(mesg_copy); putchar('\n'); }