summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaliy Cherepanov <v.cherepanov@samsung.com>2014-11-03 18:38:03 +0300
committerVitaliy Cherepanov <v.cherepanov@samsung.com>2014-11-03 18:38:03 +0300
commit641a6db0f473c53665ecfe538dd8c32cbf004de2 (patch)
tree71e19e2daa5058f3f5bb5aa9426e43d48dfe9670
parent16d9a02dd075a7ab521a55036de4288d1d918d4e (diff)
downloadswap-manager-641a6db0f473c53665ecfe538dd8c32cbf004de2.tar.gz
swap-manager-641a6db0f473c53665ecfe538dd8c32cbf004de2.tar.bz2
swap-manager-641a6db0f473c53665ecfe538dd8c32cbf004de2.zip
[FIX] prevent issue
|-------------------------|----------------| | Type | Function | |-------------------------|----------------| | Resource leak | initialize_log | | Resource leak | initialize_log | |-------------------------|----------------| Change-Id: I174970e06d4472c7ded0b5509846311f36fc099f Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
-rw-r--r--daemon/da_debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/daemon/da_debug.c b/daemon/da_debug.c
index 74c3dbd..45e5ded 100644
--- a/daemon/da_debug.c
+++ b/daemon/da_debug.c
@@ -92,13 +92,13 @@ int initialize_log(void)
LOGE("duplicate fd fail\n");
ret = -1;
}
-
- close(fd);
} else {
close(1);
close(2);
}
+ close(fd_null);
+ close(fd);
close(0);
return ret;
}