resource leak in secmem.c

Werner Koch wk at gnupg.org
Mon Mar 20 21:19:55 CET 2000


On Mon, 20 Mar 2000, Sam Roberts wrote:

> secmem.c:init_poolsize() does
>  
>  fd = open("/dev/zero");
> 
> but never closes that descriptor. Looks like a leak.

It's only called once and Unix has the nice property to close all 
file descriptors on _exit.


-- 
Werner Koch				OpenPGP key 621CC013	
OpenIT GmbH i.G.                        tel   +49 211 465357                           
Birkenstr. 12                           email info at openit.de                             
D-40233 Düsseldorf                      http://www.openit.de



More information about the Gnupg-devel mailing list