Re: bioctl.c: leaking memory ?

2009-07-11 Thread Remco
On Saturday 11 July 2009 11:38:09 Stuart Henderson wrote: > On 2009/07/11 11:15, Remco wrote: > > I was wondering, isn't it true that in code like this, > > > > allocated_mem = malloc(...); > > ... > > if (error_condition) > >err(...); > > ... > > free(allocated_mem); > > > > the 'allocated_mem

Re: bioctl.c: leaking memory ?

2009-07-11 Thread Stuart Henderson
On 2009/07/11 11:15, Remco wrote: > I was wondering, isn't it true that in code like this, > > allocated_mem = malloc(...); > ... > if (error_condition) >err(...); > ... > free(allocated_mem); > > the 'allocated_mem' will get lost into space if 'error_condition' occurs ? > > If so, the 'bio_

bioctl.c: leaking memory ?

2009-07-11 Thread Remco
I was wondering, isn't it true that in code like this, allocated_mem = malloc(...); ... if (error_condition) err(...); ... free(allocated_mem); the 'allocated_mem' will get lost into space if 'error_condition' occurs ? If so, the 'bio_createraid', and the 'bio_parse_devlist' function which is