Commit 7a5b6af1 authored by Gerd Hoffmann's avatar Gerd Hoffmann Committed by Michael Tokarev

qemu-socket: don't leak opts on error

Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
parent 58a3714c
......@@ -963,7 +963,7 @@ int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp)
default:
error_setg(errp, "socket type unsupported for datagram");
return -1;
fd = -1;
}
qemu_opts_del(opts);
return fd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment