summaryrefslogtreecommitdiff
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
parent0448e6cfa48e4a69978356147c08b57091db36d6 (diff)
Fix double frees and incorrect nprintf in eina_string example
Reviewers: cedric, ajwillia.ms, zmike Differential Revision: https://phab.enlightenment.org/D6012
-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()
53 53
54 eina_str_toupper(&str); 54 eina_str_toupper(&str);
55 printf(" Upper: %s\n", str); 55 printf(" Upper: %s\n", str);
56 free(str);
57 56
58 eina_str_tolower(&str); 57 eina_str_tolower(&str);
59 printf(" Lower: %s\n", str); 58 printf(" Lower: %s\n", str);
@@ -130,7 +129,7 @@ _string_share()
130 str = eina_stringshare_printf(line2, 12, 3, 4, "four"); 129 str = eina_stringshare_printf(line2, 12, 3, 4, "four");
131 printf("Line2: %s\n", str); 130 printf("Line2: %s\n", str);
132 eina_stringshare_del(str); 131 eina_stringshare_del(str);
133 str = eina_stringshare_nprintf(48, line2, 12, 7, 5); 132 str = eina_stringshare_nprintf(48, line2, 12, 7, 5, "four");
134 printf(" format limit (len %d): %s...\n", eina_stringshare_strlen(str), str); 133 printf(" format limit (len %d): %s...\n", eina_stringshare_strlen(str), str);
135 eina_stringshare_del(str); 134 eina_stringshare_del(str);
136 135