[Spice-devel] [PATCH vdagent-linux] vdagent-virtio-port: close socket on error

Hans de Goede hdegoede at redhat.com
Tue Sep 3 03:07:58 PDT 2013


ACK.

On 09/03/2013 12:07 PM, Alon Levy wrote:
> Signed-off-by: Alon Levy <alevy at redhat.com>
> ---
>   src/vdagent-virtio-port.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/src/vdagent-virtio-port.c b/src/vdagent-virtio-port.c
> index bdd22d9..bacfa42 100644
> --- a/src/vdagent-virtio-port.c
> +++ b/src/vdagent-virtio-port.c
> @@ -116,6 +116,9 @@ struct vdagent_virtio_port *vdagent_virtio_port_create(const char *portname,
>
>   error:
>       syslog(LOG_ERR, "open %s: %m", portname);
> +    if (vport->fd != -1) {
> +        close(vport->fd);
> +    }
>       free(vport);
>       return NULL;
>   }
>


More information about the Spice-devel mailing list