hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 2592c0858873bae68aecbf64d165adcbf95d06bc
parent aeb2be7e9f8400d788483e76db517d42020fa8c0
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sat, 30 Jan 2021 15:26:40 -0500

os: only free args in @fini if allocated by @init

Diffstat:
Mos/+linux/environ.ha | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/os/+linux/environ.ha b/os/+linux/environ.ha @@ -24,5 +24,7 @@ let args_static: [32]str = [""...]; }; @fini fn fini() void = { - free(args); + if (rt::argc >= len(args_static)) { + free(args); + }; };