Free NAL objects on error.

In some error cases, NAL objects were not freed.