diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2023-11-19 13:45:05 +0300 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2023-11-19 15:33:39 +0300 |
commit | e16b0068a70b6d2cf57177de197e9b171e39bb78 (patch) | |
tree | 48adfe8471e0437f482a0c551c2039b481dda8f1 | |
parent | b06d58fa8b6bb5d9a154f795ec595477e13998bc (diff) |
xcursor: fix NULL deref on malloc() fail
-rw-r--r-- | xcursor/xcursor.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xcursor/xcursor.c b/xcursor/xcursor.c index 46085918..7e1f310f 100644 --- a/xcursor/xcursor.c +++ b/xcursor/xcursor.c @@ -763,9 +763,11 @@ xcursor_load_theme(const char *theme, int size, continue; full = xcursor_build_fullname(dir, "cursors", ""); - load_all_cursors_from_dir(full, size, load_callback, - user_data); - free(full); + if (full) { + load_all_cursors_from_dir(full, size, load_callback, + user_data); + free(full); + } if (!inherits) { full = xcursor_build_fullname(dir, "", "index.theme"); |