Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3097 for code/trunk/src


Ignore:
Timestamp:
May 27, 2009, 11:13:16 PM (15 years ago)
Author:
scheusso
Message:

small possible memory leak closed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/network/packet/Packet.cc

    r3084 r3097  
    165165//  ENetPacket *temp = enetPacket_;
    166166//  enetPacket_ = 0; // otherwise we have a double free because enet already handles the deallocation of the packet
    167   Host::addPacket( enetPacket_, clientID_);
     167  if(!Host::addPacket( enetPacket_, clientID_))
     168    enet_packet_destroy(this->enetPacket_); // if we could not add the packet to the enet queue delete it manually
    168169  return true;
    169170}
Note: See TracChangeset for help on using the changeset viewer.