mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Backout the last change, undoing the fix for bug 320336 and bug 333405.
This commit is contained in:
parent
f400d8d165
commit
f02321e973
@ -37,7 +37,7 @@
|
||||
/*
|
||||
* Support routines for SECItem data structure.
|
||||
*
|
||||
* $Id: secitem.c,v 1.12 2006/04/24 22:50:13 wtchang%redhat.com Exp $
|
||||
* $Id: secitem.c,v 1.13 2006/04/25 04:39:24 nelson%bolyard.com Exp $
|
||||
*/
|
||||
|
||||
#include "seccomon.h"
|
||||
@ -65,17 +65,17 @@ SECITEM_AllocItem(PRArenaPool *arena, SECItem *item, unsigned int len)
|
||||
goto loser;
|
||||
}
|
||||
} else {
|
||||
PORT_Assert(item->data == NULL);
|
||||
result = item;
|
||||
}
|
||||
|
||||
result->len = len;
|
||||
if (arena != NULL) {
|
||||
result->data = PORT_ArenaAlloc(arena, len);
|
||||
} else {
|
||||
result->data = PORT_Alloc(len);
|
||||
}
|
||||
if (result->data == NULL && len) {
|
||||
goto loser;
|
||||
if (len) {
|
||||
if (arena != NULL) {
|
||||
result->data = PORT_ArenaAlloc(arena, len);
|
||||
} else {
|
||||
result->data = PORT_Alloc(len);
|
||||
}
|
||||
}
|
||||
|
||||
if (mark) {
|
||||
@ -96,10 +96,6 @@ loser:
|
||||
if (result != NULL) {
|
||||
SECITEM_FreeItem(result, (item == NULL) ? PR_TRUE : PR_FALSE);
|
||||
}
|
||||
/*
|
||||
* If item is not NULL, the above has set item->data and
|
||||
* item->len to 0.
|
||||
*/
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user