shithub: plan9front

Download patch

ref: 6c70026fa4b2ff235f60c883db15f55b4096bf6b
parent: e2e4a46f26ff7268a696a45d82414fb992b648d5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Nov 5 14:49:40 EDT 2021

acme: fix plumb message leaks (thanks igor)

--- a/sys/src/cmd/acme/exec.c	Thu Nov  4 15:08:02 2021
+++ b/sys/src/cmd/acme/exec.c	Fri Nov  5 14:49:40 2021
@@ -352,8 +352,7 @@
 			pm->ndata = strlen(pm->data);
 			if(pm->ndata < messagesize-1024)
 				plumbsend(plumbsendfd, pm);
-			else
-				plumbfree(pm);
+			plumbfree(pm);
 		}
 		colclose(et->col, et->w, TRUE);
 	}
@@ -687,8 +686,7 @@
 		pm->ndata = strlen(pm->data);
 		if(pm->ndata < messagesize-1024)
 			plumbsend(plumbsendfd, pm);
-		else
-			plumbfree(pm);
+		plumbfree(pm);
 	}
 	fbuffree(s);
 	fbuffree(r);