Fix memory leak in casewriter_make_reader.
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 2 Jun 2010 08:32:38 +0000 (10:32 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 2 Jun 2010 08:32:38 +0000 (10:32 +0200)
The proto member was not being unrefed when it should have been.
Reviewed by Ben Pfaff.

src/data/casewriter.c

index f7760eca04a5ae5d1b78bf45c46c92676b63a0c7..7631d776d3d2ac59cf336eccde48446aa8832b80 100644 (file)
@@ -99,6 +99,8 @@ casewriter_make_reader (struct casewriter *writer)
 {
   struct casereader *reader = writer->class->convert_to_reader (writer, writer->aux);
   taint_propagate (writer->taint, casereader_get_taint (reader));
+
+  caseproto_unref (writer->proto);
   taint_destroy (writer->taint);
   free (writer);
   return reader;