diff --git a/apps/app_record.c b/apps/app_record.c index a87d6cf718..ce6736d89b 100644 --- a/apps/app_record.c +++ b/apps/app_record.c @@ -356,6 +356,7 @@ static int record_exec(struct ast_channel *chan, void *data) if (!f) { ast_debug(1, "Got hangup\n"); res = -1; + ast_filedelete(args.filename, NULL); } if (gotsilence) {