summaryrefslogtreecommitdiffstats
path: root/src/ssl/pqueue/pqueue_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssl/pqueue/pqueue_test.c')
-rw-r--r--src/ssl/pqueue/pqueue_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ssl/pqueue/pqueue_test.c b/src/ssl/pqueue/pqueue_test.c
index cb688f7..5a68fc4 100644
--- a/src/ssl/pqueue/pqueue_test.c
+++ b/src/ssl/pqueue/pqueue_test.c
@@ -72,7 +72,7 @@ static int fixed_random(void) {
for (i = 0; i < NUM_ITEMS; i++) {
priority[7] = ordering[i];
item = pitem_new(priority, &ordering[i]);
- if (pqueue_insert(q, item) != item) {
+ if (item == NULL || pqueue_insert(q, item) != item) {
return 0;
}
}
@@ -82,7 +82,7 @@ static int fixed_random(void) {
for (i = 0; i < NUM_ITEMS; i++) {
priority[7] = ordering[i];
item = pitem_new(priority, &ordering[i]);
- if (pqueue_insert(q, item) != NULL) {
+ if (item == NULL || pqueue_insert(q, item) != NULL) {
return 0;
}
pitem_free(item);