diff mbox series

[ovs-dev] ofproto: Release ofport_usage to avoid memory leak.

Message ID CAOXweTdHBRVeMOjm8W5X27-Uj+QkRWWEvw3Wc3C+EZiTQ4O5rw@mail.gmail.com
State Superseded
Headers show
Series [ovs-dev] ofproto: Release ofport_usage to avoid memory leak. | expand

Checks

Context Check Description
ovsrobot/apply-robot warning apply and check: warning
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Mengxin Liu Sept. 19, 2022, 7:37 a.m. UTC
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
---
 ofproto/ofproto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.24.3 (Apple Git-128)
diff mbox series

Patch

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 3a527683c..7c6cb1c56 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -2429,7 +2429,7 @@  static void
 dealloc_ofp_port(struct ofproto *ofproto, ofp_port_t ofp_port)
 {
     if (ofp_to_u16(ofp_port) < ofproto->max_ports) {
-        ofport_set_usage(ofproto, ofp_port, time_msec());
+        ofport_remove_usage(ofproto, ofp_port);
     }
 }