return NULL;
}
- /*
- * When opening the top-level file, create the memory context used for the
- * tokenization. This will be closed with this file when coming back to
- * this level of cleanup.
- */
- if (depth == 0)
- {
- /*
- * A context may be present, but assume that it has been eliminated
- * already.
- */
- tokenize_context = AllocSetContextCreate(CurrentMemoryContext,
- "tokenize_context",
- ALLOCSET_START_SMALL_SIZES);
- }
-
file = AllocateFile(filename, "r");
if (file == NULL)
{
return NULL;
}
+ /*
+ * When opening the top-level file, create the memory context used for the
+ * tokenization. This will be closed with this file when coming back to
+ * this level of cleanup.
+ */
+ if (depth == 0)
+ {
+ /*
+ * A context may be present, but assume that it has been eliminated
+ * already.
+ */
+ tokenize_context = AllocSetContextCreate(CurrentMemoryContext,
+ "tokenize_context",
+ ALLOCSET_START_SMALL_SIZES);
+ }
+
return file;
}