mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-06 09:35:20 +00:00
8cc6d99c66
libdpkg is leaking memory on every initialization. Initialization happens everytime deb_packages gets queried. The memory leaked is allocated for the "triggersdir" global variable by "dpkg_db_get_path" called in "trigdef_update_start". "trigdef_update_start" is called by "trig_incorporate" just after the memory for "triggersdir" has been allocated. In some occasions "trigdef_update_start" is also called two times in a row. In all these cases the memory do not get deallocated in between calls, so the old memory is lost. Since the result of "dpkg_db_get_path" depends on the database dir that has been set, and in the "trigdef_update_start" function it's not possible to know if it has changed from the previous allocation or not, it's necessary to always deallocate vs just avoid to call "dpkg_db_get_path". Fix also a couple of other leaks on error. |
||
---|---|---|
.. | ||
cmake | ||
CMakeLists.txt |