avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mas...@apache.org
Subject svn commit: r930698 - in /hadoop/avro/trunk: CHANGES.txt lang/c/src/schema.c
Date Sun, 04 Apr 2010 15:14:36 GMT
Author: massie
Date: Sun Apr  4 15:14:36 2010
New Revision: 930698

URL: http://svn.apache.org/viewvc?rev=930698&view=rev
Log:
AVRO-502. Memory leak from parsing JSON schema. Contributed by Robert G. Jakabosky.

Modified:
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/lang/c/src/schema.c

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=930698&r1=930697&r2=930698&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Sun Apr  4 15:14:36 2010
@@ -18,6 +18,9 @@ Avro 1.4.0 (unreleased)
 
     AVRO-489. Skipping complex objects in the ruby impl. (jmhodges)
 
+    AVRO-502. Memory leak from parsing JSON schema.
+    (Robert G. Jakabosky via massie)
+
 Avro 1.3.2 (31 March 2010)
 
   IMPROVEMENTS

Modified: hadoop/avro/trunk/lang/c/src/schema.c
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c/src/schema.c?rev=930698&r1=930697&r2=930698&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/c/src/schema.c (original)
+++ hadoop/avro/trunk/lang/c/src/schema.c Sun Apr  4 15:14:36 2010
@@ -685,6 +685,7 @@ avro_schema_from_json_t(json_t * json, a
 								    json_string_value
 								    (json_field_name),
 								    json_field_type_schema);
+				avro_schema_decref(json_field_type_schema);
 				if (field_rval != 0) {
 					avro_schema_decref(*schema);
 					return field_rval;
@@ -755,6 +756,7 @@ avro_schema_from_json_t(json_t * json, a
 				return items_rval;
 			}
 			*schema = avro_schema_array(items_schema);
+			avro_schema_decref(items_schema);
 		}
 		break;
 
@@ -774,6 +776,7 @@ avro_schema_from_json_t(json_t * json, a
 				return values_rval;
 			}
 			*schema = avro_schema_map(values_schema);
+			avro_schema_decref(values_schema);
 		}
 		break;
 
@@ -800,6 +803,7 @@ avro_schema_from_json_t(json_t * json, a
 				}
 				schema_rval =
 				    avro_schema_union_append(*schema, s);
+				avro_schema_decref(s);
 				if (schema_rval != 0) {
 					avro_schema_decref(*schema);
 					return schema_rval;



Mime
View raw message