summaryrefslogtreecommitdiff
path: root/src/bin/eldbus
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/eldbus')
-rw-r--r--src/bin/eldbus/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bin/eldbus/utils.c b/src/bin/eldbus/utils.c
index a020445e1d..de4eb1502d 100644
--- a/src/bin/eldbus/utils.c
+++ b/src/bin/eldbus/utils.c
@@ -87,6 +87,11 @@ replace_string(const char *string, const char *substr, const char *replacement)
87 Eina_Strbuf *buffer = eina_strbuf_new(); 87 Eina_Strbuf *buffer = eina_strbuf_new();
88 88
89 pch = strtok(str_cpy, substr); 89 pch = strtok(str_cpy, substr);
90 if (!pch)
91 {
92 eina_strbuf_free(buffer);
93 return str_cpy;
94 }
90 eina_strbuf_append(buffer, pch); 95 eina_strbuf_append(buffer, pch);
91 96
92 while ((pch = strtok(NULL, substr))) 97 while ((pch = strtok(NULL, substr)))