Skip to content

Commit

Permalink
nbd: fix resource leak
Browse files Browse the repository at this point in the history
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
gongleiarei authored and Michael Tokarev committed Mar 10, 2015
1 parent 3e4c67c commit 9d0b65e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/nbd.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9d0b65e

Please sign in to comment.