While our use of the buffer produced by ofpbuf_use_data() currently
does not lead to any memory allocations, somebody might introduce
that in the future.
The documentation for ofpbuf_use_data advises to always make a
call to ofpbuf_uninit(), let's adhere to that.
Fixes: 91fc51106cfe ("route-table: Support parsing multipath routes.")
Signed-off-by: Frode Nordahl <[email protected]>
---
lib/route-table.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/route-table.c b/lib/route-table.c
index fbda4c41d..b7964522f 100644
--- a/lib/route-table.c
+++ b/lib/route-table.c
@@ -419,15 +419,18 @@ route_table_parse__(struct ofpbuf *buf, size_t ofs,
if (!mp_rtnh) {
VLOG_DBG_RL(&rl, "got short message while parsing "
"multipath attribute");
+ ofpbuf_uninit(&mp_buf);
goto error_out;
}
if (!route_table_parse__(&mp_buf, 0, nlmsg, rtm, mp_rtnh,
&mp_change)) {
+ ofpbuf_uninit(&mp_buf);
goto error_out;
}
ovs_list_push_back_all(&change->rd.nexthops,
&mp_change.rd.nexthops);
+ ofpbuf_uninit(&mp_buf);
}
}
if (!attrs[RTA_OIF] && !attrs[RTA_GATEWAY]
--
2.43.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev