mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 00:14:05 +02:00
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
This commit is contained in:
parent
dbaa421297
commit
9605107ade
16
package/opkg/patches/005-uninitialized_err.patch
Normal file
16
package/opkg/patches/005-uninitialized_err.patch
Normal file
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user