[ http://issues.apache.org/jira/browse/AXIS2C-73?page=all ] Samisa Abeysinghe closed AXIS2C-73: -----------------------------------
> Double deletion in releasing memory in wsdl_component struct > ------------------------------------------------------------ > > Key: AXIS2C-73 > URL: http://issues.apache.org/jira/browse/AXIS2C-73 > Project: Axis2-C > Type: Bug > Components: wsdl > Versions: M0.4 > Reporter: Samisa Abeysinghe > Assignee: Damitha Kumarage > > When there are multiple services, the modules desc pointers are set as > properties in wsdl_component struct. > When conf free is called, the multiple services try to free the same module > desc pointer. (see following trace) > This happens because of the way we handle properties in wsdl_component with a > callback to free memory. > We have to tidy this up to make sure we release the memory as well as do not > do that multiple times to the same pointer. > The better way to handle this is to use a "property" struct and store those > properties in the hash of wsdl_component. > the property would look like > struct property > { > void *value; /*defaults to NULL*/ > axis2_scope_t scope; /*defaults to local, mening we have to free this > here*/ > free_callback_fn_ptr; /*defaults to NULL, if null and scope is local, > then use AXIS2_FREE*/ > } > ==18138== Invalid read of size 4 > ==18138== at 0x1B979B14: axis2_module_desc_free (module_desc.c:294) > ==18138== by 0x1B979DF4: axis2_module_desc_array_list_free > (module_desc.c:350) > ==18138== by 0x1B93EFD8: axis2_wsdl_component_free (wsdl_component.c:183) > ==18138== by 0x1B93DF87: axis2_wsdl_svc_free (wsdl_svc.c:169) > ==18138== by 0x1B975571: axis2_svc_free (svc.c:543) > ==18138== by 0x1B97C945: axis2_svc_grp_free (svc_grp.c:287) > ==18138== by 0x1B95FE2D: axis2_conf_free (conf.c:604) > ==18138== by 0x1B9AF35F: axis2_call_free (call.c:291) > ==18138== by 0x1B9B33A7: axis2_stub_free (stub.c:342) > ==18138== by 0x804946E: main (math_client.c:141) > ==18138== Address 0x1BA735C8 is 24 bytes inside a block of size 28 free'd > ==18138== at 0x1B909743: free (vg_replace_malloc.c:152) > ==18138== by 0x1B979BE1: axis2_module_desc_free (module_desc.c:316) > ==18138== by 0x1B979DF4: axis2_module_desc_array_list_free > (module_desc.c:350) > ==18138== by 0x1B93EFD8: axis2_wsdl_component_free (wsdl_component.c:183) > ==18138== by 0x1B93DF87: axis2_wsdl_svc_free (wsdl_svc.c:169) > ==18138== by 0x1B975571: axis2_svc_free (svc.c:543) > ==18138== by 0x1B97C945: axis2_svc_grp_free (svc_grp.c:287) > ==18138== by 0x1B95FE2D: axis2_conf_free (conf.c:604) > ==18138== by 0x1B9AF35F: axis2_call_free (call.c:291) > ==18138== by 0x1B9B33A7: axis2_stub_free (stub.c:342) > ==18138== by 0x804946E: main (math_client.c:141) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
