# HG changeset patch # User Mark Doliner # Date 1132011426 0 # Node ID 78ca702b3338098be66ac96d46897ec3319f3cac # Parent 10f210d18310f8abd96557c61d49462eda9f1925 [gaim-migrate @ 14390] This has been crashing for me since http://cvs.sourceforge.net/viewcvs.py/gaim/gaim/src/protocols/bonjour/dns_sd.c?r1=1.11&r2=1.12 sw_discovery_init() does not allocate the session, according to http://www.porchdogsoft.com/products/howl/docs/discovery.html#sw_discovery_init "Creates a new discovery session. session is allocated by the user and filled in by Howl." committer: Tailor Script diff -r 10f210d18310 -r 78ca702b3338 src/protocols/bonjour/dns_sd.c --- a/src/protocols/bonjour/dns_sd.c Mon Nov 14 23:24:17 2005 +0000 +++ b/src/protocols/bonjour/dns_sd.c Mon Nov 14 23:37:06 2005 +0000 @@ -344,8 +344,10 @@ gc = gaim_account_get_connection(account); /* Initialize the dns-sd data and session */ + data->session = g_malloc(sizeof(sw_discovery)); if (sw_discovery_init(data->session) != SW_OKAY) { + free(data->session); data->session = NULL; gaim_debug_error("bonjour", "Unable to initialize an mDNS session.\n"); return FALSE; @@ -388,4 +390,7 @@ account = data->account; gc = gaim_account_get_connection(account); gaim_input_remove(gc->inpa); + + g_free(data->session); + data->session = NULL; }