projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
497a900
)
r201: Plug possible segfault upon connection close
author
yoe <yoe>
Thu, 19 Oct 2006 19:32:26 +0000
(19:32 +0000)
committer
yoe <yoe>
Thu, 19 Oct 2006 19:32:26 +0000
(19:32 +0000)
nbd-server.c
patch
|
blob
|
history
diff --git
a/nbd-server.c
b/nbd-server.c
index
a35aafb
..
a89ab16
100644
(file)
--- a/
nbd-server.c
+++ b/
nbd-server.c
@@
-927,7
+927,7
@@
int mainloop(CLIENT *client) {
if (request.type==NBD_CMD_DISC) {
msg2(LOG_INFO, "Disconnect request received.");
if (client->difmap) g_free(client->difmap) ;
- if (client->difffile>=0) {
+ if (client->server->flags & F_COPYONWRITE) {
close(client->difffile);
unlink(client->difffilename);
free(client->difffilename);