summaryrefslogtreecommitdiff
path: root/src/srptool.c
diff options
context:
space:
mode:
authorSUMIT AGGARWAL <aggarwal.s@samsung.com>2016-08-19 11:58:39 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-08-22 11:25:44 +0200
commit39cdaed454b12c7be9881d550ec2ea89c649c707 (patch)
treed0c8a25316d560928489feb53bf80c11cb7ab510 /src/srptool.c
parent12f5166d46db1459455b33b32c01b1fde5c73701 (diff)
downloadgnutls-39cdaed454b12c7be9881d550ec2ea89c649c707.tar.gz
Fix HANDLE_LEAK and memory leak issues.
Diffstat (limited to 'src/srptool.c')
-rw-r--r--src/srptool.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/srptool.c b/src/srptool.c
index 5d60cde0f7..8260f15fd9 100644
--- a/src/srptool.c
+++ b/src/srptool.c
@@ -114,11 +114,13 @@ static int generate_create_conf(const char *tpasswd_conf)
if (gnutls_srp_base64_encode_alloc(&n, &str_n) < 0) {
fprintf(stderr, "Could not encode\n");
+ fclose(fd);
return -1;
}
if (gnutls_srp_base64_encode_alloc(&g, &str_g) < 0) {
fprintf(stderr, "Could not encode\n");
+ fclose(fd);
return -1;
}