Fix segfault caused by cleanup functions in wrong order

This commit is contained in:
Jfreegman 2015-07-08 20:43:33 -04:00
parent f3b65bc3dc
commit 0168d53a1d
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -1803,8 +1803,8 @@ Messenger *new_messenger(Messenger_Options *options, unsigned int *error)
kill_onion(m->onion); kill_onion(m->onion);
kill_onion_announce(m->onion_a); kill_onion_announce(m->onion_a);
kill_onion_client(m->onion_c); kill_onion_client(m->onion_c);
kill_DHT(m->dht);
kill_net_crypto(m->net_crypto); kill_net_crypto(m->net_crypto);
kill_DHT(m->dht);
kill_networking(m->net); kill_networking(m->net);
free(m); free(m);
return NULL; return NULL;
@ -1818,8 +1818,8 @@ Messenger *new_messenger(Messenger_Options *options, unsigned int *error)
kill_onion(m->onion); kill_onion(m->onion);
kill_onion_announce(m->onion_a); kill_onion_announce(m->onion_a);
kill_onion_client(m->onion_c); kill_onion_client(m->onion_c);
kill_DHT(m->dht);
kill_net_crypto(m->net_crypto); kill_net_crypto(m->net_crypto);
kill_DHT(m->dht);
kill_networking(m->net); kill_networking(m->net);
free(m); free(m);