From: Ander Conselvan de Oliveira Date: Tue, 19 Jun 2012 10:45:39 +0000 (+0300) Subject: wayland-cursor: Plug leak of filename on load_all_cursors_from_dir() X-Git-Tag: 0.94.90~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=226100795309569cc0f101ed6524afc6ac3a9584;p=profile%2Fivi%2Fwayland.git wayland-cursor: Plug leak of filename on load_all_cursors_from_dir() --- 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);