forked from enlightenment/efl
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
This commit is contained in:
parent
e54fd09c34
commit
896c18045a
|
@ -48,7 +48,7 @@ udev_shutdown(void)
|
||||||
{
|
{
|
||||||
char *data;
|
char *data;
|
||||||
|
|
||||||
EINA_LIST_FREE(devices, data);
|
EINA_LIST_FREE(devices, data)
|
||||||
free(data);
|
free(data);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
Loading…
Reference in New Issue