summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_index.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index 83194a779..7f3cb39e0 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -770,14 +770,17 @@ _sel_eval(Evas_Object *obj,
770 { 770 {
771 if (label && last) 771 if (label && last)
772 { 772 {
773 label = realloc(label, strlen(label) + 773 char *temp;
774
775 temp = realloc(label, strlen(label) +
774 strlen(last) + 1); 776 strlen(last) + 1);
775 if (!label) 777 if (!temp)
776 { 778 {
779 free(label);
777 free(last); 780 free(last);
778 return; 781 return;
779 } 782 }
780 strcat(label, last); 783 label = strcat(temp, last);
781 } 784 }
782 } 785 }
783 free(last); 786 free(last);