This isn't necessary for correct behavior: if the database is killed, the old flock() will go away when the file descriptor gets closed.