From 641a6db0f473c53665ecfe538dd8c32cbf004de2 Mon Sep 17 00:00:00 2001 From: Vitaliy Cherepanov Date: Mon, 3 Nov 2014 18:38:03 +0300 Subject: [PATCH] [FIX] prevent issue |-------------------------|----------------| | Type | Function | |-------------------------|----------------| | Resource leak | initialize_log | | Resource leak | initialize_log | |-------------------------|----------------| Change-Id: I174970e06d4472c7ded0b5509846311f36fc099f Signed-off-by: Vitaliy Cherepanov --- daemon/da_debug.c | 4 ++-- 1 file 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; } -- 2.7.4