mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
cursor/convert_font.c: malloc cannot guarantee that the memory allocated is always successful
This commit is contained in:
parent
e53e0edf0f
commit
1ea08d748c
1 changed files with 5 additions and 0 deletions
|
|
@ -499,6 +499,11 @@ output_interesting_cursors()
|
|||
struct reconstructed_glyph *glyphs =
|
||||
malloc(n * sizeof(*glyphs));
|
||||
|
||||
if (!glyphs) {
|
||||
printf("reconstructed_glyph malloc failed\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
for (i = 0; i < n; ++i) {
|
||||
struct glyph *cursor, *mask;
|
||||
find_cursor_and_mask(interesting_cursors[i].source_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue