summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ppp/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index 1417dd7..fe5f2dc 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -117,10 +117,13 @@ Cleanup(int excode)
void
AbortProgram(int excode)
{
- server_Close(SignalBundle);
+ if (SignalBundle)
+ server_Close(SignalBundle);
log_Printf(LogPHASE, "PPP Terminated (%s).\n", ex_desc(excode));
- bundle_Close(SignalBundle, NULL, CLOSE_STAYDOWN);
- bundle_Destroy(SignalBundle);
+ if (SignalBundle) {
+ bundle_Close(SignalBundle, NULL, CLOSE_STAYDOWN);
+ bundle_Destroy(SignalBundle);
+ }
log_Close();
exit(excode);
}
OpenPOWER on IntegriCloud