aboutsummaryrefslogtreecommitdiffstats
path: root/main/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/cli.c')
-rw-r--r--main/cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/cli.c b/main/cli.c
index 6b129bc84..c3cc54d82 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -1426,7 +1426,8 @@ static int __ast_cli_unregister(struct ast_cli_entry *e, struct ast_cli_entry *e
e->_full_cmd = NULL;
if (e->handler) {
/* this is a new-style entry. Reset fields and free memory. */
- memset((char **)(e->cmda), '\0', sizeof(e->cmda));
+ char *cmda = (char *) e->cmda;
+ memset(cmda, '\0', sizeof(e->cmda));
ast_free(e->command);
e->command = NULL;
e->usage = NULL;