]> git.proxmox.com Git - mirror_qemu.git/blobdiff - blockdev-nbd.c
qht: fix kernel-doc markup in qht.h
[mirror_qemu.git] / blockdev-nbd.c
index dd0860f4a6e47a6127783d2649dc9ebda60890fd..28f551a7b044b2c88128cf1a0630f55ecb83a291 100644 (file)
@@ -27,6 +27,10 @@ typedef struct NBDServerData {
 
 static NBDServerData *nbd_server;
 
+static void nbd_blockdev_client_closed(NBDClient *client, bool ignored)
+{
+    nbd_client_put(client);
+}
 
 static gboolean nbd_accept(QIOChannel *ioc, GIOCondition condition,
                            gpointer opaque)
@@ -46,7 +50,7 @@ static gboolean nbd_accept(QIOChannel *ioc, GIOCondition condition,
     qio_channel_set_name(QIO_CHANNEL(cioc), "nbd-server");
     nbd_client_new(NULL, cioc,
                    nbd_server->tlscreds, NULL,
-                   nbd_client_put);
+                   nbd_blockdev_client_closed);
     object_unref(OBJECT(cioc));
     return TRUE;
 }