Skip to content

Commit 2dddb2a

Browse files
authored
Merge pull request #1217 from yuumasato/do_not_free_oscap_source_when_parsing_cvrf_xml
Don't free oscap_source when parsing cvrf_xml
2 parents 03c2e21 + 96799d6 commit 2dddb2a

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/CVRF/cvrf_priv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2333,7 +2333,6 @@ struct cvrf_index *cvrf_index_parse_xml(struct oscap_source *index_source) {
23332333
}
23342334
struct cvrf_index *index = cvrf_index_new();
23352335
cvrf_index_set_index_file(index, oscap_source_readable_origin(index_source));
2336-
oscap_source_free(index_source);
23372336
return index;
23382337
}
23392338

utils/oscap-cvrf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ static int app_cvrf_export(const struct oscap_action *action) {
151151
if (oscap_err())
152152
fprintf(stderr, "%s %s\n", OSCAP_ERR_MSG, oscap_err_desc());
153153

154-
/* TODO: Refactor, cvrf_index_parse_xml (called by oscap_source_new_from_file) frees its argument as an unexpected side-effect.
155-
* oscap_source_free(import_source);
156-
*/
154+
oscap_source_free(import_source);
157155
free(action->cvrf_action);
158156
return result;
159157
}

0 commit comments

Comments
 (0)