mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-26 15:50:05 +01:00
hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a couple of error branches, per complaints from cppcheck.
This commit is contained in:
parent
b6eb8cf03f
commit
71cff63c06
1 changed files with 3 additions and 0 deletions
|
|
@ -285,10 +285,13 @@ CreateContext(__GLXclientState * cl,
|
|||
num_be_screens = to_screen - from_screen + 1;
|
||||
glxc->real_ids = xallocarray(num_be_screens, sizeof(XID));
|
||||
if (!glxc->real_ids) {
|
||||
free(glxc);
|
||||
return BadAlloc;
|
||||
}
|
||||
glxc->real_vids = xallocarray(num_be_screens, sizeof(XID));
|
||||
if (!glxc->real_vids) {
|
||||
free(glxc->real_ids);
|
||||
free(glxc);
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue