[rescue] Mozilla Firefox

Joshua Boyd jdboyd at jdboyd.net
Fri Apr 23 15:33:16 CDT 2004


On Fri, Apr 23, 2004 at 01:41:50PM -0400, Charles Shannon Hendrix wrote:

> Here's a common error I found while working at Bank of America:
> 
>     somefunction(...)
>     {
> 	char buffer[1024];
> 	/* do some work */
> 	return buffer;
>     }
> 
> ...or:
> 
>     somefunction(...)
>     {
> 	char *buffer;
> 	buffer = malloc(something);
> 	/* do some work */
> 	free(buffer);
> 	return buffer;
>     }

Good God.

Doing that rarely, well, mistakes do get made sometimes (though code
reviews should have picked it up).  But to be common?  If that is
common, that someone seems to need to be fired.



More information about the rescue mailing list