[ovs-dev] [PATCH v2 ovn] logical-fields: fix memory leak while initializing ovnfield_by_name

Damijan Skvarc damjan.skvarc at gmail.com
Wed Aug 7 11:29:25 UTC 2019


fixed 0-day Robot issues 

Signed-off-by: Damijan Skvarc <damjan.skvarc at gmail.com>
---
 lib/logical-fields.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/logical-fields.c b/lib/logical-fields.c
index 62b9a71..fdc78cf 100644
--- a/lib/logical-fields.c
+++ b/lib/logical-fields.c
@@ -57,9 +57,8 @@ add_ct_bit(const char *name, int index, struct shash *symtab)
     free(expansion);
 }
 
-
 static void
-init_ovnfield_by_name()
+init_ovnfield_by_name(void)
 {
     static bool initialized = 0;
 
@@ -70,7 +69,7 @@ init_ovnfield_by_name()
             ovs_assert(of->id == i); /* Fields must be in the enum order. */
             shash_add_once(&ovnfield_by_name, of->name, of);
         }
-        initialized=1;
+        initialized = 1;
     }
 }
 
-- 
2.7.4



More information about the dev mailing list