From 5b856a88fc79e962229d1c8ec58d196ed17b00d0 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 23 Nov 2009 21:50:05 +0000 Subject: [PATCH] fixed memory error at string list --- door_daemon/string_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/door_daemon/string_list.c b/door_daemon/string_list.c index e5e8a62..a4f4ab8 100644 --- a/door_daemon/string_list.c +++ b/door_daemon/string_list.c @@ -92,8 +92,8 @@ int string_list_add(string_list_t* list, const char* string) tmp->next_->next_ = 0; tmp->next_->string_ = strdup(string); if(!tmp->next_->string_) { - free(list->first_); - list->first_ = NULL; + free(tmp->next_); + tmp->next_ = NULL; return -2; } } -- 1.7.10.4