XXX: Add third argument to free.
XXX: Wrong comparison.