Fix a compiler warning and a memory error that wasn't Valgrind-able and
therefore never detected...