xcursor: fix NULL deref on malloc() fail

master
Kirill Primak 1 year ago
parent b06d58fa8b
commit e16b0068a7

@ -763,9 +763,11 @@ xcursor_load_theme(const char *theme, int size,
continue; continue;
full = xcursor_build_fullname(dir, "cursors", ""); full = xcursor_build_fullname(dir, "cursors", "");
load_all_cursors_from_dir(full, size, load_callback, if (full) {
user_data); load_all_cursors_from_dir(full, size, load_callback,
free(full); user_data);
free(full);
}
if (!inherits) { if (!inherits) {
full = xcursor_build_fullname(dir, "", "index.theme"); full = xcursor_build_fullname(dir, "", "index.theme");

Loading…
Cancel
Save