Skip to content
Snippets Groups Projects
Commit eccbf019 authored by Simon McVittie's avatar Simon McVittie
Browse files

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: default avatarSimon McVittie <smcv@collabora.com>
parent f39bf26b
Branches
Tags
1 merge request!48graphics: Don't free a const version_string
Pipeline #1588 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment