pkg_init_from_file() already does this strdup(), so stop another leak.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 2 Nov 2009 01:35:59 +0000 (01:35 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 2 Nov 2009 01:35:59 +0000 (01:35 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@235 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/opkg_download.c
libopkg/opkg_install.c

index 7dc965b3ac97c8c319ea7904e0c68073ac7b7f16..ee8dc082ec952129bc6352176a79897735f3f9e5 100644 (file)
@@ -278,7 +278,6 @@ int opkg_prepare_url_for_install(opkg_conf_t *conf, const char *url, char **name
          err = pkg_init_from_file(pkg, tmp_file);
          if (err)
               return err;
-         pkg->local_filename = strdup(tmp_file);
 
          free(tmp_file);
          free(file_basec);
@@ -290,7 +289,6 @@ int opkg_prepare_url_for_install(opkg_conf_t *conf, const char *url, char **name
          err = pkg_init_from_file(pkg, url);
          if (err)
               return err;
-         pkg->local_filename = strdup(url);
          opkg_message(conf, OPKG_DEBUG2, "Package %s provided by hand (%s).\n", pkg->name,pkg->local_filename);
           pkg->provided_by_hand = 1;
 
index aae72be6cb0909e3c675468d3c7e1fdf9d165782..601d8388756f2360c68645496d726c030b34a7f2 100644 (file)
@@ -105,8 +105,6 @@ int opkg_install_from_file(opkg_conf_t *conf, const char *filename)
      pkg = hash_insert_pkg(&conf->pkg_hash, pkg, 1,conf);
      old = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg->name);
 
-     pkg->local_filename = strdup(filename);
-
      if (old) {
          old_version = pkg_version_str_alloc(old);
          new_version = pkg_version_str_alloc(pkg);