[Spice-devel] [PATCH] Avoid core calling spice_server_destroy
Christophe Fergeau
cfergeau at redhat.com
Wed Aug 26 06:44:52 PDT 2015
On Fri, Aug 21, 2015 at 10:29:30AM +0100, Frediano Ziglio wrote:
> spice_server_destroy calls reds_exit which is called also at exit time
> (is registered with atexit) so avoid to keep dandling pointers.
s/dandling/dangling/
Is this possible to trigger somehow? Looks good to me, ACK.
Christophe
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/reds.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/server/reds.c b/server/reds.c
> index c07cb6c..5d2ad9b 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -2700,8 +2700,11 @@ static void reds_exit(void)
> main_channel_close(reds->main_channel);
> }
> #ifdef RED_STATISTICS
> - shm_unlink(reds->stat_shm_name);
> - free(reds->stat_shm_name);
> + if (reds->stat_shm_name) {
> + shm_unlink(reds->stat_shm_name);
> + free(reds->stat_shm_name);
> + reds->stat_shm_name = NULL;
> + }
> #endif
> }
>
> --
> 2.4.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150826/d7665dd1/attachment-0001.sig>
More information about the Spice-devel
mailing list