Fix memory leak on error in driver/main.c.
(cherry picked from commit 09d59d744d)
This commit is contained in:
parent
1a725e063b
commit
5d320760eb
|
|
@ -367,6 +367,7 @@ static int t_preprocess_only(void)
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
if (WIFEXITED(rc)) {
|
if (WIFEXITED(rc)) {
|
||||||
fprintf(stderr, "errors preprocessing Verilog program.\n");
|
fprintf(stderr, "errors preprocessing Verilog program.\n");
|
||||||
|
free(cmd);
|
||||||
return WEXITSTATUS(rc);
|
return WEXITSTATUS(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue