[asterisk-commits] tilghman: trunk r47866 - in /trunk: ./ apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 20 13:04:12 MST 2006


Author: tilghman
Date: Mon Nov 20 14:04:11 2006
New Revision: 47866

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47866
Log:
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

........
........

Modified:
    trunk/   (props changed)
    trunk/apps/app_voicemail.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=47866&r1=47865&r2=47866
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Mon Nov 20 14:04:11 2006
@@ -1109,8 +1109,14 @@
 						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);



More information about the asterisk-commits mailing list