diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-10 19:03:04 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-10 19:03:04 +0000 |
commit | 3d2e5fea00474966a960bcf1ed66f5bad2801f7b (patch) | |
tree | 2c51dcec4fc21efe8017ad5ac75d0147c874c472 /main/cli.c | |
parent | 45f02f8778073089b804b333ce960a83bda3c7d7 (diff) |
Check pointers before freeing (was getting WARNINGS under MALLOC_DEBUG)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97825 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cli.c')
-rw-r--r-- | main/cli.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/cli.c b/main/cli.c index 72cd8152f..8813c6a3f 100644 --- a/main/cli.c +++ b/main/cli.c @@ -135,7 +135,8 @@ 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; } |