summaryrefslogtreecommitdiffstats
path: root/src/fnctdsk.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-06-04 08:43:17 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-06-04 08:43:17 +0200
commit79bf6ce3e167f07b1c789e53d586054ecfb04156 (patch)
tree5f394e9021fbfe371d690850979771b4435bc007 /src/fnctdsk.c
parent65dbe3d4baf4d486bb8119ec197a20697ba4ca28 (diff)
Fix double free() - regression introduced in bf83ac26623fc2743ec041b8f502636074ffe69c
Diffstat (limited to 'src/fnctdsk.c')
-rw-r--r--src/fnctdsk.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/fnctdsk.c b/src/fnctdsk.c
index 8aa658c..abe012c 100644
--- a/src/fnctdsk.c
+++ b/src/fnctdsk.c
@@ -117,10 +117,7 @@ list_disk_t *insert_new_disk(list_disk_t *list_disk, disk_t *disk_car)
{
if(strcmp(cur->disk->device,disk_car->device)==0)
{
- if(disk_car->clean!=NULL)
- disk_car->clean(disk_car);
- free(disk_car->device);
- free(disk_car);
+ disk_car->clean(disk_car);
return list_disk;
}
}