If we can't open alias.log, don't try to write to the
resulting NULL FILE *. PR: 9403
This commit is contained in:
parent
219cbf59f2
commit
a2743da670
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42454
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user