[PATCH 1/2] ubox: fix GCC fanalyzer warnings

Jo-Philipp Wich jo at mein.io
Mon Jul 18 01:37:28 PDT 2022


Hi,

> [...]
> -	free(aliases);
> +	if (aliases)
> +	    free(aliases);

This check is redundant, the free() function is guaranteed to be NULL-safe in
the standard:

   The free() function shall cause the space pointed to by ptr to be
   deallocated; that is, made available for further allocation. If ptr is a
   null pointer, no action shall occur.

> [...]

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20220718/176554e9/attachment-0001.sig>


More information about the openwrt-devel mailing list