tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=5c97073464fff4e048c76852ede99be2f8f8622f

commit 5c97073464fff4e048c76852ede99be2f8f8622f
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Dec 8 13:06:04 2015 +0000

    Examples performance: Fix resource leak + potential null deref.
    
    This example is completely broken and doesn't make much sense. Should be
    overhauled and probably rewritten/dumped.
    
    This is just to fix the more obvious errors (some pointed out by coverity).
    
    CID1327356
---
 src/examples/performance/performance.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/examples/performance/performance.c 
b/src/examples/performance/performance.c
index b222193..e3c7f01 100644
--- a/src/examples/performance/performance.c
+++ b/src/examples/performance/performance.c
@@ -493,15 +493,14 @@ _cb_fps_enable(void *data, Evas_Object *obj, void 
*event_info)
 }
 
 static void
-_load_mesh(void *data, Evas_Object *obj, void *event_info)
+_load_mesh(void *data EINA_UNUSED, Evas_Object *obj, void *event_info)
 {
-   char *format = NULL, *tmp = NULL, *a = NULL;
+   char *format = NULL, *a = NULL;
    char name[FILENAME_MAX];
    int i = 0, j = 0;
-   if (event_info)  tmp = strdup(event_info);
-   if (data) tmp = strdup((char *)data);
-   if (tmp)
+   if (event_info)
      {
+        char *tmp = NULL;
         tmp = strdup(event_info);
         /*Get filename in backward*/
         for (i = strlen(tmp) - 1; i >= 0; i--, j++)

-- 


Reply via email to