From 5d5fa098fdb8bf73dae7dc2edc3102441f4b65a3 Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Wed, 15 Sep 2010 10:19:55 +0200 Subject: [PATCH] Fix ressource leak --- etc/uams/uams_dhx2_passwd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/uams/uams_dhx2_passwd.c b/etc/uams/uams_dhx2_passwd.c index 39479b63..0f07333b 100644 --- a/etc/uams/uams_dhx2_passwd.c +++ b/etc/uams/uams_dhx2_passwd.c @@ -401,6 +401,8 @@ static int logincont1(void *obj _U_, struct passwd **uam_pwd _U_, K_MD5hash = calloc(1, K_hash_len = gcry_md_get_algo_dlen(GCRY_MD_MD5)); if (K_MD5hash == NULL) { ret = AFPERR_MISC; + free(K_bin); + K_bin = NULL; goto error_noctx; } gcry_md_hash_buffer(GCRY_MD_MD5, K_MD5hash, K_bin, PRIMEBITS/8); -- 2.39.2