Skip to content
Browse files

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.


git-svn-id: https://svn.apache.org/repos/asf/avro/trunk@1386906 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent a258965 commit 828c61c5f40d39697cd4a72b5ce0ea279a65870f @dcreager dcreager committed
Showing with 7 additions and 0 deletions.
  1. +2 −0 CHANGES.txt
  2. +2 −0 lang/c/src/avroappend.c
  3. +1 −0 lang/c/src/avrocat.c
  4. +1 −0 lang/c/src/avromod.c
  5. +1 −0 lang/c/src/avropipe.c
View
2 CHANGES.txt
@@ -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
View
2 lang/c/src/avroappend.c
@@ -67,6 +67,7 @@ int process_file(const char *in_filename, const char *out_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, const char *out_filename)
avro_file_writer_close(writer);
avro_value_decref(&value);
avro_value_iface_decref(iface);
+ avro_schema_decref(wschema);
return 0;
}
View
1 lang/c/src/avrocat.c
@@ -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);
View
1 lang/c/src/avromod.c
@@ -82,6 +82,7 @@ process_file(const char *in_filename, const char *out_filename)
avro_file_writer_close(writer);
avro_value_decref(&value);
avro_value_iface_decref(iface);
+ avro_schema_decref(wschema);
}
View
1 lang/c/src/avropipe.c
@@ -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);
}

0 comments on commit 828c61c

Please sign in to comment.
Something went wrong with that request. Please try again.