diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-14 04:50:26 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-14 04:50:26 +0000 |
commit | b4da42e48b6ef220203fbfa70f4a058e22392464 (patch) | |
tree | 5a93b78d9f06c4f59a6aa1eb7c78a1c314711b0e | |
parent | 31d5f7f15c383cf527e2ae406f96f94d8a1267b1 (diff) |
Sat, Apr 13, 2024, 9:50 PM -07:00
-rw-r--r-- | wk5/pset/inheritance/inheritance.c | 3 |
1 files changed, 3 insertions, 0 deletions
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. |