axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <>
Subject SoapDeSerializer::getHeader - Memory leaks from BasicNode allocation?
Date Thu, 02 Sep 2004 05:39:36 GMT
Hi All,
    It looks to me that the following in src/soap/SoapDeSerializer.cpp (line 237) causes memory

    BasicNode** pNodeList = (BasicNode**) malloc(sizeof(BasicNode*) * 10); 

I have few questions.

1. Why do we have 10 hardcoded here?
2. Where do we free the memory that is malloced here?
3. As I understand we are trying to read the SOAP headers here and call handlers. (Am I correct?)
Are the HeaderBlock destructor expected to free the memory allocated in above statement? (If
would all 10 elements be deallocated? - Even if it deallocates all 10, I do not think it is
correct to deallocate individual elements from a chunk of 10 that we have allocated using

    Please help to calrify the doubts.


Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage! 

View raw message