[dpdk-dev] [PATCH v2 1/1] eal: fix resource leak of mapped memory

2016-06-15 Thread Panu Matilainen
On 06/15/2016 12:35 PM, Kerlin, MarcinX wrote: > Hi Sergio, > > Thanks for tips, I removed double casting and I leave (void *) casting > because pointer hp is const and compiler returns warnings. If hp is something that needs freeing then it shouldn't be const in the first place. Please fix that

[dpdk-dev] [PATCH v2 1/1] eal: fix resource leak of mapped memory

2016-06-15 Thread Kerlin, MarcinX
> -Original Message- > From: Panu Matilainen [mailto:pmatilai at redhat.com] > Sent: Wednesday, June 15, 2016 12:06 PM > To: Kerlin, MarcinX ; Gonzalez Monroy, Sergio > ; david.marchand at 6wind.com > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 1/1] eal:

[dpdk-dev] [PATCH v2 1/1] eal: fix resource leak of mapped memory

2016-06-15 Thread Sergio Gonzalez Monroy
Hi Marcin, On 14/06/2016 16:33, Marcin Kerlin wrote: > Patch fixes resource leak in rte_eal_hugepage_attach() where mapped files > were not freed back to the OS in case of failure. Patch uses the behavior > of Linux munmap: "It is not an error if the indicated range does not > contain any mapped p

[dpdk-dev] [PATCH v2 1/1] eal: fix resource leak of mapped memory

2016-06-15 Thread Kerlin, MarcinX
Hi Sergio, Thanks for tips, I removed double casting and I leave (void *) casting because pointer hp is const and compiler returns warnings. Regards, Marcin > -Original Message- > From: Gonzalez Monroy, Sergio > Sent: Wednesday, June 15, 2016 10:49 AM > To: Kerlin, MarcinX ; david.march

[dpdk-dev] [PATCH v2 1/1] eal: fix resource leak of mapped memory

2016-06-14 Thread Marcin Kerlin
Patch fixes resource leak in rte_eal_hugepage_attach() where mapped files were not freed back to the OS in case of failure. Patch uses the behavior of Linux munmap: "It is not an error if the indicated range does not contain any mapped pages". Coverity issue: 13295, 13296, 13303 Fixes: af75078fec