stefan pushed a commit to branch elementary-1.7.

commit b776fb27f90ddc8b61f2caea73468ddb4cd3b090
Author: Stefan Schmidt <[email protected]>
Date:   Mon Jun 10 14:53:11 2013 +0100

    elm_cnp: Fix memory leak in error path.
    
    We allocate info->filename in all cases but missed a free in the error path.
---
 src/lib/elm_cnp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index dbec1b1..bed7df4 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -1921,6 +1921,7 @@ _tempfile_new(int size)
    /* Set map to NULL and return */
    info->map = NULL;
    info->len = 0;
+   free(info->filename);
    free(info);
    return NULL;
 #else

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to