bugfix of the destroy_key bug

This commit is contained in:
Anselm R. Garbe 2006-03-30 13:28:21 +02:00
parent 0cb93c498a
commit 43edcfc10f

View File

@ -138,11 +138,14 @@ get_key(const char *name)
void
destroy_key(Key *k)
{
Key *n;
cext_array_detach((void **)key, k, &keysz);
nkey--;
if(k->next)
destroy_key(k->next);
free(k);
while(k) {
n = k->next;
free(k);
k = n;
}
}
static void