summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:22:49 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:22:49 (EST)
commit5a3980ed0d8d521cea15d4d46e1856c14cdb4bb5 (patch)
tree2a622b1c359324015a3c5b1fb110a033d9f5155f /libopkg
parent4796dea1d78740c3ec80b4ace385f47a916e9e3e (diff)
opkg: Fix a small memory leak in opkg_download.
Patch from Alexandros Kostopoulos <akostop@inaccessnetworks.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@133 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/opkg_download.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c
index 7c64a5b..629aa79 100644
--- a/libopkg/opkg_download.c
+++ b/libopkg/opkg_download.c
@@ -49,6 +49,7 @@ int opkg_download(opkg_conf_t *conf, const char *src, const char *dest_file_name
opkg_message(conf,OPKG_INFO,"Copying %s to %s...", file_src, dest_file_name);
ret = file_copy(src + 5, dest_file_name);
opkg_message(conf,OPKG_INFO,"Done\n");
+ free(src_basec);
return ret;
}
@@ -58,6 +59,7 @@ int opkg_download(opkg_conf_t *conf, const char *src, const char *dest_file_name
opkg_message(conf,OPKG_ERROR, "%s: ERROR: failed to unlink %s: %s\n",
__FUNCTION__, tmp_file_location, strerror(errno));
free(tmp_file_location);
+ free(src_basec);
return errno;
}