aboutsummaryrefslogtreecommitdiffstats
path: root/main/cli.c
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-25 20:09:15 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-25 20:09:15 +0000
commit63c12cc1147129ad028a46f8b9c8974b9edf4343 (patch)
treec2841e9af3eaf624a5664ae539a2736b1339e0f3 /main/cli.c
parentba1f572ed75f61b72213e78fc5091bdd5c987ad2 (diff)
Don't try to free NULL
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@203311 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cli.c')
-rw-r--r--main/cli.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/cli.c b/main/cli.c
index ef3ce6d19..d633f9cb6 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;
}