[PATCH wayland] wayland-cursor: Plug leak of filename on load_all_cursors_from_dir()
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Tue Jun 19 03:45:39 PDT 2012
---
cursor/xcursor.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/cursor/xcursor.c b/cursor/xcursor.c
index 360f7f3..0fe0440 100644
--- a/cursor/xcursor.c
+++ b/cursor/xcursor.c
@@ -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);
--
1.7.4.1
More information about the wayland-devel
mailing list