Bugzilla Bug 238563: added a comment that Nelson suggested in code review.

git-svn-id: svn://10.0.0.236/trunk@170807 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtchang%redhat.com
2005-03-16 23:21:11 +00:00
parent 90cdb4aa85
commit 85aa04fb7d

View File

@@ -355,6 +355,11 @@ pr_ZoneRealloc(void *oldptr, PRUint32 bytes)
/* We don't know how big it is. But we can fix that. */
oldptr = realloc(oldptr, bytes);
/*
* If realloc returns NULL, this function loses the original
* value of oldptr. This isn't a leak because the caller of
* this function still has the original value of oldptr.
*/
if (!oldptr) {
if (bytes) {
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);