summaryrefslogtreecommitdiffstats
path: root/src/fastd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fastd.h')
-rw-r--r--src/fastd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fastd.h b/src/fastd.h
index 9b1191a..9736e08 100644
--- a/src/fastd.h
+++ b/src/fastd.h
@@ -142,6 +142,7 @@ struct fastd_bind_address {
struct fastd_socket {
int fd;
const fastd_bind_address_t *addr;
+ fastd_peer_address_t *bound_addr;
fastd_peer_t *peer;
};
@@ -458,6 +459,11 @@ static inline void fastd_socket_close(fastd_context_t *ctx, fastd_socket_t *sock
sock->fd = -2;
}
+
+ if (sock->bound_addr) {
+ free(sock->bound_addr);
+ sock->bound_addr = NULL;
+ }
}
static inline bool timespec_after(const struct timespec *tp1, const struct timespec *tp2) {