mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-07-07 00:06:53 -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;
|
continue;
|
||||||
|
|
||||||
f = fopen(full, "r");
|
f = fopen(full, "r");
|
||||||
if (!f)
|
if (!f) {
|
||||||
|
free(full);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
images = XcursorFileLoadImages(f, size);
|
images = XcursorFileLoadImages(f, size);
|
||||||
|
|
||||||
|
|
@ -894,6 +896,7 @@ load_all_cursors_from_dir(const char *path, int size,
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose (f);
|
fclose (f);
|
||||||
|
free(full);
|
||||||
}
|
}
|
||||||
|
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue