[ovs-dev] [PATCH 13/16] netdev-linux: Don't free a member of a struct.

Jesse Gross jesse at nicira.com
Tue Apr 13 14:41:15 UTC 2010


We allocate struct netdev_linux which contains struct netdev but
free the netdev.  In practice this makes no difference because the
netdev is the first member of the struct but we should be correct
anyways.
---
 lib/netdev-linux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 2fc5b09..da8c0f6 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -829,7 +829,7 @@ netdev_linux_destroy(struct netdev_dev *netdev_dev_)
         destroy_gre(netdev_dev_get_name(&netdev_dev->netdev_dev));
     }
 
-    free(netdev_dev_);
+    free(netdev_dev);
 }
 
 static int
-- 
1.6.3.3





More information about the dev mailing list