From: Kevin P. Fleming Date: Wed, 12 Jul 2006 15:53:53 +0000 (+0000) Subject: fix a weird case where a lock file could be left (but would happen almost never) X-Git-Tag: 1.2.10~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff3890a952daf78bdc5ae56d46c384c8a0bd4d73;p=thirdparty%2Fasterisk.git fix a weird case where a lock file could be left (but would happen almost never) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37442 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 96973623f3..4402d4d4fe 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2617,7 +2617,8 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_ } else if (ast_fileexists(tmptxtfile, NULL, NULL) <= 0) { if (option_debug) ast_log(LOG_DEBUG, "The recorded media file is gone, so we should remove the .txt file too!\n"); - unlink(tmptxtfile); + unlink(tmptxtfile); + ast_unlock_path(dir); } else { for (;;) { make_file(fn, sizeof(fn), dir, msgnum);