This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/351/ |
On May 15th, 2013, 6:36 p.m. CEST, Jan Safranek wrote:
src/indmanager/ind_manager.c (Diff revision 1) 502 CMSetProperty(ind_inst, "SourceInstance", &new_inst, CMPI_instance);CMSetProperty has CMPIValue* as the third argument, not CMPIInstance **. This applies to all CMSetProperty calls below.On May 16th, 2013, 1:56 p.m. CEST, Roman Rakus wrote:
Don't ask me why, but it works this way.
'Working' does not mean 'correct'. It works just accidentally because CMPIValue is union, having CMPIInstance* as member.
On May 15th, 2013, 6:36 p.m. CEST, Jan Safranek wrote:
src/indmanager/ind_manager.c (Diff revision 1) 621 static void *manage(void *data)622 {
I am afraid most of CMGet* function calls in this thread will leak memory as they do not run in context of any CIM operation (which would free it upon completion). Double check with valgrind!On May 16th, 2013, 1:56 p.m. CEST, Roman Rakus wrote:
I thought that CBAttachThread() will take care of it. But will check it.
CBAttachThread ensures that CMGet* won't fail. It won't de-allocate the copies returned from it. At least that's what I found in Pegasus implementation of CMPI.
- Jan
On May 16th, 2013, 1:59 p.m. CEST, Roman Rakus wrote:
Review request for OpenLMI Developers.
By Roman Rakus.
Updated May 16, 2013, 1:59 p.m.
Repository:
openlmi-providers
Description
Testing
Diffs
|