From: Stephan Bosch Date: Tue, 9 Feb 2021 22:44:42 +0000 (+0100) Subject: lib-smtp: smtp-client-command - Make smtp_client_command_unref(NULL) a no-op. X-Git-Tag: 2.3.15~301 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09cd268754674ca3d609d00bbbd99eb03840d23a;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: smtp-client-command - Make smtp_client_command_unref(NULL) a no-op. --- diff --git a/src/lib-smtp/smtp-client-command.c b/src/lib-smtp/smtp-client-command.c index 326e178362..014071c1ae 100644 --- a/src/lib-smtp/smtp-client-command.c +++ b/src/lib-smtp/smtp-client-command.c @@ -115,6 +115,12 @@ void smtp_client_command_ref(struct smtp_client_command *cmd) void smtp_client_command_unref(struct smtp_client_command **_cmd) { struct smtp_client_command *cmd = *_cmd; + + *_cmd = NULL; + + if (cmd == NULL) + return; + struct smtp_client_connection *conn = cmd->conn; i_assert(cmd->refcount > 0);