Fix file descriptor leak on IncFS v1

The callers of openForSpecialOps(int cmd, const char* path) are
responsible for closing returned file descriptor, but some of them do
not close it. Fix this by casting to unique_fd in order to be closed
automatically after the scope.

Change-Id: I45278f5c99c957bd2324b70dd5f56281a5173921
Signed-off-by: Hobin Woo <hobin.woo@samsung.corp-partner.google.com>
Reviewed-by: Kisung Lee <kiras.lee@samsung.com>
Reported-by: Youngjin Gil <youngjin.gil@samsung.com>
1 file changed