aboutsummaryrefslogtreecommitdiffstats
path: root/package/opkg/patches/005-uninitialized_err.patch
blob: 0d3b6cf24cc2d718e45a6da85dedc8049b2b729c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/libopkg/pkg_hash.c
+++ b/libopkg/pkg_hash.c
@@ -384,8 +384,11 @@
      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);