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:
Tom Hacohen 2015-10-09 12:32:37 +01:00
parent e54fd09c34
commit 896c18045a
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ udev_shutdown(void)
{
char *data;
EINA_LIST_FREE(devices, data);
EINA_LIST_FREE(devices, data)
free(data);
return EINA_TRUE;