Commit f1b55180 f1b55180509cfa1c1ffa76bc5701fae607781e2a by Sergey Poznyakoff

(amd_close): Unlock the monitor before returning

1 parent 7089ffd4
......@@ -368,6 +368,7 @@ amd_close (mu_mailbox_t mailbox)
amd->msg_max = 0; /* maximum message buffer capacity */
amd->uidvalidity = 0;
mu_monitor_unlock (mailbox->monitor);
return 0;
}
......@@ -1477,9 +1478,9 @@ amd_envelope_sender (mu_envelope_t envelope, char *buf, size_t len, size_t *psiz
if (mhm == NULL)
return EINVAL;
if ((status = mu_message_get_header (msg, &hdr)) != 0)
if ((status = mu_message_get_header (msg, &hdr)))
return status;
if (status = mu_header_aget_value (hdr, MU_HEADER_ENV_SENDER, &from))
if ((status = mu_header_aget_value (hdr, MU_HEADER_ENV_SENDER, &from)))
return status;
if (buf && len > 0)
......