summaryrefslogtreecommitdiff
path: root/xs_openssl.h
diff options
context:
space:
mode:
authorGravatar Santtu Lakkala2025-02-04 13:09:49 +0200
committerGravatar Santtu Lakkala2025-02-04 13:11:56 +0200
commit11d1adca7a2f3e398722f3160ac6a8061f18c31d (patch)
treecf4deaf5e76e399ad86a940d48872f90bed6cb56 /xs_openssl.h
parentUpdated documentation. (diff)
downloadpenes-snac2-11d1adca7a2f3e398722f3160ac6a8061f18c31d.tar.gz
penes-snac2-11d1adca7a2f3e398722f3160ac6a8061f18c31d.tar.xz
penes-snac2-11d1adca7a2f3e398722f3160ac6a8061f18c31d.zip
Fix memory leaks
Fix a memory leak on each login; the allocated OpenSSL BIOs were only freed partially. Also add a missing deallocation during server socket creation.
Diffstat (limited to 'xs_openssl.h')
-rw-r--r--xs_openssl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xs_openssl.h b/xs_openssl.h
index 9388691..f215bcc 100644
--- a/xs_openssl.h
+++ b/xs_openssl.h
@@ -83,7 +83,7 @@ xs_val *xs_base64_dec(const xs_str *data, int *size)
83 s = xs_realloc(s, _xs_blk_size(*size + 1)); 83 s = xs_realloc(s, _xs_blk_size(*size + 1));
84 s[*size] = '\0'; 84 s[*size] = '\0';
85 85
86 BIO_free_all(mem); 86 BIO_free_all(b64);
87 87
88 return s; 88 return s;
89} 89}