RAND_add(): fix heap corruption in error path