new_trans = CALLOC (1, sizeof (*new_trans)); new_trans->xl = this->xl; new_trans->fini = this->fini; memcpy (&new_trans->peerinfo.sockaddr, &new_sockaddr, addrlen); new_trans->peerinfo.sockaddr_len = addrlen; new_trans->myinfo.sockaddr_len sizeof (new_trans->myinfo.sockaddr); ret = getsockname (new_sock, SA (&new_trans->myinfo.sockaddr), &new_trans->myinfo.sockaddr_len); CALLOC from libglusterfs/src/mem-pool.h: #define CALLOC(cnt,size) calloc(cnt,size) man calloc: RETURN VALUE For calloc() and malloc(), the value returned is a pointer to the allocated memory, which is suitably aligned for any kind of variable, or NULL if the request fails. Did I understand the source? What about calloc returning NULL? -- Regards, Stephan