Re: [PATCH 1/2] iio: generic_buffer: Cleanup when receiving signals

2016-05-29 Thread Jonathan Cameron
On 23/05/16 17:10, Crestez Dan Leonard wrote: > On 05/21/2016 07:28 PM, Jonathan Cameron wrote: >> On 20/05/16 16:55, Peter Meerwald-Stadler wrote: >>> This also drops all the code freeing string buffers at the end of main. Memory is freed when the process exits anyway so there's no point

Re: [PATCH 1/2] iio: generic_buffer: Cleanup when receiving signals

2016-05-23 Thread Crestez Dan Leonard
On 05/21/2016 07:28 PM, Jonathan Cameron wrote: > On 20/05/16 16:55, Peter Meerwald-Stadler wrote: >> >>> This also drops all the code freeing string buffers at the end of main. >>> Memory is freed when the process exits anyway so there's no point in >>> cluttering the code with all those gotos. >>

Re: [PATCH 1/2] iio: generic_buffer: Cleanup when receiving signals

2016-05-21 Thread Jonathan Cameron
On 20/05/16 16:55, Peter Meerwald-Stadler wrote: > >> This also drops all the code freeing string buffers at the end of main. >> Memory is freed when the process exits anyway so there's no point in >> cluttering the code with all those gotos. > > well, it helps to see that all memory has been rel

Re: [PATCH 1/2] iio: generic_buffer: Cleanup when receiving signals

2016-05-20 Thread Peter Meerwald-Stadler
> This also drops all the code freeing string buffers at the end of main. > Memory is freed when the process exits anyway so there's no point in > cluttering the code with all those gotos. well, it helps to see that all memory has been released when looking for leaks :) e.g. valgrind becomes muc

[PATCH 1/2] iio: generic_buffer: Cleanup when receiving signals

2016-05-20 Thread Crestez Dan Leonard
This will clean (disable buffer/trigger/channels) when doing something like a CTRL-C. Otherwise restarting generic_buffer requires a manual echo 0 > buffer/enable This also drops all the code freeing string buffers at the end of main. Memory is freed when the process exits anyway so there's no poi