From: yoe Date: Wed, 14 Nov 2007 19:19:24 +0000 (+0000) Subject: r308: Fix segfault when exporting more than one device. X-Git-Url: http://git.alex.org.uk r308: Fix segfault when exporting more than one device. --- diff --git a/nbd-server.c b/nbd-server.c index 2c2c973..f31f812 100644 --- a/nbd-server.c +++ b/nbd-server.c @@ -1451,7 +1451,7 @@ int serveloop(GArray* servers) { /* child */ g_hash_table_destroy(children); for(i=0;ilen;i++) { - serve=g_array_index(servers, SERVER*, i); + serve=&g_array_index(servers, SERVER, i); close(serve->socket); } /* FALSE does not free the