usb-host-test: Fixed Resource leak . 48/141448/4
author“JIBAN <p.jiban@samsung.com>
Mon, 31 Jul 2017 11:53:34 +0000 (17:23 +0530)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 19 Sep 2017 22:44:43 +0000 (22:44 +0000)
[Model] COMMON
[BinType] AP
[Customer] OPEN

[Issue#] NA
[Request] NA
[Occurrence Version] NA

[Problem] file was not closed for failure case
[Cause & Measure] close the file.
[Checking Method] NA

[Team] system framework
[Developer] Jiban Prakash
[Solution company] Samsung
[Change Type] Change

Change-Id: I7b00e9f53f18944a8e9f562d6aa41bcdbc3f2e33
Signed-off-by: “JIBAN <p.jiban@samsung.com>
src/usb-host-ffs-test-daemon/descs_gen.c

index 34e56ff..8cf471c 100644 (file)
@@ -140,6 +140,7 @@ int main()
        sfp = fopen("strs", "w");
        if (!sfp) {
                perror("Could not open strings file");
+               fclose(dfp);
                return -1;
        }