From bad948c2772f9c147cd9c9c6c4c598a71261c4ed Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 28 Mar 2009 20:39:19 +0000 Subject: [PATCH] opkg: fix error message reporting caused by an uninitialized variable SVN-Revision: 15057 --- package/opkg/patches/005-uninitialized_err.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 package/opkg/patches/005-uninitialized_err.patch diff --git a/package/opkg/patches/005-uninitialized_err.patch b/package/opkg/patches/005-uninitialized_err.patch new file mode 100644 index 0000000000..34b8e86b1b --- /dev/null +++ b/package/opkg/patches/005-uninitialized_err.patch @@ -0,0 +1,16 @@ +--- a/libopkg/pkg_hash.c ++++ b/libopkg/pkg_hash.c +@@ -367,8 +367,11 @@ pkg_t *pkg_hash_fetch_best_installation_ + abstract_pkg_t *apkg = NULL; + pkg_t *ret; + +- if (!(apkg = abstract_pkg_fetch_by_name(hash, name))) +- return NULL; ++ if (!(apkg = abstract_pkg_fetch_by_name(hash, name))) { ++ if (err) ++ *err = 0; ++ return NULL; ++ } + + ret = pkg_hash_fetch_best_installation_candidate(conf, apkg, pkg_name_constraint_fcn, apkg->name, 0, err); + -- 2.30.2