acme: fix plumb message leaks (thanks igor)

This commit is contained in:
cinap_lenrek 2021-11-05 18:49:40 +00:00
parent e2e4a46f26
commit 6c70026fa4

View file

@ -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);