ovs-brcompatd: Don't delete bridge twice.
authorBen Pfaff <blp@nicira.com>
Tue, 2 Mar 2010 22:19:13 +0000 (14:19 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 2 Mar 2010 22:19:13 +0000 (14:19 -0800)
Somehow I totally goofed when I wrote commit dcdf169e "ovs-brcompatd:
Delete Bridge record when deleting a bridge."  In fact, del_bridge()
already deleted the Bridge record, and I missed that, and so I added a
*second* call to ovsrec_bridge_delete(br).  Obviously that's bad.

This commit removes the first call to delete the bridge.  It is a slight
improvement over simply reverting the buggy commit in that it doesn't
refer to 'br' (just as a pointer equality comparison) after deleting it.

Bug #2448.

vswitchd/ovs-brcompatd.c

index bf571d7..dd7ea42 100644 (file)
@@ -498,8 +498,6 @@ del_bridge(const struct ovsrec_open_vswitch *ovs, const char *br_name)
 
     del_port(br, br_name);
 
-    ovsrec_bridge_delete(br);
-
     bridges = xmalloc(sizeof *ovs->bridges * ovs->n_bridges);
     for (i = n = 0; i < ovs->n_bridges; i++) {
         if (ovs->bridges[i] != br) {