Commit 71cff63c authored by Adam Richter's avatar Adam Richter

hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a...

hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a couple of error branches, per complaints from cppcheck.
parent b6eb8cf0
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment