diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-03 22:14:59 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-03 22:14:59 (EST) |
commit | 11af232b19155c76002b5ca1f2b0e89d75699d3a (patch) | |
tree | 5e113943ec678935d2ae1ac60b7e70bd49165f6e /libopkg/pkg_depends.c | |
parent | edf1b1964b565726a0b0f730b109e4491c7929b9 (diff) |
s/strdup/xstrdup/ - check memory allocations for failure.
git-svn-id: http://opkg.googlecode.com/svn/trunk@255 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/pkg_depends.c')
-rw-r--r-- | libopkg/pkg_depends.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c index e5c50c9..6ce9fdd 100644 --- a/libopkg/pkg_depends.c +++ b/libopkg/pkg_depends.c @@ -25,6 +25,7 @@ #include "opkg_message.h" #include "pkg_parse.h" #include "hash_table.h" +#include "libbb/libbb.h" static int parseDepends(compound_depend_t *compound_depend, hash_table_t * hash, char * depend_str); static depend_t * depend_init(void); @@ -609,7 +610,7 @@ char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx) fprintf(stderr, "%s: out of memory\n", __FUNCTION__); return NULL; } - resized[count - 1] = strdup(depend_str); + resized[count - 1] = xstrdup(depend_str); resized[count] = NULL; return resized; |