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:
Gerd Hoffmann 2013-06-24 08:39:56 +02:00 committed by Michael Tokarev
parent 58a3714c52
commit 7a5b6af13a

View File

@ -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;