]> granicus.if.org Git - graphviz/commit
xlib plugin handle_file_events: more tightly scope a long-lived dynamic buffer
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 31 Mar 2022 00:16:20 +0000 (17:16 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 2 Apr 2022 19:55:48 +0000 (12:55 -0700)
commitc97173b03f9f7507b6322017d0d052dd38ed4722
tree510a4532f36d37113da93aa7d03d9bb984d3b60e
parent975c9d8f29bcfc1c0b61162b9e9c2d618f474727
xlib plugin handle_file_events: more tightly scope a long-lived dynamic buffer

This buffer was being retained in a long-lived `static` pointer, increasing peak
memory usage and making it harder to use tools like Valgrind and ASan with
Graphviz. This change makes it more obvious to both users and tools what this
buffer is used for.

Note this also tweaks an error message to be more informative.
plugin/xlib/gvdevice_xlib.c