aboutsummaryrefslogtreecommitdiffstats
path: root/reference
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-05-01 13:14:42 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-05-01 13:14:42 -0400
commit09923d92c2936c086b738c6001c53ebd17e36f13 (patch)
tree74ff9b8bb040fd6d5f9f4436b5870ae97d6f082f /reference
parentUpdate examples to latest EFL API (diff)
downloadexamples-09923d92c2936c086b738c6001c53ebd17e36f13.tar.gz
Fix double frees and incorrect nprintf in eina_string example
Reviewers: cedric, ajwillia.ms, zmike Differential Revision: https://phab.enlightenment.org/D6012
Diffstat (limited to 'reference')
-rw-r--r--reference/c/eina/src/eina_string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/reference/c/eina/src/eina_string.c b/reference/c/eina/src/eina_string.c
index 4e2e95dc..43e7f3ce 100644
--- a/reference/c/eina/src/eina_string.c
+++ b/reference/c/eina/src/eina_string.c
@@ -53,7 +53,6 @@ _string_case()
eina_str_toupper(&str);
printf(" Upper: %s\n", str);
- free(str);
eina_str_tolower(&str);
printf(" Lower: %s\n", str);
@@ -130,7 +129,7 @@ _string_share()
str = eina_stringshare_printf(line2, 12, 3, 4, "four");
printf("Line2: %s\n", str);
eina_stringshare_del(str);
- str = eina_stringshare_nprintf(48, line2, 12, 7, 5);
+ str = eina_stringshare_nprintf(48, line2, 12, 7, 5, "four");
printf(" format limit (len %d): %s...\n", eina_stringshare_strlen(str), str);
eina_stringshare_del(str);