tasn pushed a commit to branch master.

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

commit 896c18045aafb9c677d8d41b4876c47db2b4d5ce
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Oct 9 12:32:37 2015 +0100

    Eeze sensor udev: Fix memory leak and possible crash.
    
    Due to a misplaced semicolon, EINA_LIST_FREE was doing nothing and only
    the last part was freed if there was one, and probably a crash if there
    wasn't.
    
    This shows again that having statements without {} is dangerous. We need
    to force {} and add a lint rule, or at the very least, add a rule to put
    the ; in a new line (like clang warns about by default anyway).
    
    (Same as issue found in previous commit)
    
    @fix
---
 src/modules/eeze/sensor/udev/udev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/eeze/sensor/udev/udev.c 
b/src/modules/eeze/sensor/udev/udev.c
index 3e7e6b3..cf52cd3 100644
--- a/src/modules/eeze/sensor/udev/udev.c
+++ b/src/modules/eeze/sensor/udev/udev.c
@@ -48,7 +48,7 @@ udev_shutdown(void)
 {
    char *data;
 
-   EINA_LIST_FREE(devices, data);
+   EINA_LIST_FREE(devices, data)
      free(data);
 
    return EINA_TRUE;

-- 


Reply via email to