[Spice-devel] [spice-server] cursor: Consistently use g_memdup() for cursor data

Christophe Fergeau cfergeau at redhat.com
Thu Apr 5 09:51:53 UTC 2018


On Thu, Apr 05, 2018 at 10:55:13AM +0200, Christophe Fergeau wrote:
> On Thu, Apr 05, 2018 at 04:43:17AM -0400, Frediano Ziglio wrote:
> > > 
> > > Currently, red-parse-qxl.c open codes g_memdup() when it needs to
> > 
> > "open codes" ?
> > well, currently uses g_malloc+memcpy which can be rewritten with
> > g_memdup.
> 
> Yes, doing this can be seen as reimplementing g_memdup, which I'd call
> "open code".  I'll reformulate :)

I changed the full log to

"Currently, red-parse-qxl.c uses g_malloc+memcpy to duplicate the cursor
data when it could use g_memdup() instead. red-stream-device.c does the
same thing but uses spice_memdup(). This commit makes use of g_memdup()
in both cases so that this memory is consistently allocated through
glib."


> 
> Christophe



> _______________________________________________
> 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: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180405/ae254a52/attachment.sig>


More information about the Spice-devel mailing list