Skip to content

Commit feafa67

Browse files
author
inoguchi
committed
Check function return value
1 parent 0dd40cf commit feafa67

File tree

1 file changed

+3
-2
lines changed
  • src/usr.bin/openssl

1 file changed

+3
-2
lines changed

src/usr.bin/openssl/ts.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: ts.c,v 1.21 2022/03/24 13:47:55 inoguchi Exp $ */
1+
/* $OpenBSD: ts.c,v 1.22 2022/03/24 14:07:08 inoguchi Exp $ */
22
/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
33
* project 2002.
44
*/
@@ -1172,7 +1172,8 @@ create_cert_store(char *ca_path, char *ca_file)
11721172
int i;
11731173

11741174
/* Creating the X509_STORE object. */
1175-
cert_ctx = X509_STORE_new();
1175+
if ((cert_ctx = X509_STORE_new()) == NULL)
1176+
goto err;
11761177

11771178
/* Setting the callback for certificate chain verification. */
11781179
X509_STORE_set_verify_cb(cert_ctx, verify_cb);

0 commit comments

Comments
 (0)