[PATCH 3/5] setpwnam: fix memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Found with scan-build.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 login-utils/setpwnam.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/login-utils/setpwnam.c b/login-utils/setpwnam.c
index 9f39d01..0616c79 100644
--- a/login-utils/setpwnam.c
+++ b/login-utils/setpwnam.c
@@ -166,6 +166,7 @@ int setpwnam(struct passwd *pwd, const char *prefix)
 		goto fail;
 	/* finally:  success */
 	ulckpwdf();
+	free(linebuf);
 	return 0;
 
  fail:
-- 
2.8.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux