Re: [HelenOS-devel] Fix memory leak about mkmfs util

2016-03-30 Thread Manuele Conti
Hi Jan, You right tomorrow I'll resend my patch with your suggest. Many thanks, Manuele > On 30 Mar 2016, at 15:54, Jan Vesely wrote: > >> On Wed, 2016-03-30 at 13:21 +0200, Manuele Conti wrote: >> Hi All, >> I found a memory leak in a mkmfs util and I try to fix it. > >

Re: [HelenOS-devel] Fix memory leak about mkmfs util

2016-03-30 Thread Jakub Jermář
On 03/30/2016 03:54 PM, Jan Vesely wrote: > On Wed, 2016-03-30 at 13:21 +0200, Manuele Conti wrote: >> Hi All, >> I found a memory leak in a mkmfs util and I try to fix it. > > free() is NULL safe (C std 7.20.3.2, and also in HelenOS > uspace/lib/c/generic/malloc.c:972). doing: > > if (p) >

[HelenOS-devel] Fix memory leak about mkmfs util

2016-03-30 Thread Manuele Conti
Hi All, I found a memory leak in a mkmfs util and I try to fix it. Regards, Manuele === modified file 'uspace/app/mkmfs/mkmfs.c' --- uspace/app/mkmfs/mkmfs.c 2015-08-22 05:12:30 + +++ uspace/app/mkmfs/mkmfs.c 2016-03-30 11:03:04 + @@ -639,8 +639,10 @@ ibmap_buf = malloc(ibmap_nblocks *

Re: [HelenOS-devel] Remove leak in tcp_pdu_encode

2016-03-30 Thread Jakub Jermář
Hi Manuele, On 03/29/2016 12:10 PM, Manuele Conti wrote: > I found a memory leak in tcp_pdu_encode function and I try to fix it. I fixed this in mainline,2443 along with another leak and a missing check for failed tcp_header_encode(). Thanks, Jakub

Re: [HelenOS-devel] Fix memory leak about mkmfs util

2016-03-30 Thread Jan Vesely
On Wed, 2016-03-30 at 13:21 +0200, Manuele Conti wrote: > Hi All, > I found a memory leak in a mkmfs util and I try to fix it. free() is NULL safe (C std 7.20.3.2, and also in HelenOS uspace/lib/c/generic/malloc.c:972). doing: if (p) free(p); is useless. regards, Jan > > Regards, >