diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-14 04:52:14 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-14 04:52:14 +0000 |
commit | c31ebbd7e91b39fd4d4dae760af91ed86ffd6823 (patch) | |
tree | a3957d84bea97543ffed495a58052dea1954c3e4 /wk5/pset | |
parent | 46714e3a9f495cdf3774bfdbbcd516ffb5011ff8 (diff) |
Sat, Apr 13, 2024, 9:52 PM -07:00
Diffstat (limited to 'wk5/pset')
-rw-r--r-- | wk5/pset/inheritance/inheritance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wk5/pset/inheritance/inheritance.c b/wk5/pset/inheritance/inheritance.c index 6edb985..36c5cd5 100644 --- a/wk5/pset/inheritance/inheritance.c +++ b/wk5/pset/inheritance/inheritance.c @@ -80,9 +80,9 @@ person *create_family(int generations) void free_family(person *p) { // TODO: Handle base case - if (p->parent[0] == NULL) + if (p == NULL) { - free(*p); + return; } // TODO: Free parents recursively |