kwo pushed a commit to branch master.

http://git.enlightenment.org/legacy/imlib2.git/commit/?id=ae9635b5d7ff860ebfd3854394af40dca9c39153

commit ae9635b5d7ff860ebfd3854394af40dca9c39153
Author: Kim Woelders <k...@woelders.dk>
Date:   Tue Jul 17 20:08:23 2018 +0200

    Fix memory leak in imlib_list_fonts()
    
    Spotted by Sebastien Ballet.
---
 src/lib/font_load.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/font_load.c b/src/lib/font_load.c
index 950392d..3212866 100644
--- a/src/lib/font_load.c
+++ b/src/lib/font_load.c
@@ -469,12 +469,11 @@ __imlib_font_list_fonts(int *num_ret)
                                     list = malloc(sizeof(char *));
                                  list[l - 1] = strdup(dir[j]);
                               }
-                            free(dir[j]);
                          }
                     }
                   free(path);
                }
-             free(dir);
+             __imlib_FileFreeDirList(dir, d);
           }
      }
    *num_ret = l;

-- 


Reply via email to