From: Dr. David von Oheimb Date: Tue, 7 Dec 2021 17:02:19 +0000 (+0100) Subject: APPS/cmp: Simplify read_write_req_resp() - 'req' arg must not be NULL anyway X-Git-Tag: openssl-3.2.0-alpha1~3216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61fa00a4d03f6808389bc1847937f72d184f0627;p=thirdparty%2Fopenssl.git APPS/cmp: Simplify read_write_req_resp() - 'req' arg must not be NULL anyway Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17251) --- diff --git a/apps/cmp.c b/apps/cmp.c index e35626ebb2f..d6ab2a249b8 100644 --- a/apps/cmp.c +++ b/apps/cmp.c @@ -789,8 +789,7 @@ static OSSL_CMP_MSG *read_write_req_resp(OSSL_CMP_CTX *ctx, OSSL_CMP_PKIHEADER *hdr; const char *prev_opt_rspin = opt_rspin; - if (req != NULL && opt_reqout != NULL - && !write_PKIMESSAGE(req, &opt_reqout)) + if (opt_reqout != NULL && !write_PKIMESSAGE(req, &opt_reqout)) goto err; if (opt_reqin != NULL && opt_rspin == NULL) { if ((req_new = read_PKIMESSAGE(&opt_reqin)) == NULL)