summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-12-08 13:06:04 +0000
committerTom Hacohen <tom@stosb.com>2015-12-08 13:06:04 +0000
commit5c97073464fff4e048c76852ede99be2f8f8622f (patch)
treec8b3dbf1eb64f65167c86627f4bc1cf40cafd98c /src/examples
parentb97f6643960c3f31f79a22a38e33bfeddb070643 (diff)
downloadelementary-5c97073464fff4e048c76852ede99be2f8f8622f.tar.gz
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
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/performance/performance.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/examples/performance/performance.c b/src/examples/performance/performance.c
index b22219307..e3c7f014f 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++)