svace: power-shutdown: fix leak 01/200901/1 accepted/tizen/unified/20190311.072436 submit/tizen/20190308.023010
authorsanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 5 Mar 2019 12:04:20 +0000 (21:04 +0900)
committersanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 5 Mar 2019 12:04:25 +0000 (21:04 +0900)
Change-Id: Ieadd4f8a25c78775877847a065d811d4d83a5314
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
src/power-shutdown/shutdown.c

index bc4bd0d..9c6032d 100644 (file)
@@ -85,8 +85,8 @@ static void autoboot(void)
                if (ret < 0) {
                        ret = -errno;
                        printf("%s: fail to read reboot data(%d)\n", progname, ret);
-               } else
-                       close(fd);
+               }
+               close(fd);
        }
 
        printf("%s: reboot param is <%s>\n", progname, buf);