summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
Eina_Strbuf *buffer = eina_strbuf_new();
pch = strtok(str_cpy, substr);
+ if (!pch)
+ {
+ eina_strbuf_free(buffer);
+ return str_cpy;
+ }
eina_strbuf_append(buffer, pch);
while ((pch = strtok(NULL, substr)))