src/server/util/io.c

changeset 46
636e05eb48f6
parent 44
3da1f7b6847f
child 54
3a1d5a52adfc
--- a/src/server/util/io.c	Wed Jan 02 16:03:50 2013 +0100
+++ b/src/server/util/io.c	Sat Jan 12 14:00:47 2013 +0100
@@ -50,8 +50,8 @@
 };
 
 
-IOStream* stream_new_from_fd(int fd) {
-    SystemIOStream *st = malloc(sizeof(SystemIOStream));
+IOStream* stream_new_from_fd(pool_handle_t *pool, int fd) {
+    SystemIOStream *st = pool_malloc(pool, sizeof(SystemIOStream));
     st->st = native_io_funcs;
     st->fd = fd;
     return (IOStream*)st;
@@ -66,8 +66,8 @@
 }
 
 
-IOStream* net_stream_from_fd(int fd) {
-    NetIOStream *st = malloc(sizeof(NetIOStream));
+IOStream* net_stream_from_fd(pool_handle_t *pool, int fd) {
+    NetIOStream *st = pool_malloc(pool, sizeof(NetIOStream));
     st->st = net_io_funcs;
     st->fd = fd;
     st->max_read = 0;

mercurial