[splint-discuss] DIR *dire storage created but not released??
Greg White
pcguy11 at live.com
Fri Nov 7 10:56:59 PST 2008
> Date: Fri, 7 Nov 2008 10:09:17 -0800
> From: Michael.Wojcik at microfocus.com
> To: splint-discuss at cs.virginia.edu
> Subject: Re: [splint-discuss] DIR *dire storage created but not released??
>
>> From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss-
>> bounces at cs.virginia.edu] On Behalf Of Greg White
>> Sent: Thursday, 06 November, 2008 20:17
>> To: splint-discuss at mail.cs.virginia.edu
>>
>> main.c: (in function findfiles)
>> main.c:79:2: Fresh storage dire not released before return
>> A memory leak has been detected. Storage allocated locally is not
>> released before the last reference to it is lost. (Use -mustfreefresh
>> to inhibit warning)
>> main.c:58:3: Fresh storage dire created
>>
>
> You haven't shown that Splint is broken yet, so asking for a fix is a
> bit premature.
If I do an open and close on dire and get a warning about fresh storage being created when I open and not being released when I close there is a bug somewhere. I saw this same warning when I did a malloc and forgot the free. If I add a free(dire) after the close the warning goes away but the program crashes saying something about double free memory.
Thanks,
_________________________________________________________________
Stay organized with simple drag and drop from Windows Live Hotmail.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_102008
More information about the splint-discuss
mailing list