Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jakob Bornecrantz
mesa
Commits
ed6daea8
Commit
ed6daea8
authored
Dec 05, 2021
by
Jakob Bornecrantz
Browse files
vulkan-device-select: Don't leak drmDevicePtr
Cc: mesa-stable
parent
4c703686
Pipeline
#459539
waiting for manual action with stages
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/vulkan/device-select-layer/device_select_x11.c
View file @
ed6daea8
...
...
@@ -91,7 +91,7 @@ int device_select_find_xcb_pci_default(struct device_pci_info *devices, uint32_t
if
(
dri3_fd
==
-
1
)
goto
out
;
drmDevicePtr
xdev
;
drmDevicePtr
xdev
=
NULL
;
int
ret
=
drmGetDevice2
(
dri3_fd
,
0
,
&
xdev
);
close
(
dri3_fd
);
if
(
ret
<
0
)
...
...
@@ -113,7 +113,9 @@ int device_select_find_xcb_pci_default(struct device_pci_info *devices, uint32_t
if
(
default_idx
!=
-
1
)
break
;
}
out:
drmFreeDevice
(
&
xdev
);
// Is NULL pointer safe.
xcb_disconnect
(
conn
);
return
default_idx
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment