summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2018-10-15 12:34:37 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-10-15 12:34:37 -0700
commitaee75d45ed60af4877fce99a32335f01771be807 (patch)
tree94e00842fb286e65b984dc715837f1038109f647
parent52af2c81881e6292bbd13f5a76099d92e09c1727 (diff)
parent34c41cb0df7f369c2c4f96f7456c1bb6c3526681 (diff)
downloaddalvik-aee75d45ed60af4877fce99a32335f01771be807.tar.gz
Merge "[hprof-conv] Check for NULL before closing descriptors" am: 16dbf336e9
am: 34c41cb0df Change-Id: Iac16e6a6ea7440e2913438e6d4ae85448345ab79
-rw-r--r--tools/hprof-conv/HprofConv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/hprof-conv/HprofConv.c b/tools/hprof-conv/HprofConv.c
index a69440c60..cc90176f9 100644
--- a/tools/hprof-conv/HprofConv.c
+++ b/tools/hprof-conv/HprofConv.c
@@ -764,9 +764,9 @@ usage:
res = 2;
finish:
- if (in != stdin)
+ if (in != stdin && in != NULL)
fclose(in);
- if (out != stdout)
+ if (out != stdout && out != NULL)
fclose(out);
return res;
}