From d7bf6c23704fd2640ebb3918b6d72640dd5dc79e Mon Sep 17 00:00:00 2001 From: Georg Reinke Date: Wed, 14 Jun 2017 13:01:51 +0200 Subject: [PATCH] pipe: fix segfault on shutdown --- src/pipe.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/pipe.c b/src/pipe.c index 97557f527..37fe6eb80 100644 --- a/src/pipe.c +++ b/src/pipe.c @@ -60,8 +60,6 @@ pthread_t ptid; /**< Parent thread id */ static void quit(int signal, siginfo_t *sinfo, void *ctx) { - int ret; - if (recvv.started) { pthread_cancel(recvv.thread); pthread_join(recvv.thread, NULL); @@ -74,11 +72,8 @@ static void quit(int signal, siginfo_t *sinfo, void *ctx) pool_destroy(&sendd.pool); } - ret = super_node_stop(&sn); - if (ret) - error("Failed to stop super-node"); - - super_node_destroy(&sn); + node_stop(node); + node_destroy(node); info(GRN("Goodbye!")); exit(EXIT_SUCCESS);