[PATCH] set errno for malloc failures

Bob Wilson bwilson@tensilica.com
Thu Oct 6 20:19:00 GMT 2005


The malloc/realloc/memalign functions in newlib do not set errno when they fail. 
  Here is a patch to correct the problem.

2005-10-06  Bob Wilson  <bob.wilson@acm.org>

	* libc/stdlib/mallocr.c (mALLOc, rEALLOCc, mEMALIGn): Set errno
	to ENOMEM on failure.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: malloc-errno.diff
Type: text/x-patch
Size: 1261 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20051006/6304fc62/attachment.bin>


More information about the Newlib mailing list