diff options
Diffstat (limited to 'src/stack.c')
-rw-r--r-- | src/stack.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stack.c b/src/stack.c index ebfa640..ba43023 100644 --- a/src/stack.c +++ b/src/stack.c @@ -43,3 +43,10 @@ bool is_empty(stack_t *s) { return true; return false; } + +void stack_free(stack_t *s) { + if (s->stack != NULL) { + free(s->stack); + } + free(s); +} |