Use frame_new() instead of directly using the pool allocator.
authorMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 29 May 2008 21:31:56 +0000 (21:31 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 29 May 2008 21:31:56 +0000 (21:31 +0000)
This also ensures initialization if f->refcount, which was left out.

mmsoftware/tap-bridge/tap-bridge.c

index e4cd532..cbda92f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: tap-bridge.c,v 1.5 2008/01/09 03:53:53 mmondor Exp $ */
+/* $Id: tap-bridge.c,v 1.6 2008/05/29 21:31:56 mmondor Exp $ */
 
 /*
  * Copyright (C) 2007, Matthew Mondor
@@ -1201,9 +1201,9 @@ frame_receive(tap_t *tap)
                struct iovec    iov[2];
                modnode_t       *n;
 
-               if ((f = (frame_t *)pool_alloc(&frame_pool, false)) == NULL) {
+               if ((f = frame_new()) == NULL) {
                        errno = ENOMEM;
-                       warning(errno, "pool_alloc");
+                       warning(errno, "frame_new");
                        return false;
                }