From f3428dead2d1fd1b9cd475c3f10d97e5015c87dc Mon Sep 17 00:00:00 2001 From: mmichelson Date: Wed, 17 Dec 2008 20:51:38 +0000 Subject: Fix some memory leaks found while looking at how realtime configs are handled. Also cleaned up some coding guidelines violations in app_realtime.c, mostly related to spacing git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165255 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_directory.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/app_directory.c') diff --git a/apps/app_directory.c b/apps/app_directory.c index f0236d1f0..23d2b4d62 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -389,6 +389,9 @@ static struct ast_config *realtime_directory(char *context) if (!cat) { ast_log(LOG_WARNING, "Out of memory\n"); ast_config_destroy(cfg); + if (rtdata) { + ast_config_destroy(rtdata); + } return NULL; } ast_category_append(cfg, cat); -- cgit v1.2.3