[Spice-devel] [PATCH spice-server] reds: Do not leak SSL context

Christophe Fergeau cfergeau at redhat.com
Mon Mar 6 16:24:27 UTC 2017


On Mon, Mar 06, 2017 at 04:12:32PM +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> I can write a test (or better extend the leak one) but
> requires to add ca/certificate/private key.


Acked-by: Christophe Fergeau <cfergeau at redhat.com>


> ---
>  server/reds.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/server/reds.c b/server/reds.c
> index 2983aae..fc720a3 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3703,6 +3703,10 @@ SPICE_GNUC_VISIBLE void spice_server_destroy(SpiceServer *reds)
>      }
>      reds_core_timer_remove(reds, reds->mig_timer);
>  
> +    if (reds->ctx) {
> +        SSL_CTX_free(reds->ctx);
> +    }
> +
>      if (reds->main_dispatcher) {
>          g_object_unref(reds->main_dispatcher);
>      }
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170306/700fbc16/attachment.sig>


More information about the Spice-devel mailing list