summaryrefslogtreecommitdiff
path: root/parserInternals.c
diff options
context:
space:
mode:
Diffstat (limited to 'parserInternals.c')
-rw-r--r--parserInternals.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/parserInternals.c b/parserInternals.c
index 6612ea74..ddc874ca 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -639,9 +639,10 @@ xmlParserShrink(xmlParserCtxtPtr ctxt) {
xmlParserInputBufferPtr buf = in->buf;
size_t used;
- /* Don't shrink memory buffers. */
+ /* Don't shrink pull parser memory buffers. */
if ((buf == NULL) ||
- ((buf->encoder == NULL) && (buf->readcallback == NULL)))
+ ((ctxt->progressive == 0) &&
+ (buf->encoder == NULL) && (buf->readcallback == NULL)))
return;
used = in->cur - in->base;