mirror of https://github.com/libsdl-org/SDL.git
Fixed potential double-free
This commit is contained in:
parent
8ba8cca69b
commit
b99e19c0a2
|
|
@ -81,10 +81,12 @@ static bool X11_XInput2PenIsEraser(SDL_VideoDevice *_this, int deviceid, char *d
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
X11_XFree(tooltype_name_info);
|
||||
if (tooltype_name != (char *)tooltype_name_info) {
|
||||
X11_XFree(tooltype_name_info);
|
||||
}
|
||||
X11_XFree(tooltype_name);
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue