mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-28 14:21:45 +00:00
lib: Don't use malloc!
thread.c was using malloc. This was found by the assert added to memory.c. Fixes issues #170 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
1b4ae82d37
commit
f96872f001
@ -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 = (struct pollfd *) XCALLOC (MTYPE_THREAD_MASTER,
|
||||
sizeof (struct pollfd) * rv->handler.pfdsize);
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user