diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-28 15:35:23 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-28 15:35:23 +0000 |
commit | 7e7b82276dae7b2f51af7ab1195a2926f761aa93 (patch) | |
tree | ccd75c3d71febe30e9333c58f5acfa463b350934 /main/cli.c | |
parent | 5a0851702a9261f82de75dd7ad787c81c92370e3 (diff) |
Eliminate several needless checks and fix a few memory leaks
(closes issue #14833)
Reported by: contactmayankjain
Patches:
all_changes.patch uploaded by contactmayankjain (license 740)
slightly modified by me
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@197616 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cli.c')
-rw-r--r-- | main/cli.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/cli.c b/main/cli.c index 136d56a1e..1bfe263f0 100644 --- a/main/cli.c +++ b/main/cli.c @@ -235,8 +235,7 @@ static char *complete_fn(const char *word, int state) c += (strlen(ast_config_AST_MODULE_DIR) + 1); if (c) c = ast_strdup(c); - if (d) - free(d); + free(d); return c; } |