[PATCH misc-utils/namei] Fix memory leak

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

 



namei: Fix memory leak in namei(1).

Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
 misc-utils/namei.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/misc-utils/namei.c b/misc-utils/namei.c
index 3c465e4..3686182 100644
--- a/misc-utils/namei.c
+++ b/misc-utils/namei.c
@@ -325,6 +325,9 @@ add_namei(struct namei *parent, const char *orgpath, int start, struct namei **l
 
 	if (last)
 		*last = nm;
+	
+	free(path);
+	
 	return first;
 }
 
-- 
1.7.0.4





--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" 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