about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-03-14 19:35:01 +0000
committerEric Wong <normalperson@yhbt.net>2011-03-14 19:35:01 +0000
commit82a3e7d24e3cd51f15df593590986b7c5d0834aa (patch)
treefd610b7adfc099dfe11ac299e62878d4c1dc47b7
parent6299ef55e20454eaca0b9860ac4a9bd6ddd143a7 (diff)
downloadkgio-82a3e7d24e3cd51f15df593590986b7c5d0834aa.tar.gz
Oops, fortunately we allocated too much and not too little.
-rw-r--r--ext/kgio/poll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/kgio/poll.c b/ext/kgio/poll.c
index 0a4cf5a..502f660 100644
--- a/ext/kgio/poll.c
+++ b/ext/kgio/poll.c
@@ -62,7 +62,7 @@ static int io_to_pollfd_i(VALUE key, VALUE value, VALUE args)
 
 static void hash2pollfds(struct poll_args *a)
 {
-        a->fds = xmalloc(sizeof(struct poll_args) * RHASH_SIZE(a->ios));
+        a->fds = xmalloc(sizeof(struct pollfd) * RHASH_SIZE(a->ios));
         a->fd_to_io = st_init_numtable();
         rb_hash_foreach(a->ios, io_to_pollfd_i, (VALUE)a);
 }