Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
openscap-1.4.4/src/CPE/cpedict_priv.c: scope_hint: In function ‘cpe_dict_model_new’
openscap-1.4.4/src/CPE/cpedict_priv.c:303:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
#  301|   	memset(dict, 0, sizeof(struct cpe_dict_model));
#  302|   
#  303|-> 	dict->vendors = oscap_list_new();
#  304|   	dict->items = oscap_list_new();
#  305|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
openscap-1.4.4/src/CPE/cpedict_priv.c:304:23: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
#  302|   
#  303|   	dict->vendors = oscap_list_new();
#  304|-> 	dict->items = oscap_list_new();
#  305|   
#  306|   	dict->base_version = 2; // default to CPE 2.x

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
openscap-1.4.4/src/CPE/cpedict_priv.c: scope_hint: In function ‘cpe_item_new’
openscap-1.4.4/src/CPE/cpedict_priv.c:341:23: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
#  339|   	memset(item, 0, sizeof(struct cpe_item));
#  340|   
#  341|-> 	item->notes = oscap_list_new();
#  342|   	item->references = oscap_list_new();
#  343|   	item->checks = oscap_list_new();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
openscap-1.4.4/src/CPE/cpedict_priv.c:342:28: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
#  340|   
#  341|   	item->notes = oscap_list_new();
#  342|-> 	item->references = oscap_list_new();
#  343|   	item->checks = oscap_list_new();
#  344|   	item->titles = oscap_list_new();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
openscap-1.4.4/src/CPE/cpedict_priv.c:343:24: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
#  341|   	item->notes = oscap_list_new();
#  342|   	item->references = oscap_list_new();
#  343|-> 	item->checks = oscap_list_new();
#  344|   	item->titles = oscap_list_new();
#  345|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
openscap-1.4.4/src/CPE/cpedict_priv.c:344:24: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
#  342|   	item->references = oscap_list_new();
#  343|   	item->checks = oscap_list_new();
#  344|-> 	item->titles = oscap_list_new();
#  345|   
#  346|   	return item;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
openscap-1.4.4/src/CPE/cpedict_priv.c: scope_hint: In function ‘cpe_notes_new’
openscap-1.4.4/src/CPE/cpedict_priv.c:385:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘notes’
#  383|   {
#  384|   	struct cpe_notes *notes = calloc(1, sizeof(struct cpe_notes));
#  385|-> 	notes->notes = oscap_list_new();
#  386|   	return notes;
#  387|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
openscap-1.4.4/src/CPE/cpedict_priv.c:385:24: warning[-Wanalyzer-malloc-leak]: leak of ‘cpe_item_new()’
openscap-1.4.4/src/CPE/cpedict_priv.c: scope_hint: In function ‘cpe_notes_new’
#  383|   {
#  384|   	struct cpe_notes *notes = calloc(1, sizeof(struct cpe_notes));
#  385|-> 	notes->notes = oscap_list_new();
#  386|   	return notes;
#  387|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
openscap-1.4.4/src/CPE/cpedict_priv.c:385:24: warning[-Wanalyzer-malloc-leak]: leak of ‘notes’
#  383|   {
#  384|   	struct cpe_notes *notes = calloc(1, sizeof(struct cpe_notes));
#  385|-> 	notes->notes = oscap_list_new();
#  386|   	return notes;
#  387|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
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): [#def11]
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): [#def12]
openscap-1.4.4/src/CPE/cpedict_priv.c:434:26: warning[-Wanalyzer-malloc-leak]: leak of ‘cpe_vendor_new()’
#  432|   	memset(item, 0, sizeof(struct cpe_product));
#  433|   
#  434|-> 	item->versions = oscap_list_new();
#  435|   	item->value = NULL;
#  436|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
openscap-1.4.4/src/CPE/cpedict_priv.c: scope_hint: In function ‘cpe_product_new’
openscap-1.4.4/src/CPE/cpedict_priv.c:434:26: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
#  432|   	memset(item, 0, sizeof(struct cpe_product));
#  433|   
#  434|-> 	item->versions = oscap_list_new();
#  435|   	item->value = NULL;
#  436|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
openscap-1.4.4/src/CPE/cpedict_priv.c: scope_hint: In function ‘cpe_version_new’
openscap-1.4.4/src/CPE/cpedict_priv.c:450:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cpe_vendor_new()’
#  448|   	memset(item, 0, sizeof(struct cpe_version));
#  449|   
#  450|-> 	item->updates = oscap_list_new();
#  451|   	item->value = NULL;
#  452|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
openscap-1.4.4/src/CPE/cpedict_priv.c:450:25: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
#  448|   	memset(item, 0, sizeof(struct cpe_version));
#  449|   
#  450|-> 	item->updates = oscap_list_new();
#  451|   	item->value = NULL;
#  452|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
openscap-1.4.4/src/CPE/cpedict_priv.c:466:26: warning[-Wanalyzer-malloc-leak]: leak of ‘cpe_vendor_new()’
#  464|   	memset(item, 0, sizeof(struct cpe_update));
#  465|   
#  466|-> 	item->editions = oscap_list_new();
#  467|   	item->value = NULL;
#  468|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
openscap-1.4.4/src/CPE/cpedict_priv.c: scope_hint: In function ‘cpe_update_new’
openscap-1.4.4/src/CPE/cpedict_priv.c:466:26: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
#  464|   	memset(item, 0, sizeof(struct cpe_update));
#  465|   
#  466|-> 	item->editions = oscap_list_new();
#  467|   	item->value = NULL;
#  468|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
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): [#def19]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:230:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  228|                   SEXP_t *msg;
#  229|                   msg = probe_msg_creatf(OVAL_MESSAGE_LEVEL_ERROR, "xmlXPathEvalExpression() error");
#  230|->                 probe_cobj_add_msg(probe_ctx_getresult(pfd->ctx), msg);
#  231|                   SEXP_free(msg);
#  232|                   probe_cobj_set_flag(probe_ctx_getresult(pfd->ctx), SYSCHAR_FLAG_ERROR);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:231:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  229|                   msg = probe_msg_creatf(OVAL_MESSAGE_LEVEL_ERROR, "xmlXPathEvalExpression() error");
#  230|                   probe_cobj_add_msg(probe_ctx_getresult(pfd->ctx), msg);
#  231|->                 SEXP_free(msg);
#  232|                   probe_cobj_set_flag(probe_ctx_getresult(pfd->ctx), SYSCHAR_FLAG_ERROR);
#  233|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:232:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  230|                   probe_cobj_add_msg(probe_ctx_getresult(pfd->ctx), msg);
#  231|                   SEXP_free(msg);
#  232|->                 probe_cobj_set_flag(probe_ctx_getresult(pfd->ctx), SYSCHAR_FLAG_ERROR);
#  233|   
#  234|   		ret = -3;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:245:16: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  243|   	}
#  244|   
#  245|->         item = probe_item_create(OVAL_INDEPENDENT_XML_FILE_CONTENT, NULL,
#  246|                                    "filepath", OVAL_DATATYPE_STRING, filepath,
#  247|                                    "path",     OVAL_DATATYPE_STRING, path,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:259:21: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  257|   		int b;
#  258|   
#  259|-> 		b = xmlXPathCastToBoolean(xpath_obj);
#  260|   		val = SEXP_number_newb(b);
#  261|   		probe_item_ent_add(item, "value_of", NULL, val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:260:23: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  258|   
#  259|   		b = xmlXPathCastToBoolean(xpath_obj);
#  260|-> 		val = SEXP_number_newb(b);
#  261|   		probe_item_ent_add(item, "value_of", NULL, val);
#  262|   		SEXP_free(val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:261:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  259|   		b = xmlXPathCastToBoolean(xpath_obj);
#  260|   		val = SEXP_number_newb(b);
#  261|-> 		probe_item_ent_add(item, "value_of", NULL, val);
#  262|   		SEXP_free(val);
#  263|   		break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:262:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  260|   		val = SEXP_number_newb(b);
#  261|   		probe_item_ent_add(item, "value_of", NULL, val);
#  262|-> 		SEXP_free(val);
#  263|   		break;
#  264|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:270:21: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  268|   		double d;
#  269|   
#  270|-> 		d = xmlXPathCastToNumber(xpath_obj);
#  271|   		val = SEXP_number_newi_32(d);
#  272|   		probe_item_ent_add(item, "value_of", NULL, val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:271:23: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  269|   
#  270|   		d = xmlXPathCastToNumber(xpath_obj);
#  271|-> 		val = SEXP_number_newi_32(d);
#  272|   		probe_item_ent_add(item, "value_of", NULL, val);
#  273|   		SEXP_free(val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:272:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  270|   		d = xmlXPathCastToNumber(xpath_obj);
#  271|   		val = SEXP_number_newi_32(d);
#  272|-> 		probe_item_ent_add(item, "value_of", NULL, val);
#  273|   		SEXP_free(val);
#  274|   		break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:273:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’
#  271|   		val = SEXP_number_newi_32(d);
#  272|   		probe_item_ent_add(item, "value_of", NULL, val);
#  273|-> 		SEXP_free(val);
#  274|   		break;
#  275|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
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): [#def32]
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): [#def33]
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): [#def34]
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): [#def35]
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): [#def36]
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): [#def37]
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): [#def38]
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): [#def39]
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): [#def40]
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): [#def41]
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-401): [#def42]
openscap-1.4.4/src/OVAL/probes/unix/xinetd_probe.c:1257:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 1255|   	res->srv = malloc(sizeof(xiconf_service_t *) * res->cnt);
# 1256|   
# 1257|-> 	rbt_str_walk_inorder2(xiconf->stree, xiconf_dump_cb, (void *)res, 0);
# 1258|   
# 1259|   	res->cnt = rbt_str_size(xiconf->stree);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
openscap-1.4.4/src/OVAL/probes/unix/xinetd_probe.c:1257:9: warning[-Wanalyzer-malloc-leak]: leak of ‘res’
# 1255|   	res->srv = malloc(sizeof(xiconf_service_t *) * res->cnt);
# 1256|   
# 1257|-> 	rbt_str_walk_inorder2(xiconf->stree, xiconf_dump_cb, (void *)res, 0);
# 1258|   
# 1259|   	res->cnt = rbt_str_size(xiconf->stree);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
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): [#def45]
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): [#def46]
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): [#def47]
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): [#def48]
openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_fill_scanner’
openscap-1.4.4/src/XCCDF/result.c:206: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_fill_scanner’
openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_fill_scanner’
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_fill_scanner’
#  204|   	fact = xccdf_target_fact_new();
#  205|   	xccdf_target_fact_set_name(fact, "urn:xccdf:fact:scanner:version");
#  206|-> 	xccdf_target_fact_set_string(fact, oscap_get_version());
#  207|   	xccdf_result_add_target_fact(result, fact);
#  208|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_unix_get_name_fallback’
openscap-1.4.4/src/XCCDF/result.c:215:18: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_identity_new()’
#  213|   
#  214|   	errno = 0;
#  215|-> 	passwd = getpwuid(getuid());
#  216|   	if (passwd == NULL || passwd->pw_name == NULL) {
#  217|   		dW("Error when calling getpwuid(): %d, %s\n", errno, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘xccdf_result_add_identity’
openscap-1.4.4/src/XCCDF/result.c:216:37: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_identity_new()’
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_identity’
openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘xccdf_result_add_identity’
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_identity’
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_identity’
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: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_identity’
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:165: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:165:1: note: in expansion of macro ‘XCCDF_LISTMANIP’
#  214|   	errno = 0;
#  215|   	passwd = getpwuid(getuid());
#  216|-> 	if (passwd == NULL || passwd->pw_name == NULL) {
#  217|   		dW("Error when calling getpwuid(): %d, %s\n", errno, strerror(errno));
#  218|   		return "\0";

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
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): [#def52]
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): [#def53]
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): [#def54]
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): [#def55]
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): [#def56]
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): [#def57]
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): [#def58]
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): [#def59]
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): [#def60]
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): [#def61]
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): [#def62]
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): [#def63]
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): [#def64]
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): [#def65]
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): [#def66]
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): [#def67]
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): [#def68]
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): [#def69]
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): [#def70]
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): [#def71]
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): [#def72]
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): [#def73]
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): [#def74]
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): [#def75]
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): [#def76]
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): [#def77]
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): [#def78]
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): [#def79]
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): [#def80]
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): [#def81]
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): [#def82]
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): [#def83]
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): [#def84]
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): [#def85]
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): [#def86]
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): [#def87]
openscap-1.4.4/src/XCCDF_POLICY/xccdf_policy_substitute.c:98:42: warning[-Wanalyzer-malloc-leak]: leak of ‘sub_use’
openscap-1.4.4/src/common/util.h: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/XCCDF_POLICY/xccdf_policy_substitute.c: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/common/util.h: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/XCCDF_POLICY/xccdf_policy_substitute.c: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/common/util.h: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/XCCDF_POLICY/xccdf_policy_substitute.c: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/XCCDF_POLICY/xccdf_policy_substitute.c: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/common/util.h: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/XCCDF_POLICY/xccdf_policy_substitute.c: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/common/util.h: scope_hint: In function ‘_xccdf_text_substitution_cb’
openscap-1.4.4/src/XCCDF_POLICY/xccdf_policy_substitute.c: scope_hint: In function ‘_xccdf_text_substitution_cb’
#   96|   				if (!oscap_streq(sub_use, "value"))
#   97|   					dW("xccdf:sub/@idref='%s' has incorrect @use='%s'! Using @use='value' instead.", sub_idref, sub_use);
#   98|-> 				result = xccdf_policy_get_value_of_item(data->policy, value);
#   99|   			}
#  100|   			free(sub_use);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
openscap-1.4.4/src/common/debug_priv.h:47:37: warning[-Wanalyzer-malloc-leak]: leak of ‘new_valstr_array’
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/xinetd_probe.c:1502:25: 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/xinetd_probe.c:1502:25: 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/xinetd_probe.c:1502:25: 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/xinetd_probe.c:1502:25: 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|   /**

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
openscap-1.4.4/src/OVAL/probes/unix/xinetd_probe.c: scope_hint: In function ‘op_remove_strl’
openscap-1.4.4/src/common/debug_priv.h:47:37: warning[-Wanalyzer-malloc-leak]: leak of ‘newstr_array’
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/xinetd_probe.c:1479:17: 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/xinetd_probe.c:1479:17: 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/xinetd_probe.c:1479:17: 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|   /**

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
openscap-1.4.4/src/common/debug_priv.h:47:37: warning[-Wanalyzer-malloc-leak]: leak of ‘srv’
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/xinetd_probe.c:1553:25: 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/xinetd_probe.c:1553:25: 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/xinetd_probe.c:1553:25: 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|   /**

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_unix_get_name_fallback’
openscap-1.4.4/src/common/debug_priv.h:47:37: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_identity_new()’
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:62:17: note: in expansion of macro ‘oscap_dlprintf’
openscap-1.4.4/src/XCCDF/result.c:217:17: note: in expansion of macro ‘dW’
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:62:17: note: in expansion of macro ‘oscap_dlprintf’
openscap-1.4.4/src/XCCDF/result.c:217:17: note: in expansion of macro ‘dW’
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:62:17: note: in expansion of macro ‘oscap_dlprintf’
openscap-1.4.4/src/XCCDF/result.c:217:17: note: in expansion of macro ‘dW’
#   45|   
#   46|   
#   47|-> # define __dlprintf_wrapper(l, ...) __oscap_dlprintf (l, __FILE__, __PRETTY_FUNCTION__, __LINE__, 0, __VA_ARGS__)
#   48|   
#   49|   /**

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
openscap-1.4.4/src/common/list.c: scope_hint: In function ‘oscap_create_lists’
openscap-1.4.4/src/common/list.c:45:64: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#   43|   	va_list ap;
#   44|   	va_start(ap, first);
#   45|-> 	for (struct oscap_list **cur = first; cur != NULL; cur = va_arg(ap, struct oscap_list **))
#   46|   		*cur = oscap_list_new();
#   47|   	va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
openscap-1.4.4/src/common/list.c: scope_hint: In function ‘oscap_list_clone’
openscap-1.4.4/src/common/list.c:155:21: warning[-Wanalyzer-malloc-leak]: leak of ‘oscap_list_new()’
#  153|           while (item != NULL) {
#  154|                   if (cloner)
#  155|->                     oscap_list_add(copy, cloner(item->data));
#  156|                   else oscap_list_add(copy, item->data);
#  157|                   item = item->next;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
openscap-1.4.4/src/common/list.c: scope_hint: In function ‘oscap_list_find’
openscap-1.4.4/src/common/list.c:336:20: warning[-Wanalyzer-malloc-leak]: leak of ‘oscap_iterator_new(list)’
#  334|   static inline bool _oscap_iterator_has_more_internal(const struct oscap_iterator *it)
#  335|   {
#  336|-> 	return (!it->cur && it->list->first) || (it->cur && it->cur->next);
#  337|   }
#  338|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
openscap-1.4.4/src/common/list.c: scope_hint: In function ‘oscap_htable_clone’
openscap-1.4.4/src/common/list.c:430:37: warning[-Wanalyzer-malloc-leak]: leak of ‘oscap_htable_new()’
#  428|   		return NULL;
#  429|   
#  430|-> 	for (size_t i = 0; i < table->hsize; ++i) {
#  431|   		struct oscap_htable_item *item = table->table[i];
#  432|   		while (item != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
openscap-1.4.4/tests/API/SEAP/test_api_seap_spb.c: scope_hint: In function ‘main’
openscap-1.4.4/tests/API/SEAP/test_api_seap_spb.c:43:32: warning[-Wanalyzer-malloc-leak]: leak of ‘iov[0].iov_base’
#   41|                   case EINVAL:
#   42|                           fprintf (stderr, "Invalid seed: Not a number\n");
#   43|->                         return (-1);
#   44|                   }
#   45|                   break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
openscap-1.4.4/tests/API/SEAP/test_api_seap_spb.c:43:32: warning[-Wanalyzer-malloc-leak]: leak of ‘iov[1].iov_base’
#   41|                   case EINVAL:
#   42|                           fprintf (stderr, "Invalid seed: Not a number\n");
#   43|->                         return (-1);
#   44|                   }
#   45|                   break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
openscap-1.4.4/tests/API/SEAP/test_api_seap_spb.c:43:32: warning[-Wanalyzer-malloc-leak]: leak of ‘iov[2].iov_base’
#   41|                   case EINVAL:
#   42|                           fprintf (stderr, "Invalid seed: Not a number\n");
#   43|->                         return (-1);
#   44|                   }
#   45|                   break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
openscap-1.4.4/tests/API/SEAP/test_api_seap_spb.c:68:41: warning[-Wanalyzer-malloc-leak]: leak of ‘iov[0].iov_base’
#   66|                   
#   67|                                   if (iov[i].iov_base == NULL) {
#   68|->                                         perror ("iov alloc");
#   69|                                           return (2);
#   70|                                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
openscap-1.4.4/tests/API/SEAP/test_api_seap_spb.c:68:41: warning[-Wanalyzer-malloc-leak]: leak of ‘iov[1].iov_base’
#   66|                   
#   67|                                   if (iov[i].iov_base == NULL) {
#   68|->                                         perror ("iov alloc");
#   69|                                           return (2);
#   70|                                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
openscap-1.4.4/tests/API/SEAP/test_api_seap_spb.c:68:41: warning[-Wanalyzer-malloc-leak]: leak of ‘iov[2].iov_base’
#   66|                   
#   67|                                   if (iov[i].iov_base == NULL) {
#   68|->                                         perror ("iov alloc");
#   69|                                           return (2);
#   70|                                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
openscap-1.4.4/tests/API/SEAP/test_api_seap_spb.c:68:41: warning[-Wanalyzer-malloc-leak]: leak of ‘r_buf’
#   66|                   
#   67|                                   if (iov[i].iov_base == NULL) {
#   68|->                                         perror ("iov alloc");
#   69|                                           return (2);
#   70|                                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:39:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
#   37|   	oscap_assert(file != NULL);
#   38|   
#   39|-> 	fseek(file, 0, SEEK_END);
#   40|   	unsigned long len = ftell(file);
#   41|   	fseek(file, 0, SEEK_SET);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:40:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
#   38|   
#   39|   	fseek(file, 0, SEEK_END);
#   40|-> 	unsigned long len = ftell(file);
#   41|   	fseek(file, 0, SEEK_SET);
#   42|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:41:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
#   39|   	fseek(file, 0, SEEK_END);
#   40|   	unsigned long len = ftell(file);
#   41|-> 	fseek(file, 0, SEEK_SET);
#   42|   
#   43|   	oscap_assert(buffer != NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:44:30: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’
#   42|   
#   43|   	oscap_assert(buffer != NULL);
#   44|-> 	*buffer = malloc(len + 1);
#   45|   	oscap_assert(*buffer != NULL);
#   46|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c: scope_hint: In function ‘main’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:61:36: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:56:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:59:9: note: in expansion of macro ‘oscap_assert’
#   59|   	oscap_assert(buff_size != 0);
#   60|   
#   61|-> 	struct oscap_source *src = oscap_source_new_from_memory(buffer, buff_size, "file.xml.bz2");
#   62|   	printf("SCAP TYPE: %s\n", oscap_document_type_to_string(oscap_source_get_scap_type(src)));
#   63|   	oscap_assert(oscap_source_validate(src, NULL, NULL) == 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:62:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:56:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:59:9: note: in expansion of macro ‘oscap_assert’
#   60|   
#   61|   	struct oscap_source *src = oscap_source_new_from_memory(buffer, buff_size, "file.xml.bz2");
#   62|-> 	printf("SCAP TYPE: %s\n", oscap_document_type_to_string(oscap_source_get_scap_type(src)));
#   63|   	oscap_assert(oscap_source_validate(src, NULL, NULL) == 0);
#   64|   	oscap_source_free(src);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:63:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
openscap-1.4.4/tests/oscap_assert.h:30:15: note: in definition of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:56:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:59:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/oscap_assert.h:30:15: note: in definition of macro ‘oscap_assert’
openscap-1.4.4/tests/oscap_assert.h:30:15: note: in definition of macro ‘oscap_assert’
#   61|   	struct oscap_source *src = oscap_source_new_from_memory(buffer, buff_size, "file.xml.bz2");
#   62|   	printf("SCAP TYPE: %s\n", oscap_document_type_to_string(oscap_source_get_scap_type(src)));
#   63|-> 	oscap_assert(oscap_source_validate(src, NULL, NULL) == 0);
#   64|   	oscap_source_free(src);
#   65|   	free(buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:64:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:56:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:59:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:63:9: note: in expansion of macro ‘oscap_assert’
#   62|   	printf("SCAP TYPE: %s\n", oscap_document_type_to_string(oscap_source_get_scap_type(src)));
#   63|   	oscap_assert(oscap_source_validate(src, NULL, NULL) == 0);
#   64|-> 	oscap_source_free(src);
#   65|   	free(buffer);
#   66|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
openscap-1.4.4/tests/oscap_assert.h:30:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’
openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’
#   28|   /* Unlike standard assert() macro this works even if NDEBUG is defined. */
#   29|   #define oscap_assert(expr) \
#   30|-> 	if (!(expr)) { \
#   31|   		fprintf(stderr, "Assertion failed: %s, file %s, line %d, function %s.", #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
#   32|   		abort(); \

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
openscap-1.4.4/utils/oscap-xccdf.c: scope_hint: In function ‘_some_result_exists’
openscap-1.4.4/utils/oscap-xccdf.c:1047:16: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_result’
# 1045|   	files_it = oscap_file_entry_list_get_files(files);
# 1046|   	oval_result = malloc(PATH_MAX * sizeof(char));
# 1047|-> 	while (oscap_file_entry_iterator_has_more(files_it)) {
# 1048|   		struct oscap_file_entry *file_entry = (struct oscap_file_entry *) oscap_file_entry_iterator_next(files_it);;
# 1049|   		struct stat sb;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
openscap-1.4.4/utils/oscap-xccdf.c:1048:83: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_result’
# 1046|   	oval_result = malloc(PATH_MAX * sizeof(char));
# 1047|   	while (oscap_file_entry_iterator_has_more(files_it)) {
# 1048|-> 		struct oscap_file_entry *file_entry = (struct oscap_file_entry *) oscap_file_entry_iterator_next(files_it);;
# 1049|   		struct stat sb;
# 1050|   		if (strcmp(oscap_file_entry_get_system(file_entry), namespace))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
openscap-1.4.4/utils/oscap-xccdf.c:1050:21: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_result’
# 1048|   		struct oscap_file_entry *file_entry = (struct oscap_file_entry *) oscap_file_entry_iterator_next(files_it);;
# 1049|   		struct stat sb;
# 1050|-> 		if (strcmp(oscap_file_entry_get_system(file_entry), namespace))
# 1051|   			continue;
# 1052|   		snprintf(oval_result, PATH_MAX, "./%s.result.xml", oscap_file_entry_get_file(file_entry));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
openscap-1.4.4/utils/oscap-xccdf.c:1052:17: warning[-Wanalyzer-malloc-leak]: leak of ‘oval_result’
# 1050|   		if (strcmp(oscap_file_entry_get_system(file_entry), namespace))
# 1051|   			continue;
# 1052|-> 		snprintf(oval_result, PATH_MAX, "./%s.result.xml", oscap_file_entry_get_file(file_entry));
# 1053|   		if (stat(oval_result, &sb) == 0) {
# 1054|   			result = true;

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.1
analyzer-version-gcc-analyzer16.0.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.1
diffbase-analyzer-version-gcc-analyzer16.0.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-89.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260119.105402.g7a5be1b.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameopenscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a
diffbase-store-results-to/tmp/tmp4cm1i4uk/openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a.tar.xz
diffbase-time-created2026-01-22 15:03:56
diffbase-time-finished2026-01-22 15:20:15
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp4cm1i4uk/openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp4cm1i4uk/openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-89.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260119.105402.g7a5be1b.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameopenscap-1.4.4-0.20260122145405486063.pr2302.22.ge76f06107
store-results-to/tmp/tmp70ktr7yn/openscap-1.4.4-0.20260122145405486063.pr2302.22.ge76f06107.tar.xz
time-created2026-01-22 15:20:46
time-finished2026-01-22 15:33:28
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp70ktr7yn/openscap-1.4.4-0.20260122145405486063.pr2302.22.ge76f06107.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp70ktr7yn/openscap-1.4.4-0.20260122145405486063.pr2302.22.ge76f06107.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9