diff options
author | brian <brian@FreeBSD.org> | 1999-01-10 02:05:13 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-01-10 02:05:13 +0000 |
commit | 9efaefb948b4c8c90de8b30691aad110bf960dc9 (patch) | |
tree | 3f8993ee588a0071ef955b860214efac30de6f25 /lib/libalias/alias_db.c | |
parent | 89e11995349cb9c2dab945decdcca7c775b1da23 (diff) | |
download | FreeBSD-src-9efaefb948b4c8c90de8b30691aad110bf960dc9.zip FreeBSD-src-9efaefb948b4c8c90de8b30691aad110bf960dc9.tar.gz |
If we can't open alias.log, don't try to write to the
resulting NULL FILE *.
PR: 9403
Diffstat (limited to 'lib/libalias/alias_db.c')
-rw-r--r-- | lib/libalias/alias_db.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libalias/alias_db.c b/lib/libalias/alias_db.c index 7bbb191..dc9d020 100644 --- a/lib/libalias/alias_db.c +++ b/lib/libalias/alias_db.c @@ -437,7 +437,7 @@ ShowAliasStats(void) { /* Used for debugging */ - if (packetAliasMode & PKT_ALIAS_LOG) + if (monitorFile) { fprintf(monitorFile, "icmp=%d, udp=%d, tcp=%d, frag_id=%d frag_ptr=%d", icmpLinkCount, @@ -1837,8 +1837,10 @@ InitPacketAliasLog(void) static void UninitPacketAliasLog(void) { - if( monitorFile ) + if (monitorFile) { fclose(monitorFile); + monitorFile = NULL; + } packetAliasMode &= ~PKT_ALIAS_LOG; } |