diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-03-28 20:39:19 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-03-28 20:39:19 +0000 |
commit | bf44f7b388dd8d9d7fd99e2aabdfd1eb72b675bd (patch) | |
tree | 25c70dae4f058b5c9420f2bddaeab8c55d80ff91 /package | |
parent | 9899ab0de2e8c3706f0a8f56d315f2c1c92bf651 (diff) | |
download | upstream-bf44f7b388dd8d9d7fd99e2aabdfd1eb72b675bd.tar.gz upstream-bf44f7b388dd8d9d7fd99e2aabdfd1eb72b675bd.tar.bz2 upstream-bf44f7b388dd8d9d7fd99e2aabdfd1eb72b675bd.zip |
opkg: fix error message reporting caused by an uninitialized variable
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15057 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/opkg/patches/005-uninitialized_err.patch | 16 |
1 files changed, 16 insertions, 0 deletions
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); + |