-
- Downloads
graphics: Don't free a const version_string
On the wflinfo code path, the version string is "borrowed" from the JSON
data structure, but on the vulkaninfo code path, it is built up from
multiple fields and needs to be freed.
Instead of having a variable that is sometimes "borrowed" and sometimes
"owned" and a boolean to indicate which it is, let's have a separate
variable new_version_string that is always "owned" (but possibly NULL),
then make version_string a "borrowed" pointer to either the wflinfo JSON
or new_version_string.
Signed-off-by:
Simon McVittie <smcv@collabora.com>
Loading
Please register or sign in to comment