Mercurial > mplayer.hg
changeset 36556:0803f123d737
menu_filesel: Fix memory leak in case of readdir error.
author | reimar |
---|---|
date | Sun, 19 Jan 2014 22:24:47 +0000 |
parents | 46a0b7b3db4c |
children | 7bfdbba6f2f7 |
files | libmenu/menu_filesel.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmenu/menu_filesel.c Sun Jan 19 22:24:46 2014 +0000 +++ b/libmenu/menu_filesel.c Sun Jan 19 22:24:47 2014 +0000 @@ -316,6 +316,7 @@ if (n < 0) { mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_ReaddirError,strerror(errno)); + free(namelist); return 0; } qsort(namelist, n, sizeof(char *), compare);