Bug 530812 Mismatched allocators in jsd: PR_Calloc vs delete, r=biesi
authortimeless@mozdev.org
Sun, 13 Dec 2009 09:11:39 -0800
changeset 35666 6cae4ab0b62281e5272b2edb71b7cbb216509fb2
parent 35665 6bd943c2c7bb5b3e909f40aff468d90260d8fde8
child 35667 6956e3df30f564c75070ec580a7fb047014dd1a2
push id10671
push userphilringnalda@gmail.com
push dateSun, 13 Dec 2009 17:12:14 +0000
treeherdermozilla-central@6956e3df30f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbiesi
bugs530812
milestone1.9.3a1pre
Bug 530812 Mismatched allocators in jsd: PR_Calloc vs delete, r=biesi
js/jsd/jsd_xpc.cpp
--- a/js/jsd/jsd_xpc.cpp
+++ b/js/jsd/jsd_xpc.cpp
@@ -240,20 +240,20 @@ jsds_RemoveEphemeral (LiveEphemeral **li
     
     PR_REMOVE_AND_INIT_LINK(&item->links);
 }
 
 /*******************************************************************************
  * utility functions for filters
  *******************************************************************************/
 void
-jsds_FreeFilter (FilterRecord *filter)
+jsds_FreeFilter (FilterRecord *rec)
 {
-    NS_IF_RELEASE (filter->filterObject);
-    delete filter;
+    NS_IF_RELEASE (rec->filterObject);
+    PR_Free (rec);
 }
 
 /* copies appropriate |filter| attributes into |rec|.
  * False return indicates failure, the contents of |rec| will not be changed.
  */
 PRBool
 jsds_SyncFilter (FilterRecord *rec, jsdIFilter *filter)
 {