Commits

Anonymous committed 6b08471

Some small memory leak fixes

  • Participants
  • Parent commits f294a6c

Comments (0)

Files changed (1)

     FREETMPS;
     LEAVE;
     
+    SvREFCNT_dec(tbuff);
+    SvREFCNT_dec(tsize);
+    
     return read_length;
 }
 
         }
         ctxt->_private = (void*)self;
         
+        SvCUR_set(LibXML_error, 0);
+        
         ret = xmlParseDocument(ctxt);
         
         well_formed = ctxt->wellFormed;
         xmlDocPtr real_dom;
         ProxyObject* proxy;
     CODE:
+        SvCUR_set(LibXML_error, 0);
+        
         real_dom = LibXML_parse_stream(self, fh);
         if (real_dom == NULL) {
             RETVAL = &PL_sv_undef;    
         }
         ctxt->_private = (void*)self;
         
+        SvCUR_set(LibXML_error, 0);
+        
         xmlParseDocument(ctxt);
         well_formed = ctxt->wellFormed;
 
     CODE:
         if ( self->object != NULL ) {
             xmlFreeDoc((xmlDocPtr)self->object);
-            #warn( "REAL DOCUMENT DROP SUCCEEDS" );
+            # warn( "REAL DOCUMENT DROP SUCCEEDS" );
         }        
         self->object = NULL;
         Safefree( self );