mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 13:28:07 +02:00
backlight: fix backlight_path memory leak
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
This commit is contained in:
parent
87d3b61355
commit
981fa33809
1 changed files with 3 additions and 1 deletions
|
|
@ -210,8 +210,10 @@ struct backlight *backlight_init(struct udev_device *drm_device,
|
|||
entry->d_name) < 0)
|
||||
goto err;
|
||||
|
||||
if (asprintf(&path, "%s/%s", backlight_path, "type") < 0)
|
||||
if (asprintf(&path, "%s/%s", backlight_path, "type") < 0) {
|
||||
free(backlight_path);
|
||||
goto err;
|
||||
}
|
||||
|
||||
fd = open(path, O_RDONLY);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue