Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] openscap-1.4.4/src/CPE/cpedict_priv.c: scope_hint: In function ‘cpe_vendor_new’ openscap-1.4.4/src/CPE/cpedict_priv.c:418:24: warning[-Wanalyzer-malloc-leak]: leak of ‘item’ # 416| # 417| item->value = NULL; # 418|-> item->titles = oscap_list_new(); # 419| item->products = oscap_list_new(); # 420| Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] openscap-1.4.4/src/CPE/cpedict_priv.c:419:26: warning[-Wanalyzer-malloc-leak]: leak of ‘item’ # 417| item->value = NULL; # 418| item->titles = oscap_list_new(); # 419|-> item->products = oscap_list_new(); # 420| # 421| return item; Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] openscap-1.4.4/src/CPE/cpelang_priv.c:292:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 290| # 291| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), ATTR_TITLE_STR) && # 292|-> xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT) { # 293| oscap_list_add(ret->titles, oscap_text_new_parse(OSCAP_TEXT_TRAITS_PLAIN, reader)); # 294| } else Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] openscap-1.4.4/src/CPE/cpelang_priv.c:292:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cpe_platform_new()’ # 290| # 291| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), ATTR_TITLE_STR) && # 292|-> xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT) { # 293| oscap_list_add(ret->titles, oscap_text_new_parse(OSCAP_TEXT_TRAITS_PLAIN, reader)); # 294| } else Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] openscap-1.4.4/src/CPE/cpelang_priv.c:293:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 291| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), ATTR_TITLE_STR) && # 292| xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT) { # 293|-> oscap_list_add(ret->titles, oscap_text_new_parse(OSCAP_TEXT_TRAITS_PLAIN, reader)); # 294| } else # 295| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), TAG_REMARK_STR) && Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] openscap-1.4.4/src/CPE/cpelang_priv.c:293:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cpe_platform_new()’ # 291| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), ATTR_TITLE_STR) && # 292| xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT) { # 293|-> oscap_list_add(ret->titles, oscap_text_new_parse(OSCAP_TEXT_TRAITS_PLAIN, reader)); # 294| } else # 295| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), TAG_REMARK_STR) && Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] openscap-1.4.4/src/CPE/cpelang_priv.c:293:53: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 291| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), ATTR_TITLE_STR) && # 292| xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT) { # 293|-> oscap_list_add(ret->titles, oscap_text_new_parse(OSCAP_TEXT_TRAITS_PLAIN, reader)); # 294| } else # 295| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), TAG_REMARK_STR) && Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] openscap-1.4.4/src/CPE/cpelang_priv.c:293:53: warning[-Wanalyzer-malloc-leak]: leak of ‘cpe_platform_new()’ # 291| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), ATTR_TITLE_STR) && # 292| xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT) { # 293|-> oscap_list_add(ret->titles, oscap_text_new_parse(OSCAP_TEXT_TRAITS_PLAIN, reader)); # 294| } else # 295| if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), TAG_REMARK_STR) && Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] openscap-1.4.4/src/CPE/cpelang_priv.c:295:26: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 293| oscap_list_add(ret->titles, oscap_text_new_parse(OSCAP_TEXT_TRAITS_PLAIN, reader)); # 294| } else # 295|-> if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), TAG_REMARK_STR) && # 296| xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT) { # 297| ret->remark = parse_text_element(reader, (char *)TAG_REMARK_STR); // TODO: 0-n remarks ! Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] openscap-1.4.4/src/CPE/cpelang_priv.c:295:26: warning[-Wanalyzer-malloc-leak]: leak of ‘cpe_platform_new()’ # 293| oscap_list_add(ret->titles, oscap_text_new_parse(OSCAP_TEXT_TRAITS_PLAIN, reader)); # 294| } else # 295|-> if (!xmlStrcmp(xmlTextReaderConstLocalName(reader), TAG_REMARK_STR) && # 296| xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT) { # 297| ret->remark = parse_text_element(reader, (char *)TAG_REMARK_STR); // TODO: 0-n remarks ! Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_OBJECTREF_tag’ openscap-1.4.4/src/OVAL/oval_component.c:275:25: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 2)’ # 273| __attribute__nonnull__(component); # 274| # 275|-> return component->type; # 276| } # 277| Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘oval_component_new’ openscap-1.4.4/src/OVAL/oval_component.c:743:57: warning[-Wanalyzer-malloc-leak]: leak of ‘function’ # 741| # 742| component = (oval_component_t *) function; # 743|-> function->function_components = oval_collection_new(); # 744| } # 745| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘oval_component_clone’ openscap-1.4.4/src/OVAL/oval_component.c:773:30: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(new_model, *old_component.type)’ # 771| return NULL; # 772| # 773|-> switch (new_component->type) { # 774| case OVAL_FUNCTION_ARITHMETIC:{ # 775| oval_arithmetic_operation_t operation = oval_component_get_arithmetic_operation(old_component); Error: GCC_ANALYZER_WARNING (CWE-476): [#def14] openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘oval_component_set_variable’ openscap-1.4.4/src/OVAL/oval_component.c:939:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘component’ # 937| # 938| /* type == OVAL_COMPONENT_VARREF */ # 939|-> if (component->type == OVAL_COMPONENT_VARREF) { # 940| oval_component_VARREF_t *varref = (oval_component_VARREF_t *) component; # 941| varref->variable = variable; Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] openscap-1.4.4/src/OVAL/oval_component.c:954:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 1)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘oval_component_parse_tag’ # 952| { # 953| # 954|-> return oval_value_parse_tag(reader, context, oval_value_consume, component); # 955| } # 956| Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_OBJECTREF_tag’ openscap-1.4.4/src/OVAL/oval_component.c:962:32: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 2)’ # 960| # 961| struct oval_definition_model *model = context->definition_model; # 962|-> char *objref = (char *)xmlTextReaderGetAttribute(reader, BAD_CAST "object_ref"); # 963| struct oval_object *object = oval_definition_model_get_new_object(model, objref); # 964| char *field; Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] openscap-1.4.4/src/OVAL/oval_component.c:963:38: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 2)’ # 961| struct oval_definition_model *model = context->definition_model; # 962| char *objref = (char *)xmlTextReaderGetAttribute(reader, BAD_CAST "object_ref"); # 963|-> struct oval_object *object = oval_definition_model_get_new_object(model, objref); # 964| char *field; # 965| Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] openscap-1.4.4/src/OVAL/oval_component.c:974:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 972| if (field) # 973| free(field); # 974|-> field = (char *)xmlTextReaderGetAttribute(reader, BAD_CAST "record_field"); # 975| oval_component_set_record_field(component, field); # 976| if (field) Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_VARREF_tag’ openscap-1.4.4/src/OVAL/oval_component.c:987:32: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 3)’ # 985| # 986| struct oval_definition_model *model = context->definition_model; # 987|-> char *varref = (char *)xmlTextReaderGetAttribute(reader, BAD_CAST "var_ref"); # 988| struct oval_variable *variable = oval_definition_model_get_new_variable(model, varref, OVAL_VARIABLE_UNKNOWN); # 989| if (varref != NULL) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] openscap-1.4.4/src/OVAL/oval_component.c:988:42: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 3)’ # 986| struct oval_definition_model *model = context->definition_model; # 987| char *varref = (char *)xmlTextReaderGetAttribute(reader, BAD_CAST "var_ref"); # 988|-> struct oval_variable *variable = oval_definition_model_get_new_variable(model, varref, OVAL_VARIABLE_UNKNOWN); # 989| if (varref != NULL) { # 990| free(varref); Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 10)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_TIMEDIF_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 11)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘oval_component_parse_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 12)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_REGEX_CAPTURE_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 13)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_ARITHMETIC_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 14)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘oval_component_parse_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 15)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘oval_component_parse_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 5)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_BEGEND_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 6)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘oval_component_parse_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 7)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_BEGEND_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 8)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_SPLIT_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] openscap-1.4.4/src/OVAL/oval_component.c:1017:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_component_new(model, 9)’ openscap-1.4.4/src/OVAL/oval_component.c: scope_hint: In function ‘_oval_component_parse_SUBSTRING_tag’ # 1015| { # 1016| oval_component_FUNCTION_t *function = (oval_component_FUNCTION_t *) component; # 1017|-> return oval_parser_parse_tag(reader, context, &oval_subcomp_tag_consume, function); # 1018| } # 1019| Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] openscap-1.4.4/src/OVAL/probes/SEAP/seap-packet.c: scope_hint: In function ‘SEAP_packet_sexp2cmd’ openscap-1.4.4/src/OVAL/probes/SEAP/seap-packet.c:756:37: warning[-Wanalyzer-malloc-leak]: leak of ‘SEAP_packet_new()’ # 754| _packet->type = SEAP_PACKET_CMD; # 755| # 756|-> if (SEAP_packet_sexp2cmd (sexp_packet, &(_packet->data.cmd)) != 0) { # 757| /* error */ # 758| dD("Invalid SEAP packet received: %s.", "can't translate to cmd struct"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def33] openscap-1.4.4/src/OVAL/probes/SEAP/seap-packet.c: scope_hint: In function ‘SEAP_packet_sexp2err’ openscap-1.4.4/src/OVAL/probes/SEAP/seap-packet.c:776:37: warning[-Wanalyzer-malloc-leak]: leak of ‘SEAP_packet_new()’ # 774| _packet->type = SEAP_PACKET_ERR; # 775| # 776|-> if (SEAP_packet_sexp2err (sexp_packet, &(_packet->data.err)) != 0) { # 777| /* error */ # 778| dD("Invalid SEAP packet received: %s.", "can't translate to err struct"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:330:9: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 328| } # 329| # 330|-> probe_item_collect(pfd->ctx, item); # 331| item = NULL; # 332| cleanup: Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:566:29: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 564| memset(req, 0, sizeof(*req)); # 565| # 566|-> req->protocol_ent = probe_obj_getent(object, "protocol", 1); # 567| if (req->protocol_ent == NULL) { # 568| err = PROBE_ENOVAL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:572:34: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 570| } # 571| # 572|-> req->local_address_ent = probe_obj_getent(object, "local_address", 1); # 573| if (req->local_address_ent == NULL) { # 574| err = PROBE_ENOVAL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:578:31: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 576| } # 577| # 578|-> req->local_port_ent = probe_obj_getent(object, "local_port", 1); # 579| if (req->local_port_ent == NULL) { # 580| err = PROBE_ENOVAL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:589:23: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ # 587| SEXP_t *msg; # 588| # 589|-> msg = probe_msg_creat(OVAL_MESSAGE_LEVEL_ERROR, "Permission error."); # 590| probe_cobj_add_msg(probe_ctx_getresult(ctx), msg); # 591| SEXP_free(msg); Error: GCC_ANALYZER_WARNING (CWE-401): [#def39] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:590:17: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ # 588| # 589| msg = probe_msg_creat(OVAL_MESSAGE_LEVEL_ERROR, "Permission error."); # 590|-> probe_cobj_add_msg(probe_ctx_getresult(ctx), msg); # 591| SEXP_free(msg); # 592| probe_cobj_set_flag(probe_ctx_getresult(ctx), SYSCHAR_FLAG_ERROR); Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:591:17: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ # 589| msg = probe_msg_creat(OVAL_MESSAGE_LEVEL_ERROR, "Permission error."); # 590| probe_cobj_add_msg(probe_ctx_getresult(ctx), msg); # 591|-> SEXP_free(msg); # 592| probe_cobj_set_flag(probe_ctx_getresult(ctx), SYSCHAR_FLAG_ERROR); # 593| Error: GCC_ANALYZER_WARNING (CWE-401): [#def41] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:592:17: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ # 590| probe_cobj_add_msg(probe_ctx_getresult(ctx), msg); # 591| SEXP_free(msg); # 592|-> probe_cobj_set_flag(probe_ctx_getresult(ctx), SYSCHAR_FLAG_ERROR); # 593| # 594| err = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:615:9: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 613| err = 0; # 614| cleanup: # 615|-> SEXP_free(req->protocol_ent); # 616| SEXP_free(req->local_address_ent); # 617| SEXP_free(req->local_port_ent); Error: GCC_ANALYZER_WARNING (CWE-401): [#def43] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:616:9: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 614| cleanup: # 615| SEXP_free(req->protocol_ent); # 616|-> SEXP_free(req->local_address_ent); # 617| SEXP_free(req->local_port_ent); # 618| free(req); Error: GCC_ANALYZER_WARNING (CWE-401): [#def44] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:617:9: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 615| SEXP_free(req->protocol_ent); # 616| SEXP_free(req->local_address_ent); # 617|-> SEXP_free(req->local_port_ent); # 618| free(req); # 619| Error: GCC_ANALYZER_WARNING (CWE-401): [#def45] openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:334:14: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’ # 332| mnt_entval = probe_ent_getval(mnt_entity); # 333| # 334|-> if (!SEXP_stringp(mnt_entval)) { # 335| SEXP_free(mnt_entval); # 336| SEXP_free(mnt_entity); Error: GCC_ANALYZER_WARNING (CWE-401): [#def46] openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:335:17: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’ # 333| # 334| if (!SEXP_stringp(mnt_entval)) { # 335|-> SEXP_free(mnt_entval); # 336| SEXP_free(mnt_entity); # 337| fclose(mnt_fp); Error: GCC_ANALYZER_WARNING (CWE-401): [#def47] openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:336:17: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’ # 334| if (!SEXP_stringp(mnt_entval)) { # 335| SEXP_free(mnt_entval); # 336|-> SEXP_free(mnt_entity); # 337| fclose(mnt_fp); # 338| return (PROBE_EINVAL); Error: GCC_ANALYZER_WARNING (CWE-401): [#def48] openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:341:9: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’ # 339| } # 340| # 341|-> SEXP_string_cstr_r(mnt_entval, mnt_path, sizeof mnt_path); # 342| SEXP_free(mnt_entval); # 343| SEXP_free(mnt_entity); Error: GCC_ANALYZER_WARNING (CWE-401): [#def49] openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:342:9: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’ # 340| # 341| SEXP_string_cstr_r(mnt_entval, mnt_path, sizeof mnt_path); # 342|-> SEXP_free(mnt_entval); # 343| SEXP_free(mnt_entity); # 344| Error: GCC_ANALYZER_WARNING (CWE-401): [#def50] openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:343:9: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’ # 341| SEXP_string_cstr_r(mnt_entval, mnt_path, sizeof mnt_path); # 342| SEXP_free(mnt_entval); # 343|-> SEXP_free(mnt_entity); # 344| # 345| if (mnt_fp != NULL) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def51] openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:355:21: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’ # 353| blkid_cache blkcache; # 354| # 355|-> if (blkid_get_cache(&blkcache, NULL) != 0) { # 356| endmntent(mnt_fp); # 357| return (PROBE_EUNKNOWN); Error: GCC_ANALYZER_WARNING (CWE-401): [#def52] openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:361:30: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’ openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:327:44: note: in expansion of macro ‘SEXP_number_geti’ # 359| #endif # 360| if (mnt_op == OVAL_OPERATION_PATTERN_MATCH) { # 361|-> re = oscap_pcre_compile(mnt_path, OSCAP_PCRE_OPTS_UTF8, &estr, &eoff); # 362| # 363| if (re == NULL) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def53] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_new’ openscap-1.4.4/src/SCE/sce_engine.c:81:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’ # 79| { # 80| struct sce_check_result* ret = malloc(sizeof(struct sce_check_result)); # 81|-> ret->href = NULL; # 82| ret->basename = NULL; # 83| ret->std_out = NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def54] openscap-1.4.4/src/SCE/sce_engine.c:85:38: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 83| ret->std_out = NULL; # 84| ret->std_err = NULL; # 85|-> ret->environment_variables = oscap_stringlist_new(); # 86| ret->xccdf_result = XCCDF_RESULT_UNKNOWN; # 87| Error: GCC_ANALYZER_WARNING (CWE-401): [#def55] openscap-1.4.4/src/SCE/sce_engine.c:85:38: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ # 83| ret->std_out = NULL; # 84| ret->std_err = NULL; # 85|-> ret->environment_variables = oscap_stringlist_new(); # 86| ret->xccdf_result = XCCDF_RESULT_UNKNOWN; # 87| Error: GCC_ANALYZER_WARNING (CWE-401): [#def56] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_engine_eval_rule’ openscap-1.4.4/src/SCE/sce_engine.c:108:15: warning[-Wanalyzer-malloc-leak]: leak of ‘sce_check_result_new()’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_engine_eval_rule’ # 106| void sce_check_result_set_href(struct sce_check_result* v, const char* href) # 107| { # 108|-> free(v->href); # 109| v->href = oscap_strdup(href); # 110| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def57] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_export’ openscap-1.4.4/src/SCE/sce_engine.c:125:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(target_file, "w")’ # 123| const char* sce_check_result_get_basename(struct sce_check_result* v) # 124| { # 125|-> return v->basename; # 126| } # 127| Error: GCC_ANALYZER_WARNING (CWE-401): [#def58] openscap-1.4.4/src/SCE/sce_engine.c:125:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(target_file, "w")’ # 123| const char* sce_check_result_get_basename(struct sce_check_result* v) # 124| { # 125|-> return v->basename; # 126| } # 127| Error: GCC_ANALYZER_WARNING (CWE-401): [#def59] openscap-1.4.4/src/SCE/sce_engine.c:168:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ # 166| void sce_check_result_add_environment_variable(struct sce_check_result* v, const char* var) # 167| { # 168|-> oscap_stringlist_add_string(v->environment_variables, var); # 169| } # 170| Error: GCC_ANALYZER_WARNING (CWE-401): [#def60] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c:168:9: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ # 166| void sce_check_result_add_environment_variable(struct sce_check_result* v, const char* var) # 167| { # 168|-> oscap_stringlist_add_string(v->environment_variables, var); # 169| } # 170| Error: GCC_ANALYZER_WARNING (CWE-476): [#def61] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_session_new’ openscap-1.4.4/src/SCE/sce_engine.c:225:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’ # 223| { # 224| struct sce_session* ret = malloc(sizeof(struct sce_session)); # 225|-> ret->results = oscap_list_new(); # 226| # 227| return ret; Error: GCC_ANALYZER_WARNING (CWE-401): [#def62] openscap-1.4.4/src/SCE/sce_engine.c:225:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ # 223| { # 224| struct sce_session* ret = malloc(sizeof(struct sce_session)); # 225|-> ret->results = oscap_list_new(); # 226| # 227| return ret; Error: GCC_ANALYZER_WARNING (CWE-476): [#def63] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_parameters_new’ openscap-1.4.4/src/SCE/sce_engine.c:281:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’ # 279| { # 280| struct sce_parameters *ret = malloc(sizeof(struct sce_parameters)); # 281|-> ret->xccdf_directory = NULL; # 282| ret->session = NULL; # 283| Error: GCC_ANALYZER_WARNING (CWE-401): [#def64] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_parameters_set_session’ openscap-1.4.4/src/SCE/sce_engine.c:313:9: warning[-Wanalyzer-malloc-leak]: leak of ‘sce_session_new()’ # 311| void sce_parameters_set_session(struct sce_parameters* v, struct sce_session* value) # 312| { # 313|-> sce_session_free(v->session); # 314| v->session = value; # 315| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def65] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘_pipe_try_read_into_string’ openscap-1.4.4/src/SCE/sce_engine.c:337:33: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 335| // & is a special case, we have to "escape" it manually # 336| // (all else will eventually get handled by libxml) # 337|-> oscap_string_append_string(string, "&"); # 338| } else { # 339| oscap_string_append_char(string, readbuf); Error: GCC_ANALYZER_WARNING (CWE-401): [#def66] openscap-1.4.4/src/SCE/sce_engine.c:339:33: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 337| oscap_string_append_string(string, "&"); # 338| } else { # 339|-> oscap_string_append_char(string, readbuf); # 340| } # 341| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def67] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_engine_eval_rule’ openscap-1.4.4/src/SCE/sce_engine.c:415:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘env_values’ # 413| const size_t index_of_first_env_value_not_compiled_in = 10; # 414| # 415|-> env_values[0] = "PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin"; # 416| # 417| env_values[1] = "XCCDF_RESULT_PASS=101"; Error: GCC_ANALYZER_WARNING (CWE-401): [#def68] openscap-1.4.4/src/SCE/sce_engine.c:427:16: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 425| env_values[9] = "XCCDF_RESULT_FIXED=109"; # 426| # 427|-> while (xccdf_value_binding_iterator_has_more(value_binding_it)) # 428| { # 429| struct xccdf_value_binding* binding = xccdf_value_binding_iterator_next(value_binding_it); Error: GCC_ANALYZER_WARNING (CWE-401): [#def69] openscap-1.4.4/src/SCE/sce_engine.c:427:16: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 425| env_values[9] = "XCCDF_RESULT_FIXED=109"; # 426| # 427|-> while (xccdf_value_binding_iterator_has_more(value_binding_it)) # 428| { # 429| struct xccdf_value_binding* binding = xccdf_value_binding_iterator_next(value_binding_it); Error: GCC_ANALYZER_WARNING (CWE-401): [#def70] openscap-1.4.4/src/SCE/sce_engine.c:429:55: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 427| while (xccdf_value_binding_iterator_has_more(value_binding_it)) # 428| { # 429|-> struct xccdf_value_binding* binding = xccdf_value_binding_iterator_next(value_binding_it); # 430| # 431| void *new_env_values = realloc(env_values, (env_value_count + 3) * sizeof(char *)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def71] openscap-1.4.4/src/SCE/sce_engine.c:542:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stderr_pipefd[0]’ # 540| { # 541| // we won't read from the pipes, so close the reading fd # 542|-> close(stdout_pipefd[0]); # 543| close(stderr_pipefd[0]); # 544| Error: GCC_ANALYZER_WARNING (CWE-775): [#def72] openscap-1.4.4/src/SCE/sce_engine.c:542:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stderr_pipefd[1]’ # 540| { # 541| // we won't read from the pipes, so close the reading fd # 542|-> close(stdout_pipefd[0]); # 543| close(stderr_pipefd[0]); # 544| Error: GCC_ANALYZER_WARNING (CWE-775): [#def73] openscap-1.4.4/src/SCE/sce_engine.c:542:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_pipefd[0]’ # 540| { # 541| // we won't read from the pipes, so close the reading fd # 542|-> close(stdout_pipefd[0]); # 543| close(stderr_pipefd[0]); # 544| Error: GCC_ANALYZER_WARNING (CWE-775): [#def74] openscap-1.4.4/src/SCE/sce_engine.c:542:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_pipefd[1]’ # 540| { # 541| // we won't read from the pipes, so close the reading fd # 542|-> close(stdout_pipefd[0]); # 543| close(stderr_pipefd[0]); # 544| Error: GCC_ANALYZER_WARNING (CWE-775): [#def75] openscap-1.4.4/src/SCE/sce_engine.c:543:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stderr_pipefd[0]’ # 541| // we won't read from the pipes, so close the reading fd # 542| close(stdout_pipefd[0]); # 543|-> close(stderr_pipefd[0]); # 544| # 545| // forward stdout and stderr to our custom opened pipes Error: GCC_ANALYZER_WARNING (CWE-775): [#def76] openscap-1.4.4/src/SCE/sce_engine.c:543:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stderr_pipefd[1]’ # 541| // we won't read from the pipes, so close the reading fd # 542| close(stdout_pipefd[0]); # 543|-> close(stderr_pipefd[0]); # 544| # 545| // forward stdout and stderr to our custom opened pipes Error: GCC_ANALYZER_WARNING (CWE-775): [#def77] openscap-1.4.4/src/SCE/sce_engine.c:543:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_pipefd[1]’ # 541| // we won't read from the pipes, so close the reading fd # 542| close(stdout_pipefd[0]); # 543|-> close(stderr_pipefd[0]); # 544| # 545| // forward stdout and stderr to our custom opened pipes Error: GCC_ANALYZER_WARNING (CWE-775): [#def78] openscap-1.4.4/src/SCE/sce_engine.c:552:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stderr_pipefd[1]’ # 550| // ones now, stdout and stderr will be closed properly after the execved # 551| // script/executable finishes # 552|-> close(stdout_pipefd[1]); # 553| close(stderr_pipefd[1]); # 554| Error: GCC_ANALYZER_WARNING (CWE-775): [#def79] openscap-1.4.4/src/SCE/sce_engine.c:552:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_pipefd[1]’ # 550| // ones now, stdout and stderr will be closed properly after the execved # 551| // script/executable finishes # 552|-> close(stdout_pipefd[1]); # 553| close(stderr_pipefd[1]); # 554| Error: GCC_ANALYZER_WARNING (CWE-775): [#def80] openscap-1.4.4/src/SCE/sce_engine.c:553:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stderr_pipefd[1]’ # 551| // script/executable finishes # 552| close(stdout_pipefd[1]); # 553|-> close(stderr_pipefd[1]); # 554| # 555| // before we execute the script, lets make sure we get SIGTERM when Error: GCC_ANALYZER_WARNING (CWE-401): [#def81] openscap-1.4.4/src/XCCDF/profile.c:261:37: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_refine_rule_new()’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 259| rr->selector = xccdf_attribute_copy(reader, XCCDFA_SELECTOR); # 260| rr->weight = xccdf_attribute_get_float(reader, XCCDFA_WEIGHT); # 261|-> if (xccdf_attribute_has(reader, XCCDFA_ROLE)) # 262| rr->role = # 263| oscap_string_to_enum(XCCDF_ROLE_MAP, Error: GCC_ANALYZER_WARNING (CWE-401): [#def82] openscap-1.4.4/src/XCCDF/profile.c:263:45: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ # 261| if (xccdf_attribute_has(reader, XCCDFA_ROLE)) # 262| rr->role = # 263|-> oscap_string_to_enum(XCCDF_ROLE_MAP, # 264| xccdf_attribute_get(reader, XCCDFA_ROLE)); # 265| if (xccdf_attribute_has(reader, XCCDFA_SEVERITY)) Error: GCC_ANALYZER_WARNING (CWE-401): [#def83] openscap-1.4.4/src/XCCDF/profile.c:263:45: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_refine_rule_new()’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 261| if (xccdf_attribute_has(reader, XCCDFA_ROLE)) # 262| rr->role = # 263|-> oscap_string_to_enum(XCCDF_ROLE_MAP, # 264| xccdf_attribute_get(reader, XCCDFA_ROLE)); # 265| if (xccdf_attribute_has(reader, XCCDFA_SEVERITY)) Error: GCC_ANALYZER_WARNING (CWE-401): [#def84] openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ openscap-1.4.4/src/XCCDF/profile.c:265:37: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ # 263| oscap_string_to_enum(XCCDF_ROLE_MAP, # 264| xccdf_attribute_get(reader, XCCDFA_ROLE)); # 265|-> if (xccdf_attribute_has(reader, XCCDFA_SEVERITY)) # 266| rr->severity = # 267| oscap_string_to_enum(XCCDF_LEVEL_MAP, Error: GCC_ANALYZER_WARNING (CWE-401): [#def85] openscap-1.4.4/src/XCCDF/profile.c:265:37: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_refine_rule_new()’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 263| oscap_string_to_enum(XCCDF_ROLE_MAP, # 264| xccdf_attribute_get(reader, XCCDFA_ROLE)); # 265|-> if (xccdf_attribute_has(reader, XCCDFA_SEVERITY)) # 266| rr->severity = # 267| oscap_string_to_enum(XCCDF_LEVEL_MAP, Error: GCC_ANALYZER_WARNING (CWE-401): [#def86] openscap-1.4.4/src/XCCDF/profile.c:267:45: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ # 265| if (xccdf_attribute_has(reader, XCCDFA_SEVERITY)) # 266| rr->severity = # 267|-> oscap_string_to_enum(XCCDF_LEVEL_MAP, # 268| xccdf_attribute_get(reader, XCCDFA_SEVERITY)); # 269| xccdf_parse_remarks(reader, rr->remarks, depth + 1); Error: GCC_ANALYZER_WARNING (CWE-401): [#def87] openscap-1.4.4/src/XCCDF/profile.c:267:45: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_refine_rule_new()’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 265| if (xccdf_attribute_has(reader, XCCDFA_SEVERITY)) # 266| rr->severity = # 267|-> oscap_string_to_enum(XCCDF_LEVEL_MAP, # 268| xccdf_attribute_get(reader, XCCDFA_SEVERITY)); # 269| xccdf_parse_remarks(reader, rr->remarks, depth + 1); Error: GCC_ANALYZER_WARNING (CWE-401): [#def88] openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_parse_remarks’ openscap-1.4.4/src/XCCDF/profile.c:269:33: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_refine_rule_new()’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 267| oscap_string_to_enum(XCCDF_LEVEL_MAP, # 268| xccdf_attribute_get(reader, XCCDFA_SEVERITY)); # 269|-> xccdf_parse_remarks(reader, rr->remarks, depth + 1); # 270| oscap_list_add(prof->sub.profile.refine_rules, rr); # 271| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def89] openscap-1.4.4/src/XCCDF/profile.c:270:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ # 268| xccdf_attribute_get(reader, XCCDFA_SEVERITY)); # 269| xccdf_parse_remarks(reader, rr->remarks, depth + 1); # 270|-> oscap_list_add(prof->sub.profile.refine_rules, rr); # 271| break; # 272| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def90] openscap-1.4.4/src/XCCDF/profile.c:279:48: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ # 277| struct xccdf_refine_value *rv = xccdf_refine_value_new(); # 278| rv->item = oscap_strdup(id); # 279|-> rv->selector = xccdf_attribute_copy(reader, XCCDFA_SELECTOR); # 280| if (xccdf_attribute_has(reader, XCCDFA_OPERATOR)) # 281| rv->oper = Error: GCC_ANALYZER_WARNING (CWE-401): [#def91] openscap-1.4.4/src/XCCDF/profile.c:279:48: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_refine_value_new()’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 277| struct xccdf_refine_value *rv = xccdf_refine_value_new(); # 278| rv->item = oscap_strdup(id); # 279|-> rv->selector = xccdf_attribute_copy(reader, XCCDFA_SELECTOR); # 280| if (xccdf_attribute_has(reader, XCCDFA_OPERATOR)) # 281| rv->oper = Error: GCC_ANALYZER_WARNING (CWE-401): [#def92] openscap-1.4.4/src/XCCDF/profile.c:280:37: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ # 278| rv->item = oscap_strdup(id); # 279| rv->selector = xccdf_attribute_copy(reader, XCCDFA_SELECTOR); # 280|-> if (xccdf_attribute_has(reader, XCCDFA_OPERATOR)) # 281| rv->oper = # 282| oscap_string_to_enum(XCCDF_OPERATOR_MAP, Error: GCC_ANALYZER_WARNING (CWE-401): [#def93] openscap-1.4.4/src/XCCDF/profile.c:280:37: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_refine_value_new()’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 278| rv->item = oscap_strdup(id); # 279| rv->selector = xccdf_attribute_copy(reader, XCCDFA_SELECTOR); # 280|-> if (xccdf_attribute_has(reader, XCCDFA_OPERATOR)) # 281| rv->oper = # 282| oscap_string_to_enum(XCCDF_OPERATOR_MAP, Error: GCC_ANALYZER_WARNING (CWE-401): [#def94] openscap-1.4.4/src/XCCDF/profile.c:282:45: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ # 280| if (xccdf_attribute_has(reader, XCCDFA_OPERATOR)) # 281| rv->oper = # 282|-> oscap_string_to_enum(XCCDF_OPERATOR_MAP, # 283| xccdf_attribute_get(reader, XCCDFA_OPERATOR)); # 284| xccdf_parse_remarks(reader, rv->remarks, depth + 1); Error: GCC_ANALYZER_WARNING (CWE-401): [#def95] openscap-1.4.4/src/XCCDF/profile.c:282:45: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_refine_value_new()’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 280| if (xccdf_attribute_has(reader, XCCDFA_OPERATOR)) # 281| rv->oper = # 282|-> oscap_string_to_enum(XCCDF_OPERATOR_MAP, # 283| xccdf_attribute_get(reader, XCCDFA_OPERATOR)); # 284| xccdf_parse_remarks(reader, rv->remarks, depth + 1); Error: GCC_ANALYZER_WARNING (CWE-401): [#def96] openscap-1.4.4/src/XCCDF/profile.c:284:33: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_refine_value_new()’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 282| oscap_string_to_enum(XCCDF_OPERATOR_MAP, # 283| xccdf_attribute_get(reader, XCCDFA_OPERATOR)); # 284|-> xccdf_parse_remarks(reader, rv->remarks, depth + 1); # 285| oscap_list_add(prof->sub.profile.refine_values, rv); # 286| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def97] openscap-1.4.4/src/XCCDF/profile.c:285:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ # 283| xccdf_attribute_get(reader, XCCDFA_OPERATOR)); # 284| xccdf_parse_remarks(reader, rv->remarks, depth + 1); # 285|-> oscap_list_add(prof->sub.profile.refine_values, rv); # 286| break; # 287| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def98] openscap-1.4.4/src/XCCDF/profile.c:289:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/profile.c: scope_hint: In function ‘xccdf_profile_parse’ # 287| } # 288| case XCCDFE_SET_VALUE:{ # 289|-> oscap_list_add(prof->sub.profile.setvalues, xccdf_setvalue_new_parse(reader)); # 290| xmlTextReaderRead(reader); # 291| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def99] openscap-1.4.4/src/XCCDF/profile.c:289:33: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_setvalue_new_parse(reader)’ openscap-1.4.4/src/XCCDF/profile.c:233:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ # 287| } # 288| case XCCDFE_SET_VALUE:{ # 289|-> oscap_list_add(prof->sub.profile.setvalues, xccdf_setvalue_new_parse(reader)); # 290| xmlTextReaderRead(reader); # 291| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def100] openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c:181:59: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/helpers.h:118:17: note: in expansion of macro ‘XCCDF_ITERATOR_GETTER’ openscap-1.4.4/src/XCCDF/helpers.h:123:17: note: in expansion of macro ‘XCCDF_IGETTER’ openscap-1.4.4/src/XCCDF/result.c:170:1: note: in expansion of macro ‘XCCDF_LISTMANIP’ openscap-1.4.4/src/XCCDF/helpers.h:118:17: note: in expansion of macro ‘XCCDF_ITERATOR_GETTER’ openscap-1.4.4/src/XCCDF/helpers.h:123:17: note: in expansion of macro ‘XCCDF_IGETTER’ openscap-1.4.4/src/XCCDF/result.c:170:1: note: in expansion of macro ‘XCCDF_LISTMANIP’ openscap-1.4.4/src/XCCDF/helpers.h:118:17: note: in expansion of macro ‘XCCDF_ITERATOR_GETTER’ openscap-1.4.4/src/XCCDF/helpers.h:123:17: note: in expansion of macro ‘XCCDF_IGETTER’ openscap-1.4.4/src/XCCDF/result.c:170:1: note: in expansion of macro ‘XCCDF_LISTMANIP’ # 179| static inline void _xccdf_result_add_target_fact_uniq(struct xccdf_result *result, struct xccdf_target_fact *fact) # 180| { # 181|-> struct xccdf_target_fact_iterator *target_facts = xccdf_result_get_target_facts(result); # 182| while (xccdf_target_fact_iterator_has_more(target_facts)) { # 183| struct xccdf_target_fact *target_fact = xccdf_target_fact_iterator_next(target_facts); Error: GCC_ANALYZER_WARNING (CWE-401): [#def101] openscap-1.4.4/src/XCCDF/result.c:182:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/debug_priv.h:47:102: note: in definition of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:62:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/XCCDF/result.c:317:25: note: in expansion of macro ‘dW’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:117:41: note: in definition of macro ‘OSCAP_ITERATOR_HAS_MORE’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ openscap-1.4.4/src/common/util.h:122:57: note: in expansion of macro ‘OSCAP_ITERATOR_HAS_MORE’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ openscap-1.4.4/src/common/util.h:122:57: note: in expansion of macro ‘OSCAP_ITERATOR_HAS_MORE’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ # 180| { # 181| struct xccdf_target_fact_iterator *target_facts = xccdf_result_get_target_facts(result); # 182|-> while (xccdf_target_fact_iterator_has_more(target_facts)) { # 183| struct xccdf_target_fact *target_fact = xccdf_target_fact_iterator_next(target_facts); # 184| if (target_fact->type == fact->type) Error: GCC_ANALYZER_WARNING (CWE-401): [#def102] openscap-1.4.4/src/XCCDF/result.c:184:40: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/debug_priv.h:47:102: note: in definition of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:62:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/XCCDF/result.c:317:25: note: in expansion of macro ‘dW’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:118:36: note: in definition of macro ‘OSCAP_ITERATOR_NEXT’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ openscap-1.4.4/src/common/util.h:122:108: note: in expansion of macro ‘OSCAP_ITERATOR_NEXT’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ openscap-1.4.4/src/common/util.h:122:108: note: in expansion of macro ‘OSCAP_ITERATOR_NEXT’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ # 182| while (xccdf_target_fact_iterator_has_more(target_facts)) { # 183| struct xccdf_target_fact *target_fact = xccdf_target_fact_iterator_next(target_facts); # 184|-> if (target_fact->type == fact->type) # 185| if (target_fact->name != NULL && fact->name != NULL && !strcmp(target_fact->name, fact->name)) # 186| if (target_fact->value != NULL && fact->value != NULL && !strcmp(target_fact->value, fact->value)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def103] openscap-1.4.4/src/XCCDF/result.c:191:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/debug_priv.h:47:102: note: in definition of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:62:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/XCCDF/result.c:317:25: note: in expansion of macro ‘dW’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/helpers.h:123:50: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:170:1: note: in expansion of macro ‘XCCDF_LISTMANIP’ openscap-1.4.4/src/XCCDF/helpers.h:123:50: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:170:1: note: in expansion of macro ‘XCCDF_LISTMANIP’ openscap-1.4.4/src/XCCDF/helpers.h:123:50: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:170:1: note: in expansion of macro ‘XCCDF_LISTMANIP’ # 189| } # 190| } # 191|-> xccdf_result_add_target_fact(result, fact); # 192| exit: # 193| xccdf_target_fact_iterator_free(target_facts); Error: GCC_ANALYZER_WARNING (CWE-401): [#def104] openscap-1.4.4/src/XCCDF/tailoring.c:191:51: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/tailoring.c:126:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/tailoring.c: scope_hint: In function ‘xccdf_tailoring_parse’ # 189| dI("Parsing Tailoring Profiles without reference to Benchmark"); # 190| } # 191|-> struct xccdf_item *item = xccdf_profile_parse(reader, benchmark); # 192| if (!xccdf_tailoring_add_profile(tailoring, XPROFILE(item))) { # 193| dW("Failed to add profile to tailoring while parsing!"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def105] openscap-1.4.4/src/XCCDF/tailoring.c:201:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/tailoring.c:126:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/tailoring.c: scope_hint: In function ‘xccdf_tailoring_parse’ # 199| xmlTextReaderConstLocalName(reader)); # 200| } # 201|-> xmlTextReaderRead(reader); # 202| } # 203| Error: GCC_ANALYZER_WARNING (CWE-401): [#def106] openscap-1.4.4/src/XCCDF/tailoring.c:399:22: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_tailoring_new()’ openscap-1.4.4/src/XCCDF/tailoring.c:126:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/tailoring.c: scope_hint: In function ‘xccdf_tailoring_parse’ # 397| bool xccdf_tailoring_set_id(struct xccdf_tailoring *tailoring, const char* newval) # 398| { # 399|-> if (tailoring->id) # 400| free(tailoring->id); # 401| Error: GCC_ANALYZER_WARNING (CWE-775): [#def107] openscap-1.4.4/src/common/debug_priv.h:47:37: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_pipefd[0]’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:526:17: note: in expansion of macro ‘dE’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:526:17: note: in expansion of macro ‘dE’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:526:17: note: in expansion of macro ‘dE’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:526:17: note: in expansion of macro ‘dE’ # 45| # 46| # 47|-> # define __dlprintf_wrapper(l, ...) __oscap_dlprintf (l, __FILE__, __PRETTY_FUNCTION__, __LINE__, 0, __VA_ARGS__) # 48| # 49| /** Error: GCC_ANALYZER_WARNING (CWE-775): [#def108] openscap-1.4.4/src/common/debug_priv.h:47:37: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_pipefd[1]’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:526:17: note: in expansion of macro ‘dE’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:526:17: note: in expansion of macro ‘dE’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:526:17: note: in expansion of macro ‘dE’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:526:17: note: in expansion of macro ‘dE’ # 45| # 46| # 47|-> # define __dlprintf_wrapper(l, ...) __oscap_dlprintf (l, __FILE__, __PRETTY_FUNCTION__, __LINE__, 0, __VA_ARGS__) # 48| # 49| /**
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-63.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | openscap-1.4.4-0.20260112184144361094.pr2298.23.ga94bed741 |
| diffbase-store-results-to | /tmp/tmpah4lrk42/openscap-1.4.4-0.20260112184144361094.pr2298.23.ga94bed741.tar.xz |
| diffbase-time-created | 2026-01-12 19:11:08 |
| diffbase-time-finished | 2026-01-12 19:23:38 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpah4lrk42/openscap-1.4.4-0.20260112184144361094.pr2298.23.ga94bed741.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpah4lrk42/openscap-1.4.4-0.20260112184144361094.pr2298.23.ga94bed741.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-63.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a |
| store-results-to | /tmp/tmp22zeadpr/openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a.tar.xz |
| time-created | 2026-01-12 18:55:22 |
| time-finished | 2026-01-12 19:10:27 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp22zeadpr/openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp22zeadpr/openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |