projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
693e1ba
)
fixed memory error at string list
author
Christian Pointner
<equinox@realraum.at>
Mon, 23 Nov 2009 21:50:05 +0000
(21:50 +0000)
committer
Christian Pointner
<equinox@realraum.at>
Mon, 23 Nov 2009 21:50:05 +0000
(21:50 +0000)
door_daemon/string_list.c
patch
|
blob
|
history
diff --git
a/door_daemon/string_list.c
b/door_daemon/string_list.c
index
e5e8a62
..
a4f4ab8
100644
(file)
--- 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;
}
}