aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_voicemail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 96973623f..4402d4d4f 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);