ofproto-dpif-upcall: Prevent memory leak on log message.
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Wed, 8 Jun 2016 16:04:11 +0000 (13:04 -0300)
committerJoe Stringer <joe@ovn.org>
Wed, 8 Jun 2016 16:48:29 +0000 (09:48 -0700)
When DPIF does not support UFID (like old kernels), it may print this
message quite frequently, if using an OVS version that does not include
the upstream fix af50de800ecb ("ofproto-dpif-upcall: Pass key to
dpif_flow_get().").

Fixes: 64bb477f0568 ("dpif: Minimize memory copy for revalidation.")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
ofproto/ofproto-dpif-upcall.c

index 1374950..a18fc5a 100644 (file)
@@ -2056,6 +2056,7 @@ log_unexpected_flow(const struct dpif_flow *flow, int error)
                   "unexpected flow (%s): ", ovs_strerror(error));
     odp_format_ufid(&flow->ufid, &ds);
     VLOG_WARN_RL(&rl, "%s", ds_cstr(&ds));
+    ds_destroy(&ds);
 }
 
 static void