From: Philipp Tölke Date: Wed, 17 Nov 2010 08:55:33 +0000 (+0000) Subject: NULL-Pointer X-Git-Tag: initial-import-from-subversion-38251~19709 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f91ab8c55ff0ce6fb18701a361e2da9bd372f950;p=oweals%2Fgnunet.git NULL-Pointer --- 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)