From 03d3fb7a7a40f4db59300491e65e14425be18c30 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Thu, 25 Jun 2009 20:09:15 +0000 Subject: [PATCH] Don't try to free NULL git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@203311 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/cli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/cli.c b/main/cli.c index ef3ce6d19e..d633f9cb6d 100644 --- a/main/cli.c +++ b/main/cli.c @@ -1289,7 +1289,9 @@ static char *complete_fn_3(const char *line, const char *word, int pos, int stat c += (strlen(ast_config_AST_MODULE_DIR) + 1); if (c) c = strdup(c); - free(d); + if (d) { + free(d); + } return c; }