[asterisk-commits] mmichelson: branch 1.6.1 r157636 - in /branches/1.6.1: ./ main/astmm.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 18 19:00:45 CST 2008


Author: mmichelson
Date: Tue Nov 18 19:00:44 2008
New Revision: 157636

URL: http://svn.digium.com/view/asterisk?view=rev&rev=157636
Log:
Merged revisions 157632 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r157632 | mmichelson | 2008-11-18 18:59:48 -0600 (Tue, 18 Nov 2008) | 10 lines

If malloc returns NULL, we need to  return NULL immediately or
else Asterisk will crash when attempting to dereference the NULL
pointer

(closes issue #13858)
Reported by: eliel
Patches:
      astmm.c.patch uploaded by eliel (license 64)


........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/astmm.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/astmm.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/astmm.c?view=diff&rev=157636&r1=157635&r2=157636
==============================================================================
--- branches/1.6.1/main/astmm.c (original)
+++ branches/1.6.1/main/astmm.c Tue Nov 18 19:00:44 2008
@@ -114,6 +114,7 @@
 	if (!(reg = malloc(size + sizeof(*reg) + sizeof(*fence)))) {
 		astmm_log("Memory Allocation Failure - '%d' bytes in function %s "
 			  "at line %d of %s\n", (int) size, func, lineno, file);
+		return NULL;
 	}
 
 	ast_copy_string(reg->file, file, sizeof(reg->file));




More information about the asterisk-commits mailing list