The following commit has been merged in the master branch:
commit efa6e49193f7948de103bada19de40720a7774fb
Author: Guillem Jover <[email protected]>
Date:   Fri Feb 4 19:45:01 2011 +0100

    dpkg: Use m_realloc() instead of free()+m_malloc() on process_archive()

diff --git a/src/processarc.c b/src/processarc.c
index 00b9504..bbfa333 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -224,9 +224,7 @@ void process_archive(const char *filename) {
     if (!tmpdir)
       ohshite(_("unable to create temporary directory"));
 
-    if (!cidir)
-      free(cidir);
-    cidir = m_malloc(strlen(tmpdir) + MAXCONTROLFILENAME + 10);
+    cidir = m_realloc(cidir, strlen(tmpdir) + MAXCONTROLFILENAME + 10);
     strcpy(cidir, tmpdir);
     strcat(cidir,"/");
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to