Regarding Changeset 3174.

View: New views
1 Messages — Rating Filter:   Alert me  

Regarding Changeset 3174.

by Suresh Sundriyal-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I really haven't had much time to spare for fixing/testing Openwsman
code as much as I would like and hence the lack of patches along with
the usual bitching. :) I'm just sending in the explanations for the
things that seem out of the ordinary so that someone with a bit more
time can take a look at it or I can refer back to these emails when I
get more time.

In changeset 3174, we uncommented some of the code to return the
provider faults.

status->fault_msg = u_strdup(rc.msg->hdl);

Here the memory for fault string is malloc'ed. Where is this memory free'ed?

Besides, the only place status->fault_msg is used is in
CimResource_Custom_EP, so the only place you will be getting provider
faults is in Invoke method. Why not other intrinsic operations?

I believe the reason why the code was commented out in the first place
was to avoid memory leaks.

This one has a potential to cause memory leaks with every single
intrinsic operation, since cim_to_wsman_status is called by every one of
the intrinsic operations in sfcc-interface.c.

The correct fix for this would involve cleaning up status.fault_msg at
the end of almost every method that instantiates a WsmanStatus variable
in cim_data_stubs.c and makes a call to one of the operations in
sfcc-interface.c.

--
Regards,
Suresh.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Openwsman-devel mailing list
Openwsman-devel@...
https://lists.sourceforge.net/lists/listinfo/openwsman-devel