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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user