Re: [PATCH] libselinux: clean up process file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 6, 2016 at 1:43 PM, William Roberts
<bill.c.roberts@xxxxxxxxx> wrote:
> <snip>
>>>>>
>>>>> Also, there are some memory leaks in there; run it under valgrind, e.g.
>>>>> valgrind --leak-check=full matchpathcon /etc
>>>>
>>>> OK I'll run that test.
>>
>> I cant reproduce:
> bad send... Can you send your valgrind output? Are you sure its not there
> prior to my patch? The only heap alloc I add is the strdup, closef should
> always be called despite any flow changes in process_file() as the caller,
> init() always goes to label finish.

Ok I see the condition now, I had to statically link in libselinux to
matchpathcon to get it to not use the system one, even though I set
LD_LIBRARY_PATH.  Once I did that,
I got the leaks. The condition on which it occurs, is because
process_file() can be called N times and reseats the data->path
pointer. This should have been obvious since
mmap area is a linked list.


>
>
> --
> Respectfully,
>
> William C Roberts



-- 
Respectfully,

William C Roberts
_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux