]> mj.ucw.cz Git - libucw.git/commitdiff
Main: Fixed miscalculated memory allocation
authorMartin Mares <mj@ucw.cz>
Tue, 7 Feb 2012 09:10:11 +0000 (10:10 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 7 Feb 2012 09:10:11 +0000 (10:10 +0100)
ucw/mainloop.c

index c7fe01250b365649fdca44bfd2acc9a904f0c041..454ea81c2776c7316d4a651889e3fcddd54444af 100644 (file)
@@ -100,7 +100,7 @@ main_new(void)
   m->epoll_fd = epoll_create(64);
   if (m->epoll_fd < 0)
     die("epoll_create() failed: %m");
-  m->epoll_events = xmalloc(EPOLL_BUF_SIZE * sizeof(struct epoll_event *));
+  m->epoll_events = xmalloc(EPOLL_BUF_SIZE * sizeof(struct epoll_event));
   clist_init(&m->file_recalc_list);
 #else
   m->poll_table_obsolete = 1;