Skip to content

Commit

Permalink
ovsdb: Fix error leak for negative timeout and invalid until case
Browse files Browse the repository at this point in the history
Although the check for negative timeout is present, the error string
is overwritten if an invalid "until" is found right after. This leaks
an error string and results in not reporting the negative timeout back
to the user even though it is encountered first.

Signed-off-by: Thomas Graf <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
Thomas Graf authored and blp committed Aug 28, 2014
1 parent ffd9722 commit 3c5ce2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ovsdb/execution.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ ovsdb_execute_wait(struct ovsdb_execution *x, struct ovsdb_parser *parser,
} else {
timeout_msec = LLONG_MAX;
}
}
if (!error) {
if (strcmp(json_string(until), "==")
&& strcmp(json_string(until), "!=")) {
error = ovsdb_syntax_error(until, NULL,
Expand Down

0 comments on commit 3c5ce2c

Please sign in to comment.