mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-01 23:07:45 +08:00
Fixed potential double-free
This commit is contained in:
@@ -81,10 +81,12 @@ static bool X11_XInput2PenIsEraser(SDL_VideoDevice *_this, int deviceid, char *d
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tooltype_name) {
|
if (tooltype_name) {
|
||||||
if (0 == SDL_strcasecmp(tooltype_name, PEN_ERASER_NAME_TAG)) {
|
if (SDL_strcasecmp(tooltype_name, PEN_ERASER_NAME_TAG) == 0) {
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
X11_XFree(tooltype_name_info);
|
if (tooltype_name != (char *)tooltype_name_info) {
|
||||||
|
X11_XFree(tooltype_name_info);
|
||||||
|
}
|
||||||
X11_XFree(tooltype_name);
|
X11_XFree(tooltype_name);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user