aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-22 18:05:41 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-22 18:05:41 -0800
commit5836e6b0308d8562420256aebff29cc39f5d3344 (patch)
tree3e41b75a6ab4bc46bd2dc67adb7100c9ebdf45c5 /src
parent58537035fda61d18d7dab19a93348dcd1b8f3d41 (diff)
downloadnng-5836e6b0308d8562420256aebff29cc39f5d3344.tar.gz
nng-5836e6b0308d8562420256aebff29cc39f5d3344.tar.bz2
nng-5836e6b0308d8562420256aebff29cc39f5d3344.zip
Fix leak on bad URL
Diffstat (limited to 'src')
-rw-r--r--src/core/listener.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/listener.c b/src/core/listener.c
index 9e0025fc..08b235af 100644
--- a/src/core/listener.c
+++ b/src/core/listener.c
@@ -208,6 +208,7 @@ nni_listener_create(nni_listener **lp, nni_sock *s, const char *url_str)
return (NNG_ENOMEM);
}
if ((rv = nni_url_parse_inline(&l->l_url, url_str)) != 0) {
+ nni_url_fini(&l->l_url);
NNI_FREE_STRUCT(l);
return (rv);
}