diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-14 00:58:01 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-14 00:58:01 (EST) |
commit | 2da4982d7fcf037361e31dd29768903f7d5101d9 (patch) | |
tree | 9ff7c42b495675561509da64de3ff5173be2a67d | |
parent | f5561428256847e24e7a5a688f26a92d12372f75 (diff) |
Fix what I broke in r468.
git-svn-id: http://opkg.googlecode.com/svn/trunk@492 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r-- | libopkg/opkg_download.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c index 81ce53d..fc97d34 100644 --- a/libopkg/opkg_download.c +++ b/libopkg/opkg_download.c @@ -86,8 +86,6 @@ opkg_download(const char *src, const char *dest_file_name, char *src_base = basename(src_basec); char *tmp_file_location; - free(src_basec); - opkg_msg(NOTICE,"Downloading %s.\n", src); if (str_starts_with(src, "file:")) { @@ -95,10 +93,12 @@ opkg_download(const char *src, const char *dest_file_name, opkg_msg(INFO, "Copying %s to %s...", file_src, dest_file_name); err = file_copy(file_src, dest_file_name); opkg_msg(INFO, "Done.\n"); + free(src_basec); return err; } sprintf_alloc(&tmp_file_location, "%s/%s", conf->tmp_dir, src_base); + free(src_basec); err = unlink(tmp_file_location); if (err && errno != ENOENT) { opkg_perror(ERROR, "Failed to unlink %s", tmp_file_location); |