elementary/map - allocate memory only when it needs

SVN revision: 82850
This commit is contained in:
ChunEon Park 2013-01-16 03:37:32 +00:00
parent 1ed0b739b1
commit 5122a4d821
1 changed files with 2 additions and 2 deletions

View File

@ -2763,10 +2763,10 @@ _xml_name_dump_list_cb(void *data,
Elm_Map_Name *name;
Name_Dump dump = {0, NULL, 0.0, 0.0};
_xml_name_dump_cb(&dump, type, value, offset, length);
name = calloc(1, sizeof(Elm_Map_Name));
if (!name) return EINA_FALSE;
if (dump.address)
{
name = calloc(1, sizeof(Elm_Map_Name));
if (!name) return EINA_FALSE;
name->address = strdup(dump.address);
name->lon = dump.lon;
name->lat = dump.lat;