]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't try to free NULL
authorTerry Wilson <twilson@digium.com>
Thu, 25 Jun 2009 20:09:15 +0000 (20:09 +0000)
committerTerry Wilson <twilson@digium.com>
Thu, 25 Jun 2009 20:09:15 +0000 (20:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@203311 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cli.c

index ef3ce6d19e453e41deacedb0f676fdebf0c419e8..d633f9cb6dfe796812299682f50d90f81f70eb67 100644 (file)
@@ -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;
 }