diff options
author | nelson%bolyard.com <devnull@localhost> | 2006-04-25 04:37:13 +0000 |
---|---|---|
committer | nelson%bolyard.com <devnull@localhost> | 2006-04-25 04:37:13 +0000 |
commit | 088813a32af089cf06382728a9ec3bb9f01b0c5d (patch) | |
tree | 421c79d331f0714610b89f07a99c1047edb13fce | |
parent | 987153820fb8fafb8b5fed6a9966243a1467fe58 (diff) | |
download | nss-hg-088813a32af089cf06382728a9ec3bb9f01b0c5d.tar.gz |
Backout the last change, undoing the fix for bug 320336 and bug 333405.
-rw-r--r-- | security/nss/lib/util/secitem.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/security/nss/lib/util/secitem.c b/security/nss/lib/util/secitem.c index 20eaecd0c..71009143c 100644 --- a/security/nss/lib/util/secitem.c +++ b/security/nss/lib/util/secitem.c @@ -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); } |