avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcrea...@apache.org
Subject svn commit: r1386906 - in /avro/trunk: CHANGES.txt lang/c/src/avroappend.c lang/c/src/avrocat.c lang/c/src/avromod.c lang/c/src/avropipe.c
Date Mon, 17 Sep 2012 23:25:13 GMT
Author: dcreager
Date: Mon Sep 17 23:25:12 2012
New Revision: 1386906

URL: http://svn.apache.org/viewvc?rev=1386906&view=rev
Log:
AVRO-1161. C: Fix memory leak in avro{append,cat,mod,pipe}

Patch from me, analysis and description of fix contributed by Lucas Martin-King
and Maxim Pugachev.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/c/src/avroappend.c
    avro/trunk/lang/c/src/avrocat.c
    avro/trunk/lang/c/src/avromod.c
    avro/trunk/lang/c/src/avropipe.c

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1386906&r1=1386905&r2=1386906&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Mon Sep 17 23:25:12 2012
@@ -89,6 +89,8 @@ Avro 1.7.2 (unreleased)
     AVRO-1165. C: Fix memory leak in generic value implementations involving
     LINK schemas.  (Vivek Nadkarni via dcreager)
 
+    AVRO-1161. C: Fix memory leak in avro{append,cat,mod,pipe} (dcreager)
+
 Avro 1.7.1 (16 July 2012)
 
   NEW FEATURES

Modified: avro/trunk/lang/c/src/avroappend.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/avroappend.c?rev=1386906&r1=1386905&r2=1386906&view=diff
==============================================================================
--- avro/trunk/lang/c/src/avroappend.c (original)
+++ avro/trunk/lang/c/src/avroappend.c Mon Sep 17 23:25:12 2012
@@ -67,6 +67,7 @@ int process_file(const char *in_filename
 		}
 
 		avro_file_reader_close(oreader);
+		avro_schema_decref(oschema);
 	}
 
 	if (avro_file_writer_open(out_filename, &writer)) {
@@ -95,6 +96,7 @@ int process_file(const char *in_filename
 	avro_file_writer_close(writer);
 	avro_value_decref(&value);
 	avro_value_iface_decref(iface);
+	avro_schema_decref(wschema);
 
 	return 0;
 }

Modified: avro/trunk/lang/c/src/avrocat.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/avrocat.c?rev=1386906&r1=1386905&r2=1386906&view=diff
==============================================================================
--- avro/trunk/lang/c/src/avrocat.c (original)
+++ avro/trunk/lang/c/src/avrocat.c Mon Sep 17 23:25:12 2012
@@ -86,6 +86,7 @@ process_file(const char *filename)
 	avro_file_reader_close(reader);
 	avro_value_decref(&value);
 	avro_value_iface_decref(iface);
+	avro_schema_decref(wschema);
 
 	if (should_close) {
 		fclose(fp);

Modified: avro/trunk/lang/c/src/avromod.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/avromod.c?rev=1386906&r1=1386905&r2=1386906&view=diff
==============================================================================
--- avro/trunk/lang/c/src/avromod.c (original)
+++ avro/trunk/lang/c/src/avromod.c Mon Sep 17 23:25:12 2012
@@ -82,6 +82,7 @@ process_file(const char *in_filename, co
 	avro_file_writer_close(writer);
 	avro_value_decref(&value);
 	avro_value_iface_decref(iface);
+	avro_schema_decref(wschema);
 }
 
 

Modified: avro/trunk/lang/c/src/avropipe.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/avropipe.c?rev=1386906&r1=1386905&r2=1386906&view=diff
==============================================================================
--- avro/trunk/lang/c/src/avropipe.c (original)
+++ avro/trunk/lang/c/src/avropipe.c Mon Sep 17 23:25:12 2012
@@ -373,6 +373,7 @@ process_file(const char *filename)
 	avro_value_decref(&value);
 	avro_value_iface_decref(iface);
 	avro_file_reader_close(reader);
+	avro_schema_decref(wschema);
 }
 
 



Mime
View raw message