From a488797db18ad666acccb21f4067b3d16bd0226a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 6 May 2002 06:47:19 +0000 Subject: fixed a DIR * leak git-svn-id: svn://svn.rockbox.org/rockbox/trunk@459 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/tree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'uisimulator') diff --git a/uisimulator/tree.c b/uisimulator/tree.c index 744bbc75b0..5cbc358842 100644 --- a/uisimulator/tree.c +++ b/uisimulator/tree.c @@ -50,9 +50,11 @@ struct entry { #ifdef HAVE_LCD_BITMAP -bool is_dir(char* path) { +bool is_dir(char* path) +{ DIR* dir = opendir(path); - return(dir!=0); + closedir(dir); + return (dir!=0); } int static -- cgit v1.2.3