summaryrefslogtreecommitdiff
path: root/src/crash-stack
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2016-12-22 17:58:58 +0900
committerSunmin Lee <sunm.lee@samsung.com>2016-12-22 17:58:58 +0900
commit254636d7f4be7df048ec4c17cc9159da661a2d97 (patch)
treef255d0ab88458cdc50f6264d28c46854991e1fd0 /src/crash-stack
parente446d126daf8c708373ac89a36854e73af44888c (diff)
downloadcrash-worker-254636d7f4be7df048ec4c17cc9159da661a2d97.tar.gz
crash-worker-254636d7f4be7df048ec4c17cc9159da661a2d97.tar.bz2
crash-worker-254636d7f4be7df048ec4c17cc9159da661a2d97.zip
Fix handle leak of file pointer at crash-stack Change-Id: I2d68e04ad84ea7263e3c45cc91ef295557532bde Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Diffstat (limited to 'src/crash-stack')
-rw-r--r--src/crash-stack/crash-stack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crash-stack/crash-stack.c b/src/crash-stack/crash-stack.c
index 71d2f15..82be10d 100644
--- a/src/crash-stack/crash-stack.c
+++ b/src/crash-stack/crash-stack.c
@@ -298,8 +298,10 @@ static int __attachable(pid_t pid, pid_t tid)
return -1;
/* check if status is D */
- if (fscanf(f, "%*d %*s %c", &status) != 1)
+ if (fscanf(f, "%*d %*s %c", &status) != 1) {
+ fclose(f);
return -1;
+ }
fclose(f);