[splint-discuss] Re: Can't fit our memory management to Splint's model

SF Markus Elfring elfring at users.sourceforge.net
Mon Jun 18 02:49:00 PDT 2007


> static void
> s1_free (/*@only@*/ /*@null@*/ struct s1 * f) {
>   if ( f == NULL )
>     return;
>   free(f);
> }

By the way: The check for the null pointer can be omitted in this example.
http://opengroup.org/onlinepubs/009695399/functions/free.html

Regards,
Markus


More information about the splint-discuss mailing list