On 02/27/2013 01:55 PM, Martin Kosek wrote:
> On 02/27/2013 01:39 PM, Martin Kosek wrote:
>> On 02/27/2013 12:35 PM, Sumit Bose wrote:
>>> the attached patches 102-107 fix issues found by Coverity which are
>>> tracked by tickets #3422-#3427 and remove an unused variable
>>> (patch 101).
>> I see just one issue. In patch 0105:
>> - global_ipactx = (struct ipa_context *)malloc(sizeof(global_ipactx));
>> + global_ipactx = (struct ipa_context *)malloc(sizeof(*global_ipactx));
>> I do not think this will work right. *global_ipactx will just de-reference
>> global_ipactxt and run sizeof on the result, right?
>> I would prefer this change:
>> global_ipactx = (struct ipa_context *)malloc(sizeof(struct ipa_context *));
> We just discussed this in Brno - in fact your change should be right as you
> allocate memory for the whole structure and not just a pointer to the
> (though I personally would prefer sizeof(struct ipa_context) as it is
> Hmrph, C language 101 revisited :-)
Good, my tests were OK with your patchset.
ACK for all patches, pushed to master, ipa-3-1.
Freeipa-devel mailing list