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:
parent
3e4c67c9ce
commit
9d0b65e6e8
|
@ -274,6 +274,7 @@ static int nbd_open(BlockDriverState *bs, QDict *options, int flags,
|
||||||
*/
|
*/
|
||||||
sock = nbd_establish_connection(bs, errp);
|
sock = nbd_establish_connection(bs, errp);
|
||||||
if (sock < 0) {
|
if (sock < 0) {
|
||||||
|
g_free(export);
|
||||||
return sock;
|
return sock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue