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 | bad948c2772f9c147cd9c9c6c4c598a71261c4ed (patch) | |
tree | 65d05b467e2c11cc9ea931a18495fc0c8202c3cb /package | |
parent | ca749bea976300c4c5c2b67e132aefdda8ce1f3e (diff) | |
download | mtk-20170518-bad948c2772f9c147cd9c9c6c4c598a71261c4ed.zip mtk-20170518-bad948c2772f9c147cd9c9c6c4c598a71261c4ed.tar.gz mtk-20170518-bad948c2772f9c147cd9c9c6c4c598a71261c4ed.tar.bz2 |
opkg: fix error message reporting caused by an uninitialized variable
SVN-Revision: 15057
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 0000000..34b8e86 --- /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); + |