]> git.proxmox.com Git - mirror_qemu.git/commitdiff
nbd: fix resource leak
authorGonglei <arei.gonglei@huawei.com>
Fri, 27 Feb 2015 07:50:11 +0000 (15:50 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 10 Mar 2015 05:15:34 +0000 (08:15 +0300)
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
block/nbd.c

index 697c0219b4477eb141a77c75a2eb0b4aca732900..6634a696646618ca6dda10c0081dde0d996cae79 100644 (file)
@@ -274,6 +274,7 @@ static int nbd_open(BlockDriverState *bs, QDict *options, int flags,
      */
     sock = nbd_establish_connection(bs, errp);
     if (sock < 0) {
+        g_free(export);
         return sock;
     }