summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-07-03 23:22:11 (EDT)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-07-03 23:22:11 (EDT)
commit37c40a63c9990377512c6345a32b3b645d1f29a4 (patch)
tree76403fda7e656bf8123e9069c02b7a3d4e46eaae
parent2bd54b21c7e9fcef7eb288d298795b12538e84db (diff)
Fix issue on "Segmentation fault on package removal"
Thanks to http://code.google.com/u/kosmaty/ Find the issue and fix it. http://code.google.com/p/opkg/issues/detail?id=13 git-svn-id: http://opkg.googlecode.com/svn/trunk@215 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r--libopkg/str_list.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libopkg/str_list.c b/libopkg/str_list.c
index 563f3a1..f4cc136 100644
--- a/libopkg/str_list.c
+++ b/libopkg/str_list.c
@@ -75,10 +75,11 @@ str_list_elt_t *str_list_pop(str_list_t *list)
void str_list_remove(str_list_t *list, str_list_elt_t **iter)
{
- str_list_elt_t * elt = void_list_remove((void_list_t *) list,
+ char *str = void_list_remove((void_list_t *) list,
(void_list_elt_t **) iter);
- str_list_elt_deinit(elt);
+ if (str)
+ free(str);
}
void str_list_remove_elt(str_list_t *list, const char *target_str)