shithub: puzzles

ref: cf9e6e81ebecbc98bc853dcbb2ceabc832cb49fb
dir: /misc.c/

View raw version
/*
 * misc.c: Miscellaneous helpful functions.
 */

#include <assert.h>
#include <stdlib.h>

#include "puzzles.h"

void free_cfg(config_item *cfg)
{
    config_item *i;

    for (i = cfg; i->type != C_END; i++)
	if (i->type == C_STRING)
	    sfree(i->sval);
    sfree(cfg);
}