=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/memory.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/make/memory.c 2004/04/07 13:11:36 1.3 --- src/usr.bin/make/memory.c 2007/09/16 10:43:53 1.4 *************** *** 1,5 **** /* $OpenPackages$ */ ! /* $OpenBSD: memory.c,v 1.3 2004/04/07 13:11:36 espie Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 --- 1,5 ---- /* $OpenPackages$ */ ! /* $OpenBSD: memory.c,v 1.4 2007/09/16 10:43:53 espie Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 *************** *** 42,47 **** --- 42,50 ---- #include #include #include + #include + #include + #include #include "defines.h" #include "memory.h" *************** *** 164,168 **** --- 167,182 ---- return -1; } return unlink(file); + } + + void + free_hash(struct ohash *h) + { + void *e; + unsigned int i; + + for (e = ohash_first(h, &i); e != NULL; e = ohash_next(h, &i)) + free(e); + ohash_delete(h); }