9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] lock: Fix some memory leaks
@ 2023-01-21  0:17 Josiah Frentsos
  2023-01-21  7:55 ` Steve Simon
  2023-01-22 20:46 ` cinap_lenrek
  0 siblings, 2 replies; 6+ messages in thread
From: Josiah Frentsos @ 2023-01-21  0:17 UTC (permalink / raw)
  To: 9front

diff bb36ba0617b5aa8263ea9b5ece8c1a5249fedc86 uncommitted
--- a/sys/src/cmd/lock.c
+++ b/sys/src/cmd/lock.c
@@ -35,6 +35,7 @@
 		}
 		if (w->pid == pid)
 			return w;
+		free(w);
 	}
 }
 
@@ -141,7 +142,8 @@
 		error("wait");
 
 	postnote(PNPROC, lckpid, "die");
-	waitfor(lckpid);
+	free(waitfor(lckpid));
+
 	if(w->msg[0]){
 		p = utfrune(w->msg, ':');
 		if(p && p[1])

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-22 20:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-21  0:17 [9front] lock: Fix some memory leaks Josiah Frentsos
2023-01-21  7:55 ` Steve Simon
2023-01-22  0:36   ` Dan Cross
2023-01-22  7:09     ` Benjamin Purcell
2023-01-22  8:11       ` Steve Simon
2023-01-22 20:46 ` cinap_lenrek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).