about summary refs log tree commit diff stats
path: root/src/loader
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-09-25 22:24:20 +0200
committerbptato <nincsnevem662@gmail.com>2024-09-25 22:48:00 +0200
commit9d5a9b167c5ef302c36e4e08090ce862f22a59fb (patch)
tree6a58a492e99adc87f1c294825ce2c753e80e4535 /src/loader
parentc6fdc79ad5db4fe7305e909c389510d10ec5d4a9 (diff)
downloadchawan-9d5a9b167c5ef302c36e4e08090ce862f22a59fb.tar.gz
loader, pager: fix fd leaks
Diffstat (limited to 'src/loader')
-rw-r--r--src/loader/loader.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/loader/loader.nim b/src/loader/loader.nim
index e8d29ee2..732336f9 100644
--- a/src/loader/loader.nim
+++ b/src/loader/loader.nim
@@ -1008,6 +1008,8 @@ proc openCachedItem(ctx: LoaderContext; stream: SocketStream;
     w.swrite(ps != nil)
     if ps != nil:
       w.sendAux.add(FileHandle(ps.fd))
+  if ps != nil:
+    ps.sclose()
   stream.sclose()
 
 proc passFd(ctx: LoaderContext; stream: SocketStream; client: ClientData;