cedric pushed a commit to branch master.

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

commit d25d56758c735cdf5760278f8a97e9c6b8ec7355
Author: kabeer khan <kabeer.k...@samsung.com>
Date:   Mon Dec 22 11:55:44 2014 +0100

    eet: fix memory leak in eet_cipher
    
    Summary: Signed-off-by: kabeer khan <kabeer.k...@samsung.com>
    
    @fix
    
    Reviewers: devilhorns
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1799
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/eet/eet_cipher.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/eet/eet_cipher.c b/src/lib/eet/eet_cipher.c
index 2dd4d07..66ee245 100644
--- a/src/lib/eet/eet_cipher.c
+++ b/src/lib/eet/eet_cipher.c
@@ -1110,8 +1110,10 @@ eet_decipher(const void   *data,
 
    err = gcry_cipher_setiv(cipher, iv, MAX_IV_LEN);
    if (err)
-     goto on_error;
-
+     {
+        free(ret);
+        goto on_error;
+     }
    err = gcry_cipher_setkey(cipher, ik, MAX_KEY_LEN);
    if (err)
      goto on_error;

-- 


Reply via email to