Fix an error reported by valgrind
Begone, state->memory!
Merge branch 'master' of github.com:supergameherm/supergameherm