From f91ab8c55ff0ce6fb18701a361e2da9bd372f950 Mon Sep 17 00:00:00 2001 From: Philipp Tölke Date: Wed, 17 Nov 2010 08:55:33 +0000 Subject: NULL-Pointer --- src/vpn/gnunet-daemon-vpn.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') 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) { GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); /* stop the helper */ - GNUNET_OS_process_kill (helper_proc, SIGTERM); - GNUNET_OS_process_wait (helper_proc); - GNUNET_OS_process_close (helper_proc); - helper_proc = NULL; + if (helper_proc != NULL) + { + GNUNET_OS_process_kill (helper_proc, SIGTERM); + GNUNET_OS_process_wait (helper_proc); + GNUNET_OS_process_close (helper_proc); + helper_proc = NULL; + } /* close the connection to the service-dns */ if (dns_connection != NULL) -- cgit v1.2.3