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.37.1~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bcb6ccf819e09b0ebf014737f3d37015ebcc672e;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'); }