[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH 1/3] Libc: Mehrfaches free in Pfadfunktion
! Libc: Mehrfaches free in io_split_dirname()
Signed-off-by: Antoine Kaufmann <toni@xxxxxxxxxx>
---
src/modules/lib/lost_path.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/src/modules/lib/lost_path.c b/src/modules/lib/lost_path.c
index 81c1e94..694573b 100644
--- a/src/modules/lib/lost_path.c
+++ b/src/modules/lib/lost_path.c
@@ -514,7 +514,6 @@ char* io_split_dirname(const char* path)
{
char* dirname;
list_t* list = list_create();
- void* data;
size_t size;
struct path_element* element;
@@ -555,11 +554,7 @@ char* io_split_dirname(const char* path)
size = calc_path_length(list);
dirname = malloc(size + 1);
create_path_string(list, dirname, TRUE);
-
- while ((data = list_pop(list))) {
- free(data);
- }
- list_destroy(data);
+ list_destroy(list);
return dirname;
}
--
1.6.0.6