]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/thread.c
Merge remote-tracking branch 'origin/stable/2.0'
[mirror_frr.git] / lib / thread.c
index 28245d11a2a4bcbb68631ed671e0b3743d882384..c1558a83e1ddfbc1917e0200c664fab7b54d7e76 100644 (file)
@@ -362,8 +362,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;
 }