References: <20210402112403.6873-1-maximilian.fillinger@...2507...> From: Arne Schwabe Message-ID: Date: Sat, 3 Apr 2021 14:08:53 +0200 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB Subject: Re: [Openvpn-devel] [PATCH 1/1] Let mbedtls_ssl_configs find reloaded CRLs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Max Fillinger , openvpn-devel@lists.sourceforge.net Cc: Maximilian Fillinger > } > > void > +make_empty_crl(struct tls_root_ctx *ctx) > +{ > + if (ctx->crl == NULL) > + { > + ALLOC_OBJ_CLEAR(ctx->crl, mbedtls_x509_crl); > + } > + else > + { > + mbedtls_x509_crl_free(ctx->crl); > + } > +} > + This function is confsung me. This needs at least more documentation what it is doing as docstring etc. I would also expect to have mbedtls_x509_crl_init to init the struct and not just a malloc that set the whole structure to zero. And mbedtls_x509_crl_free does from its description doesn't guarantee that the object is left in a proper state. Arne