summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
diff options
context:
space:
mode:
authorJfreegman <jfreegman@gmail.com>2015-07-08 20:43:33 -0400
committerJfreegman <jfreegman@gmail.com>2015-07-08 20:43:33 -0400
commit0168d53a1d6bb4654ee0737298f48b5beb66f725 (patch)
treea417838d5c582b3d549ae1c9b042284c42020117 /toxcore/Messenger.c
parentf3b65bc3dc4f85924ddf7f2cf453924963b5e989 (diff)
Fix segfault caused by cleanup functions in wrong order
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r--toxcore/Messenger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index 6ec5a796..c8c0042f 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -1803,8 +1803,8 @@ Messenger *new_messenger(Messenger_Options *options, unsigned int *error)
1803 kill_onion(m->onion); 1803 kill_onion(m->onion);
1804 kill_onion_announce(m->onion_a); 1804 kill_onion_announce(m->onion_a);
1805 kill_onion_client(m->onion_c); 1805 kill_onion_client(m->onion_c);
1806 kill_DHT(m->dht);
1807 kill_net_crypto(m->net_crypto); 1806 kill_net_crypto(m->net_crypto);
1807 kill_DHT(m->dht);
1808 kill_networking(m->net); 1808 kill_networking(m->net);
1809 free(m); 1809 free(m);
1810 return NULL; 1810 return NULL;
@@ -1818,8 +1818,8 @@ Messenger *new_messenger(Messenger_Options *options, unsigned int *error)
1818 kill_onion(m->onion); 1818 kill_onion(m->onion);
1819 kill_onion_announce(m->onion_a); 1819 kill_onion_announce(m->onion_a);
1820 kill_onion_client(m->onion_c); 1820 kill_onion_client(m->onion_c);
1821 kill_DHT(m->dht);
1822 kill_net_crypto(m->net_crypto); 1821 kill_net_crypto(m->net_crypto);
1822 kill_DHT(m->dht);
1823 kill_networking(m->net); 1823 kill_networking(m->net);
1824 free(m); 1824 free(m);
1825 1825