From 58c5edd9af219be179be04606e09bdb5e92fdd89 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 5 Mar 2014 14:36:39 +0000 Subject: [PATCH] ecore-evas-x: Fix resource leak from eina_str_split_full usage @bugfix: This fixes Coverity CID 1188012 Coverity reported resource leak from eina_str_split_full return which was only being freed if the number was > 0. This is incorrect as eina_str_split_full will still allocate the array and thus it should be freed. Signed-off-by: Chris Michael --- src/modules/ecore_evas/engines/x/ecore_evas_x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c index 5bd261000f..0079c4897a 100644 --- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c +++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c @@ -371,7 +371,7 @@ _ecore_evas_x_aux_hints_supprted_update(Ecore_Evas *ee) eina_list_append(ee->prop.aux_hint.supported_list, hint); } - if (num > 0) + if ((str) && (str[0])) { free(str[0]); free(str);