On 29.08.2025 21:57, Stefano Stabellini wrote:
> On Thu, 28 Aug 2025, dmuk...@xen.org wrote:
>> +static void cf_check ns16x50_free(void *arg)
>> +{
>> +    struct vuart_ns16x50 *vdev = arg;
>> +
>> +    if ( vdev )
>> +        ns16x50_deinit(vdev);
>> +
>> +    XVFREE(vdev);
> 
> XVFREE should only be called if ( vdev )

Why would this be? Like free(), both xfree() and xvfree() are fine to be
called with a NULL pointer. What's odd here is that the uppercase form (the
wrapper macro) is used - clearing the local variable is pointless when it
is about to go out of scope anyway.

Jan

Reply via email to