ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » SecurityExit Buffer Memory Allocation Rules

Post new topic  Reply to topic
 SecurityExit Buffer Memory Allocation Rules « View previous topic :: View next topic » 
Author Message
mfuini
PostPosted: Tue Feb 15, 2005 1:33 pm    Post subject: SecurityExit Buffer Memory Allocation Rules Reply with quote

Novice

Joined: 20 Jan 2005
Posts: 15

Can anyone help me find the documentation on who is supposed to free the memory created and returned in the buffers for the ChannelExit API?

I have seen some code where the memory is always Freed upon entering the function.

What is the general rule?

void MQENTRY SecurityChannelExit (PMQVOID channelExitParms,
PMQVOID channelDef,
PMQLONG dataLength,
PMQLONG agBufLength,
PMQVOID agBuf,
PMQLONG exitBufLength, PMQPTR exitBufAddr)
{

....

FreeExitBuffer (exitBufAddr, exitBufLength);

}
_________________
Mark Fuini
markfuini@yahoo.com
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Tue Feb 15, 2005 9:39 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

Rule # 1 - If you allocate it then you free it.

Hint - that is why there is an initialization & termination ExitReason codes in the exit.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
mfuini
PostPosted: Wed Feb 16, 2005 6:39 am    Post subject: Reply with quote

Novice

Joined: 20 Jan 2005
Posts: 15

Thanks Roger!!

Do you free it when the code is TERM? I have only seen the free done at the beginning of the function if the pointer is not null.

FreeExitBuffer( pExitBufferAddr, pExitBufferLength );

switch ( pChlExParms->ExitReason )
{
case MQXR_INIT:
...
break;

case MQXR_TERM:
....
break;

case MQXR_INIT_SEC:
switch ( pChDef->ChannelType )
{
case MQCHT_SENDER:
...
buf = AllocExitBuffer( buflen );
_________________
Mark Fuini
markfuini@yahoo.com
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Wed Feb 16, 2005 9:08 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Yes, that is what I meant.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » SecurityExit Buffer Memory Allocation Rules
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.