mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 07:06:02 +01:00
Fix use after free
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
b1e8edf0d6
commit
029364bd30
1 changed files with 3 additions and 4 deletions
7
main.c
7
main.c
|
@ -107,13 +107,12 @@ main(int argc, char* argv[])
|
|||
return -1;
|
||||
}
|
||||
|
||||
const bool ret = synctex_forward_position(real_path, synctex_fwd);
|
||||
free(real_path);
|
||||
|
||||
if (ret == true) {
|
||||
if (synctex_forward_position(real_path, synctex_fwd) == true) {
|
||||
free(real_path);
|
||||
return 0;
|
||||
} else {
|
||||
girara_error("Could not find open instance for '%s'", real_path);
|
||||
free(real_path);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue