diff options
-rw-r--r-- | src/lib9/dial.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib9/dial.c b/src/lib9/dial.c index c3dd1762..81e3a830 100644 --- a/src/lib9/dial.c +++ b/src/lib9/dial.c @@ -141,8 +141,10 @@ Unix: return -1; } /* Allow regular files in addition to Unix sockets. */ - if((s = open(unix, ORDWR)) >= 0) + if((s = open(unix, ORDWR)) >= 0){ + free(buf); return s; + } free(buf); if((s = socket(ss.ss_family, SOCK_STREAM, 0)) < 0){ werrstr("socket: %r"); |