[LTP] [PATCH v3 3/3] syscalls/ioctl_ns0[156]: align stack and wait for child

Jan Stancek jstancek@redhat.com
Thu Jun 13 16:57:35 CEST 2019

----- Original Message -----
> Hi!
> > > We need free(child_stack) in the cleanup function.
> > 
> > Can you elaborate?
> If I remember correctly at some point we decided to clean up after tests
> properly so that we don't upset various debugging tools, i.e. coverity,
> valgrind, etc. and I think that you were part of that discussion.

I recall I started with that position (free all), and I thought you
turned me around after this many years :-).

Do we have anything about this in style guide? I only found brief mention 
in "don't call cleanup from setup" section, which isn't even possible with newlib.

You don't need to clean up the following:                                                                                                                                                                          
 * +malloc(3)+'ed memory.                                                                                                                                                                                          
 * Read-only file descriptors in persistent paths (i.e. not                                                                                                                                                        
   temporary directories).  

> --
> Cyril Hrubis
> chrubis@suse.cz

More information about the ltp mailing list