- Clear the structures allocated for the pNext chains. While this
is not strictly necessary, any pNext structure that is not
filled in by a driver (because the extension isn't there) gets
left in an untouched state. This can be a false positive flagged
by valgrind.
- Use XFree to free storage allocated by Xlib's XGetVisualInfo().
This fixes an actual leak.
if (!place->pNext) {
ERR_EXIT(VK_ERROR_OUT_OF_HOST_MEMORY);
}
+ memset(place->pNext, 0, chain_info[i].mem_size);
place = place->pNext;
place->sType = chain_info[i].sType;
}
visualInfo->visual, 0, NULL);
XSync(inst->xlib_display,false);
+ XFree(visualInfo);
}
static void AppCreateXlibSurface(struct AppInstance *inst) {