mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixed bug 3723 - Possible double free in kmsdrm init code on certain errors
Simon Hug KMSDRM_VideoInit allocates and frees some connectors and encoders but doesn't set the pointer to NULL after freeing. The cleanup code at the end may free one of those garbage pointer should an error happen in the initialization.
This commit is contained in:
parent
d0b46f1bea
commit
a05522a089
@ -325,6 +325,7 @@ KMSDRM_VideoInit(_THIS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
KMSDRM_drmModeFreeConnector(connector);
|
KMSDRM_drmModeFreeConnector(connector);
|
||||||
|
connector = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == resources->count_connectors) {
|
if (i == resources->count_connectors) {
|
||||||
@ -345,6 +346,7 @@ KMSDRM_VideoInit(_THIS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
KMSDRM_drmModeFreeEncoder(encoder);
|
KMSDRM_drmModeFreeEncoder(encoder);
|
||||||
|
encoder = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == resources->count_encoders) {
|
if (i == resources->count_encoders) {
|
||||||
|
Loading…
Reference in New Issue
Block a user