mac-learning: Avoid unnecessary call to free().
authorBen Pfaff <blp@nicira.com>
Fri, 8 Apr 2011 20:19:56 +0000 (13:19 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 26 Apr 2011 00:11:29 +0000 (17:11 -0700)
lib/mac-learning.c

index 981578d8aa688ae9a547b9c3bc3729dd07cf3423..f9f4db3d4bfbd2e9a2846c5d5a4861a70ebf6496 100644 (file)
@@ -134,8 +134,8 @@ mac_learning_destroy(struct mac_learning *ml)
 {
     if (ml) {
         bitmap_free(ml->flood_vlans);
+        free(ml);
     }
-    free(ml);
 }
 
 /* Provides a bitmap of VLANs which have learning disabled, that is, VLANs on