diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-01 20:35:59 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-01 20:35:59 (EST) |
commit | 25abd20abaaa030fbdc1d1d909874790e36f82b8 (patch) | |
tree | 7251987a8ccb701d683d525d0daebd574e2c7ad3 /libopkg | |
parent | 03f8e73500e85ec1e8920d7c6ccc2a0a1ce4b830 (diff) |
pkg_init_from_file() already does this strdup(), so stop another leak.
git-svn-id: http://opkg.googlecode.com/svn/trunk@235 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r-- | libopkg/opkg_download.c | 2 | ||||
-rw-r--r-- | libopkg/opkg_install.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c index 7dc965b..ee8dc08 100644 --- a/libopkg/opkg_download.c +++ b/libopkg/opkg_download.c @@ -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; diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c index aae72be..601d838 100644 --- a/libopkg/opkg_install.c +++ b/libopkg/opkg_install.c @@ -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); |