Re: flwrapper on Opteron

Michael Obster <[email protected]> Tue, 28 Feb 2006 23:06:05 +0100
Newsgroups gmane.linux.distributions.rock.devel
Message-ID <[email protected]>
Hi Stefan,

Stefan Fiedler schrieb:
> There's only one occurrence of free() in /misc/tools-source/fl_wrapper.c 
> (which is created from the corresponding .sh file):
> 
> /misc/tools-source/fl_wrapper.c{,.sh}:
> 		char buf[512], *buf2, *logfile;
> 		...
> 		buf2=get_current_dir_name();
> 		...
> 		free(buf2);
> 
> According to the man pages of "3 get_current_dir_name" and "3 free", 
> get_current_dir_name() should malloc() a buffer and store it in buf2, which 
> is later on (correctly) freed.
> free() requires a void * as argument, while buf2 is a char *; you could try an 
> explicit type cast and replace 
> 		free(buf2);
> with
> 		free((void *)buf2);
> 
> Hope that helps,

thank you for your tip. I will try it in my current build (because I've 
corrupted my 64-bit userland a few minutes ago with find as flist 
wrapper alternative, which is a little imprecise...)

Results at CLT :-). See you on saturday.

Cheers,
Michael