[Spice-devel] [PATCH v2 x11spice 1/4] Convert to the use of glib memory routines in options.c.
Jeremy White
jwhite at codeweavers.com
Tue Jul 23 14:16:44 UTC 2019
On 7/22/19 5:16 AM, Frediano Ziglio wrote:
>>
>> Signed-off-by: Jeremy White <jwhite at codeweavers.com>
>
> I didn't expected you would change everything :-)
:-).
Well, I appreciate the review, so when the suggestions are easy, I try
to be responsive.
>>
>> - p = options->spice_password = malloc(options->generate_password + 1);
>> + p = options->spice_password = g_malloc(options->generate_password + 1);
>> if (!p)
>
> g_malloc never returns NULL. Do you want to remove the check and accept
> the abort() or use g_try_malloc ? I suppose the first giving the above code
> and the fact that many old strdup assumed strdup never returned NULL.
Yeah, abort is perfectly fine. I resent this patch.
Cheers,
Jeremy
More information about the Spice-devel
mailing list