elm_index: Also free last on error path.

If we can't realloc label we need to free last before we can return
or we leak it.

CID: 1193240
This commit is contained in:
Stefan Schmidt 2014-06-17 11:12:04 +02:00
parent d3b0bb58a4
commit 9cf70c353a
1 changed files with 5 additions and 1 deletions

View File

@ -652,7 +652,11 @@ _sel_eval(Evas_Object *obj,
{
label = realloc(label, strlen(label) +
strlen(last) + 1);
if (!label) return;
if (!label)
{
free(last);
return;
}
strcat(label, last);
}
}