Parcourir la source

memory leak fix

eihrul il y a 20 ans
Parent
commit
940a220d6a
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      peer.c

+ 3 - 0
peer.c

@@ -292,6 +292,9 @@ enet_peer_reset_incoming_commands (ENetList * queue)
             enet_packet_destroy (incomingCommand -> packet);
        }
 
+       if (incomingCommand -> fragments != NULL)
+         enet_free (incomingCommand -> fragments);
+
        enet_free (incomingCommand);
     }
 }