$NetBSD: patch-aj,v 1.1 2000/10/07 19:24:16 kim Exp $ Do not try to fclose(NULL). --- programs/IRRd/database.c.orig Fri Aug 18 14:42:18 2000 +++ programs/IRRd/database.c Sat Oct 7 14:59:02 2000 @@ -93,9 +93,13 @@ HASH_Clear (db->hash_spec); } - trace (NORM, default_trace, "Creating new radix and closing db->fd\n"); + trace (NORM, default_trace, "Creating new db->radix\n"); db->radix = New_Radix (128); - fclose (db->fd); + + if (db->fd != NULL) { + trace (NORM, default_trace, "Closing db->fd\n"); + fclose (db->fd); + } db->fd = NULL; db->db_syntax = EMPTY_DB;