raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a725924b5398140ec25b6bc81f087345d6a03feb

commit a725924b5398140ec25b6bc81f087345d6a03feb
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Thu Feb 13 18:57:01 2014 +0900

    evas - filter - fix memory leak if cmd not found by curve cmd
---
 src/lib/evas/filters/evas_filter.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 0609118..f481a24 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1116,7 +1116,11 @@ evas_filter_command_curve_add(Evas_Filter_Context *ctx,
    if (!copy) return -1;
 
    cmd = _command_new(ctx, EVAS_FILTER_MODE_CURVE, in, NULL, out);
-   if (!cmd) return -1;
+   if (!cmd)
+     {
+        free(copy);
+        return -1;
+     }
 
    memcpy(copy, curve, 256 * sizeof(DATA8));
    cmd->curve.data = copy;

-- 


Reply via email to