Skip to content

Commit 8d9500b

Browse files
committed
Avoid a couple of valgrind warnings on i686.
1 parent 7939ddf commit 8d9500b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Lib/poll_plugins/epoll_priv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int poll_create(void) {
66
}
77

88
int poll_set_data(void **_ev) {
9-
*_ev = memhook._malloc(sizeof(struct epoll_event));
9+
*_ev = memhook._calloc(1, sizeof(struct epoll_event));
1010
MOD_ALLOC_ASSERT(*_ev);
1111
return MOD_OK;
1212
}

Lib/poll_plugins/kqueue_priv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ int poll_create(void) {
1010
}
1111

1212
int poll_set_data(void **_ev) {
13-
*_ev = memhook._malloc(sizeof(struct kevent));
13+
*_ev = memhook._calloc(1, sizeof(struct kevent));
1414
MOD_ALLOC_ASSERT(*_ev);
1515
return MOD_OK;
1616
}

0 commit comments

Comments
 (0)