Merge "[hprof-conv] Check for NULL before closing descriptors"
am: 16dbf336e9

Change-Id: Ied34b0a478f997e13ceae7c835d71c35330e9020
diff --git a/tools/hprof-conv/HprofConv.c b/tools/hprof-conv/HprofConv.c
index a69440c..cc90176 100644
--- a/tools/hprof-conv/HprofConv.c
+++ b/tools/hprof-conv/HprofConv.c
@@ -764,9 +764,9 @@
     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;
 }