mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
lib9: fix memory leak in dial of regular file (#284)
This commit is contained in:
parent
fa7fecff33
commit
d96e9e5dc3
1 changed files with 3 additions and 1 deletions
|
@ -141,8 +141,10 @@ Unix:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* Allow regular files in addition to Unix sockets. */
|
/* Allow regular files in addition to Unix sockets. */
|
||||||
if((s = open(unix, ORDWR)) >= 0)
|
if((s = open(unix, ORDWR)) >= 0){
|
||||||
|
free(buf);
|
||||||
return s;
|
return s;
|
||||||
|
}
|
||||||
free(buf);
|
free(buf);
|
||||||
if((s = socket(ss.ss_family, SOCK_STREAM, 0)) < 0){
|
if((s = socket(ss.ss_family, SOCK_STREAM, 0)) < 0){
|
||||||
werrstr("socket: %r");
|
werrstr("socket: %r");
|
||||||
|
|
Loading…
Reference in a new issue