From 4700f8d3464525ce3405d4d00e6fb9e2d832798f Mon Sep 17 00:00:00 2001 From: seanbright Date: Sat, 29 Jan 2011 18:08:14 +0000 Subject: If we fail to allocate our announcement objects, make sure we don't leak objects. The majority of this patch was committed already in r304726 and r304729. (issue #18225) Reported by: kenji (issue #18444) Reported by: junky (closes issue #18343) Reported by: kobaz Patches: meetme-refs.diff uploaded by kobaz (license 834) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@304776 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_meetme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app_meetme.c b/apps/app_meetme.c index ab34b49a3..647b3af6b 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -2475,7 +2475,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c if (!(confflags & CONFFLAG_QUIET) && ((confflags & CONFFLAG_INTROUSER) || (confflags & CONFFLAG_INTROUSERNOREVIEW)) && conf->users > 1) { struct announce_listitem *item; if (!(item = ao2_alloc(sizeof(*item), NULL))) - return -1; + goto outrun; ast_copy_string(item->namerecloc, user->namerecloc, sizeof(item->namerecloc)); ast_copy_string(item->language, chan->language, sizeof(item->language)); item->confchan = conf->chan; @@ -3375,7 +3375,7 @@ bailoutandtrynormal: if (!(confflags & CONFFLAG_QUIET) && ((confflags & CONFFLAG_INTROUSER) || (confflags & CONFFLAG_INTROUSERNOREVIEW)) && conf->users > 1) { struct announce_listitem *item; if (!(item = ao2_alloc(sizeof(*item), NULL))) - return -1; + goto outrun; ast_copy_string(item->namerecloc, user->namerecloc, sizeof(item->namerecloc)); ast_copy_string(item->language, chan->language, sizeof(item->language)); item->confchan = conf->chan; -- cgit v1.2.3