cleanup: remove memory leak 19/234519/1 accepted/tizen/unified/20200529.124139 submit/tizen/20200527.060137 submit/tizen/20200528.070254 submit/tizen/20200528.103513
authorYunmi Ha <yunmi.ha@samsung.com>
Wed, 27 May 2020 04:32:02 +0000 (13:32 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Wed, 27 May 2020 04:32:02 +0000 (13:32 +0900)
Change-Id: I8d2a705d629eb7d8faa9b36798edfda7b1591445
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
src/storage/cleanup.c

index 2d55593..077d409 100644 (file)
@@ -141,7 +141,9 @@ static int remove_dir(const char *path)
 
                bEmpty = false;
                _D("path (%s) is not empty.", path);
+               break;
        }
+       closedir(dir);
 
        if (bEmpty)
                REMOVE(path);