aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli.c b/cli.c
index fa33bcc33..e5fc66120 100755
--- a/cli.c
+++ b/cli.c
@@ -873,7 +873,7 @@ static char *__ast_cli_generator(char *text, char *word, int state, int lock)
if (lock)
ast_pthread_mutex_unlock(&clilock);
free(dup);
- return res ? res : NULL;
+ return res ? strdup(res) : NULL;
}
}
}