aboutsummaryrefslogtreecommitdiff
path: root/src/nng.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nng.c')
-rw-r--r--src/nng.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nng.c b/src/nng.c
index 39206941..bd403896 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -679,6 +679,12 @@ nng_device(nng_socket s1, nng_socket s2)
}
rv = nni_device(sock1, sock2);
+ if (sock1 != NULL) {
+ nni_sock_rele(sock1);
+ }
+ if (sock2 != NULL) {
+ nni_sock_rele(sock2);
+ }
return (rv);
}