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
Erik Kurzinger
xserver
Commits
7c25439f
Commit
7c25439f
authored
Oct 16, 2018
by
Peter Hutterer
Browse files
xwayland: fix a realloc OOM error case
Found by coverity Signed-off-by:
Peter Hutterer
<
peter.hutterer@who-t.net
>
parent
bd5fe759
Changes
1
Hide whitespace changes
Inline
Side-by-side
hw/xwayland/xwayland-glamor-eglstream.c
View file @
7c25439f
...
...
@@ -196,7 +196,7 @@ xwl_glamor_egl_supports_device_probing(void)
static
void
**
xwl_glamor_egl_get_devices
(
int
*
num_devices
)
{
EGLDeviceEXT
*
devices
;
EGLDeviceEXT
*
devices
,
*
tmp
;
Bool
ret
;
int
drm_dev_count
=
0
;
int
i
;
...
...
@@ -233,7 +233,11 @@ xwl_glamor_egl_get_devices(int *num_devices)
goto
error
;
*
num_devices
=
drm_dev_count
;
devices
=
realloc
(
devices
,
sizeof
(
EGLDeviceEXT
)
*
drm_dev_count
);
tmp
=
realloc
(
devices
,
sizeof
(
EGLDeviceEXT
)
*
drm_dev_count
);
if
(
!
tmp
)
goto
error
;
devices
=
tmp
;
return
devices
;
...
...
Write
Preview
Supports
Markdown
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