Merged revisions 203311 via svnmerge from
authorTerry Wilson <twilson@digium.com>
Thu, 25 Jun 2009 20:25:39 +0000 (20:25 +0000)
committerTerry Wilson <twilson@digium.com>
Thu, 25 Jun 2009 20:25:39 +0000 (20:25 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r203311 | twilson | 2009-06-25 15:09:15 -0500 (Thu, 25 Jun 2009) | 2 lines

  Don't try to free NULL
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203338 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cli.c

index d1d4bb3..d8814f0 100644 (file)
@@ -235,7 +235,9 @@ static char *complete_fn(const char *word, int state)
                c += (strlen(ast_config_AST_MODULE_DIR) + 1);
        if (c)
                c = ast_strdup(c);
-       free(d);
+       if (d) {
+               free(d);
+       }
        
        return c;
 }