summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/socket_wrapper.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index aad5f3e..353ad1d 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -3739,9 +3739,7 @@ static int swrap_sendmsg_copy_cmsg(struct cmsghdr *cmsg,
size_t cmspace;
uint8_t *p;
- cmspace =
- (*cm_data_space) +
- CMSG_SPACE(cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)));
+ cmspace = *cm_data_space + CMSG_ALIGN(cmsg->cmsg_len);
p = realloc((*cm_data), cmspace);
if (p == NULL) {