aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-21 02:03:23 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-21 02:03:23 +0000
commitf59208b3547f73e655d5d5b6262aaf099a79a54b (patch)
treebbb1faa372cacf2175059cac6609ee8521de9056 /apps
parentdf2a37ab18a6275f742260324b6c8dbc512be514 (diff)
issue #5787
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-2@7163 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_record.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_record.c b/apps/app_record.c
index 7c50a1d73..85310ea70 100755
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -277,6 +277,7 @@ static int record_exec(struct ast_channel *chan, void *data)
if (res) {
ast_log(LOG_WARNING, "Problem writing frame\n");
+ ast_frfree(f);
break;
}
@@ -295,16 +296,15 @@ static int record_exec(struct ast_channel *chan, void *data)
break;
}
}
- }
- if (f->frametype == AST_FRAME_VIDEO) {
+ } else if (f->frametype == AST_FRAME_VIDEO) {
res = ast_writestream(s, f);
if (res) {
ast_log(LOG_WARNING, "Problem writing frame\n");
+ ast_frfree(f);
break;
}
- }
- if ((f->frametype == AST_FRAME_DTMF) &&
+ } else if ((f->frametype == AST_FRAME_DTMF) &&
(f->subclass == terminator)) {
ast_frfree(f);
break;