Forgot to remove the free(db); from the end of namedb_unload