Fix bug in malloc test