projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
recipes/90-test_shlibload.t: disable tests on AIX till further notice.
[openssl.git]
/
ssl
/
pqueue.c
diff --git
a/ssl/pqueue.c
b/ssl/pqueue.c
index 9ff4132dcc6c097cdbeaa874001dbb060fd73b72..548a7a443d914545cfaba504a7583f388d8df2f8 100644
(file)
--- a/
ssl/pqueue.c
+++ b/
ssl/pqueue.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 2005-201
6
The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2005-201
8
The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@
-18,14
+18,15
@@
struct pqueue_st {
pitem *pitem_new(unsigned char *prio64be, void *data)
{
pitem *item = OPENSSL_malloc(sizeof(*item));
pitem *pitem_new(unsigned char *prio64be, void *data)
{
pitem *item = OPENSSL_malloc(sizeof(*item));
- if (item == NULL)
+
+ if (item == NULL) {
+ SSLerr(SSL_F_PITEM_NEW, ERR_R_MALLOC_FAILURE);
return NULL;
return NULL;
+ }
memcpy(item->priority, prio64be, sizeof(item->priority));
memcpy(item->priority, prio64be, sizeof(item->priority));
-
item->data = data;
item->next = NULL;
item->data = data;
item->next = NULL;
-
return item;
}
return item;
}
@@
-34,10
+35,13
@@
void pitem_free(pitem *item)
OPENSSL_free(item);
}
OPENSSL_free(item);
}
-pqueue *pqueue_new()
+pqueue *pqueue_new(
void
)
{
pqueue *pq = OPENSSL_zalloc(sizeof(*pq));
{
pqueue *pq = OPENSSL_zalloc(sizeof(*pq));
+ if (pq == NULL)
+ SSLerr(SSL_F_PQUEUE_NEW, ERR_R_MALLOC_FAILURE);
+
return pq;
}
return pq;
}
@@
-127,7
+131,7
@@
pitem *pqueue_iterator(pqueue *pq)
return pqueue_peek(pq);
}
return pqueue_peek(pq);
}
-pitem *pqueue_next(pite
m *
*item)
+pitem *pqueue_next(pite
rator
*item)
{
pitem *ret;
{
pitem *ret;
@@
-144,7
+148,7
@@
pitem *pqueue_next(pitem **item)
size_t pqueue_size(pqueue *pq)
{
pitem *item = pq->items;
size_t pqueue_size(pqueue *pq)
{
pitem *item = pq->items;
-
in
t count = 0;
+
size_
t count = 0;
while (item != NULL) {
count++;
while (item != NULL) {
count++;