mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-14 01:30:31 +00:00
Merge pull request #171 from donaldsharp/double_free
lib: Don't use malloc!
This commit is contained in:
commit
62fb7b19e8
@ -489,8 +489,8 @@ thread_master_create (void)
|
||||
#if defined(HAVE_POLL)
|
||||
rv->handler.pfdsize = rv->fd_limit;
|
||||
rv->handler.pfdcount = 0;
|
||||
rv->handler.pfds = (struct pollfd *) malloc (sizeof (struct pollfd) * rv->handler.pfdsize);
|
||||
memset (rv->handler.pfds, 0, sizeof (struct pollfd) * rv->handler.pfdsize);
|
||||
rv->handler.pfds = XCALLOC (MTYPE_THREAD_MASTER,
|
||||
sizeof (struct pollfd) * rv->handler.pfdsize);
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user