[LTP] [PATCH] futex_waitv01: Correct assign and add cleanup

Petr Vorel pvorel@suse.cz
Thu Apr 14 17:25:36 CEST 2022


Hi Zhao, Cyril,

> Hi!
> > +static void cleanup(void)
> > +{
> > +	if (futex != NULL)
> > +		free(futex);

> free(NULL) is no-op, there is no reason to check for NULL before passing
> a pointer to free().

> The rest of the changes looks good to me.

Removed if check before free(futex) and merged with Cyril's Reviewed-by: tag.

Thanks!

Kind regards,
Petr


More information about the ltp mailing list