From 5a3980ed0d8d521cea15d4d46e1856c14cdb4bb5 Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Mon, 15 Dec 2008 05:22:49 +0000 Subject: [PATCH] opkg: Fix a small memory leak in opkg_download. Patch from Alexandros Kostopoulos git-svn-id: http://opkg.googlecode.com/svn/trunk@133 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- libopkg/opkg_download.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.30.2