projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix last(?) batch of malloc-NULL places
[openssl.git]
/
crypto
/
comp
/
comp_lib.c
diff --git
a/crypto/comp/comp_lib.c
b/crypto/comp/comp_lib.c
index c199bb352f139f9a5768402cf9a07cdfd245b709..6ae2114496b03b24a18cc4b5f19e69719f16b805 100644
(file)
--- a/
crypto/comp/comp_lib.c
+++ b/
crypto/comp/comp_lib.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 1998-201
6
The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1998-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
@@
-12,14
+12,17
@@
#include <string.h>
#include <openssl/objects.h>
#include <openssl/comp.h>
#include <string.h>
#include <openssl/objects.h>
#include <openssl/comp.h>
+#include <openssl/err.h>
#include "comp_lcl.h"
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth)
{
COMP_CTX *ret;
#include "comp_lcl.h"
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth)
{
COMP_CTX *ret;
- if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
+ if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
+ COMPerr(COMP_F_COMP_CTX_NEW, ERR_R_MALLOC_FAILURE);
return NULL;
return NULL;
+ }
ret->meth = meth;
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
OPENSSL_free(ret);
ret->meth = meth;
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
OPENSSL_free(ret);