From bcff9862e75ac538fb021e9ceadf15148db73ab0 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 18 Jan 1993 15:29:54 +0000 Subject: [PATCH] found some small leaks with Purify --- modules/src/em_code/insert.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/src/em_code/insert.c b/modules/src/em_code/insert.c index 11ec89539..167eb38eb 100644 --- a/modules/src/em_code/insert.c +++ b/modules/src/em_code/insert.c @@ -67,7 +67,10 @@ outpart(id) */ Part *p = C_findpart(id); - if (p) C_out_parts(p->p_parts); + if (p) { + C_out_parts(p->p_parts); + p->p_parts = 0; + } } static @@ -109,7 +112,9 @@ C_out_parts(pp) } #endif } + prev = pp; pp = pp->pp_next; + free((char *) prev); } }