summaryrefslogtreecommitdiff
path: root/btreplay
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2011-12-16 13:13:21 -0600
committerJens Axboe <jaxboe@fusionio.com>2012-02-01 13:14:27 +0100
commit6ca1e530ba80c37dc9a686259fe643548ffce69c (patch)
tree798c55bfbadd4b7b0fc5ce3843607e24a25b0e5b /btreplay
parentf9a89a6f99189f7929278d881de0ce011149d87c (diff)
downloadblktrace-6ca1e530ba80c37dc9a686259fe643548ffce69c.tar.gz
blktrace-6ca1e530ba80c37dc9a686259fe643548ffce69c.tar.bz2
Remove extraneous malloc in find_input routines
No point in malloc()ing space if we just immediately overwrite the pointer via strdup. That'll leak some space. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'btreplay')
-rw-r--r--btreplay/btrecord.c2
-rw-r--r--btreplay/btreplay.c2
2 files changed, 2 insertions, 2 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;
diff --git a/btreplay/btreplay.c b/btreplay/btreplay.c
index f4f5aa0..20494e0 100644
--- a/btreplay/btreplay.c
+++ b/btreplay/btreplay.c
@@ -596,7 +596,7 @@ static void find_input_devs(char *idir)
}
while ((ent = readdir(dir)) != NULL) {
- char *p, *dsf = malloc(256);
+ char *p, *dsf;
if (strstr(ent->d_name, ".replay.") == NULL)
continue;