summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_install.c
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:30:29 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:30:29 (EST)
commit733d8409723a397b4ced39ea7aaab8bc8b4af5d9 (patch)
tree7138fbfc11577cf7d0fbae0ae7fa98a02ef63a8e /libopkg/opkg_install.c
parent1cefade73444d4670d9ae7c06e8f9cc55492fd79 (diff)
opkg: adding the hash_table_remove API, not using yet.
Just complete the API for future usage. Clean all the entry at initial time. This reduces planty of unnecessary check. In order to prevent this kind of bug, using calloc to replace most malloc git-svn-id: http://opkg.googlecode.com/svn/trunk@160 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg_install.c')
-rw-r--r--libopkg/opkg_install.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
index dc014d3..01d5875 100644
--- a/libopkg/opkg_install.c
+++ b/libopkg/opkg_install.c
@@ -597,7 +597,7 @@ static int pkg_remove_orphan_dependent(opkg_conf_t *conf, pkg_t *pkg, pkg_t *old
if (found)
continue;
d_str = old_pkg->depends_str[i];
- buf = malloc (strlen (d_str) + 1);
+ buf = calloc (1, strlen (d_str) + 1);
j=0;
while (d_str[j] != '\0' && d_str[j] != ' ') {
buf[j]=d_str[j];