discovery: Free "buffer" in discovery_set_accept_controller_re().
authorJustin Pettit <jpettit@nicira.com>
Tue, 22 Feb 2011 00:06:28 +0000 (16:06 -0800)
committerJustin Pettit <jpettit@nicira.com>
Tue, 22 Feb 2011 17:36:57 +0000 (09:36 -0800)
Coverity #10728

ofproto/discovery.c

index 1c39e2ae4c31f884b8834108e6e11747e2d9f580..37d32e43fb76a1b5063fa59430fc99c1abffca65 100644 (file)
@@ -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;