buaazp: fixed double free error when processing broken images for #27