Update synctex internal copy to 1.21
Submitted by dev..@..ook.it
Link to original bug (#793711)
Description
I classified this memory leak as a minor bug because it happens only in a specific rare case.
As explained in synctex_parser.h
, the function synctex_scanner_new_with_output_file
supports a parameter, called build_directory, provided as a work around of a bug in MikTeX where the synctex file does not follow the pdf file. When the build_directory parameter is not null there is a memory leak in the code. In fact, synctex_scanner_new_with_output_file
calls _synctex_open
whose allocates build_output without freeing it at the end.
This is a rare case because Evince always uses synctex_scanner_new_with_output_file
with build_directory=NULL
. Thus, build_output
is never allocated inside _synctex_open
. However, the function is publicly exposed by the synctex library, hence this memory leak could happen if someone uses the function specifying the build_directory
.
Patch 368744, "Free the allocated memory by _synctex_open before to return":
0001-Memory-leak-in-_synctex_open-function.patch
Version: git master