diff options
author | hm <hm@FreeBSD.org> | 2001-12-27 08:41:10 +0000 |
---|---|---|
committer | hm <hm@FreeBSD.org> | 2001-12-27 08:41:10 +0000 |
commit | 04e8094fce906b141d822b3cff38372870a63cc2 (patch) | |
tree | 3d4dc6de2860f6ee46b461c82e275f0a61f729f6 /usr.sbin/i4b/isdnd/log.c | |
parent | 05b3080b8f1af3fd361f1b1328e4208479d121fe (diff) | |
download | FreeBSD-src-04e8094fce906b141d822b3cff38372870a63cc2.zip FreeBSD-src-04e8094fce906b141d822b3cff38372870a63cc2.tar.gz |
Fix potential fclose nullpointer core dumps
MFC after: 1 month
Diffstat (limited to 'usr.sbin/i4b/isdnd/log.c')
-rw-r--r-- | usr.sbin/i4b/isdnd/log.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/i4b/isdnd/log.c b/usr.sbin/i4b/isdnd/log.c index 34f68d4..7876f13 100644 --- a/usr.sbin/i4b/isdnd/log.c +++ b/usr.sbin/i4b/isdnd/log.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,9 @@ * i4b daemon - logging routines * ----------------------------- * - * $Id: log.c,v 1.25 2000/10/09 12:53:29 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Mon Dec 13 21:47:28 1999] + * last edit-date: [Wed Dec 26 12:49:45 2001] * *---------------------------------------------------------------------------*/ @@ -126,7 +124,7 @@ init_log(void) void finish_log(void) { - if(uselogfile) + if(uselogfile && logfp) { fflush(logfp); fclose(logfp); |