forked from drath/libratbag
tools: ratbag-command: fix a memory leak
valgrind complains that we did not release the profile, so we shall. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
@@ -441,8 +441,10 @@ ratbag_cmd_info(const struct ratbag_cmd *cmd,
|
||||
printf(" Profile %d (%s)%s\n", i,
|
||||
ratbag_profile_is_enabled(profile) ? "enabled" : "disabled",
|
||||
ratbag_profile_is_active(profile) ? " (active)" : "");
|
||||
if (!ratbag_profile_is_enabled(profile))
|
||||
if (!ratbag_profile_is_enabled(profile)) {
|
||||
ratbag_profile_unref(profile);
|
||||
continue;
|
||||
}
|
||||
|
||||
printf(" Resolutions:\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user