aboutsummaryrefslogtreecommitdiff
path: root/src/util/srp.cpp
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2016-07-28 08:56:22 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2016-08-10 16:59:32 +0200
commit48b3bb980d4a026d32739acc1982f16e3c303c5b (patch)
tree1685d44bb69642771a9840171bcab93a68f6da49 /src/util/srp.cpp
parent1be3894e6f283b0538a725bc438922c7d7ec294a (diff)
downloadminetest-48b3bb980d4a026d32739acc1982f16e3c303c5b.tar.gz
minetest-48b3bb980d4a026d32739acc1982f16e3c303c5b.tar.bz2
minetest-48b3bb980d4a026d32739acc1982f16e3c303c5b.zip
couple of memory leaks fixes.
Diffstat (limited to 'src/util/srp.cpp')
-rw-r--r--src/util/srp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/srp.cpp b/src/util/srp.cpp
index 0d3c938a3..77c1816e8 100644
--- a/src/util/srp.cpp
+++ b/src/util/srp.cpp
@@ -542,7 +542,7 @@ static SRP_Result fill_buff()
if (!fp) return SRP_ERR;
- if (fread(g_rand_buff, sizeof(g_rand_buff), 1, fp) != 1) return SRP_ERR;
+ if (fread(g_rand_buff, sizeof(g_rand_buff), 1, fp) != 1) { fclose(fp); return SRP_ERR; }
if (fclose(fp)) return SRP_ERR;
#endif
return SRP_OK;