summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-23 21:52:16 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-23 21:52:16 (GMT)
commit388413cc9a55c3935c332159ef9a74f195193cf1 (patch)
tree4fcff3ec6a52588b2f30d6ddc745a24a45c22d89
parent0b61ff077bdd3ccee0b5bf0233c337abc817732d (diff)
fixed memory error at string_list
-rw-r--r--string_list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string_list.c b/string_list.c
index e5e8a62..a4f4ab8 100644
--- a/string_list.c
+++ b/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;
}
}