Author: nwellnhof
Date: Fri Mar 23 16:16:50 2012
New Revision: 1304460

URL: http://svn.apache.org/viewvc?rev=1304460&view=rev
Log:
Fix memory leaks in Clownfish

Also remove an unused variable

Modified:
    incubator/lucy/trunk/clownfish/src/CFCPerl.c
    incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c

Modified: incubator/lucy/trunk/clownfish/src/CFCPerl.c
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerl.c?rev=1304460&r1=1304459&r2=1304460&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerl.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerl.c Fri Mar 23 16:16:50 2012
@@ -160,7 +160,6 @@ CFCPerl_write_pod(CFCPerl *self) {
     while (registry[num_registered] != NULL) { num_registered++; }
     char     **pod_paths = (char**)CALLOCATE(num_registered + 1, 
sizeof(char*));
     char     **pods      = (char**)CALLOCATE(num_registered + 1, 
sizeof(char*));
-    CFCClass **ordered   = CFCHierarchy_ordered_classes(self->hierarchy);
     size_t     count     = 0;
 
     // Generate POD, but don't write.  That way, if there's an error while
@@ -343,6 +342,7 @@ S_write_boot_c(CFCPerl *self) {
     FREEMEM(isa_pushes);
     FREEMEM(registrations);
     FREEMEM(pound_includes);
+    FREEMEM(ordered);
 }
 
 void

Modified: incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c?rev=1304460&r1=1304459&r2=1304460&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c Fri Mar 23 16:16:50 2012
@@ -299,5 +299,6 @@ CFCPerlTypeMap_write_xs_typemap(CFCHiera
     FREEMEM(output);
     FREEMEM(input);
     FREEMEM(start);
+    FREEMEM(classes);
 }
 


Reply via email to