Simon Josefsson <[email protected]> writes:
> Here is a patch for that bug, and another I found.
Actually, that leaked some memory. Here is a better patch.
/Simon
diff --git a/imap4d/auth_gsasl.c b/imap4d/auth_gsasl.c
index 3f137b0..0546e49 100644
--- a/imap4d/auth_gsasl.c
+++ b/imap4d/auth_gsasl.c
@@ -63,7 +63,6 @@ gsasl_replace_streams (void *self, void *data)
util_set_output (s[1]);
free (s);
util_event_remove (self);
- free (self);
return 0;
}
@@ -99,8 +98,7 @@ auth_gsasl (struct imap4d_command *command, char *auth_type,
char **username)
util_send ("+ %s\r\n", output);
imap4d_getline (&input_str, &input_size, &input_len);
}
-
- free (input_str);
+
if (rc != GSASL_OK)
{
mu_diag_output (MU_DIAG_NOTICE, _("GSASL error: %s"),
@@ -117,11 +115,13 @@ auth_gsasl (struct imap4d_command *command, char
*auth_type, char **username)
imap4d_getline (&input_str, &input_size, &input_len);
if (input_len != 0)
{
+ free (input_str);
mu_diag_output (MU_DIAG_NOTICE, _("non-empty client response"));
return RESP_NO;
}
}
+ free (input_str);
free (output);
if (*username == NULL)
_______________________________________________
Bug-mailutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-mailutils