From 431aba869708c7d47ee40380cb05c9a1380d1bd5 Mon Sep 17 00:00:00 2001 From: Simon Pichugin Date: May 13 2020 12:05:42 +0000 Subject: Issue 50610 - Fix return code when it's nothing to free Description: Fix the return code when NULL == clcrypt_handle supplied to clcrypt_destroy. https://pagure.io/389-ds-base/issue/50610 Reviewed by: mreynolds (Thanks!) --- diff --git a/ldap/servers/plugins/replication/cl_crypt.c b/ldap/servers/plugins/replication/cl_crypt.c index d57075b..8385534 100644 --- a/ldap/servers/plugins/replication/cl_crypt.c +++ b/ldap/servers/plugins/replication/cl_crypt.c @@ -87,6 +87,8 @@ clcrypt_destroy(void *clcrypt_handle) slapi_log_err(SLAPI_LOG_TRACE, repl_plugin_name, "-> clcrypt_destroy\n"); if (NULL == clcrypt_handle) { + /* Nothing to free */ + rc = 0; goto bail; } crypt_destroy.state_priv = clcrypt_handle;