Commit 029364bd authored by Sebastian Ramacher's avatar Sebastian Ramacher

Fix use after free

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent b1e8edf0
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment