summaryrefslogtreecommitdiffstats
path: root/src/ewf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-06-24 21:34:20 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2016-06-24 21:34:20 +0200
commitb31247a04905f713ad65904b7949627eaeba21b1 (patch)
tree8a06bb4c69931478c1ab54b4751937d93f1ea64a /src/ewf.c
parent2c1ece813538515d78dd389d2ba861983cb173a4 (diff)
Fix small memory leak in fewf_init()
Diffstat (limited to 'src/ewf.c')
-rw-r--r--src/ewf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ewf.c b/src/ewf.c
index f37629f..4cc084e 100644
--- a/src/ewf.c
+++ b/src/ewf.c
@@ -136,6 +136,7 @@ disk_t *fewf_init(const char *device, const int mode)
libewf_error_sprint(ewf_error, buffer, sizeof(buffer));
log_error("libewf_glob(%s) failed: %s\n", device, buffer);
libewf_error_free(&ewf_error);
+ free(data->file_name);
free(data);
return NULL;
}
@@ -154,6 +155,7 @@ disk_t *fewf_init(const char *device, const int mode)
if(filenames==NULL)
{
globfree(&globbuf);
+ free(data->file_name);
free(data);
return NULL;
}
@@ -181,6 +183,7 @@ disk_t *fewf_init(const char *device, const int mode)
filenames,
num_files,
NULL );
+ free(data->file_name);
free(data);
return NULL;
}
@@ -226,6 +229,7 @@ disk_t *fewf_init(const char *device, const int mode)
filenames,
num_files,
NULL );
+ free(data->file_name);
free(data);
return NULL;
}
@@ -249,6 +253,7 @@ disk_t *fewf_init(const char *device, const int mode)
filenames,
num_files,
NULL );
+ free(data->file_name);
free(data);
return NULL;
}
@@ -261,6 +266,7 @@ disk_t *fewf_init(const char *device, const int mode)
globfree(&globbuf);
#endif
free(filenames);
+ free(data->file_name);
free(data);
return NULL;
}