[PATCH] btrecord: Fix memory leak in find_input_files()

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

 



David Binderman <dcb314@xxxxxxxxxxx> found a memory leak in btrecord where
find_input_files() is leaking 256 bytes for every iteration of the while
loop.

Signed-off-by: Jan Blunck <jblunck@xxxxxxx>
---
 btreplay/btrecord.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/btreplay/btrecord.c b/btreplay/btrecord.c
index 88ab806..3646257 100644
--- a/btreplay/btrecord.c
+++ b/btreplay/btrecord.c
@@ -365,7 +365,7 @@ static void find_input_files(char *idir)
 	}
 
 	while ((ent = readdir(dir)) != NULL) {
-		char *p, *dsf = malloc(256);
+		char *p, *dsf;
 
 		if (strstr(ent->d_name, ".blktrace.") == NULL)
 			continue;
-- 
1.6.1.3

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

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

  Powered by Linux