summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2006-11-20 20:04:11 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2006-11-20 20:04:11 +0000
commite78c50a201b8921d6d59eb86872c63d271b26720 (patch)
tree5ddbeb6c8faaff51d8f1be5673543d3641d5d444 /apps
parentdcba38ebaf66e900ae9b435ccef0a62cf4374a36 (diff)
Merged revisions 47864-47865 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47864 | tilghman | 2006-11-20 14:01:58 -0600 (Mon, 20 Nov 2006) | 2 lines Oops, merge missed release of odbc object ........ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index dbf306ec3..da34569b3 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1109,8 +1109,14 @@ static int retrieve_file(char *dir, int msgnum)
fd = -1;
continue;
}
- if (fd > -1)
- fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ if (fd > -1) {
+ if ((fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == -1) {
+ ast_log(LOG_WARNING, "Could not mmap the output file: %s (%d)\n", strerror(errno), errno);
+ SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+ ast_odbc_release_obj(obj);
+ goto yuck;
+ }
+ }
}
if (fdm) {
memset(fdm, 0, fdlen);