diff mbox

[1/9] nbd: fix resource leak

Message ID 1425023419-12244-2-git-send-email-arei.gonglei@huawei.com
State New
Headers show

Commit Message

Gonglei (Arei) Feb. 27, 2015, 7:50 a.m. UTC
From: Gonglei <arei.gonglei@huawei.com>

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 block/nbd.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/block/nbd.c b/block/nbd.c
index 2f3b9ad..b9955cb 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -273,6 +273,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;
     }