/*
- * Copyright 2006-2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2006-2018 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
#include <openssl/objects.h>
#include "obj_xref.h"
#include "internal/nelem.h"
+#include <openssl/err.h>
static STACK_OF(nid_triple) *sig_app, *sigx_app;
sigx_app = sk_nid_triple_new(sigx_cmp);
if (sigx_app == NULL)
return 0;
- ntr = OPENSSL_malloc(sizeof(*ntr));
- if (ntr == NULL)
+ if ((ntr = OPENSSL_malloc(sizeof(*ntr))) == NULL) {
+ OBJerr(OBJ_F_OBJ_ADD_SIGID, ERR_R_MALLOC_FAILURE);
return 0;
+ }
ntr->sign_id = signid;
ntr->hash_id = dig_id;
ntr->pkey_id = pkey_id;