From: Sebastian Dransfeld Date: Sat, 6 Nov 2010 18:13:57 +0000 (+0000) Subject: Don't allow NULL id X-Git-Tag: submit/efl/20131021.015651~6664 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7867b41c98b6cc0668f6e183fe88b13b8277ffa7;p=platform%2Fupstream%2Fenlightenment.git Don't allow NULL id This fixes #567 SVN revision: 54243 --- diff --git a/src/bin/e_gadcon.c b/src/bin/e_gadcon.c index 8e8808a..2560820 100644 --- a/src/bin/e_gadcon.c +++ b/src/bin/e_gadcon.c @@ -776,8 +776,13 @@ e_gadcon_client_config_new(E_Gadcon *gc, const char *name) cf_gcc = E_NEW(E_Config_Gadcon_Client, 1); if (!cf_gcc) return NULL; - cf_gcc->name = eina_stringshare_add(name); cf_gcc->id = eina_stringshare_add(cc->func.id_new(cc)); + if (!cf_gcc->id) + { + free(cf_gcc); + return NULL; + } + cf_gcc->name = eina_stringshare_add(name); if (gc->zone) cf_gcc->geom.res = gc->zone->w; else