Fix memleak of window_prop_property_get

NB: Fixes Coverity CID1039274

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-08 12:34:28 +01:00
parent a01ce5e409
commit d7600cfbee
1 changed files with 8 additions and 1 deletions

View File

@ -201,12 +201,19 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
t = realloc(_version_cache, _version_cache_alloc *
sizeof(Version_Cache_Item));
if (!t) return 0;
if (!t)
{
if (prop_data) free(prop_data);
return 0;
}
_version_cache = t;
_version_cache[_version_cache_num - 1].win = win;
_version_cache[_version_cache_num - 1].ver = 0;
}
if (prop_data) free(prop_data);
return 0;
}