corrected mismatched free/delete in avatar items. Might have caused random crashes.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2740 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-04-20 14:15:30 +00:00
parent 7c6ad47bcf
commit abeb4c92ee

View File

@ -149,9 +149,12 @@ uint32_t RsChatAvatarItem::serial_size()
RsChatAvatarItem::~RsChatAvatarItem() RsChatAvatarItem::~RsChatAvatarItem()
{ {
free(image_data) ; if(image_data != NULL)
{
delete[] image_data ;
image_data = NULL ; image_data = NULL ;
} }
}
/* serialise the data to the buffer */ /* serialise the data to the buffer */
bool RsChatMsgItem::serialise(void *data, uint32_t& pktsize) bool RsChatMsgItem::serialise(void *data, uint32_t& pktsize)