Remove extraneous malloc in find_input routines
PATCH 5/10 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 <[email protected]>
---
btreplay/btrecord.c +1 -1
@@ -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 ;
btreplay/btreplay.c +1 -1
@@ -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 ;