[PATCH 13/34] libmount: fix memory leak [clang-analyzer]

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

 



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

diff --git a/libmount/src/utils.c b/libmount/src/utils.c
index 1655764..7714b50 100644
--- a/libmount/src/utils.c
+++ b/libmount/src/utils.c
@@ -198,6 +198,7 @@ int mnt_chdir_to_parent(const char *target, char **filename)
 		else
 			memcpy(*filename, last, strlen(last) + 1);
 	}
+	free(buf);
 	return 0;
 err:
 	free(buf);
-- 
1.8.3.2

--
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