From 11d22742c9d0e9f87f01593435d57a4f4f789044 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 16 Apr 1998 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1998-04-16 --- port/chan.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/port/chan.c b/port/chan.c index 2b80158772f363ba522081d0fd1b619d93bf7bd8..879b958743ae777398b2c3ce3074f4148c5ab2e0 100644 --- a/port/chan.c +++ b/port/chan.c @@ -118,8 +118,14 @@ chanfree(Chan *c) * Channel can be closed before a path is created or the last * channel in a mount which has already cleared its pt names */ - if(c->path) + if(c->path) { + if (c->path->ref <= 0) { + char buf[100]; + ptpath(c->path, buf, sizeof(buf)); + print("decref %s\n", buf); + } decref(c->path); + } lock(&chanalloc); c->next = chanalloc.free;