/*
- * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
#include <stdlib.h>
#include "internal/event_queue.h"
-#include "crypto/sparse_array.h"
#include "ssl_local.h"
struct ossl_event_queue_st {
{
OSSL_EVENT *e = OPENSSL_malloc(sizeof(*e));
- if (e == NULL || queue == NULL)
+ if (e == NULL || queue == NULL) {
+ OPENSSL_free(e);
return NULL;
+ }
+
ossl_event_set(e, type, priority, when, ctx, payload, payload_size);
e->flag_dynamic = 1;
if (event_queue_add(queue, e))