Bugfix: small memory leaks plugged (rev. 15)

Signed-off-by: nixnodes <code@eth.si>