X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto-dpif-governor.c;h=75379d1f769d95da3f910155dc6958a7d41b4251;hb=a39c3ff9f586d3416976d3c3bd095fa81d73efa0;hp=506dadb6df4fdb009937ef49be2d8cf461e5bd61;hpb=e368cad8ecf6dbf272b2a3775b2e3e5e2dc6a5cf;p=sliver-openvswitch.git diff --git a/ofproto/ofproto-dpif-governor.c b/ofproto/ofproto-dpif-governor.c index 506dadb6d..75379d1f7 100644 --- a/ofproto/ofproto-dpif-governor.c +++ b/ofproto/ofproto-dpif-governor.c @@ -18,7 +18,6 @@ #include "ofproto-dpif-governor.h" -#include #include #include "coverage.h" @@ -71,6 +70,7 @@ governor_destroy(struct governor *g) { if (g) { VLOG_INFO("%s: disengaging", g->name); + free(g->name); free(g->table); free(g); } @@ -120,7 +120,7 @@ governor_should_install_flow(struct governor *g, uint32_t hash, int n) bool install_flow; uint8_t *e; - assert(n > 0); + ovs_assert(n > 0); /* Count these packets and begin a new generation if necessary. */ g->n_packets += n; @@ -176,8 +176,8 @@ governor_should_install_flow(struct governor *g, uint32_t hash, int n) static void governor_new_generation(struct governor *g, unsigned int size) { - assert(size >= MIN_SIZE && size <= MAX_SIZE); - assert(is_pow2(size)); + ovs_assert(size >= MIN_SIZE && size <= MAX_SIZE); + ovs_assert(is_pow2(size)); /* Allocate new table, if necessary. */ if (g->size != size) {