Use FreeAndNil across the board. Even if we are immediately assigning after, probably avoids accidental mistakes. Also free neglected owner tex on shutdown, and delete hog gears using the normal deletion procedure if for any reason they still exist (EndGame call?).
Name: hedgewars-server
Version: 0.1
Synopsis: hedgewars server
Description: hedgewars server
Homepage: http://www.hedgewars.org/
License: GPL-2
Author: unC0Rr
Maintainer: unC0Rr@hedgewars.org
Category: Game
Build-type: Simple
Cabal-version: >=1.10
Executable hedgewars-server
main-is: hedgewars-server.hs
default-language: Haskell2010
Build-depends:
base >= 4.3,
containers,
vector,
bytestring,
bytestring-show,
network >= 2.3,
random,
time,
mtl >= 2,
dataenc,
hslogger,
process,
deepseq,
utf8-string,
SHA,
entropy,
zlib
if !os(windows)
build-depends: unix
ghc-options: -O2