__glXDRIscreenProbe: free screen when DRI2Connect fails, instead of leaking it
Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 V2: goto existing error handler, instead of replicating more of it here Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
9567fa9a72
commit
8c5ff2e93f
|
@ -946,7 +946,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
|||
&screen->fd, &driverName, &deviceName)) {
|
||||
LogMessage(X_INFO,
|
||||
"AIGLX: Screen %d is not DRI2 capable\n", pScreen->myNum);
|
||||
return NULL;
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
screen->base.destroy = __glXDRIscreenDestroy;
|
||||
|
|
Loading…
Reference in New Issue
Block a user