opkg: (leak fixing, day 3) fixed final memory leaks fixed reported from
[oweals/opkg-lede.git] / libopkg / pkg_hash.c
index f38c6cada4e89c5399f108b5427d2f06f0219d4c..2fb0d1d8bf4a44639816f11a057ed449326aa73f 100644 (file)
@@ -140,6 +140,7 @@ int pkg_hash_add_from_file(opkg_conf_t *conf, const char *file_name,
               }
               hash_insert_pkg(hash, pkg, is_status_file,conf);
          } else {
+              pkg_deinit (pkg);
               free(pkg);
          }
      }