mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
wayland-cursor: Plug leak of filename on load_all_cursors_from_dir()
This commit is contained in:
parent
61260854ec
commit
2261007953
1 changed files with 4 additions and 1 deletions
|
|
@ -883,8 +883,10 @@ load_all_cursors_from_dir(const char *path, int size,
|
|||
continue;
|
||||
|
||||
f = fopen(full, "r");
|
||||
if (!f)
|
||||
if (!f) {
|
||||
free(full);
|
||||
continue;
|
||||
}
|
||||
|
||||
images = XcursorFileLoadImages(f, size);
|
||||
|
||||
|
|
@ -894,6 +896,7 @@ load_all_cursors_from_dir(const char *path, int size,
|
|||
}
|
||||
|
||||
fclose (f);
|
||||
free(full);
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue