Task #96999 - added.err
back to task #96999download
Error: GCC_ANALYZER_WARNING (CWE-401):
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):
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):
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):
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):
openscap-1.4.4/src/OVAL/probes/SEAP/public/sexp.h:28: included_from: Included from here.
openscap-1.4.4/src/OVAL/probes/SEAP/public/sexp-datatype.h:29: included_from: Included from here.
openscap-1.4.4/src/OVAL/probes/SEAP/_sexp-datatype.h:27: included_from: Included from here.
openscap-1.4.4/src/OVAL/probes/SEAP/_sexp-types.h:31: included_from: Included from here.
openscap-1.4.4/src/OVAL/probes/SEAP/seap-descriptor.h:33: included_from: Included from here.
openscap-1.4.4/src/OVAL/probes/SEAP/sch_queue.h:28: included_from: Included from here.
openscap-1.4.4/src/OVAL/probes/SEAP/_seap.h:28: included_from: Included from here.
openscap-1.4.4/src/OVAL/probes/probe/probe.h:37: included_from: Included from here.
openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:63: included_from: Included from here.
openscap-1.4.4/src/OVAL/probes/SEAP/public/sexp-manip.h:115:26: 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’
openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:327:44: note: in expansion of macro ‘SEXP_number_geti’
openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:327:44: note: in expansion of macro ‘SEXP_number_geti’
openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:327:44: note: in expansion of macro ‘SEXP_number_geti’
# 113| * The size of the integer may be architecture dependent.
# 114| */
# 115|-> #define SEXP_number_geti SEXP_number_geti_32
# 116|
# 117| /**
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/OVAL/probes/independent/environmentvariable58_probe.c: scope_hint: In function ‘read_environment’
openscap-1.4.4/src/OVAL/probes/independent/environmentvariable58_probe.c:387:17: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buffer’
# 385| }
# 386|
# 387|-> close(fd);
# 388| }
# 389| closedir(d);
Error: GCC_ANALYZER_WARNING (CWE-401):
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):
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):
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):
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):
openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:324:21: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’
# 322| }
# 323|
# 324|-> mnt_opval = probe_ent_getattrval(mnt_entity, "operation");
# 325|
# 326| if (mnt_opval != NULL) {
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:328:17: 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’
# 326| if (mnt_opval != NULL) {
# 327| mnt_op = (oval_operation_t)SEXP_number_geti(mnt_opval);
# 328|-> SEXP_free(mnt_opval);
# 329| } else
# 330| mnt_op = OVAL_OPERATION_EQUALS;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/OVAL/probes/unix/linux/partition_probe.c:332:22: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt_fp’
# 330| mnt_op = OVAL_OPERATION_EQUALS;
# 331|
# 332|-> mnt_entval = probe_ent_getval(mnt_entity);
# 333|
# 334| if (!SEXP_stringp(mnt_entval)) {
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:184:41: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&pathbuf)’
# 182| start = kill = false;
# 183|
# 184|-> while ((rc_dp = readdir(rc_dir)) != NULL) {
# 185| if (stat(rc_dp->d_name, &rc_st) != 0) {
# 186| dD("Can't stat file %s/%s: errno=%d, %s.",
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:225:47: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rep_lst’
# 223| }
# 224|
# 225|-> rep_lst->service_name = strdup(service_name);
# 226| rep_lst->runlevel = strdup(runlevel);
# 227| rep_lst->start = start;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:232:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(".")’
# 230| }
# 231| }
# 232|-> closedir(init_dir);
# 233|
# 234| if (fchdir(dirfd(orig_dir)) == -1) {
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_status_new_fill’
openscap-1.4.4/src/XCCDF/item.c:1007:26: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
# 1005| return NULL;
# 1006| ret = calloc(1, sizeof(struct xccdf_status));
# 1007|-> if ((ret->status = oscap_string_to_enum(XCCDF_STATUS_MAP, status)) == XCCDF_STATUS_NOT_SPECIFIED) {
# 1008| free(ret);
# 1009| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1007:28: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
# 1005| return NULL;
# 1006| ret = calloc(1, sizeof(struct xccdf_status));
# 1007|-> if ((ret->status = oscap_string_to_enum(XCCDF_STATUS_MAP, status)) == XCCDF_STATUS_NOT_SPECIFIED) {
# 1008| free(ret);
# 1009| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_item_process_element’
openscap-1.4.4/src/XCCDF/item.c:1007:28: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_status_new_fill(oscap_element_string_copy(reader), xccdf_attribute_get(reader, 8))’
# 1005| return NULL;
# 1006| ret = calloc(1, sizeof(struct xccdf_status));
# 1007|-> if ((ret->status = oscap_string_to_enum(XCCDF_STATUS_MAP, status)) == XCCDF_STATUS_NOT_SPECIFIED) {
# 1008| free(ret);
# 1009| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_status_new_fill’
openscap-1.4.4/src/XCCDF/item.c:1011:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
# 1009| return NULL;
# 1010| }
# 1011|-> ret->date = oscap_get_date(date);
# 1012| return ret;
# 1013| }
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_model_clone’
openscap-1.4.4/src/XCCDF/item.c:1061:27: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new_model’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_model_clone’
# 1059| {
# 1060| struct xccdf_model *new_model = calloc(1, sizeof(struct xccdf_model));
# 1061|-> new_model->system = oscap_strdup(old_model->system);
# 1062|
# 1063| //params maps char * to char * so we will need to oscap_strdup the items.
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1064:29: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_model_clone’
# 1062|
# 1063| //params maps char * to char * so we will need to oscap_strdup the items.
# 1064|-> new_model->params = oscap_htable_clone(old_model->params, (oscap_clone_func) oscap_strdup);
# 1065| //new_model->params = NULL;
# 1066| return new_model;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1064:29: warning[-Wanalyzer-malloc-leak]: leak of ‘new_model’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_model_clone’
# 1062|
# 1063| //params maps char * to char * so we will need to oscap_strdup the items.
# 1064|-> new_model->params = oscap_htable_clone(old_model->params, (oscap_clone_func) oscap_strdup);
# 1065| //new_model->params = NULL;
# 1066| return new_model;
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_model_new’
openscap-1.4.4/src/XCCDF/item.c:1072:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘model’
# 1070| {
# 1071| struct xccdf_model *model = calloc(1, sizeof(struct xccdf_model));
# 1072|-> model->params = oscap_htable_new();
# 1073| return model;
# 1074| }
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1072:21: warning[-Wanalyzer-malloc-leak]: leak of ‘model’
# 1070| {
# 1071| struct xccdf_model *model = calloc(1, sizeof(struct xccdf_model));
# 1072|-> model->params = oscap_htable_new();
# 1073| return model;
# 1074| }
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_model_new_xml’
openscap-1.4.4/src/XCCDF/item.c:1086:25: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_model_new()’
# 1084|
# 1085| model = xccdf_model_new();
# 1086|-> model->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 1087|
# 1088| while (oscap_to_start_element(reader, depth)) {
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1088:16: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_model_new()’
# 1086| model->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 1087|
# 1088|-> while (oscap_to_start_element(reader, depth)) {
# 1089| if (xccdf_element_get(reader) == XCCDFE_PARAM) {
# 1090| const char *name = xccdf_attribute_get(reader, XCCDFA_NAME);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1089:21: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_model_new()’
# 1087|
# 1088| while (oscap_to_start_element(reader, depth)) {
# 1089|-> if (xccdf_element_get(reader) == XCCDFE_PARAM) {
# 1090| const char *name = xccdf_attribute_get(reader, XCCDFA_NAME);
# 1091| char *value = oscap_element_string_copy(reader);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1090:44: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_model_new()’
# 1088| while (oscap_to_start_element(reader, depth)) {
# 1089| if (xccdf_element_get(reader) == XCCDFE_PARAM) {
# 1090|-> const char *name = xccdf_attribute_get(reader, XCCDFA_NAME);
# 1091| char *value = oscap_element_string_copy(reader);
# 1092| if (!name || !value || !oscap_htable_add(model->params, name, value))
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1091:39: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_model_new()’
# 1089| if (xccdf_element_get(reader) == XCCDFE_PARAM) {
# 1090| const char *name = xccdf_attribute_get(reader, XCCDFA_NAME);
# 1091|-> char *value = oscap_element_string_copy(reader);
# 1092| if (!name || !value || !oscap_htable_add(model->params, name, value))
# 1093| free(value);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1092:29: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_model_new()’
# 1090| const char *name = xccdf_attribute_get(reader, XCCDFA_NAME);
# 1091| char *value = oscap_element_string_copy(reader);
# 1092|-> if (!name || !value || !oscap_htable_add(model->params, name, value))
# 1093| free(value);
# 1094| }
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_warning_new’
openscap-1.4.4/src/XCCDF/item.c:1120:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘w’
# 1118| {
# 1119| struct xccdf_warning *w = calloc(1, sizeof(struct xccdf_warning));
# 1120|-> w->category = XCCDF_WARNING_GENERAL;
# 1121| return w;
# 1122| }
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_warning_new_parse’
openscap-1.4.4/src/XCCDF/item.c:1127:19: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_warning_new()’
# 1125| {
# 1126| struct xccdf_warning *w = xccdf_warning_new();
# 1127|-> w->category = oscap_string_to_enum(XCCDF_WARNING_MAP, xccdf_attribute_get(reader, XCCDFA_CATEGORY));
# 1128| w->text = oscap_text_new_parse(XCCDF_TEXT_HTMLSUB, reader);
# 1129| return w;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_item_process_element’
openscap-1.4.4/src/XCCDF/item.c:1127:19: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_warning_new_parse(reader)’
# 1125| {
# 1126| struct xccdf_warning *w = xccdf_warning_new();
# 1127|-> w->category = oscap_string_to_enum(XCCDF_WARNING_MAP, xccdf_attribute_get(reader, XCCDFA_CATEGORY));
# 1128| w->text = oscap_text_new_parse(XCCDF_TEXT_HTMLSUB, reader);
# 1129| return w;
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
openscap-1.4.4/src/XCCDF/item.c:1218:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘clone’
# 1216| {
# 1217| struct xccdf_value_instance * clone = calloc(1, sizeof(struct xccdf_value_instance));
# 1218|-> clone->type = val->type;
# 1219|
# 1220| clone->value = oscap_strdup(val->value);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1222:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
# 1220| clone->value = oscap_strdup(val->value);
# 1221| clone->defval = oscap_strdup(val->defval);
# 1222|-> clone->choices = oscap_list_clone(val->choices, (oscap_clone_func) oscap_strdup);
# 1223| clone->match = oscap_strdup(val->match);
# 1224| clone->lower_bound = val->lower_bound;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1222:22: warning[-Wanalyzer-malloc-leak]: leak of ‘clone’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
# 1220| clone->value = oscap_strdup(val->value);
# 1221| clone->defval = oscap_strdup(val->defval);
# 1222|-> clone->choices = oscap_list_clone(val->choices, (oscap_clone_func) oscap_strdup);
# 1223| clone->match = oscap_strdup(val->match);
# 1224| clone->lower_bound = val->lower_bound;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1228:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
# 1226|
# 1227| clone->flags = val->flags;
# 1228|-> xccdf_value_instance_set_selector(clone, xccdf_value_instance_get_selector(val));
# 1229| return clone;
# 1230| }
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/item.c:1228:9: warning[-Wanalyzer-malloc-leak]: leak of ‘clone’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
openscap-1.4.4/src/XCCDF/item.c: scope_hint: In function ‘xccdf_value_instance_clone’
# 1226|
# 1227| clone->flags = val->flags;
# 1228|-> xccdf_value_instance_set_selector(clone, xccdf_value_instance_get_selector(val));
# 1229| return clone;
# 1230| }
Error: GCC_ANALYZER_WARNING (CWE-401):
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’
# 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):
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_parse’
openscap-1.4.4/src/XCCDF/rule.c:586:21: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_new()’
# 584| struct xccdf_check *check = xccdf_check_new();
# 585|
# 586|-> check->id = xccdf_attribute_copy(reader, XCCDFA_ID);
# 587| check->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 588| check->selector = xccdf_attribute_copy(reader, XCCDFA_SELECTOR);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:587:25: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_new()’
# 585|
# 586| check->id = xccdf_attribute_copy(reader, XCCDFA_ID);
# 587|-> check->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 588| check->selector = xccdf_attribute_copy(reader, XCCDFA_SELECTOR);
# 589| check->oper = oscap_string_to_enum(XCCDF_BOOLOP_MAP, xccdf_attribute_get(reader, XCCDFA_OPERATOR));
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:588:27: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_new()’
# 586| check->id = xccdf_attribute_copy(reader, XCCDFA_ID);
# 587| check->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 588|-> check->selector = xccdf_attribute_copy(reader, XCCDFA_SELECTOR);
# 589| check->oper = oscap_string_to_enum(XCCDF_BOOLOP_MAP, xccdf_attribute_get(reader, XCCDFA_OPERATOR));
# 590| if (xccdf_attribute_has(reader, XCCDFA_MULTICHECK) && el != XCCDFE_COMPLEX_CHECK) {
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:589:23: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_new()’
# 587| check->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 588| check->selector = xccdf_attribute_copy(reader, XCCDFA_SELECTOR);
# 589|-> check->oper = oscap_string_to_enum(XCCDF_BOOLOP_MAP, xccdf_attribute_get(reader, XCCDFA_OPERATOR));
# 590| if (xccdf_attribute_has(reader, XCCDFA_MULTICHECK) && el != XCCDFE_COMPLEX_CHECK) {
# 591| check->flags.def_multicheck = true;
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/rule.c:612:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xccdf_check_content_ref_new()’
# 610| break;
# 611| struct xccdf_check_content_ref *ref = xccdf_check_content_ref_new();
# 612|-> ref->name = xccdf_attribute_copy(reader, XCCDFA_NAME);
# 613| ref->href = oscap_strdup(href);
# 614| oscap_list_add(check->content_refs, ref);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:612:45: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_content_ref_new()’
# 610| break;
# 611| struct xccdf_check_content_ref *ref = xccdf_check_content_ref_new();
# 612|-> ref->name = xccdf_attribute_copy(reader, XCCDFA_NAME);
# 613| ref->href = oscap_strdup(href);
# 614| oscap_list_add(check->content_refs, ref);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:614:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_parse’
# 612| ref->name = xccdf_attribute_copy(reader, XCCDFA_NAME);
# 613| ref->href = oscap_strdup(href);
# 614|-> oscap_list_add(check->content_refs, ref);
# 615| break;
# 616| }
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:614:33: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_content_ref_new()’
# 612| ref->name = xccdf_attribute_copy(reader, XCCDFA_NAME);
# 613| ref->href = oscap_strdup(href);
# 614|-> oscap_list_add(check->content_refs, ref);
# 615| break;
# 616| }
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/rule.c:627:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xccdf_check_import_new()’
# 625| break;
# 626| struct xccdf_check_import *imp = xccdf_check_import_new();
# 627|-> imp->name = oscap_strdup(name);
# 628| if (xpath) // @import-xpath is just optional
# 629| imp->xpath = oscap_strdup(xpath);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:630:48: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_parse’
# 628| if (xpath) // @import-xpath is just optional
# 629| imp->xpath = oscap_strdup(xpath);
# 630|-> imp->content = oscap_element_string_copy(reader);
# 631| oscap_list_add(check->imports, imp);
# 632| break;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:630:48: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_import_new()’
# 628| if (xpath) // @import-xpath is just optional
# 629| imp->xpath = oscap_strdup(xpath);
# 630|-> imp->content = oscap_element_string_copy(reader);
# 631| oscap_list_add(check->imports, imp);
# 632| break;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:631:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_parse’
# 629| imp->xpath = oscap_strdup(xpath);
# 630| imp->content = oscap_element_string_copy(reader);
# 631|-> oscap_list_add(check->imports, imp);
# 632| break;
# 633| }
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:631:33: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_import_new()’
# 629| imp->xpath = oscap_strdup(xpath);
# 630| imp->content = oscap_element_string_copy(reader);
# 631|-> oscap_list_add(check->imports, imp);
# 632| break;
# 633| }
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/rule.c:639:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xccdf_check_export_new()’
# 637| break;
# 638| struct xccdf_check_export *exp = xccdf_check_export_new();
# 639|-> exp->name = oscap_strdup(name);
# 640| exp->value = xccdf_attribute_copy(reader, XCCDFA_VALUE_ID);
# 641| oscap_list_add(check->exports, exp);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:640:46: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_parse’
# 638| struct xccdf_check_export *exp = xccdf_check_export_new();
# 639| exp->name = oscap_strdup(name);
# 640|-> exp->value = xccdf_attribute_copy(reader, XCCDFA_VALUE_ID);
# 641| oscap_list_add(check->exports, exp);
# 642| break;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:640:46: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_export_new()’
# 638| struct xccdf_check_export *exp = xccdf_check_export_new();
# 639| exp->name = oscap_strdup(name);
# 640|-> exp->value = xccdf_attribute_copy(reader, XCCDFA_VALUE_ID);
# 641| oscap_list_add(check->exports, exp);
# 642| break;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:641:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_parse’
# 639| exp->name = oscap_strdup(name);
# 640| exp->value = xccdf_attribute_copy(reader, XCCDFA_VALUE_ID);
# 641|-> oscap_list_add(check->exports, exp);
# 642| break;
# 643| }
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:641:33: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_check_export_new()’
# 639| exp->name = oscap_strdup(name);
# 640| exp->value = xccdf_attribute_copy(reader, XCCDFA_VALUE_ID);
# 641|-> oscap_list_add(check->exports, exp);
# 642| break;
# 643| }
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_inject_content_ref’
openscap-1.4.4/src/XCCDF/rule.c:687:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_inject_content_ref’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_inject_content_ref’
# 685| if (name != NULL)
# 686| xccdf_check_content_ref_set_name(content_clone, name);
# 687|-> oscap_list_free(check->content_refs, (oscap_destruct_func) xccdf_check_content_ref_free);
# 688| check->content_refs = oscap_list_new();
# 689| return oscap_list_add(check->content_refs, content_clone);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:688:31: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_inject_content_ref’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_inject_content_ref’
# 686| xccdf_check_content_ref_set_name(content_clone, name);
# 687| oscap_list_free(check->content_refs, (oscap_destruct_func) xccdf_check_content_ref_free);
# 688|-> check->content_refs = oscap_list_new();
# 689| return oscap_list_add(check->content_refs, content_clone);
# 690| }
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:689:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_inject_content_ref’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_check_inject_content_ref’
# 687| oscap_list_free(check->content_refs, (oscap_destruct_func) xccdf_check_content_ref_free);
# 688| check->content_refs = oscap_list_new();
# 689|-> return oscap_list_add(check->content_refs, content_clone);
# 690| }
# 691|
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_fix_clone’
openscap-1.4.4/src/XCCDF/rule.c:783:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new_fix’
# 781| struct xccdf_fix *new_fix = calloc(1, sizeof(struct xccdf_fix));
# 782|
# 783|-> new_fix->reboot = old_fix->reboot;
# 784| new_fix->strategy = old_fix->strategy;
# 785| new_fix->disruption = old_fix->disruption;
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_fix_parse’
openscap-1.4.4/src/XCCDF/rule.c:801:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xccdf_fix_new()’
# 799| {
# 800| struct xccdf_fix *fix = xccdf_fix_new();
# 801|-> fix->id = xccdf_attribute_copy(reader, XCCDFA_ID);
# 802| fix->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 803| fix->platform = xccdf_attribute_copy(reader, XCCDFA_PLATFORM);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:801:19: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fix_new()’
# 799| {
# 800| struct xccdf_fix *fix = xccdf_fix_new();
# 801|-> fix->id = xccdf_attribute_copy(reader, XCCDFA_ID);
# 802| fix->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 803| fix->platform = xccdf_attribute_copy(reader, XCCDFA_PLATFORM);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:802:23: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fix_new()’
# 800| struct xccdf_fix *fix = xccdf_fix_new();
# 801| fix->id = xccdf_attribute_copy(reader, XCCDFA_ID);
# 802|-> fix->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 803| fix->platform = xccdf_attribute_copy(reader, XCCDFA_PLATFORM);
# 804| fix->reboot = xccdf_attribute_get_bool(reader, XCCDFA_REBOOT);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:803:25: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fix_new()’
# 801| fix->id = xccdf_attribute_copy(reader, XCCDFA_ID);
# 802| fix->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 803|-> fix->platform = xccdf_attribute_copy(reader, XCCDFA_PLATFORM);
# 804| fix->reboot = xccdf_attribute_get_bool(reader, XCCDFA_REBOOT);
# 805| fix->strategy = oscap_string_to_enum(XCCDF_STRATEGY_MAP, xccdf_attribute_get(reader, XCCDFA_STRATEGY));
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:804:27: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fix_new()’
# 802| fix->system = xccdf_attribute_copy(reader, XCCDFA_SYSTEM);
# 803| fix->platform = xccdf_attribute_copy(reader, XCCDFA_PLATFORM);
# 804|-> fix->reboot = xccdf_attribute_get_bool(reader, XCCDFA_REBOOT);
# 805| fix->strategy = oscap_string_to_enum(XCCDF_STRATEGY_MAP, xccdf_attribute_get(reader, XCCDFA_STRATEGY));
# 806| fix->disruption = oscap_string_to_enum(XCCDF_LEVEL_MAP, xccdf_attribute_get(reader, XCCDFA_DISRUPTION));
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:805:27: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fix_new()’
# 803| fix->platform = xccdf_attribute_copy(reader, XCCDFA_PLATFORM);
# 804| fix->reboot = xccdf_attribute_get_bool(reader, XCCDFA_REBOOT);
# 805|-> fix->strategy = oscap_string_to_enum(XCCDF_STRATEGY_MAP, xccdf_attribute_get(reader, XCCDFA_STRATEGY));
# 806| fix->disruption = oscap_string_to_enum(XCCDF_LEVEL_MAP, xccdf_attribute_get(reader, XCCDFA_DISRUPTION));
# 807| fix->complexity = oscap_string_to_enum(XCCDF_LEVEL_MAP, xccdf_attribute_get(reader, XCCDFA_COMPLEXITY));
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_fixtext_clone’
openscap-1.4.4/src/XCCDF/rule.c:820:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xccdf_fixtext_new()’
# 818| {
# 819| struct xccdf_fixtext * clone = xccdf_fixtext_new();
# 820|-> clone->reboot = fixtext->reboot;
# 821| clone->strategy = fixtext->strategy;
# 822| clone->disruption = fixtext->disruption;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:820:32: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fixtext_new()’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_fixtext_clone’
# 818| {
# 819| struct xccdf_fixtext * clone = xccdf_fixtext_new();
# 820|-> clone->reboot = fixtext->reboot;
# 821| clone->strategy = fixtext->strategy;
# 822| clone->disruption = fixtext->disruption;
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:825:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_fixtext_clone’
# 823| clone->complexity = fixtext->complexity;
# 824| clone->fixref = oscap_strdup(fixtext->fixref);
# 825|-> clone->text = oscap_text_clone(fixtext->text);
# 826| return clone;
# 827| }
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/rule.c: scope_hint: In function ‘xccdf_fixtext_parse’
openscap-1.4.4/src/XCCDF/rule.c:832:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xccdf_fixtext_new()’
# 830| {
# 831| struct xccdf_fixtext *fix = xccdf_fixtext_new();
# 832|-> fix->fixref = xccdf_attribute_copy(reader, XCCDFA_FIXREF);
# 833| fix->text = oscap_text_new_parse(XCCDF_TEXT_HTMLSUB, reader);
# 834| fix->reboot = xccdf_attribute_get_bool(reader, XCCDFA_REBOOT);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:832:23: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fixtext_new()’
# 830| {
# 831| struct xccdf_fixtext *fix = xccdf_fixtext_new();
# 832|-> fix->fixref = xccdf_attribute_copy(reader, XCCDFA_FIXREF);
# 833| fix->text = oscap_text_new_parse(XCCDF_TEXT_HTMLSUB, reader);
# 834| fix->reboot = xccdf_attribute_get_bool(reader, XCCDFA_REBOOT);
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:833:21: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fixtext_new()’
# 831| struct xccdf_fixtext *fix = xccdf_fixtext_new();
# 832| fix->fixref = xccdf_attribute_copy(reader, XCCDFA_FIXREF);
# 833|-> fix->text = oscap_text_new_parse(XCCDF_TEXT_HTMLSUB, reader);
# 834| fix->reboot = xccdf_attribute_get_bool(reader, XCCDFA_REBOOT);
# 835| fix->strategy = oscap_string_to_enum(XCCDF_STRATEGY_MAP, xccdf_attribute_get(reader, XCCDFA_STRATEGY));
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:834:27: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fixtext_new()’
# 832| fix->fixref = xccdf_attribute_copy(reader, XCCDFA_FIXREF);
# 833| fix->text = oscap_text_new_parse(XCCDF_TEXT_HTMLSUB, reader);
# 834|-> fix->reboot = xccdf_attribute_get_bool(reader, XCCDFA_REBOOT);
# 835| fix->strategy = oscap_string_to_enum(XCCDF_STRATEGY_MAP, xccdf_attribute_get(reader, XCCDFA_STRATEGY));
# 836| fix->disruption = oscap_string_to_enum(XCCDF_LEVEL_MAP, xccdf_attribute_get(reader, XCCDFA_DISRUPTION));
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/XCCDF/rule.c:835:27: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_fixtext_new()’
# 833| fix->text = oscap_text_new_parse(XCCDF_TEXT_HTMLSUB, reader);
# 834| fix->reboot = xccdf_attribute_get_bool(reader, XCCDFA_REBOOT);
# 835|-> fix->strategy = oscap_string_to_enum(XCCDF_STRATEGY_MAP, xccdf_attribute_get(reader, XCCDFA_STRATEGY));
# 836| fix->disruption = oscap_string_to_enum(XCCDF_LEVEL_MAP, xccdf_attribute_get(reader, XCCDFA_DISRUPTION));
# 837| fix->complexity = oscap_string_to_enum(XCCDF_LEVEL_MAP, xccdf_attribute_get(reader, XCCDFA_COMPLEXITY));
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.4/src/common/debug_priv.h:47:37: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&pathbuf)’
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:64:17: note: in expansion of macro ‘oscap_dlprintf’
openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:168:33: note: in expansion of macro ‘dD’
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:64:17: note: in expansion of macro ‘oscap_dlprintf’
openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:168:33: note: in expansion of macro ‘dD’
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:64:17: note: in expansion of macro ‘oscap_dlprintf’
openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:168:33: note: in expansion of macro ‘dD’
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:64:17: note: in expansion of macro ‘oscap_dlprintf’
openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:168:33: note: in expansion of macro ‘dD’
# 45|
# 46|
# 47|-> # define __dlprintf_wrapper(l, ...) __oscap_dlprintf (l, __FILE__, __PRETTY_FUNCTION__, __LINE__, 0, __VA_ARGS__)
# 48|
# 49| /**