Skip to content

Commit

Permalink
fixup eproc: zeroed memory when create eproc
Browse files Browse the repository at this point in the history
Signed-off-by: John Sanpe <[email protected]>
  • Loading branch information
sanpeqf committed Jan 15, 2025
1 parent fef9fb3 commit 7a23ed7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/eproc/event-epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ epoll_create_eproc(const bfdev_alloc_t *alloc)
struct epoll_eproc *sproc;
void *block;

sproc = bfdev_malloc(alloc, sizeof(*sproc));
sproc = bfdev_zalloc(alloc, sizeof(*sproc));
if (!sproc)
return NULL;

Expand Down
2 changes: 1 addition & 1 deletion src/eproc/event-poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ poll_create_eproc(const bfdev_alloc_t *alloc)
{
struct poll_eproc *sproc;

sproc = bfdev_malloc(alloc, sizeof(*sproc));
sproc = bfdev_zalloc(alloc, sizeof(*sproc));
if (!sproc)
return NULL;

Expand Down
2 changes: 1 addition & 1 deletion src/eproc/event-select.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ select_create_eproc(const bfdev_alloc_t *alloc)
{
struct select_eproc *sproc;

sproc = bfdev_malloc(alloc, sizeof(*sproc));
sproc = bfdev_zalloc(alloc, sizeof(*sproc));
if (!sproc)
return NULL;

Expand Down

0 comments on commit 7a23ed7

Please sign in to comment.