From: Terry Wilson Date: Thu, 25 Jun 2009 20:09:15 +0000 (+0000) Subject: Don't try to free NULL X-Git-Tag: 1.4.26~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03d3fb7a7a40f4db59300491e65e14425be18c30;p=thirdparty%2Fasterisk.git Don't try to free NULL git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@203311 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- 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; }