Refactor: replace variable with function call.
Refactor: Drop datastream_id property from xccdf_session.
Refactor: Drop component_id property from xccdf_session.
Introduce function: ds_sds_session_get_component_by_href
Prepare already parsed oscap_sources to oval_content_resource list.
Return NULL on error

Addressing:
src/XCCDF/benchmark.c:233:3: warning: statement with no effect [-Wunused-value]
   NULL;
Fix sorting in error message arguments.
Use existing oscap_source for validation.
oval_content_resource should always point to an oscap_source.
Remove a dead code

The contents->source is always not NULL.
Re-use existing oscap_source for each OVAL file.
Drop filename property from oval_content_resource.