diff --git a/src/connection/connection.c b/src/connection/connection.c index cfd4322..ef98ca6 100644 --- a/src/connection/connection.c +++ b/src/connection/connection.c @@ -1,3 +1,4 @@ +#include "xdbd_pool.h" #include #include #include @@ -22,6 +23,11 @@ xdbd_listening_t *xdbd_create_listening(xdbd_t *xdbd, struct sockaddr *sockaddr, xdbd_memzero(ls, sizeof(xdbd_listening_t)); + sa = xdbd_palloc(xdbd->pool, socklen); + if (sa == NULL) { + return NULL; + } + xdbd_memcpy(sa, sockaddr, socklen); ls->sockaddr = sa;