File pwgen-2.06-fdleaks.patch of Package pwgen

Index: sha1num.c
===================================================================
--- sha1num.c.orig	2007-07-05 01:42:19.000000000 +0200
+++ sha1num.c	2009-10-02 04:17:46.000000000 +0200
@@ -53,6 +53,7 @@ void pw_sha1_init(char *sha1)
 	while( ( i = fread( buf, 1, sizeof( buf ), f ) ) > 0 ) {
 		sha1_update( &sha1_ctx, buf, i );
 	}
+	fclose(f);
 
 	return;
 }
Index: sha1.c
===================================================================
--- sha1.c.orig	2007-07-05 01:42:19.000000000 +0200
+++ sha1.c	2009-10-02 02:33:01.000000000 +0200
@@ -383,6 +383,8 @@ int main( argc, argv )
             sha1_update( &ctx, buf, i );
         }
 
+	fclose(f);
+
         sha1_finish( &ctx, sha1sum );
 
         for( j = 0; j < 20; j++ )
openSUSE Build Service is sponsored by