Free memory when there are unresolved dependencies.
[project/opkg-lede.git] / libopkg / pkg_depends.c
index 6355fe3fe4416a202a4d6ef978e481f817fd208d..9fe9a71b370fd96bcb586fc091eb18332f846028 100644 (file)
@@ -236,6 +236,8 @@ int pkg_hash_fetch_unsatisfied_dependencies(opkg_conf_t *conf, pkg_t * pkg,
                                                                      unsatisfied,
                                                                      &newstuff);
                              the_lost = merge_unresolved(the_lost, newstuff);
+                             if (newstuff)
+                                  free(newstuff);
                         }
                    }
               }