Fixed memory leak getting the X11 window title
parent
05cff7923c
commit
66a88c6c97
|
@ -643,6 +643,7 @@ X11_GetWindowTitle(_THIS, Window xwindow)
|
||||||
&items_read, &items_left, &propdata);
|
&items_read, &items_left, &propdata);
|
||||||
if (status == Success && propdata) {
|
if (status == Success && propdata) {
|
||||||
title = SDL_iconv_string("UTF-8", "", SDL_static_cast(char*, propdata), items_read+1);
|
title = SDL_iconv_string("UTF-8", "", SDL_static_cast(char*, propdata), items_read+1);
|
||||||
|
X11_XFree(propdata);
|
||||||
} else {
|
} else {
|
||||||
title = SDL_strdup("");
|
title = SDL_strdup("");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue