nbd: fix resource leak

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Gonglei
2015-03-10 08:15:34 +03:00
committed by Michael Tokarev
parent 3e4c67c9ce
commit 9d0b65e6e8
+1
View 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;
}