qemu-socket: don't leak opts on error
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
58a3714c52
commit
7a5b6af13a
|
@ -963,7 +963,7 @@ int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
error_setg(errp, "socket type unsupported for datagram");
|
error_setg(errp, "socket type unsupported for datagram");
|
||||||
return -1;
|
fd = -1;
|
||||||
}
|
}
|
||||||
qemu_opts_del(opts);
|
qemu_opts_del(opts);
|
||||||
return fd;
|
return fd;
|
||||||
|
|
Loading…
Reference in New Issue