From 98ce0e5b6c811ff8037e3267323f39a046c0badc Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Thu, 28 May 2009 15:35:23 +0000 Subject: 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: https://origsvn.digium.com/svn/asterisk/trunk@197616 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/cli.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'main/cli.c') 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; } -- cgit v1.2.3