summaryrefslogtreecommitdiffstats
path: root/src/fnctdsk.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-19 19:25:18 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-19 19:25:18 +0200
commitbf83ac26623fc2743ec041b8f502636074ffe69c (patch)
tree85f199a84587f11355345dc9024db56e2e01c252 /src/fnctdsk.c
parent4699591268012128de457f172963a51ae1c681d6 (diff)
Fix memory leak when freeing device
Diffstat (limited to 'src/fnctdsk.c')
-rw-r--r--src/fnctdsk.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/fnctdsk.c b/src/fnctdsk.c
index fc43c21..8aa658c 100644
--- a/src/fnctdsk.c
+++ b/src/fnctdsk.c
@@ -195,11 +195,7 @@ int delete_list_disk(list_disk_t *list_disk)
{
list_disk_t *element_disk_next=element_disk->next;
write_used|=element_disk->disk->write_used;
- if(element_disk->disk->clean!=NULL)
- element_disk->disk->clean(element_disk->disk);
- free(element_disk->disk->device);
- free(element_disk->disk->model);
- free(element_disk->disk);
+ element_disk->disk->clean(element_disk->disk);
free(element_disk);
element_disk=element_disk_next;
}