r4481 - trunk/src/target/opkg/libopkg

thomas at docs.openmoko.org thomas at docs.openmoko.org
Mon Jun 9 17:56:30 CEST 2008


Author: thomas
Date: 2008-06-09 17:56:29 +0200 (Mon, 09 Jun 2008)
New Revision: 4481

Modified:
   trunk/src/target/opkg/libopkg/opkg_download.c
Log:
opkg: Fix a small memory leak in opkg_download.
      Patch from Alexandros Kostopoulos <akostop at inaccessnetworks.com>


Modified: trunk/src/target/opkg/libopkg/opkg_download.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_download.c	2008-06-09 02:10:18 UTC (rev 4480)
+++ trunk/src/target/opkg/libopkg/opkg_download.c	2008-06-09 15:56:29 UTC (rev 4481)
@@ -49,6 +49,7 @@
 	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 @@
 	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;
     }
 





More information about the commitlog mailing list