summaryrefslogtreecommitdiff
path: root/cursor
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2012-06-19 13:45:39 +0300
committerKristian Høgsberg <krh@bitplanet.net>2012-06-19 11:36:31 -0400
commit226100795309569cc0f101ed6524afc6ac3a9584 (patch)
tree78b9179a8de901516c31c2af27bc7893e97dea22 /cursor
parent61260854ec92a43e4e0f5cf1469eecbe404eac5a (diff)
wayland-cursor: Plug leak of filename on load_all_cursors_from_dir()
Diffstat (limited to 'cursor')
-rw-r--r--cursor/xcursor.c5
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);