valgrind: Fix memory leak at expr_error.
authorWilliam Tu <u9012063@gmail.com>
Mon, 4 Apr 2016 21:51:30 +0000 (14:51 -0700)
committerJustin Pettit <jpettit@ovn.org>
Tue, 29 Mar 2016 04:08:35 +0000 (21:08 -0700)
Reported by test case 2015: ovn -- action parsing.
    xvasprintf (util.c:164)
    expr_error (expr.c:489)
    expr_parse_field (expr.c:2910)
    action_parse_field (actions.c:287)

Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Justin Pettit <jpettit@ovn.org>
ovn/lib/actions.c

index 44957c7..a17b5a7 100644 (file)
@@ -288,6 +288,7 @@ action_parse_field(struct action_context *ctx,
                              &prereqs);
     if (error) {
         action_error(ctx, "%s", error);
+        free(error);
         return false;
     }