[splint-discuss] Re: Can't fit our memory management to Splint's
model
Tommy Pettersson
ptp at lysator.liu.se
Mon Jun 18 02:26:47 PDT 2007
On Mon, Jun 18, 2007 at 08:43:32AM +0200, Wenzel, Bodo wrote:
> static void
> s_free (/*@only@*/ /*@null@*/ struct s * f) {
> if ( f == NULL )
> return;
> s1_free(f->f1);
> s2_free(f->f2);
> free(f);
> }
It has the problem that if you "forget" to free e.g. f->f2 in
s_free() splint doesn't warn you about it. Maybe not a big deal
though, if s_free is simple.
--
Tommy Pettersson <ptp at lysator.liu.se>
More information about the splint-discuss
mailing list