From 6fc7da3c529ca7c610e8172f5b02980c75597dd5 Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 19 Oct 2006 21:58:59 +0000 Subject: Fix a handful of small one-time memory leaks in vbackup, and one per-package memory leak (in writethread). --- src/libventi/hangup.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libventi/hangup.c') diff --git a/src/libventi/hangup.c b/src/libventi/hangup.c index 5a992e73..23075864 100644 --- a/src/libventi/hangup.c +++ b/src/libventi/hangup.c @@ -1,4 +1,5 @@ #include +#include #include #include #include "queue.h" @@ -8,6 +9,9 @@ vthangup(VtConn *z) { qlock(&z->lk); z->state = VtStateClosed; + /* try to make the read in vtsendproc fail */ + shutdown(SHUT_WR, z->infd); + shutdown(SHUT_WR, z->outfd); if(z->infd >= 0) close(z->infd); if(z->outfd >= 0 && z->outfd != z->infd) @@ -20,3 +24,4 @@ vthangup(VtConn *z) _vtqhangup(z->readq); qunlock(&z->lk); } + -- cgit v1.2.3