mcstrans: free constraint in error branch
Free constraint, like in all other error branches. Reported-by: Cppcheck Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
2b6f639a52
commit
55b474ee41
|
@ -477,6 +477,7 @@ add_constraint(char op, char *raw, char *tok) {
|
|||
}
|
||||
if (asprintf(&constraint->text, "%s%c%s", raw, op, tok) < 0) {
|
||||
log_error("asprintf failed %s", strerror(errno));
|
||||
free(constraint);
|
||||
return -1;
|
||||
}
|
||||
constraint->op = op;
|
||||
|
|
Loading…
Reference in New Issue