elm_cnp: Fix memory leak in error path.
authorStefan Schmidt <s.schmidt@samsung.com>
Mon, 10 Jun 2013 13:53:11 +0000 (14:53 +0100)
committerStefan Schmidt <s.schmidt@samsung.com>
Thu, 13 Jun 2013 09:52:13 +0000 (10:52 +0100)
We allocate info->filename in all cases but missed a free in the error path.

src/lib/elm_cnp.c

index dbec1b1ba35e8895e897c7ce6df2e8867e16ee85..bed7df4e6b2a276533d9f78c28095df5b17b6467 100644 (file)
@@ -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