summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-11-23 21:46:08 +0000
committerChristian Pointner <equinox@anytun.org>2009-11-23 21:46:08 +0000
commit5f67b7406597044de498f536a63123624795a194 (patch)
tree896166a9b9d852a763403fa68004ce08b49b422c /src
parentfixed typo at include guards (diff)
fixed memory error at string_list
Diffstat (limited to 'src')
-rw-r--r--src/string_list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string_list.c b/src/string_list.c
index e5e8a62..a4f4ab8 100644
--- a/src/string_list.c
+++ b/src/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;
}
}