summaryrefslogtreecommitdiff
path: root/wk5
diff options
context:
space:
mode:
Diffstat (limited to 'wk5')
-rw-r--r--wk5/pset/inheritance/inheritance.c3
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.