summaryrefslogtreecommitdiff
path: root/src/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udp.c')
-rw-r--r--src/udp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/udp.c b/src/udp.c
index 927e4b2..b5701ad 100644
--- a/src/udp.c
+++ b/src/udp.c
@@ -114,6 +114,9 @@ void udp_close(udp_socket_t** sock)
if((*sock)->fd_ > 0)
close((*sock)->fd_);
+
+ free(*sock);
+ *sock = NULL;
}
int udp_read(udp_socket_t* sock, u_int8_t* buf, u_int32_t len, struct sockaddr_storage* remote_end_)