[Vortex] Fix for vortex_connection_set_profile_mask returning an error on success.
Philip Black-Knight
pblack at tresys.com
Wed Dec 21 17:51:47 CET 2011
I was trying to figure out why my call to vortex_connection_set_profile_mask() was returning an error. It looks like it's due to an improper ordering of the statements in the function. When the function is called for the first time, node->mask_id was getting set to -1 because axl_list_length() was returning -1. The error return from axl_list_length() is because connection->profile_masks is created on demand, and is NULL the first time the function is called.
This patch moves the assignment of the node members after the block that creates the list, so the node will get the correct mask_id of 0.
I also added a call to axl_free() to release the memory for the node if there is an error creating the axl_list for the profile_masks.
-Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.aspl.es/pipermail/vortex/attachments/20111221/b727b045/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vortex_profile_mask_fix.patch
Type: application/octet-stream
Size: 995 bytes
Desc: vortex_profile_mask_fix.patch
URL: <http://lists.aspl.es/pipermail/vortex/attachments/20111221/b727b045/attachment.obj>
More information about the Vortex
mailing list