]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Applied patch from Karel Slany that fixes a memory leak in the
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 24 Aug 2011 11:03:29 +0000 (11:03 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 24 Aug 2011 11:03:29 +0000 (11:03 +0000)
  unbound python module, in string conversions.

git-svn-id: file:///svn/unbound/trunk@2481 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
pythonmod/interface.i

index ff2b195a714a725fec4539052685164f4710df4a..c107b413edd27b768c8905a937c0408b9c3a68f2 100644 (file)
@@ -1,3 +1,7 @@
+24 August 2011: Wouter
+       - Applied patch from Karel Slany that fixes a memory leak in the
+         unbound python module, in string conversions.
+
 22 August 2011: Wouter
        - Fix validation of qtype ANY responses with CNAMEs (thanks Cathy
          Zhang and Luo Ce).  Unbound responds with the RR types that are
index ca2ae1671b6591b2fe80183f47685a7dcd7bc6ca..7d3739ab29c770e16bbb9aafc59a3bbcff7c7029 100644 (file)
@@ -868,6 +868,15 @@ void log_dns_msg(const char* str, struct query_info* qinfo, struct reply_info* r
 void log_query_info(enum verbosity_value v, const char* str, struct query_info* qinf);
 void regional_log_stats(struct regional *r);
 
+// Free allocated memory from marked sources returning corresponding types
+%typemap(newfree, noblock = 1) char * {
+  free($1);
+}
+
+// Mark as source returning newly allocated memory
+%newobject ldns_rr_type2str;
+%newobject ldns_rr_class2str;
+
 // LDNS functions
 char *ldns_rr_type2str(const uint16_t atype);
 char *ldns_rr_class2str(const uint16_t aclass);