Mercurial > ~mikael > mcabber > hg
diff mcabber/src/otr.c @ 1307:6c116207ab2e
Work around segfault in otrl_userstate_free()
It only occurs when SSL is enabled and mcabber is linked to libgnutls.
Seems to be a problem in libgcrypt when both libotr and libgnutls use it.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 09 Sep 2007 17:44:34 +0200 |
parents | a7d21918234c |
children | b17754d9221b |
line wrap: on
line diff
--- a/mcabber/src/otr.c Sun Sep 09 13:24:40 2007 +0200 +++ b/mcabber/src/otr.c Sun Sep 09 17:44:34 2007 +0200 @@ -141,7 +141,18 @@ g_free(account); account = NULL; + + /* XXX This #ifdef is a quick workaround: when mcabber + * is linked to both gnutls and libotr, libgcrypt will + * segfault when we call otrl_userstate_free(). + * This is reported to be a bug in libgcrypt :-/ + * Mikael + */ +#if defined(HAVE_GNUTLS) && !defined(HAVE_OPENSSL) + if (!settings_opt_get_int("ssl")) +#endif otrl_userstate_free(userstate); + userstate = NULL; g_free(keyfile); keyfile = NULL;