summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_install.c
diff options
context:
space:
mode:
authorgraham.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)
commit11af232b19155c76002b5ca1f2b0e89d75699d3a (patch)
tree5e113943ec678935d2ae1ac60b7e70bd49165f6e /libopkg/opkg_install.c
parentedf1b1964b565726a0b0f730b109e4491c7929b9 (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/opkg_install.c')
-rw-r--r--libopkg/opkg_install.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
index e726867..2d5bb4e 100644
--- a/libopkg/opkg_install.c
+++ b/libopkg/opkg_install.c
@@ -44,6 +44,7 @@ typedef void (*sighandler_t)(int);
#include "str_util.h"
#include "xsystem.h"
#include "user.h"
+#include "libbb/libbb.h"
static int verify_pkg_installable(opkg_conf_t *conf, pkg_t *pkg);
static int unpack_pkg_control_files(opkg_conf_t *conf, pkg_t *pkg);
@@ -1135,7 +1136,7 @@ static int preinst_configure(opkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg)
sprintf_alloc(&preinst_args, "install %s", pkg_version);
free(pkg_version);
} else {
- preinst_args = strdup("install");
+ preinst_args = xstrdup("install");
}
err = pkg_run_script(conf, pkg, "preinst", preinst_args);