From 6c70026fa4b2ff235f60c883db15f55b4096bf6b Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 5 Nov 2021 18:49:40 +0000 Subject: [PATCH] acme: fix plumb message leaks (thanks igor) --- sys/src/cmd/acme/exec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/src/cmd/acme/exec.c b/sys/src/cmd/acme/exec.c index a48db1469..71070a1b6 100644 --- a/sys/src/cmd/acme/exec.c +++ b/sys/src/cmd/acme/exec.c @@ -352,8 +352,7 @@ del(Text *et, Text*, Text *argt, int flag1, int, Rune *arg, int narg) 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 @@ putfile(File *f, int q0, int q1, Rune *namer, int nname) pm->ndata = strlen(pm->data); if(pm->ndata < messagesize-1024) plumbsend(plumbsendfd, pm); - else - plumbfree(pm); + plumbfree(pm); } fbuffree(s); fbuffree(r);