--- gnutls-2.2.2/lib/auth_psk_passwd.c.old 2008-04-02 18:00:52.000000000 +0000 +++ gnutls-2.2.2/lib/auth_psk_passwd.c 2008-04-02 18:01:35.000000000 +0000 @@ -195,11 +195,14 @@ if (ret < 0) { gnutls_assert (); + fclose (fd); return GNUTLS_E_SRP_PWD_ERROR; } + fclose (fd); return 0; } } + fclose (fd); /* user was not found. Fake him. * the last index found and randomize the entry.