Fix memory leak on error condition
diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc
index eebbbb4..3667821 100644
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@ -343,6 +343,7 @@
 
       if (lastCachedPage >= numPages) {
         error(errSyntaxError, -1, "Page count in top-level pages object is incorrect");
+        delete p;
         return gFalse;
       }