aboutsummaryrefslogtreecommitdiff
path: root/src/vpn/gnunet-daemon-vpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpn/gnunet-daemon-vpn.c')
-rw-r--r--src/vpn/gnunet-daemon-vpn.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c
index 7290d15ab..f447eaf41 100644
--- a/src/vpn/gnunet-daemon-vpn.c
+++ b/src/vpn/gnunet-daemon-vpn.c
@@ -176,10 +176,13 @@ cleanup(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tskctx) {
176 GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); 176 GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
177 177
178 /* stop the helper */ 178 /* stop the helper */
179 GNUNET_OS_process_kill (helper_proc, SIGTERM); 179 if (helper_proc != NULL)
180 GNUNET_OS_process_wait (helper_proc); 180 {
181 GNUNET_OS_process_close (helper_proc); 181 GNUNET_OS_process_kill (helper_proc, SIGTERM);
182 helper_proc = NULL; 182 GNUNET_OS_process_wait (helper_proc);
183 GNUNET_OS_process_close (helper_proc);
184 helper_proc = NULL;
185 }
183 186
184 /* close the connection to the service-dns */ 187 /* close the connection to the service-dns */
185 if (dns_connection != NULL) 188 if (dns_connection != NULL)