summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-04 12:17:34 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-04 12:17:34 +0200
commit52d1bd7d845f7e9cecef8cbce2719c10d0010e87 (patch)
tree09d796fcbf951715a88b8f4730e937199ddd9f85 /lib
parent0d50e06b73ba5b23c3167bf1b8c7b620a5b34823 (diff)
downloadgnutls-52d1bd7d845f7e9cecef8cbce2719c10d0010e87.tar.gz
Eliminated password file descriptor leak.
Issue discovered using codenomicon TLS test suite.
Diffstat (limited to 'lib')
-rw-r--r--lib/auth/psk_passwd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/auth/psk_passwd.c b/lib/auth/psk_passwd.c
index c553b4a26b..5c10997ba9 100644
--- a/lib/auth/psk_passwd.c
+++ b/lib/auth/psk_passwd.c
@@ -185,17 +185,16 @@ _gnutls_psk_pwd_find_entry(gnutls_session_t session, char *username,
ret = GNUTLS_E_SRP_PWD_ERROR;
goto cleanup;
}
- return 0;
+ ret = 0;
+ goto cleanup;
}
}
/* user was not found. Fake him.
- * the last index found and randomize the entry.
*/
ret = _randomize_psk(psk);
if (ret < 0) {
goto cleanup;
- return ret;
}
ret = 0;