diff options
author | Ori Bernstein <ori@eigenstate.org> | 2021-01-01 11:48:39 -0800 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2021-01-01 11:48:39 -0800 |
commit | c3b30544e19f54020ddc364b02e5202bb465cec6 (patch) | |
tree | cc01bb1eca9ef16c62653209bd616eef17aaf443 | |
parent | fd1db35c4d429096b9aff1763f25de9e1711bf88 (diff) | |
download | plan9front-c3b30544e19f54020ddc364b02e5202bb465cec6.tar.xz |
sort: fix memory leak (thanks Igor Boehm)
Free the last line that we examine when looping
through the lines in a file.
-rw-r--r-- | sys/src/cmd/sort.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/cmd/sort.c b/sys/src/cmd/sort.c index 0cc207174..e613f185e 100644 --- a/sys/src/cmd/sort.c +++ b/sys/src/cmd/sort.c @@ -209,6 +209,8 @@ dofile(Biobuf *b) free(ol); ol = l; } + free(ol->key); + free(ol); return; } |