[ovs-dev] [coverity 05/14] discovery: Free "buffer" in discovery_set_accept_controller_re().

Justin Pettit jpettit at nicira.com
Tue Feb 22 01:44:48 UTC 2011


Coverity #10728
---
 ofproto/discovery.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ofproto/discovery.c b/ofproto/discovery.c
index 1c39e2a..37d32e4 100644
--- a/ofproto/discovery.c
+++ b/ofproto/discovery.c
@@ -198,6 +198,7 @@ discovery_set_accept_controller_re(struct discovery *d, const char *re_)
         char *buffer = xmalloc(length);
         regerror(error, regex, buffer, length);
         VLOG_WARN("%s: %s: %s", d->dpif_name, re, buffer);
+        free(buffer);
         free(regex);
         free(re);
         return EINVAL;
-- 
1.7.1





More information about the dev mailing list