diff src/libpst.c @ 383:2379a4d8d9c7

Tim Dufrane - fix segfault in pst_close()
author Carl Byington <carl@five-ten-sg.com>
date Thu, 25 Jul 2019 07:43:49 -0700
parents 0ccc746c8079
children 5c0ce43c7532
line wrap: on
line diff
--- a/src/libpst.c	Thu Jul 25 07:18:19 2019 -0700
+++ b/src/libpst.c	Thu Jul 25 07:43:49 2019 -0700
@@ -409,6 +409,10 @@
 
 int pst_close(pst_file *pf) {
     DEBUG_ENT("pst_close");
+    if (!pf) {
+        DEBUG_RET();
+        return 0;
+    }
     if (!pf->fp) {
         DEBUG_RET();
         return 0;