[Bug 64372] Re: Crashes when connecting to server that requires STARTTLS

Robert McQueen robot101 at debian.org
Tue Nov 13 01:25:25 UTC 2007

This patch is an ugly hack because it still relies on reading free()'d
memory to detect the symptom of the bug - the attached patch should fix
the real problem. In some connection failure paths,
_lm_connection_failed_with_error was being called and kicking off a
second connection attempt (eg falling back to an IPv4 address if IPv6
has failed), but then the source ID was being overwritten, meaning the
source wasn't destroyed, so the callback was still being called after
connect_data had been freed. I guess at some point in the past
_lm_connection_failed_with_error didn't exist or do retries, so zeroing
out the source ID was a reasonable thing to do in case of failure. I've
also added some asserts which should trigger if my understanding of the
problem and solution are wrong, and these don't trigger on my machine in
either the failure or success cases. I'd recommend pushing this into
updates for any supported distribution you ship with 1.2.x.

** Attachment added: "fix GSource leak and resulting SEGV"

Crashes when connecting to server that requires STARTTLS
You received this bug notification because you are a member of
Telepathy, which is a bug assignee.

More information about the Ubuntu-telepathy mailing list