Replace malloc/free of one structure by C++ idioms and add a destructor to the struct. Otherwise, don't touch the code. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>