From b4da42e48b6ef220203fbfa70f4a058e22392464 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 14 Apr 2024 04:50:26 +0000 Subject: Sat, Apr 13, 2024, 9:50 PM -07:00 --- wk5/pset/inheritance/inheritance.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'wk5/pset/inheritance/inheritance.c') diff --git a/wk5/pset/inheritance/inheritance.c b/wk5/pset/inheritance/inheritance.c index 9e7a211..87bbd01 100644 --- a/wk5/pset/inheritance/inheritance.c +++ b/wk5/pset/inheritance/inheritance.c @@ -84,6 +84,7 @@ void free_family(person *p) { free(*p); } + else // TODO: Free parents recursively if (p->parent[0] != NULL) @@ -91,8 +92,10 @@ void free_family(person *p) free_family(p->parent[0]); free_family(p->parent[1]); } + else // TODO: Free child + free(*p); } // Print each family member and their alleles. -- cgit v1.2.3