device-mapper-multipath-0.13.0-1.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-477): [#def1]
/usr/bin/mpathconf:79:18: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   77|   {
#   78|   	shift 3
#   79|-> 	while [ -n "$1" -a -n "$2" ]; do
#   80|   		MAJOR=$(echo $1 | tr -d '(,')
#   81|   		MINOR=$(echo $2 | tr -d ')')

Error: SHELLCHECK_WARNING (CWE-156): [#def2]
/usr/bin/mpathconf:97:15: warning[SC2046]: Quote this to prevent word splitting.
#   95|   		add_wwid "${1##mpath-}"
#   96|   	else
#   97|-> 		get_dm_deps `dmsetup deps -u $1`
#   98|   	fi
#   99|   }

Error: SHELLCHECK_WARNING (CWE-477): [#def3]
/usr/bin/mpathconf:236:45: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def4]
/usr/bin/mpathconf:236:59: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def5]
/usr/bin/mpathconf:236:77: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def6]
/usr/bin/mpathconf:236:93: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def7]
/usr/bin/mpathconf:236:110: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def8]
/usr/bin/mpathconf:236:131: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def9]
/usr/bin/mpathconf:247:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  245|   		RECHECK_WWID=""
#  246|   	fi
#  247|-> 	if [ -n "$FRIENDLY" ] && [ "$FRIENDLY" != "y" -a "$FRIENDLY" != "n" ]; then
#  248|   		echo "--user_friendly_names must be either 'y' or 'n'"
#  249|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def10]
/usr/bin/mpathconf:251:56: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  249|   		exit 1
#  250|   	fi
#  251|-> 	if [ -n "$RECHECK_WWID" ] && [ "$RECHECK_WWID" != "y" -a "$RECHECK_WWID" != "n" ]; then
#  252|   		echo "--recheck_wwid must be either 'y' or 'n'"
#  253|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def11]
/usr/bin/mpathconf:259:43: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def12]
/usr/bin/mpathconf:259:63: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def13]
/usr/bin/mpathconf:259:83: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def14]
/usr/bin/mpathconf:259:102: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def15]
/usr/bin/mpathconf:259:125: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def16]
/usr/bin/mpathconf:259:148: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def17]
/usr/bin/mpathconf:263:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  261|   		exit 1
#  262|   	fi
#  263|-> 	if [ -n "$PROPERTY" ] && [ "$PROPERTY" != "y" -a "$PROPERTY" != "n" ]; then
#  264|   		echo "--property_blacklist must be either 'y' or 'n'"
#  265|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def18]
/usr/bin/mpathconf:267:46: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  265|   		exit 1
#  266|   	fi
#  267|-> 	if [ -n "$FOREIGN" ] && [ "$FOREIGN" != "y" -a "$FOREIGN" != "n" ]; then
#  268|   		echo "--enable_foreign must be either 'y' or 'n'"
#  269|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def19]
/usr/bin/mpathconf:283:20: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def20]
/usr/bin/mpathconf:283:34: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def21]
/usr/bin/mpathconf:283:52: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def22]
/usr/bin/mpathconf:283:70: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def23]
/usr/bin/mpathconf:283:87: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def24]
/usr/bin/mpathconf:283:108: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def25]
/usr/bin/mpathconf:286:44: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  284|   		SHOW_STATUS=1
#  285|   	fi
#  286|-> 	if [ -n "$MODULE" ] && [ "$MODULE" != "y" -a "$MODULE" != "n" ]; then
#  287|   		echo "--with_module must be either 'y' or 'n'"
#  288|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def26]
/usr/bin/mpathconf:290:52: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  288|   		exit 1
#  289|   	fi
#  290|-> 	if [ -n "$MULTIPATHD" ] && [ "$MULTIPATHD" != "y" -a "$MULTIPATHD" != "n" ]; then
#  291|   		echo "--with_multipathd must be either 'y' or 'n'"
#  292|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def27]
/usr/bin/mpathconf:294:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  292|   		exit 1
#  293|   	fi
#  294|-> 	if [ "$ENABLE" = 2 -a -z "$HAVE_OUTFILE" ]; then
#  295|   		echo "Because --allow makes changes that cannot be automatically reversed,"
#  296|   		echo "you must set --outfile when you set --allow"

Error: SHELLCHECK_WARNING (CWE-477): [#def28]
/usr/bin/mpathconf:341:19: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  339|   fi
#  340|   
#  341|-> if [ -z "$MODULE" -o "$MODULE" = "y" ]; then
#  342|   	if lsmod | grep -q "dm_multipath" ; then
#  343|   		HAVE_MODULE=1

Error: SHELLCHECK_WARNING (CWE-477): [#def29]
/usr/bin/mpathconf:419:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  417|   
#  418|   if [ -n "$SHOW_STATUS" ]; then
#  419|-> 	if [ -z "$HAVE_DISABLE" -o "$HAVE_DISABLE" = 0 ]; then
#  420|   		echo "multipath is enabled"
#  421|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def30]
/usr/bin/mpathconf:429:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  427|   		echo "find_multipaths is $HAVE_FIND"
#  428|   	fi
#  429|-> 	if [ -z "$HAVE_FRIENDLY" -o "$HAVE_FRIENDLY" = 0 ]; then
#  430|   		echo "user_friendly_names is disabled"
#  431|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def31]
/usr/bin/mpathconf:434:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  432|   		echo "user_friendly_names is enabled"
#  433|   	fi
#  434|-> 	if [ -z "$HAVE_RECHECK_WWID" -o "$HAVE_RECHECK_WWID" = 0 ]; then
#  435|   		echo "recheck_wwid is disabled"
#  436|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def32]
/usr/bin/mpathconf:439:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  437|   		echo "recheck_wwid is enabled"
#  438|   	fi
#  439|-> 	if [ -z "$HAVE_PROPERTY" -o "$HAVE_PROPERTY" = 0 ]; then
#  440|   		echo "default property blacklist is disabled"
#  441|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def33]
/usr/bin/mpathconf:444:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  442|   		echo "default property blacklist is enabled"
#  443|   	fi
#  444|-> 	if [ -z "$HAVE_FOREIGN" -o "$HAVE_FOREIGN" = 0 ]; then
#  445|   		echo "enable_foreign is not set (no foreign multipath devices will be shown)"
#  446|   	elif [ "$HAVE_FOREIGN" = 1 ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def34]
/usr/bin/mpathconf:578:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  576|   	fi
#  577|   elif [ "$PROPERTY" = "y" ]; then
#  578|-> 	if [ -z "$HAVE_PROPERTY" -a -z "$HAVE_EXCEPTIONS" ]; then
#  579|   		cat >> $TMPFILE << _EOF_
#  580|   

Error: SHELLCHECK_WARNING (CWE-477): [#def35]
/usr/bin/mpathconf:598:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  596|   
#  597|   if [ "$FOREIGN" = "n" ]; then
#  598|-> 	if [ "$HAVE_FOREIGN" = 1 -o "$HAVE_FOREIGN" = 3 ]; then
#  599|   		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*enable_foreign/#	enable_foreign/' $TMPFILE
#  600|   		CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def36]
/usr/bin/mpathconf:608:29: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  606|   ' $TMPFILE
#  607|   		CHANGED_CONFIG=1
#  608|-> 	elif [ "$HAVE_FOREIGN" = 0 -o "$HAVE_FOREIGN" = 2 -o "$HAVE_FOREIGN" = 3 ]; then
#  609|   		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*#\?[[:space:]]*enable_foreign.*$/	enable_foreign ".*"/' $TMPFILE
#  610|   		CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def37]
/usr/bin/mpathconf:608:52: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  606|   ' $TMPFILE
#  607|   		CHANGED_CONFIG=1
#  608|-> 	elif [ "$HAVE_FOREIGN" = 0 -o "$HAVE_FOREIGN" = 2 -o "$HAVE_FOREIGN" = 3 ]; then
#  609|   		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*#\?[[:space:]]*enable_foreign.*$/	enable_foreign ".*"/' $TMPFILE
#  610|   		CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def38]
/usr/bin/mpathconf:614:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  612|   fi
#  613|   
#  614|-> if [ -n "$OPTION_NAME" -a -n "$OPTION_VALUE" ]; then
#  615|   	if [ -z "$HAVE_OPTION" ]; then
#  616|   		sed -i '/^defaults[[:space:]]*{/ a\

Error: SHELLCHECK_WARNING (CWE-477): [#def39]
/usr/bin/mpathconf:624:26: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  622|   		CHANGED_CONFIG=1
#  623|   	fi
#  624|-> elif [ -n "$OPTION_NAME" -a -n "$HAVE_OPTION" ]; then
#  625|   	sed -i '/^defaults[[:space:]]*{/,/^}/{/^[[:space:]]*'"$OPTION_NAME"'\([[:space:]].*\)\?$/d}' $TMPFILE
#  626|   	CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def40]
/usr/bin/mpathconf:656:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  654|   		systemctl stop multipathd.service
#  655|   	fi
#  656|-> elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then
#  657|   	systemctl reload multipathd.service
#  658|   fi

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
multipath-tools-0.13.0/kpartx/dasd.c:286:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_dasd’
multipath-tools-0.13.0/kpartx/dasd.c:57:1: enter_function: entry to ‘read_dasd_pt’
multipath-tools-0.13.0/kpartx/dasd.c:76:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
multipath-tools-0.13.0/kpartx/dasd.c:80:13: branch_false: ...to here
multipath-tools-0.13.0/kpartx/dasd.c:80:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/dasd.c:84:51: branch_false: ...to here
multipath-tools-0.13.0/kpartx/dasd.c:86:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/dasd.c:90:29: branch_true: ...to here
multipath-tools-0.13.0/kpartx/dasd.c:90:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/dasd.c:94:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/dasd.c:96:20: branch_false: following ‘false’ branch (when ‘__major == 94’)...
multipath-tools-0.13.0/kpartx/dasd.c:107:17: call_function: inlined call to ‘gnu_dev_minor’ from ‘read_dasd_pt’
multipath-tools-0.13.0/kpartx/dasd.c:109:32: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/dasd.c:109:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/dasd.c:122:20: branch_false: ...to here
multipath-tools-0.13.0/kpartx/dasd.c:122:20: branch_true: following ‘true’ branch (when ‘fd_dasd < 0’)...
multipath-tools-0.13.0/kpartx/dasd.c:77:24: branch_true: ...to here
multipath-tools-0.13.0/kpartx/dasd.c:286:1: danger: ‘fd_dasd’ leaks here; was opened at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  284|   	close(fd_dasd);
#  285|   	return retval;
#  286|-> }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
multipath-tools-0.13.0/kpartx/devmapper.c:272:9: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
multipath-tools-0.13.0/kpartx/devmapper.c:260:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:263:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/devmapper.c:263:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:264:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/devmapper.c:263:13: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:267:15: branch_false: ...to here
multipath-tools-0.13.0/kpartx/devmapper.c:268:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:269:24: acquire_memory: allocated here
multipath-tools-0.13.0/kpartx/devmapper.c:272:9: throw: if ‘dm_task_destroy’ throws an exception...
multipath-tools-0.13.0/kpartx/devmapper.c:272:9: danger: ‘name’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  270|   
#  271|   out:
#  272|-> 	dm_task_destroy(dmt);
#  273|   	return name;
#  274|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
multipath-tools-0.13.0/kpartx/devmapper.c:297:9: warning[-Wanalyzer-malloc-leak]: leak of ‘mapname’
multipath-tools-0.13.0/kpartx/devmapper.c:283:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:286:9: branch_false: ...to here
multipath-tools-0.13.0/kpartx/devmapper.c:289:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:292:15: branch_false: ...to here
multipath-tools-0.13.0/kpartx/devmapper.c:293:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:294:27: acquire_memory: allocated here
multipath-tools-0.13.0/kpartx/devmapper.c:297:9: throw: if ‘dm_task_destroy’ throws an exception...
multipath-tools-0.13.0/kpartx/devmapper.c:297:9: danger: ‘mapname’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  295|   
#  296|   out:
#  297|-> 	dm_task_destroy(dmt);
#  298|   	return mapname;
#  299|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
multipath-tools-0.13.0/kpartx/devmapper.c:354:9: warning[-Wanalyzer-malloc-leak]: leak of ‘uuid’
multipath-tools-0.13.0/kpartx/devmapper.c:341:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:344:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/devmapper.c:344:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:347:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/devmapper.c:347:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:350:15: branch_false: ...to here
multipath-tools-0.13.0/kpartx/devmapper.c:351:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/devmapper.c:352:24: branch_true: ...to here
multipath-tools-0.13.0/kpartx/devmapper.c:352:24: acquire_memory: allocated here
multipath-tools-0.13.0/kpartx/devmapper.c:354:9: throw: if ‘dm_task_destroy’ throws an exception...
multipath-tools-0.13.0/kpartx/devmapper.c:354:9: danger: ‘uuid’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  352|   		uuid = strdup(tmp);
#  353|   out:
#  354|-> 	dm_task_destroy(dmt);
#  355|   	return uuid;
#  356|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: warning[-Wanalyzer-malloc-leak]: leak of ‘delim’
multipath-tools-0.13.0/kpartx/kpartx.c:231:1: enter_function: entry to ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: call_function: calling ‘initpts’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: return_function: returning to ‘main’ from ‘initpts’
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: following ‘false’ branch (when ‘argc > 1’)...
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:332:12: branch_false: following ‘false’ branch (when ‘hotplug == 0’)...
multipath-tools-0.13.0/kpartx/kpartx.c:334:30: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:344:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:349:13: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:349:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:352:21: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:352:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:357:27: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:359:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:362:20: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:363:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:369:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:371:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:682:1: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:383:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:384:58: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:385:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:386:32: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:395:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: following ‘false’ branch (when ‘mapname’ is non-NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_true: following ‘true’ branch (when ‘delim’ is NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: call_function: calling ‘xmalloc’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: return_function: returning to ‘main’ from ‘xmalloc’
multipath-tools-0.13.0/kpartx/kpartx.c:410:12: branch_false: following ‘false’ branch (when ‘what != 2’)...
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: throw: if ‘open’ throws an exception...
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: danger: ‘delim’ leaks here; was allocated at [(80)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/79)
#  423|   	}
#  424|   
#  425|-> 	fd = open(device, O_RDONLY | O_DIRECT);
#  426|   
#  427|   	if (fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
multipath-tools-0.13.0/kpartx/kpartx.c:428:17: warning[-Wanalyzer-malloc-leak]: leak of ‘delim’
multipath-tools-0.13.0/kpartx/kpartx.c:231:1: enter_function: entry to ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: call_function: calling ‘initpts’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: return_function: returning to ‘main’ from ‘initpts’
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: following ‘false’ branch (when ‘argc > 1’)...
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:332:12: branch_false: following ‘false’ branch (when ‘hotplug == 0’)...
multipath-tools-0.13.0/kpartx/kpartx.c:334:30: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:344:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:349:13: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:349:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:352:21: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:352:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:357:27: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:359:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:362:20: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:363:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:369:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:371:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:682:1: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:383:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:384:58: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:385:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:386:32: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:395:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: following ‘false’ branch (when ‘mapname’ is non-NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_true: following ‘true’ branch (when ‘delim’ is NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: call_function: calling ‘xmalloc’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: return_function: returning to ‘main’ from ‘xmalloc’
multipath-tools-0.13.0/kpartx/kpartx.c:410:12: branch_false: following ‘false’ branch (when ‘what != 2’)...
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:427:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:428:17: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:428:17: throw: if ‘perror’ throws an exception...
multipath-tools-0.13.0/kpartx/kpartx.c:428:17: danger: ‘delim’ leaks here; was allocated at [(80)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/79)
#  426|   
#  427|   	if (fd == -1) {
#  428|-> 		perror(device);
#  429|   		exit(1);
#  430|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
multipath-tools-0.13.0/kpartx/kpartx.c:432:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 16384)’
multipath-tools-0.13.0/kpartx/kpartx.c:231:1: enter_function: entry to ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: call_function: calling ‘initpts’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: return_function: returning to ‘main’ from ‘initpts’
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: following ‘false’ branch (when ‘argc > 1’)...
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:332:12: branch_false: following ‘false’ branch (when ‘hotplug == 0’)...
multipath-tools-0.13.0/kpartx/kpartx.c:334:30: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:344:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:349:13: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:349:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:352:21: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:352:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:357:27: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:359:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:362:20: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:363:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:369:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:371:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:682:1: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:383:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:384:58: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:385:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:386:32: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:395:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: following ‘false’ branch (when ‘mapname’ is non-NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_true: following ‘true’ branch (when ‘delim’ is NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: call_function: calling ‘xmalloc’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: return_function: returning to ‘main’ from ‘xmalloc’
multipath-tools-0.13.0/kpartx/kpartx.c:410:12: branch_false: following ‘false’ branch (when ‘what != 2’)...
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/kpartx.c:427:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:427:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:432:21: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:666:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:432:21: danger: ‘open(device, 16384)’ leaks here; was opened at [(85)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/84)
#  430|   	}
#  431|   
#  432|-> 	for (i = 0; i < ptct; i++) {
#  433|   		ptp = &pts[i];
#  434|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
multipath-tools-0.13.0/kpartx/kpartx.c:439:21: warning[-Wanalyzer-malloc-leak]: leak of ‘delim’
multipath-tools-0.13.0/kpartx/kpartx.c:231:1: enter_function: entry to ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: call_function: calling ‘initpts’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: return_function: returning to ‘main’ from ‘initpts’
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: following ‘false’ branch (when ‘argc > 1’)...
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:332:12: branch_false: following ‘false’ branch (when ‘hotplug == 0’)...
multipath-tools-0.13.0/kpartx/kpartx.c:334:30: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:344:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:349:13: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:349:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:352:21: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:352:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:357:27: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:359:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:362:20: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:363:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:369:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:371:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:682:1: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:383:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:384:58: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:385:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:386:32: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:395:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: following ‘false’ branch (when ‘mapname’ is non-NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_true: following ‘true’ branch (when ‘delim’ is NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: call_function: calling ‘xmalloc’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: return_function: returning to ‘main’ from ‘xmalloc’
multipath-tools-0.13.0/kpartx/kpartx.c:410:12: branch_false: following ‘false’ branch (when ‘what != 2’)...
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:427:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:427:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:432:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:435:20: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:435:20: branch_false: following ‘false’ branch (when ‘type’ is NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:439:21: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:439:21: throw: if the called function throws an exception...
multipath-tools-0.13.0/kpartx/kpartx.c:439:21: danger: ‘delim’ leaks here; was allocated at [(80)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/79)
#  437|   
#  438|   		/* here we get partitions */
#  439|-> 		n = ptp->fn(fd, all, slices, SIZE(slices));
#  440|   
#  441|   #ifdef DEBUG

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
multipath-tools-0.13.0/kpartx/kpartx.c:666:17: warning[-Wanalyzer-malloc-leak]: leak of ‘delim’
multipath-tools-0.13.0/kpartx/kpartx.c:231:1: enter_function: entry to ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: call_function: calling ‘initpts’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: return_function: returning to ‘main’ from ‘initpts’
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: following ‘false’ branch (when ‘argc > 1’)...
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:332:12: branch_false: following ‘false’ branch (when ‘hotplug == 0’)...
multipath-tools-0.13.0/kpartx/kpartx.c:334:30: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:344:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:349:13: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:349:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:352:21: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:352:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:357:27: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:359:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:362:20: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:363:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:369:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:371:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:682:1: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:383:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:384:58: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:385:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:386:32: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:395:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: following ‘false’ branch (when ‘mapname’ is non-NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_true: following ‘true’ branch (when ‘delim’ is NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: call_function: calling ‘xmalloc’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: return_function: returning to ‘main’ from ‘xmalloc’
multipath-tools-0.13.0/kpartx/kpartx.c:410:12: branch_false: following ‘false’ branch (when ‘what != 2’)...
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:427:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:427:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:432:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:435:20: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:435:20: branch_false: following ‘false’ branch (when ‘type’ is NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:439:21: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:445:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:445:20: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:432:21: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:666:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:666:17: throw: if ‘close’ throws an exception...
multipath-tools-0.13.0/kpartx/kpartx.c:666:17: danger: ‘delim’ leaks here; was allocated at [(80)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/79)
#  664|   	}
#  665|   	if (fd != -1)
#  666|-> 		close(fd);
#  667|   	if (what == LIST && loopcreated) {
#  668|   		if (del_loop(device)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
multipath-tools-0.13.0/kpartx/kpartx.c:668:21: warning[-Wanalyzer-malloc-leak]: leak of ‘delim’
multipath-tools-0.13.0/kpartx/kpartx.c:231:1: enter_function: entry to ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: call_function: calling ‘initpts’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:248:9: return_function: returning to ‘main’ from ‘initpts’
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: following ‘false’ branch (when ‘argc > 1’)...
multipath-tools-0.13.0/kpartx/kpartx.c:272:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:332:12: branch_false: following ‘false’ branch (when ‘hotplug == 0’)...
multipath-tools-0.13.0/kpartx/kpartx.c:334:30: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:344:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:349:13: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:349:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:352:21: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:352:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:357:27: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:359:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:362:20: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:363:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:369:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:371:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:682:1: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:383:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:384:58: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:385:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:386:32: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:395:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:398:12: branch_false: following ‘false’ branch (when ‘mapname’ is non-NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:401:12: branch_true: following ‘true’ branch (when ‘delim’ is NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: call_function: calling ‘xmalloc’ from ‘main’
multipath-tools-0.13.0/kpartx/kpartx.c:402:25: return_function: returning to ‘main’ from ‘xmalloc’
multipath-tools-0.13.0/kpartx/kpartx.c:410:12: branch_false: following ‘false’ branch (when ‘what != 2’)...
multipath-tools-0.13.0/kpartx/kpartx.c:425:14: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:427:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:427:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:432:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:435:20: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:435:20: branch_false: following ‘false’ branch (when ‘type’ is NULL)...
multipath-tools-0.13.0/kpartx/kpartx.c:439:21: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:445:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:445:20: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:432:21: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:666:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:667:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/kpartx.c:668:21: branch_true: ...to here
multipath-tools-0.13.0/kpartx/kpartx.c:668:21: throw: if ‘del_loop’ throws an exception...
multipath-tools-0.13.0/kpartx/kpartx.c:668:21: danger: ‘delim’ leaks here; was allocated at [(80)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/79)
#  666|   		close(fd);
#  667|   	if (what == LIST && loopcreated) {
#  668|-> 		if (del_loop(device)) {
#  669|   			if (verbose)
#  670|   				fprintf(stderr, "can't del loop : %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
multipath-tools-0.13.0/kpartx/lopart.c:61:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&VIRT_BLOCK)’
multipath-tools-0.13.0/kpartx/lopart.c:57:15: acquire_memory: allocated here
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:61:24: throw: if ‘readdir’ throws an exception...
multipath-tools-0.13.0/kpartx/lopart.c:61:24: danger: ‘opendir(&VIRT_BLOCK)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   59|   		return NULL;
#   60|   
#   61|-> 	while ((dent = readdir(dir)) != NULL) {
#   62|   		if (strncmp(dent->d_name,"loop",4))
#   63|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
multipath-tools-0.13.0/kpartx/lopart.c:75:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:61:16: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:62:29: branch_true: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:65:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:69:22: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:69:22: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:70:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:73:30: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:74:20: branch_true: following ‘true’ branch (when ‘bytes_read <= 0’)...
multipath-tools-0.13.0/kpartx/lopart.c:75:25: branch_true: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:75:25: danger: ‘open(&path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   73|   		bytes_read = read(fd, dev, sizeof(dev) - 1);
#   74|   		if (bytes_read <= 0) {
#   75|-> 			close(fd);
#   76|   			continue;
#   77|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
multipath-tools-0.13.0/kpartx/lopart.c:79:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:61:16: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:62:29: branch_true: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:65:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:69:22: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:69:22: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:70:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:73:30: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:74:20: branch_false: following ‘false’ branch (when ‘bytes_read > 0’)...
multipath-tools-0.13.0/kpartx/lopart.c:79:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:79:17: danger: ‘open(&path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#   77|   		}
#   78|   
#   79|-> 		close(fd);
#   80|   
#   81|   		dev[bytes_read] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
multipath-tools-0.13.0/kpartx/lopart.c:125:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&bf_path, 0)’
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:61:16: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:62:29: branch_true: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:83:20: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
multipath-tools-0.13.0/kpartx/lopart.c:85:21: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:105:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
multipath-tools-0.13.0/kpartx/lopart.c:115:21: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:119:22: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:125:25: danger: ‘open(&bf_path, 0)’ leaks here; was opened at [(10)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/9)
#  123|   		bytes_read = read(fd, backing_file, sizeof(backing_file) - 1);
#  124|   		if (bytes_read <= 0) {
#  125|-> 			close(fd);
#  126|   			continue;
#  127|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
multipath-tools-0.13.0/kpartx/lopart.c:129:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&bf_path, 0)’
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:58:12: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:61:16: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:62:29: branch_true: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:83:20: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
multipath-tools-0.13.0/kpartx/lopart.c:85:21: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:105:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
multipath-tools-0.13.0/kpartx/lopart.c:115:21: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:119:22: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:129:17: danger: ‘open(&bf_path, 0)’ leaks here; was opened at [(10)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/9)
#  127|   		}
#  128|   
#  129|-> 		close(fd);
#  130|   
#  131|   		backing_file[bytes_read-1] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
multipath-tools-0.13.0/kpartx/lopart.c:151:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ffd’
multipath-tools-0.13.0/kpartx/lopart.c:236:5: enter_function: entry to ‘set_loop’
multipath-tools-0.13.0/kpartx/lopart.c:243:20: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:243:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:254:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:254:19: call_function: calling ‘find_unused_loop_device’ from ‘set_loop’
#  149|   	FILE *procdev;
#  150|   
#  151|-> 	next_loop_fd = open("/dev/loop-control", O_RDWR);
#  152|   	if (next_loop_fd < 0)
#  153|   		goto no_loop_fd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
multipath-tools-0.13.0/kpartx/lopart.c:165:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ffd’
multipath-tools-0.13.0/kpartx/lopart.c:236:5: enter_function: entry to ‘set_loop’
multipath-tools-0.13.0/kpartx/lopart.c:243:20: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:243:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:254:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:254:19: call_function: calling ‘find_unused_loop_device’ from ‘set_loop’
#  163|   		sprintf(dev, "/dev/loop%d", next_loop);
#  164|   
#  165|-> 		fd = open (dev, mode);
#  166|   		if (fd >= 0) {
#  167|   			if (fstat (fd, &statbuf) == 0 &&

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
multipath-tools-0.13.0/kpartx/lopart.c:176:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ffd’
multipath-tools-0.13.0/kpartx/lopart.c:236:5: enter_function: entry to ‘set_loop’
multipath-tools-0.13.0/kpartx/lopart.c:243:20: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:243:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:254:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:254:19: call_function: calling ‘find_unused_loop_device’ from ‘set_loop’
#  174|   
#  175|   					if (name == NULL)
#  176|-> 						close(fd);
#  177|   					else
#  178|   						*loop_fd = fd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
multipath-tools-0.13.0/kpartx/lopart.c:179:41: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ffd’
multipath-tools-0.13.0/kpartx/lopart.c:236:5: enter_function: entry to ‘set_loop’
multipath-tools-0.13.0/kpartx/lopart.c:243:20: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:243:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:254:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:254:19: call_function: calling ‘find_unused_loop_device’ from ‘set_loop’
#  177|   					else
#  178|   						*loop_fd = fd;
#  179|-> 					close(next_loop_fd);
#  180|   					return name;
#  181|   				}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
multipath-tools-0.13.0/kpartx/lopart.c:179:41: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
multipath-tools-0.13.0/kpartx/lopart.c:152:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:155:15: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:155:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:160:20: branch_false: following ‘false’ branch (when ‘next_loop >= 0’)...
multipath-tools-0.13.0/kpartx/lopart.c:163:17: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:166:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:167:29: branch_true: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:173:54: acquire_memory: allocated here
multipath-tools-0.13.0/kpartx/lopart.c:175:44: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
multipath-tools-0.13.0/kpartx/lopart.c:178:49: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:179:41: throw: if ‘close’ throws an exception...
multipath-tools-0.13.0/kpartx/lopart.c:179:41: danger: ‘name’ leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
#  177|   					else
#  178|   						*loop_fd = fd;
#  179|-> 					close(next_loop_fd);
#  180|   					return name;
#  181|   				}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
multipath-tools-0.13.0/kpartx/lopart.c:184:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ffd’
multipath-tools-0.13.0/kpartx/lopart.c:236:5: enter_function: entry to ‘set_loop’
multipath-tools-0.13.0/kpartx/lopart.c:243:20: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:243:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:254:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:254:19: call_function: calling ‘find_unused_loop_device’ from ‘set_loop’
#  182|   
#  183|   			}
#  184|-> 			close (fd);
#  185|   
#  186|   			/* continue trying as long as devices exist */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
multipath-tools-0.13.0/kpartx/lopart.c:192:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ffd’
multipath-tools-0.13.0/kpartx/lopart.c:236:5: enter_function: entry to ‘set_loop’
multipath-tools-0.13.0/kpartx/lopart.c:243:20: acquire_resource: opened here
multipath-tools-0.13.0/kpartx/lopart.c:243:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/kpartx/lopart.c:254:19: branch_false: ...to here
multipath-tools-0.13.0/kpartx/lopart.c:254:19: call_function: calling ‘find_unused_loop_device’ from ‘set_loop’
#  190|   
#  191|   nothing_found:
#  192|-> 	close(next_loop_fd);
#  193|   
#  194|   no_loop_fd:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def63]
multipath-tools-0.13.0/libdmmp/libdmmp.c:88:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
multipath-tools-0.13.0/libdmmp/libdmmp.c:384:12: enter_function: entry to ‘_ipc_connect’
multipath-tools-0.13.0/libdmmp/libdmmp.c:400:20: branch_true: following ‘true’ branch (when ‘errno_save == 111’)...
multipath-tools-0.13.0/libdmmp/libdmmp.c:402:25: branch_true: ...to here
multipath-tools-0.13.0/libdmmp/libdmmp.c:402:25: call_function: calling ‘dmmp_context_log_priority_get’ from ‘_ipc_connect’
multipath-tools-0.13.0/libdmmp/libdmmp.c:402:25: return_function: returning to ‘_ipc_connect’ from ‘dmmp_context_log_priority_get’
multipath-tools-0.13.0/libdmmp/libdmmp.c:402:25: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libdmmp/libdmmp.c:402:25: branch_true: ...to here
multipath-tools-0.13.0/libdmmp/libdmmp.c:402:25: call_function: calling ‘dmmp_log’ from ‘_ipc_connect’
#   86|   
#   87|   	va_start(args, format);
#   88|-> 	ctx->log_func(ctx, priority, file, line, func_name, format, args);
#   89|   	if (priority == DMMP_LOG_PRIORITY_ERROR)
#   90|   		vsnprintf(ctx->last_err_msg, LAST_ERR_MSG_BUFF_SIZE,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
multipath-tools-0.13.0/libmpathpersist/mpath_pr_ioctl.c:347:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&devname, 0)’
multipath-tools-0.13.0/libmpathpersist/mpath_pr_ioctl.c:328:5: enter_function: entry to ‘prin_do_scsi_ioctl’
multipath-tools-0.13.0/libmpathpersist/mpath_pr_ioctl.c:341:14: acquire_resource: opened here
multipath-tools-0.13.0/libmpathpersist/mpath_pr_ioctl.c:342:11: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathpersist/mpath_pr_ioctl.c:347:13: branch_false: ...to here
multipath-tools-0.13.0/libmpathpersist/mpath_pr_ioctl.c:347:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathpersist/mpath_pr_ioctl.c:350:31: branch_false: ...to here
multipath-tools-0.13.0/libmpathpersist/mpath_pr_ioctl.c:350:31: call_function: calling ‘get_prin_length’ from ‘prin_do_scsi_ioctl’
#  345|   	}
#  346|   
#  347|-> 	if (mpath_mx_alloc_len)
#  348|   		mx_resp_len = mpath_mx_alloc_len;
#  349|   	else

Error: GCC_ANALYZER_WARNING (CWE-404): [#def65]
multipath-tools-0.13.0/libmpathutil/debug.c:33:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
multipath-tools-0.13.0/libmpathutil/debug.c:27:9: acquire_resource: ‘va_start’ called here
multipath-tools-0.13.0/libmpathutil/debug.c:28:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/debug.c:29:20: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/debug.c:29:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/debug.c:33:25: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/debug.c:33:25: throw: if ‘get_monotonic_time’ throws an exception...
multipath-tools-0.13.0/libmpathutil/debug.c:33:25: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   31|   			char buff[32];
#   32|   
#   33|-> 			get_monotonic_time(&ts);
#   34|   			safe_sprintf(buff, "%ld.%06ld",
#   35|   				     (long)ts.tv_sec,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def66]
multipath-tools-0.13.0/libmpathutil/debug.c:42:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
multipath-tools-0.13.0/libmpathutil/debug.c:27:9: acquire_resource: ‘va_start’ called here
multipath-tools-0.13.0/libmpathutil/debug.c:28:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/debug.c:42:17: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/debug.c:42:17: throw: if ‘log_safe’ throws an exception...
multipath-tools-0.13.0/libmpathutil/debug.c:42:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   40|   	}
#   41|   	else
#   42|-> 		log_safe(prio + 3, fmt, ap);
#   43|   	va_end(ap);
#   44|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
multipath-tools-0.13.0/libmpathutil/parser.c:37:14: warning[-Wanalyzer-malloc-leak]: leak of ‘keyword’
multipath-tools-0.13.0/libmpathutil/parser.c:32:37: acquire_memory: allocated here
multipath-tools-0.13.0/libmpathutil/parser.c:34:12: branch_false: following ‘false’ branch (when ‘keyword’ is non-NULL)...
multipath-tools-0.13.0/libmpathutil/parser.c:37:14: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:37:14: throw: if ‘vector_alloc_slot’ throws an exception...
multipath-tools-0.13.0/libmpathutil/parser.c:37:14: danger: ‘keyword’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   35|   		return 1;
#   36|   
#   37|-> 	if (!vector_alloc_slot(keywords)) {
#   38|   		free(keyword);
#   39|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
multipath-tools-0.13.0/libmpathutil/parser.c:46:9: warning[-Wanalyzer-malloc-leak]: leak of ‘keyword’
multipath-tools-0.13.0/libmpathutil/parser.c:32:37: acquire_memory: allocated here
multipath-tools-0.13.0/libmpathutil/parser.c:34:12: branch_false: following ‘false’ branch (when ‘keyword’ is non-NULL)...
multipath-tools-0.13.0/libmpathutil/parser.c:37:14: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:37:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:41:9: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:46:9: throw: if ‘vector_set_slot’ throws an exception...
multipath-tools-0.13.0/libmpathutil/parser.c:46:9: danger: ‘keyword’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   44|   	keyword->unique = unique;
#   45|   
#   46|-> 	vector_set_slot(keywords, keyword);
#   47|   
#   48|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def69]
multipath-tools-0.13.0/libmpathutil/parser.c:130:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘keyword’
multipath-tools-0.13.0/libmpathutil/parser.c:114:1: enter_function: entry to ‘find_keyword’
multipath-tools-0.13.0/libmpathutil/parser.c:120:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:123:12: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:128:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:129:27: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:129:27: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:129:27: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:130:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:131:22: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:130:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
multipath-tools-0.13.0/libmpathutil/parser.c:133:21: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:133:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:134:35: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:134:35: call_function: calling ‘find_keyword’ from ‘find_keyword’
#  128|   	for (i = 0; i < VECTOR_SIZE(v); i++) {
#  129|   		keyword = VECTOR_SLOT(v, i);
#  130|-> 		if ((strlen(keyword->string) == len) &&
#  131|   		    !strcmp(keyword->string, name))
#  132|   			return keyword;

Error: COMPILER_WARNING (CWE-704): [#def70]
multipath-tools-0.13.0/libmpathutil/parser.c: scope_hint: In function ‘snprint_keyword’
multipath-tools-0.13.0/libmpathutil/parser.c:155:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  155 |                 f = strchr(fmt, '%');
#      |                   ^
#  153|   
#  154|   	do {
#  155|-> 		f = strchr(fmt, '%');
#  156|   		if (f == NULL) {
#  157|   			r = append_strbuf_str(&sbuf, fmt);

Error: COMPILER_WARNING (CWE-704): [#def71]
multipath-tools-0.13.0/libmpathutil/parser.c:155:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  153|   
#  154|   	do {
#  155|-> 		f = strchr(fmt, '%');
#  156|   		if (f == NULL) {
#  157|   			r = append_strbuf_str(&sbuf, fmt);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
multipath-tools-0.13.0/libmpathutil/parser.c:296:17: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
multipath-tools-0.13.0/libmpathutil/parser.c:216:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:220:13: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:220:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:224:18: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:226:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:226:12: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:233:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:236:17: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:238:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:240:33: acquire_memory: allocated here
multipath-tools-0.13.0/libmpathutil/parser.c:242:28: branch_false: following ‘false’ branch (when ‘token’ is non-NULL)...
multipath-tools-0.13.0/libmpathutil/parser.c:245:25: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:246:28: branch_false: following ‘false’ branch (when ‘in_string == 0’)...
multipath-tools-0.13.0/libmpathutil/parser.c:246:28: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:296:17: throw: if ‘vector_set_slot’ throws an exception...
multipath-tools-0.13.0/libmpathutil/parser.c:296:17: danger: ‘token’ leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  294|   			}
#  295|   		}
#  296|-> 		vector_set_slot(strvec, token);
#  297|   
#  298|   		while ((!in_string &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
multipath-tools-0.13.0/libmpathutil/parser.c:378:14: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
multipath-tools-0.13.0/libmpathutil/parser.c:375:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmpathutil/parser.c:376:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
multipath-tools-0.13.0/libmpathutil/parser.c:378:14: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:378:14: throw: if ‘vector_alloc_slot’ throws an exception...
multipath-tools-0.13.0/libmpathutil/parser.c:378:14: danger: ‘tmp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  376|   	if (!tmp)
#  377|   		return 1;
#  378|-> 	if (!vector_alloc_slot(uniques)) {
#  379|   		free(tmp);
#  380|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
multipath-tools-0.13.0/libmpathutil/parser.c:382:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
multipath-tools-0.13.0/libmpathutil/parser.c:375:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmpathutil/parser.c:376:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
multipath-tools-0.13.0/libmpathutil/parser.c:378:14: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:378:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:382:9: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:382:9: throw: if ‘vector_set_slot’ throws an exception...
multipath-tools-0.13.0/libmpathutil/parser.c:382:9: danger: ‘tmp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  380|   		return 1;
#  381|   	}
#  382|-> 	vector_set_slot(uniques, tmp);
#  383|   	return 0;
#  384|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
multipath-tools-0.13.0/libmpathutil/parser.c:575:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
multipath-tools-0.13.0/libmpathutil/parser.c:490:1: enter_function: entry to ‘process_stream’
multipath-tools-0.13.0/libmpathutil/parser.c:502:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:505:15: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:505:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmpathutil/parser.c:507:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
multipath-tools-0.13.0/libmpathutil/parser.c:507:12: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:512:16: call_function: calling ‘read_line’ from ‘process_stream’
multipath-tools-0.13.0/libmpathutil/parser.c:512:16: return_function: returning to ‘process_stream’ from ‘read_line’
multipath-tools-0.13.0/libmpathutil/parser.c:512:16: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:574:13: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:574:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:575:17: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:575:17: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:575:17: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:575:17: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/libmpathutil/parser.c:575:17: danger: ‘buf’ leaks here; was allocated at [(4)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/3)
#  573|   	}
#  574|   	if (kw_level == 1)
#  575|-> 		condlog(1, "missing '%s' at end of %s", EOB, file);
#  576|   out:
#  577|   	free(buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def76]
multipath-tools-0.13.0/libmpathutil/parser.c:602:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
multipath-tools-0.13.0/libmpathutil/parser.c:584:1: enter_function: entry to ‘process_file’
multipath-tools-0.13.0/libmpathutil/parser.c:589:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:593:18: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:593:18: acquire_resource: opened here
multipath-tools-0.13.0/libmpathutil/parser.c:594:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:601:9: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:602:13: call_function: calling ‘process_stream’ from ‘process_file’
#  600|   	/* Stream handling */
#  601|   	line_nr = 0;
#  602|-> 	r = process_stream(conf, stream, conf->keywords, NULL, file);
#  603|   	fclose(stream);
#  604|   	//free_keywords(keywords);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
multipath-tools-0.13.0/libmpathutil/parser.c:602:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
multipath-tools-0.13.0/libmpathutil/parser.c:584:1: enter_function: entry to ‘process_file’
multipath-tools-0.13.0/libmpathutil/parser.c:589:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:593:18: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:593:18: acquire_memory: allocated here
multipath-tools-0.13.0/libmpathutil/parser.c:594:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/parser.c:601:9: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/parser.c:602:13: call_function: calling ‘process_stream’ from ‘process_file’
#  600|   	/* Stream handling */
#  601|   	line_nr = 0;
#  602|-> 	r = process_stream(conf, stream, conf->keywords, NULL, file);
#  603|   	fclose(stream);
#  604|   	//free_keywords(keywords);

Error: COMPILER_WARNING (CWE-704): [#def78]
multipath-tools-0.13.0/libmpathutil/util.c: scope_hint: In function ‘libmp_basename’
multipath-tools-0.13.0/libmpathutil/util.c:41:19: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   41 |         char *p = strrchr(filename, '/');
#      |                   ^~~~~~~
#   39|   const char *libmp_basename(const char *filename)
#   40|   {
#   41|-> 	char *p = strrchr(filename, '/');
#   42|   	return p ? p + 1 : filename;
#   43|   }

Error: COMPILER_WARNING (CWE-704): [#def79]
multipath-tools-0.13.0/libmpathutil/util.c:41:19: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   39|   const char *libmp_basename(const char *filename)
#   40|   {
#   41|-> 	char *p = strrchr(filename, '/');
#   42|   	return p ? p + 1 : filename;
#   43|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
multipath-tools-0.13.0/libmpathutil/uxsock.c:77:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
multipath-tools-0.13.0/libmpathutil/uxsock.c:45:5: enter_function: entry to ‘ux_socket_listen’
multipath-tools-0.13.0/libmpathutil/uxsock.c:55:14: acquire_resource: stream socket created here
multipath-tools-0.13.0/libmpathutil/uxsock.c:56:12: branch_false: following ‘false’ branch (when ‘fd != -1’)...
multipath-tools-0.13.0/libmpathutil/uxsock.c:61:15: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/uxsock.c:61:15: call_function: calling ‘mpath_fill_sockaddr__’ from ‘ux_socket_listen’
multipath-tools-0.13.0/libmpathutil/uxsock.c:61:15: return_function: returning to ‘ux_socket_listen’ from ‘mpath_fill_sockaddr__’
multipath-tools-0.13.0/libmpathutil/uxsock.c:62:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/uxsock.c:72:13: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/uxsock.c:76:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/uxsock.c:77:17: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/uxsock.c:77:17: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/uxsock.c:77:17: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/uxsock.c:77:17: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/libmpathutil/uxsock.c:77:17: danger: ‘fd’ leaks here
#   75|   
#   76|   	if (listen(fd, 10) == -1) {
#   77|-> 		condlog(3, "Couldn't listen to ux_socket, error %d", errno);
#   78|   		close(fd);
#   79|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def81]
multipath-tools-0.13.0/libmpathutil/uxsock.c:78:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
multipath-tools-0.13.0/libmpathutil/uxsock.c:45:5: enter_function: entry to ‘ux_socket_listen’
multipath-tools-0.13.0/libmpathutil/uxsock.c:55:14: acquire_resource: stream socket created here
multipath-tools-0.13.0/libmpathutil/uxsock.c:56:12: branch_false: following ‘false’ branch (when ‘fd != -1’)...
multipath-tools-0.13.0/libmpathutil/uxsock.c:61:15: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/uxsock.c:61:15: call_function: calling ‘mpath_fill_sockaddr__’ from ‘ux_socket_listen’
multipath-tools-0.13.0/libmpathutil/uxsock.c:61:15: return_function: returning to ‘ux_socket_listen’ from ‘mpath_fill_sockaddr__’
multipath-tools-0.13.0/libmpathutil/uxsock.c:62:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmpathutil/uxsock.c:72:13: branch_false: ...to here
multipath-tools-0.13.0/libmpathutil/uxsock.c:76:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/uxsock.c:77:17: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/uxsock.c:78:17: throw: if ‘close’ throws an exception...
multipath-tools-0.13.0/libmpathutil/uxsock.c:78:17: danger: ‘fd’ leaks here
#   76|   	if (listen(fd, 10) == -1) {
#   77|   		condlog(3, "Couldn't listen to ux_socket, error %d", errno);
#   78|-> 		close(fd);
#   79|   		return -1;
#   80|   	}

Error: GCC_ANALYZER_WARNING (CWE-122): [#def82]
multipath-tools-0.13.0/libmpathutil/vector.c:77:34: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
multipath-tools-0.13.0/libmpathutil/vector.c:69:1: enter_function: entry to ‘vector_insert_slot’
multipath-tools-0.13.0/libmpathutil/vector.c:73:14: call_function: calling ‘vector_alloc_slot’ from ‘vector_insert_slot’
multipath-tools-0.13.0/libmpathutil/vector.c:73:14: return_function: returning to ‘vector_insert_slot’ from ‘vector_alloc_slot’
multipath-tools-0.13.0/libmpathutil/vector.c:73:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/vector.c:76:18: branch_true: ...to here
multipath-tools-0.13.0/libmpathutil/vector.c:76:18: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmpathutil/vector.c:77:34: danger: read of 8 bytes at offset ‘(long unsigned int)(*v.allocated + -2) * 8’ exceeds the buffer
#   75|   
#   76|   	for (i = VECTOR_SIZE(v) - 2; i >= slot; i--)
#   77|-> 		v->slot[i + 1] = v->slot[i];
#   78|   
#   79|   	v->slot[slot] = value;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def83]
multipath-tools-0.13.0/libmultipath/alias.c:190:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bdg’
multipath-tools-0.13.0/libmultipath/alias.c:844:5: enter_function: entry to ‘check_alias_settings’
multipath-tools-0.13.0/libmultipath/alias.c:851:19: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:851:19: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:859:9: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:860:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:866:56: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:866:21: call_function: calling ‘add_binding’ from ‘check_alias_settings’
multipath-tools-0.13.0/libmultipath/alias.c:866:21: return_function: returning to ‘check_alias_settings’ from ‘add_binding’
multipath-tools-0.13.0/libmultipath/alias.c:866:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:859:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:859:9: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:860:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:866:56: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:866:21: call_function: calling ‘add_binding’ from ‘check_alias_settings’
#  188|   	/* Check for exact match */
#  189|   	if (i >= 0 && cmp == 0)
#  190|-> 		return strcmp(bdg->wwid, wwid) ?
#  191|   			BINDING_CONFLICT : BINDING_EXISTS;
#  192|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
multipath-tools-0.13.0/libmultipath/alias.c:199:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
multipath-tools-0.13.0/libmultipath/alias.c:844:5: enter_function: entry to ‘check_alias_settings’
multipath-tools-0.13.0/libmultipath/alias.c:851:19: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:851:19: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:859:9: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:860:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:866:56: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:866:21: call_function: calling ‘add_binding’ from ‘check_alias_settings’
#  197|   		bdg->alias = strdup(alias);
#  198|   		if (bdg->wwid && bdg->alias &&
#  199|-> 		    vector_insert_slot(bindings, i, bdg))
#  200|   			return BINDING_ADDED;
#  201|   		else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
multipath-tools-0.13.0/libmultipath/alias.c:199:21: warning[-Wanalyzer-malloc-leak]: leak of ‘bdg’
multipath-tools-0.13.0/libmultipath/alias.c:844:5: enter_function: entry to ‘check_alias_settings’
multipath-tools-0.13.0/libmultipath/alias.c:851:19: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:851:19: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:859:9: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:860:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:866:56: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:866:21: call_function: calling ‘add_binding’ from ‘check_alias_settings’
#  197|   		bdg->alias = strdup(alias);
#  198|   		if (bdg->wwid && bdg->alias &&
#  199|-> 		    vector_insert_slot(bindings, i, bdg))
#  200|   			return BINDING_ADDED;
#  201|   		else

Error: GCC_ANALYZER_WARNING (CWE-457): [#def86]
multipath-tools-0.13.0/libmultipath/alias.c:330:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ts’
multipath-tools-0.13.0/libmultipath/alias.c:766:12: enter_function: entry to ‘_read_bindings_file’
multipath-tools-0.13.0/libmultipath/alias.c:783:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:786:16: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:787:12: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/alias.c:788:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:792:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:806:27: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:806:27: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:807:31: call_function: calling ‘update_bindings_file’ from ‘_read_bindings_file’
#  328|   	else {
#  329|   		pthread_mutex_lock(&timestamp_mutex);
#  330|-> 		bindings_last_updated = ts;
#  331|   		pthread_mutex_unlock(&timestamp_mutex);
#  332|   		condlog(1, "updated bindings file %s", bindings_file_path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
multipath-tools-0.13.0/libmultipath/alias.c:788:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
multipath-tools-0.13.0/libmultipath/alias.c:783:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:786:16: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:786:16: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/alias.c:787:12: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/alias.c:788:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:788:17: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/alias.c:788:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/alias.c:788:17: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/libmultipath/alias.c:788:17: danger: ‘file’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  786|   	file = fdopen(fd, "r");
#  787|   	if (file != NULL) {
#  788|-> 		condlog(3, "%s: reading %s", __func__, bindings_file_path);
#  789|   
#  790|   		pthread_cleanup_push(cleanup_fclose, file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
multipath-tools-0.13.0/libmultipath/blacklist.c:56:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ble’
multipath-tools-0.13.0/libmultipath/blacklist.c:44:12: branch_false: following ‘false’ branch (when ‘strdup_str’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:47:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:47:12: branch_false: following ‘false’ branch (when ‘blist’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:50:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:50:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/blacklist.c:52:12: branch_false: following ‘false’ branch (when ‘ble’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:55:21: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:56:13: throw: if ‘regcomp’ throws an exception...
multipath-tools-0.13.0/libmultipath/blacklist.c:56:13: danger: ‘ble’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   54|   
#   55|   	regex_str = check_invert(strdup_str, &ble->invert);
#   56|-> 	if (regcomp(&ble->regex, regex_str, REG_EXTENDED|REG_NOSUB))
#   57|   		goto out1;
#   58|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
multipath-tools-0.13.0/libmultipath/blacklist.c:56:13: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup_str’
multipath-tools-0.13.0/libmultipath/blacklist.c:43:22: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/blacklist.c:44:12: branch_false: following ‘false’ branch (when ‘strdup_str’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:47:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:47:12: branch_false: following ‘false’ branch (when ‘blist’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:50:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:52:12: branch_false: following ‘false’ branch (when ‘ble’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:55:21: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:56:13: throw: if ‘regcomp’ throws an exception...
multipath-tools-0.13.0/libmultipath/blacklist.c:56:13: danger: ‘strdup_str’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   54|   
#   55|   	regex_str = check_invert(strdup_str, &ble->invert);
#   56|-> 	if (regcomp(&ble->regex, regex_str, REG_EXTENDED|REG_NOSUB))
#   57|   		goto out1;
#   58|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
multipath-tools-0.13.0/libmultipath/blacklist.c:59:14: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup_str’
multipath-tools-0.13.0/libmultipath/blacklist.c:43:22: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/blacklist.c:44:12: branch_false: following ‘false’ branch (when ‘strdup_str’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:47:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:47:12: branch_false: following ‘false’ branch (when ‘blist’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:50:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:52:12: branch_false: following ‘false’ branch (when ‘ble’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:55:21: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:56:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/blacklist.c:59:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:59:14: throw: if ‘vector_alloc_slot’ throws an exception...
multipath-tools-0.13.0/libmultipath/blacklist.c:59:14: danger: ‘strdup_str’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   57|   		goto out1;
#   58|   
#   59|-> 	if (!vector_alloc_slot(blist))
#   60|   		goto out1;
#   61|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
multipath-tools-0.13.0/libmultipath/blacklist.c:85:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ble’
multipath-tools-0.13.0/libmultipath/blacklist.c:81:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/blacklist.c:82:12: branch_false: following ‘false’ branch (when ‘ble’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:85:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:85:14: throw: if ‘vector_alloc_slot’ throws an exception...
multipath-tools-0.13.0/libmultipath/blacklist.c:85:14: danger: ‘ble’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   83|   		return 1;
#   84|   
#   85|-> 	if (!vector_alloc_slot(blist)) {
#   86|   		free(ble);
#   87|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
multipath-tools-0.13.0/libmultipath/blacklist.c:89:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ble’
multipath-tools-0.13.0/libmultipath/blacklist.c:81:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/blacklist.c:82:12: branch_false: following ‘false’ branch (when ‘ble’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:85:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:85:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/blacklist.c:89:9: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:89:9: throw: if ‘vector_set_slot’ throws an exception...
multipath-tools-0.13.0/libmultipath/blacklist.c:89:9: danger: ‘ble’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   87|   		return 1;
#   88|   	}
#   89|-> 	vector_set_slot(blist, ble);
#   90|   	return 0;
#   91|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
multipath-tools-0.13.0/libmultipath/blacklist.c:114:21: warning[-Wanalyzer-malloc-leak]: leak of ‘vendor_str’
multipath-tools-0.13.0/libmultipath/blacklist.c:100:12: branch_false: following ‘false’ branch (when ‘blist’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:103:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:103:15: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/blacklist.c:103:15: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:105:12: branch_false: following ‘false’ branch (when ‘ble’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:108:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:108:12: branch_true: following ‘true’ branch (when ‘vendor’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:109:30: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:109:30: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/blacklist.c:110:20: branch_false: following ‘false’ branch (when ‘vendor_str’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:113:29: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:114:21: throw: if ‘regcomp’ throws an exception...
multipath-tools-0.13.0/libmultipath/blacklist.c:114:21: danger: ‘vendor_str’ leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
#  112|   
#  113|   		regex_str = check_invert(vendor_str, &ble->vendor_invert);
#  114|-> 		if (regcomp(&ble->vendor_reg, regex_str, REG_EXTENDED|REG_NOSUB))
#  115|   			goto out;
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
multipath-tools-0.13.0/libmultipath/blacklist.c:125:21: warning[-Wanalyzer-malloc-leak]: leak of ‘product_str’
multipath-tools-0.13.0/libmultipath/blacklist.c:100:12: branch_false: following ‘false’ branch (when ‘blist’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:103:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:103:15: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/blacklist.c:103:15: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:105:12: branch_false: following ‘false’ branch (when ‘ble’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:108:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:108:12: branch_false: following ‘false’ branch (when ‘vendor’ is NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:119:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:119:12: branch_true: following ‘true’ branch (when ‘product’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:120:31: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:120:31: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/blacklist.c:121:20: branch_false: following ‘false’ branch (when ‘product_str’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:124:29: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:125:21: throw: if ‘regcomp’ throws an exception...
multipath-tools-0.13.0/libmultipath/blacklist.c:125:21: danger: ‘product_str’ leaks here; was allocated at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
#  123|   
#  124|   		regex_str = check_invert(product_str, &ble->product_invert);
#  125|-> 		if (regcomp(&ble->product_reg, regex_str, REG_EXTENDED|REG_NOSUB))
#  126|   			goto out1;
#  127|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
multipath-tools-0.13.0/libmultipath/blacklist.c:134:17: warning[-Wanalyzer-malloc-leak]: leak of ‘product_str’
multipath-tools-0.13.0/libmultipath/blacklist.c:100:12: branch_false: following ‘false’ branch (when ‘blist’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:103:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:103:15: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/blacklist.c:103:15: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:105:12: branch_false: following ‘false’ branch (when ‘ble’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:108:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:108:12: branch_true: following ‘true’ branch (when ‘vendor’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:109:30: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:110:20: branch_false: following ‘false’ branch (when ‘vendor_str’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:113:29: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:114:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/blacklist.c:117:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:119:12: branch_true: following ‘true’ branch (when ‘product’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:120:31: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:120:31: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/blacklist.c:121:20: branch_false: following ‘false’ branch (when ‘product_str’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:124:29: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:125:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/blacklist.c:126:25: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:133:12: branch_true: following ‘true’ branch (when ‘vendor’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/blacklist.c:134:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:134:17: throw: if ‘regfree’ throws an exception...
multipath-tools-0.13.0/libmultipath/blacklist.c:134:17: danger: ‘product_str’ leaks here; was allocated at [(15)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/14)
#  132|   out1:
#  133|   	if (vendor) {
#  134|-> 		regfree(&ble->vendor_reg);
#  135|   		ble->vendor = NULL;
#  136|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def96]
multipath-tools-0.13.0/libmultipath/blacklist.c:212:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fn, 0)’
multipath-tools-0.13.0/libmultipath/blacklist.c:207:14: acquire_resource: opened here
multipath-tools-0.13.0/libmultipath/blacklist.c:208:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/blacklist.c:211:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/blacklist.c:212:9: danger: ‘open(&fn, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  210|   
#  211|   	len = read(fd, buf, sizeof(buf));
#  212|-> 	close(fd);
#  213|   
#  214|   	return (len >= 1 && buf[0] == 'Y');

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
multipath-tools-0.13.0/libmultipath/checkers/directio.c:204:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ct’
multipath-tools-0.13.0/libmultipath/checkers/directio.c:166:5: enter_function: entry to ‘libcheck_init’
multipath-tools-0.13.0/libmultipath/checkers/directio.c:173:14: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:174:12: branch_false: following ‘false’ branch (when ‘ct’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:176:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:178:13: call_function: calling ‘set_aio_group’ from ‘libcheck_init’
multipath-tools-0.13.0/libmultipath/checkers/directio.c:178:13: return_function: returning to ‘libcheck_init’ from ‘set_aio_group’
multipath-tools-0.13.0/libmultipath/checkers/directio.c:178:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:181:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:182:12: branch_false: following ‘false’ branch (when ‘req’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:185:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:198:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:201:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:201:13: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:201:13: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:204:17: throw: if ‘fcntl’ throws an exception...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:204:17: danger: ‘ct’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#  202|   		goto out;
#  203|   
#  204|-> 	flags = fcntl(c->fd, F_GETFL);
#  205|   	if (flags < 0)
#  206|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
multipath-tools-0.13.0/libmultipath/checkers/directio.c:209:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ct’
multipath-tools-0.13.0/libmultipath/checkers/directio.c:166:5: enter_function: entry to ‘libcheck_init’
multipath-tools-0.13.0/libmultipath/checkers/directio.c:173:14: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:174:12: branch_false: following ‘false’ branch (when ‘ct’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:176:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:178:13: call_function: calling ‘set_aio_group’ from ‘libcheck_init’
multipath-tools-0.13.0/libmultipath/checkers/directio.c:178:13: return_function: returning to ‘libcheck_init’ from ‘set_aio_group’
multipath-tools-0.13.0/libmultipath/checkers/directio.c:178:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:181:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:182:12: branch_false: following ‘false’ branch (when ‘req’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:185:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:198:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:201:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:201:13: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:201:13: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:205:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:205:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:207:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:207:12: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/checkers/directio.c:209:21: throw: if ‘fcntl’ throws an exception...
multipath-tools-0.13.0/libmultipath/checkers/directio.c:209:21: danger: ‘ct’ leaks here; was allocated at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
#  207|   	if (!(flags & O_DIRECT)) {
#  208|   		flags |= O_DIRECT;
#  209|-> 		if (fcntl(c->fd, F_SETFL, flags) < 0)
#  210|   			goto out;
#  211|   		ct->reset_flags = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
multipath-tools-0.13.0/libmultipath/checkers/tur.c:78:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ct’
multipath-tools-0.13.0/libmultipath/checkers/tur.c:70:14: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/checkers/tur.c:71:12: branch_false: following ‘false’ branch (when ‘ct’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/checkers/tur.c:73:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/checkers/tur.c:78:9: throw: if ‘pthread_cond_init_mono’ throws an exception...
multipath-tools-0.13.0/libmultipath/checkers/tur.c:78:9: danger: ‘ct’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   76|   	ct->fd = -1;
#   77|   	uatomic_set(&ct->holders, 1);
#   78|-> 	pthread_cond_init_mono(&ct->active);
#   79|   	pthread_mutex_init(&ct->lock, NULL);
#   80|   	if (fstat(c->fd, &sb) == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
multipath-tools-0.13.0/libmultipath/config.c:889:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 504)’
multipath-tools-0.13.0/libmultipath/config.c:868:16: enter_function: entry to ‘load_config’
multipath-tools-0.13.0/libmultipath/config.c:870:31: call_function: inlined call to ‘alloc_config’ from ‘load_config’
multipath-tools-0.13.0/libmultipath/config.c:872:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/config.c:872:22: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/config.c:872:22: call_function: calling ‘init_config__’ from ‘load_config’
#  887|   	 * When we return, we'll copy the config value back
#  888|   	 */
#  889|-> 	conf->verbosity = libmp_verbosity;
#  890|   
#  891|   	/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
multipath-tools-0.13.0/libmultipath/configure.c:768:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cmpp_feat’
multipath-tools-0.13.0/libmultipath/configure.c:690:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:704:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:710:19: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:721:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:721:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:730:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:730:12: branch_false: following ‘false’ branch (when ‘force_reload == 0’)...
multipath-tools-0.13.0/libmultipath/configure.c:736:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:736:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:742:13: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:748:13: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:751:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:750:13: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:757:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:765:21: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/configure.c:767:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:768:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:768:17: throw: if ‘remove_feature’ throws an exception...
multipath-tools-0.13.0/libmultipath/configure.c:768:17: danger: ‘cmpp_feat’ leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  766|   	mpp_feat = strdup(mpp->features);
#  767|   	if (cmpp_feat && mpp_feat) {
#  768|-> 		remove_feature(&mpp_feat, "queue_if_no_path");
#  769|   		remove_feature(&mpp_feat, "retain_attached_hw_handler");
#  770|   		remove_feature(&cmpp_feat, "queue_if_no_path");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
multipath-tools-0.13.0/libmultipath/configure.c:768:17: warning[-Wanalyzer-malloc-leak]: leak of ‘mpp_feat’
multipath-tools-0.13.0/libmultipath/configure.c:690:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:704:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:710:19: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:721:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:721:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:730:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:730:12: branch_false: following ‘false’ branch (when ‘force_reload == 0’)...
multipath-tools-0.13.0/libmultipath/configure.c:736:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:736:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:742:13: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:748:13: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:751:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:750:13: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:757:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:766:20: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/configure.c:767:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:768:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:768:17: throw: if ‘remove_feature’ throws an exception...
multipath-tools-0.13.0/libmultipath/configure.c:768:17: danger: ‘mpp_feat’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  766|   	mpp_feat = strdup(mpp->features);
#  767|   	if (cmpp_feat && mpp_feat) {
#  768|-> 		remove_feature(&mpp_feat, "queue_if_no_path");
#  769|   		remove_feature(&mpp_feat, "retain_attached_hw_handler");
#  770|   		remove_feature(&cmpp_feat, "queue_if_no_path");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
multipath-tools-0.13.0/libmultipath/configure.c:769:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cmpp_feat’
multipath-tools-0.13.0/libmultipath/configure.c:690:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:704:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:710:19: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:721:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:721:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:730:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:730:12: branch_false: following ‘false’ branch (when ‘force_reload == 0’)...
multipath-tools-0.13.0/libmultipath/configure.c:736:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:736:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:742:13: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:748:13: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:751:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:750:13: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:757:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:765:21: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/configure.c:767:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:768:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:769:17: throw: if ‘remove_feature’ throws an exception...
multipath-tools-0.13.0/libmultipath/configure.c:769:17: danger: ‘cmpp_feat’ leaks here; was allocated at [(15)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/14)
#  767|   	if (cmpp_feat && mpp_feat) {
#  768|   		remove_feature(&mpp_feat, "queue_if_no_path");
#  769|-> 		remove_feature(&mpp_feat, "retain_attached_hw_handler");
#  770|   		remove_feature(&cmpp_feat, "queue_if_no_path");
#  771|   		remove_feature(&cmpp_feat, "retain_attached_hw_handler");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
multipath-tools-0.13.0/libmultipath/configure.c:770:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cmpp_feat’
multipath-tools-0.13.0/libmultipath/configure.c:690:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:704:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:710:19: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:721:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:721:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:730:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:730:12: branch_false: following ‘false’ branch (when ‘force_reload == 0’)...
multipath-tools-0.13.0/libmultipath/configure.c:736:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:736:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:742:13: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:748:13: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:751:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:750:13: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:757:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:765:21: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/configure.c:767:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/configure.c:768:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/configure.c:770:17: throw: if ‘remove_feature’ throws an exception...
multipath-tools-0.13.0/libmultipath/configure.c:770:17: danger: ‘cmpp_feat’ leaks here; was allocated at [(15)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/14)
#  768|   		remove_feature(&mpp_feat, "queue_if_no_path");
#  769|   		remove_feature(&mpp_feat, "retain_attached_hw_handler");
#  770|-> 		remove_feature(&cmpp_feat, "queue_if_no_path");
#  771|   		remove_feature(&cmpp_feat, "retain_attached_hw_handler");
#  772|   		if (strcmp(mpp_feat, cmpp_feat)) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def105]
multipath-tools-0.13.0/libmultipath/devmapper.c:110:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘dmt’
multipath-tools-0.13.0/libmultipath/devmapper.c:1585:5: enter_function: entry to ‘dm_reassign_table’
multipath-tools-0.13.0/libmultipath/devmapper.c:1595:21: call_function: calling ‘libmp_dm_task_create’ from ‘dm_reassign_table’
multipath-tools-0.13.0/libmultipath/devmapper.c:1589:67: call_function: inlined call to ‘cleanup_dm_task’ from ‘dm_reassign_table’
#  108|   static void cleanup_dm_task(struct dm_task **pdmt)
#  109|   {
#  110|-> 	if (*pdmt)
#  111|   		dm_task_destroy(*pdmt);
#  112|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
multipath-tools-0.13.0/libmultipath/devmapper.c:1334:55: warning[-Wanalyzer-malloc-leak]: leak of ‘params’
multipath-tools-0.13.0/libmultipath/devmapper.c:1331:1: enter_function: entry to ‘is_valid_partmap’
multipath-tools-0.13.0/libmultipath/devmapper.c:1338:13: call_function: calling ‘libmp_mapinfo’ from ‘is_valid_partmap’
multipath-tools-0.13.0/libmultipath/devmapper.c:1334:55: throw: if ‘cleanup_charp’ throws an exception...
multipath-tools-0.13.0/libmultipath/devmapper.c:1334:55: danger: ‘params’ leaks here; was allocated at [(71)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/70)
# 1332|   		 const char *map_uuid) {
# 1333|   	int r;
# 1334|-> 	char __attribute__((cleanup(cleanup_charp))) *params = NULL;
# 1335|   	char *p;
# 1336|   	char part_uuid[DM_UUID_LEN];

Error: GCC_ANALYZER_WARNING (CWE-465): [#def107]
multipath-tools-0.13.0/libmultipath/dmparser.c:31:12: warning[-Wanalyzer-deref-before-check]: check of ‘p’ for NULL after already dereferencing it
#   29|   	*dst = realloc(*dst, len);
#   30|   
#   31|-> 	if (!*dst) {
#   32|   		free(p);
#   33|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def108]
multipath-tools-0.13.0/libmultipath/dmparser.c:435:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.13.0/libmultipath/dmparser.c:344:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:367:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:370:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:392:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:395:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:406:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:409:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:412:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:418:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:423:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:428:22: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:430:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:433:25: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:435:25: danger: dereference of NULL ‘pgp’
#  433|   		switch (*word) {
#  434|   		case 'D':
#  435|-> 			pgp->status = PGSTATE_DISABLED;
#  436|   			break;
#  437|   		case 'A':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def109]
multipath-tools-0.13.0/libmultipath/dmparser.c:438:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.13.0/libmultipath/dmparser.c:344:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:367:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:370:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:392:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:395:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:406:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:409:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:412:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:418:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:423:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:428:22: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:430:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:433:25: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:438:25: danger: dereference of NULL ‘pgp’
#  436|   			break;
#  437|   		case 'A':
#  438|-> 			pgp->status = PGSTATE_ACTIVE;
#  439|   			break;
#  440|   		case 'E':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def110]
multipath-tools-0.13.0/libmultipath/dmparser.c:441:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.13.0/libmultipath/dmparser.c:344:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:367:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:370:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:392:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:395:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:406:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:409:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:412:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:418:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:423:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:428:22: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:430:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:433:25: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:441:25: danger: dereference of NULL ‘pgp’
#  439|   			break;
#  440|   		case 'E':
#  441|-> 			pgp->status = PGSTATE_ENABLED;
#  442|   			break;
#  443|   		default:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def111]
multipath-tools-0.13.0/libmultipath/dmparser.c:444:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.13.0/libmultipath/dmparser.c:344:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:367:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:370:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:392:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:395:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:406:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:409:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:412:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:418:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:423:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:428:22: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:430:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:433:25: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:444:25: danger: dereference of NULL ‘pgp’
#  442|   			break;
#  443|   		default:
#  444|-> 			pgp->status = PGSTATE_UNDEF;
#  445|   			break;
#  446|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def112]
multipath-tools-0.13.0/libmultipath/dmparser.c:500:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
multipath-tools-0.13.0/libmultipath/dmparser.c:344:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:367:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:370:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:392:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:395:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:406:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:409:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:412:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:418:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:423:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:430:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:433:25: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:454:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:457:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:466:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:469:29: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:474:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:477:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:480:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:480:20: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:484:30: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:495:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:498:33: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:514:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:517:41: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:523:37: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:483:44: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:483:29: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:484:30: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:495:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:498:33: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:500:33: danger: dereference of NULL ‘pp’
#  498|   			switch (*word) {
#  499|   			case 'F':
#  500|-> 				pp->dmstate = PSTATE_FAILED;
#  501|   				break;
#  502|   			case 'A':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def113]
multipath-tools-0.13.0/libmultipath/dmparser.c:503:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
multipath-tools-0.13.0/libmultipath/dmparser.c:344:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:367:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:370:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:392:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:395:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:406:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:409:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:412:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:418:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:423:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:430:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:433:25: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:454:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:457:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:466:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:469:29: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:474:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:477:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:480:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:480:20: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:484:30: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:495:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:498:33: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:514:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:517:41: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:523:37: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:483:44: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:483:29: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:484:30: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:495:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:498:33: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:503:33: danger: dereference of NULL ‘pp’
#  501|   				break;
#  502|   			case 'A':
#  503|-> 				pp->dmstate = PSTATE_ACTIVE;
#  504|   				break;
#  505|   			default:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def114]
multipath-tools-0.13.0/libmultipath/dmparser.c:517:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
multipath-tools-0.13.0/libmultipath/dmparser.c:344:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:367:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:370:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:392:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:395:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:406:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:409:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:412:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:418:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:420:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:423:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:424:23: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:430:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:433:25: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:454:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:457:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:466:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:469:29: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:474:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:477:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:480:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:480:20: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:484:30: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:495:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:498:33: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:514:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:517:41: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:523:37: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:483:44: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:483:29: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:484:30: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:495:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:498:33: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/dmparser.c:514:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/dmparser.c:517:41: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.13.0/libmultipath/dmparser.c:517:25: danger: dereference of NULL ‘pp’
#  515|   				return 1;
#  516|   
#  517|-> 			pp->failcount = atoi(word);
#  518|   			free(word);
#  519|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
multipath-tools-0.13.0/libmultipath/file.c:51:25: warning[-Wanalyzer-malloc-leak]: leak of ‘end’
multipath-tools-0.13.0/libmultipath/file.c:35:20: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/file.c:36:12: branch_false: following ‘false’ branch (when ‘pathname’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/file.c:36:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/file.c:46:16: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/file.c:48:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/file.c:50:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/file.c:51:25: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/file.c:51:25: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/file.c:51:25: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/libmultipath/file.c:51:25: danger: ‘end’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   49|   		err = mkdir(pathname, dir_mode);
#   50|   		if (err && errno != EEXIST) {
#   51|-> 			condlog(0, "Cannot make directory [%s] : %s",
#   52|   				pathname, strerror(errno));
#   53|   			free(pathname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
multipath-tools-0.13.0/libmultipath/file.c:57:25: warning[-Wanalyzer-malloc-leak]: leak of ‘end’
multipath-tools-0.13.0/libmultipath/file.c:35:20: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/file.c:36:12: branch_false: following ‘false’ branch (when ‘pathname’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/file.c:36:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/file.c:46:16: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/file.c:48:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/file.c:50:20: branch_false: following ‘false’ branch (when ‘err == 0’)...
multipath-tools-0.13.0/libmultipath/file.c:57:25: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/file.c:57:25: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/file.c:57:25: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/file.c:57:25: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/libmultipath/file.c:57:25: danger: ‘end’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   55|   		}
#   56|   		if (!err)
#   57|-> 			condlog(3, "Created dir [%s]", pathname);
#   58|   		*end = '/';
#   59|   		end++;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def117]
multipath-tools-0.13.0/libmultipath/file.c:93:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
multipath-tools-0.13.0/libmultipath/file.c:110:1: enter_function: entry to ‘open_file’
multipath-tools-0.13.0/libmultipath/file.c:115:13: call_function: calling ‘ensure_directories_exist’ from ‘open_file’
multipath-tools-0.13.0/libmultipath/file.c:115:13: return_function: returning to ‘open_file’ from ‘ensure_directories_exist’
multipath-tools-0.13.0/libmultipath/file.c:115:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/file.c:117:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/file.c:119:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/file.c:120:21: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/file.c:120:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/file.c:121:25: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/file.c:124:30: acquire_resource: opened here
multipath-tools-0.13.0/libmultipath/file.c:125:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/file.c:137:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/file.c:137:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/file.c:137:27: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/file.c:137:27: call_function: calling ‘lock_file’ from ‘open_file’
#   91|   
#   92|   	alarm(FILE_TIMEOUT);
#   93|-> 	err = fcntl(fd, F_SETLKW, &lock);
#   94|   	alarm(0);
#   95|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def118]
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:78:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:838:12: enter_function: entry to ‘_delete_map’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:844:15: call_function: calling ‘_find_nvme_map_by_devt’ from ‘_delete_map’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:844:15: return_function: returning to ‘_delete_map’ from ‘_find_nvme_map_by_devt’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:845:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:848:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:849:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:852:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:854:9: call_function: calling ‘cleanup_nvme_map’ from ‘_delete_map’
#   76|   {
#   77|   	condlog(5, "%s: %p %p", __func__, path, path->udev);
#   78|-> 	if (path->udev)
#   79|   		udev_device_unref(path->udev);
#   80|   	vector_reset(&path->pg.pathvec);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:98:9: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:764:12: enter_function: entry to ‘_add_map’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:770:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:773:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:773:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:774:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:777:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:786:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:787:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:787:17: call_function: calling ‘cleanup_nvme_map’ from ‘_add_map’
#   96|   		vector_del_slot(&map->pgvec, i);
#   97|   	}
#   98|-> 	vector_reset(&map->pgvec);
#   99|   	if (map->udev)
#  100|   		udev_device_unref(map->udev);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def120]
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:634:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:883:6: enter_function: entry to ‘check__’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:888:9: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:891:17: call_function: calling ‘_find_controllers’ from ‘check__’
#  632|   	vector_foreach_slot(&map->pgvec, pg, i) {
#  633|   		path = nvme_pg_to_path(pg);
#  634|-> 		path->seen = false;
#  635|   	}
#  636|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def121]
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:744:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:883:6: enter_function: entry to ‘check__’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:888:9: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:891:17: call_function: calling ‘_find_controllers’ from ‘check__’
#  742|   	vector_foreach_slot_backwards(&map->pgvec, pg, i) {
#  743|   		path = nvme_pg_to_path(pg);
#  744|-> 		if (!path->seen) {
#  745|   			condlog(1, "path %d not found in %s any more",
#  746|   				i, udev_device_get_sysname(map->udev));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:778:21: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:770:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:773:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:773:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:774:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:777:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:778:21: throw: if ‘udev_device_ref’ throws an exception...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:778:21: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  776|   
#  777|   	map->devt = devt;
#  778|-> 	map->udev = udev_device_ref(ud);
#  779|   	/*
#  780|   	 * subsys is implicitly referenced by map->udev,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:786:14: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:770:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:773:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:773:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:774:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:777:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:786:14: throw: if ‘vector_alloc_slot’ throws an exception...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:786:14: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  784|   	map->gen.ops = &nvme_map_ops;
#  785|   
#  786|-> 	if (!vector_alloc_slot(ctx->mpvec)) {
#  787|   		cleanup_nvme_map(map);
#  788|   		return FOREIGN_ERR;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:790:9: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:770:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:773:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:773:15: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:774:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:777:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:786:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:790:9: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:790:9: throw: if ‘vector_set_slot’ throws an exception...
multipath-tools-0.13.0/libmultipath/foreign/nvme.c:790:9: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  788|   		return FOREIGN_ERR;
#  789|   	}
#  790|-> 	vector_set_slot(ctx->mpvec, map);
#  791|   	_find_controllers(ctx, map);
#  792|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
multipath-tools-0.13.0/libmultipath/print.c:1233:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p_width’
multipath-tools-0.13.0/libmultipath/print.c:1231:6: enter_function: entry to ‘print_multipath_topology__’
multipath-tools-0.13.0/libmultipath/print.c:1239:19: call_function: calling ‘alloc_path_layout’ from ‘print_multipath_topology__’
multipath-tools-0.13.0/libmultipath/print.c:1239:19: return_function: returning to ‘print_multipath_topology__’ from ‘alloc_path_layout’
multipath-tools-0.13.0/libmultipath/print.c:1242:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/print.c:1242:12: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/print.c:1243:17: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/print.c:1244:35: throw: if the called function throws an exception...
multipath-tools-0.13.0/libmultipath/print.c:1234:23: throw: if ‘cleanup_ucharp’ throws an exception...
multipath-tools-0.13.0/libmultipath/print.c:1233:9: throw: if ‘reset_strbuf’ throws an exception...
multipath-tools-0.13.0/libmultipath/print.c:1233:9: danger: ‘p_width’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 1231|   void print_multipath_topology__(const struct gen_multipath *gmp, int verbosity)
# 1232|   {
# 1233|-> 	STRBUF_ON_STACK(buff);
# 1234|   	fieldwidth_t *p_width __attribute__((cleanup(cleanup_ucharp))) = NULL;
# 1235|   	const struct gen_pathgroup *gpg;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
multipath-tools-0.13.0/libmultipath/print.c:1279:9: warning[-Wanalyzer-malloc-leak]: leak of ‘width’
multipath-tools-0.13.0/libmultipath/print.c:1272:5: enter_function: entry to ‘snprint_multipath_topology__’
multipath-tools-0.13.0/libmultipath/print.c:1283:12: branch_false: following ‘false’ branch (when ‘verbosity > 0’)...
multipath-tools-0.13.0/libmultipath/print.c:1286:22: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/print.c:1286:22: call_function: calling ‘alloc_multipath_layout’ from ‘snprint_multipath_topology__’
multipath-tools-0.13.0/libmultipath/print.c:1286:22: return_function: returning to ‘snprint_multipath_topology__’ from ‘alloc_multipath_layout’
multipath-tools-0.13.0/libmultipath/print.c:1286:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/print.c:1289:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/print.c:1290:24: call_function: calling ‘snprint_multipath__’ from ‘snprint_multipath_topology__’
multipath-tools-0.13.0/libmultipath/print.c:1281:23: throw: if ‘cleanup_ucharp’ throws an exception...
multipath-tools-0.13.0/libmultipath/print.c:1279:9: throw: if ‘reset_strbuf’ throws an exception...
multipath-tools-0.13.0/libmultipath/print.c:1279:9: danger: ‘width’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
# 1277|   	const struct vector_s *pgvec;
# 1278|   	const struct gen_pathgroup *gpg;
# 1279|-> 	STRBUF_ON_STACK(style);
# 1280|   	size_t initial_len = get_strbuf_len(buff);
# 1281|   	fieldwidth_t *width __attribute__((cleanup(cleanup_ucharp))) = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
multipath-tools-0.13.0/libmultipath/print.c:2064:9: warning[-Wanalyzer-malloc-leak]: leak of ‘width’
multipath-tools-0.13.0/libmultipath/print.c:2060:13: enter_function: entry to ‘print_all_paths_custo’
multipath-tools-0.13.0/libmultipath/print.c:2067:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/print.c:2073:22: call_function: calling ‘alloc_path_layout’ from ‘print_all_paths_custo’
multipath-tools-0.13.0/libmultipath/print.c:2073:22: return_function: returning to ‘print_all_paths_custo’ from ‘alloc_path_layout’
multipath-tools-0.13.0/libmultipath/print.c:2073:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/print.c:2075:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/print.c:2075:9: call_function: calling ‘get_path_layout’ from ‘print_all_paths_custo’
multipath-tools-0.13.0/libmultipath/print.c:2065:23: throw: if ‘cleanup_ucharp’ throws an exception...
multipath-tools-0.13.0/libmultipath/print.c:2064:9: throw: if ‘reset_strbuf’ throws an exception...
multipath-tools-0.13.0/libmultipath/print.c:2064:9: danger: ‘width’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
# 2062|   	int i;
# 2063|   	struct path * pp;
# 2064|-> 	STRBUF_ON_STACK(line);
# 2065|   	fieldwidth_t *width __attribute__((cleanup(cleanup_ucharp))) = NULL;
# 2066|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:192:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:232:1: enter_function: entry to ‘get_target_port_group’
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:241:32: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:242:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:248:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:249:14: call_function: calling ‘do_inquiry’ from ‘get_target_port_group’
#  190|   
#  191|   	if (pp->udev)
#  192|-> 		ud = udev_device_get_parent_with_subsystem_devtype(pp->udev,
#  193|   								   "scsi",
#  194|   							   "scsi_device");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:201:30: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:232:1: enter_function: entry to ‘get_target_port_group’
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:241:32: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:242:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:248:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:249:14: call_function: calling ‘do_inquiry’ from ‘get_target_port_group’
#  199|   			rc = sysfs_get_inquiry(ud, resp, resplen);
#  200|   		else
#  201|-> 			rc = sysfs_get_vpd(ud, codepage, resp, resplen);
#  202|   
#  203|   		if (rc >= 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:208:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:232:1: enter_function: entry to ‘get_target_port_group’
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:241:32: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:242:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:248:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/alua_rtpg.c:249:14: call_function: calling ‘do_inquiry’ from ‘get_target_port_group’
#  206|   		}
#  207|   	}
#  208|-> 	return do_inquiry_sg(pp->fd, evpd, codepage, resp, resplen,
#  209|   			     get_prio_timeout_ms(pp));
#  210|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:46:33: warning[-Wanalyzer-malloc-leak]: leak of ‘find_regex(&buffer, "(sd[a-z]+)")’
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:76:5: enter_function: entry to ‘iet_prio’
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:82:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:87:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:87:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:93:13: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:93:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:102:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:104:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:104:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:108:16: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:109:21: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:116:42: call_function: calling ‘find_regex’ from ‘iet_prio’
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:116:42: return_function: returning to ‘iet_prio’ from ‘find_regex’
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:118:36: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:118:53: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:120:46: call_function: calling ‘find_regex’ from ‘iet_prio’
#   44|   		regmatch_t *pmatch = NULL;
#   45|   		nmatch = preg.re_nsub;
#   46|-> 		pmatch = malloc(sizeof(*pmatch) * nmatch);
#   47|   
#   48|   		if (pmatch) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:49:33: warning[-Wanalyzer-malloc-leak]: leak of ‘pmatch’
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:41:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:45:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:46:26: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:48:20: branch_true: following ‘true’ branch (when ‘pmatch’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:49:33: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:49:33: throw: if ‘regexec’ throws an exception...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:49:33: danger: ‘pmatch’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   47|   
#   48|   		if (pmatch) {
#   49|-> 			match = regexec(&preg, string, nmatch, pmatch, 0);
#   50|   			regfree(&preg);
#   51|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:108:39: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&fullpath)’
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:82:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:87:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:87:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:93:13: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:93:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:102:14: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:103:17: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:104:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:104:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:108:39: throw: if ‘readdir’ throws an exception...
multipath-tools-0.13.0/libmultipath/prioritizers/iet.c:108:39: danger: ‘opendir(&fullpath)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  106|   
#  107|   	// loop to find device in /dev/disk/by-path
#  108|-> 	while( NULL != (dir_entry_p = readdir(dir_p))) {
#  109|   		if (dir_entry_p->d_name[0] != '.') {
#  110|   			char path[BUFFERSIZE] = "/dev/disk/by-path/";

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
multipath-tools-0.13.0/libmultipath/prioritizers/path_latency.c:165:23: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
multipath-tools-0.13.0/libmultipath/prioritizers/path_latency.c:155:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/path_latency.c:160:22: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/prioritizers/path_latency.c:161:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/prioritizers/path_latency.c:161:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/path_latency.c:164:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
multipath-tools-0.13.0/libmultipath/prioritizers/path_latency.c:165:23: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/prioritizers/path_latency.c:165:23: throw: if ‘get_next_string’ throws an exception...
multipath-tools-0.13.0/libmultipath/prioritizers/path_latency.c:165:23: danger: ‘temp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  163|   
#  164|   	for (i = 0; i < 2; i++) {
#  165|-> 		str = get_next_string(&temp, split_char);
#  166|   		if (!str)
#  167|   			goto out;

Error: COMPILER_WARNING (CWE-704): [#def135]
multipath-tools-0.13.0/libmultipath/prkey.c: scope_hint: In function ‘parse_prkey_flags’
multipath-tools-0.13.0/libmultipath/prkey.c:57:17: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   57 |         flagstr = strchr(ptr, ':');
#      |                 ^
#   55|   	char *flagstr;
#   56|   
#   57|-> 	flagstr = strchr(ptr, ':');
#   58|   	*flags = 0;
#   59|   	if (flagstr) {

Error: COMPILER_WARNING (CWE-704): [#def136]
multipath-tools-0.13.0/libmultipath/prkey.c:57:17: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   55|   	char *flagstr;
#   56|   
#   57|-> 	flagstr = strchr(ptr, ':');
#   58|   	*flags = 0;
#   59|   	if (flagstr) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
multipath-tools-0.13.0/libmultipath/sysfs.c:225:26: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&path)’
multipath-tools-0.13.0/libmultipath/sysfs.c:198:5: enter_function: entry to ‘sysfs_check_holders’
multipath-tools-0.13.0/libmultipath/sysfs.c:206:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/sysfs.c:211:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/sysfs.c:211:13: call_function: calling ‘devt2devname’ from ‘sysfs_check_holders’
multipath-tools-0.13.0/libmultipath/sysfs.c:211:13: return_function: returning to ‘sysfs_check_holders’ from ‘devt2devname’
multipath-tools-0.13.0/libmultipath/sysfs.c:211:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/sysfs.c:216:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/sysfs.c:219:17: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/sysfs.c:220:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/sysfs.c:220:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/sysfs.c:225:26: throw: if ‘readdir’ throws an exception...
multipath-tools-0.13.0/libmultipath/sysfs.c:225:26: danger: ‘opendir(&path)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/17)
#  223|   		return 0;
#  224|   	}
#  225|-> 	while ((holder = readdir(dirfd)) != NULL) {
#  226|   		if ((strcmp(holder->d_name,".") == 0) ||
#  227|   		    (strcmp(holder->d_name,"..") == 0))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def138]
multipath-tools-0.13.0/libmultipath/sysfs.c:329:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
multipath-tools-0.13.0/libmultipath/sysfs.c:261:6: enter_function: entry to ‘sysfs_is_multipathed’
multipath-tools-0.13.0/libmultipath/sysfs.c:272:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/sysfs.c:277:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/sysfs.c:278:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/sysfs.c:280:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/sysfs.c:280:17: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/sysfs.c:285:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/sysfs.c:288:21: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/sysfs.c:289:21: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/sysfs.c:297:22: acquire_resource: opened here
multipath-tools-0.13.0/libmultipath/sysfs.c:303:17: call_function: inlined call to ‘__pthread_cleanup_routine’ from ‘sysfs_is_multipathed’
multipath-tools-0.13.0/libmultipath/sysfs.c:329:1: danger: ‘fd’ leaks here; was opened at [(10)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/9)
#  327|   
#  328|   	return found;
#  329|-> }
#  330|   
#  331|   struct udev_device *get_udev_for_mpp(const struct multipath *mpp)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
multipath-tools-0.13.0/libmultipath/uevent.c:87:17: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_uevent()’
multipath-tools-0.13.0/libmultipath/uevent.c:577:23: enter_function: entry to ‘uevent_from_udev_device’
multipath-tools-0.13.0/libmultipath/uevent.c:584:15: call_function: calling ‘alloc_uevent’ from ‘uevent_from_udev_device’
multipath-tools-0.13.0/libmultipath/uevent.c:584:15: return_function: returning to ‘uevent_from_udev_device’ from ‘alloc_uevent’
multipath-tools-0.13.0/libmultipath/uevent.c:585:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/uevent.c:590:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/uevent.c:592:9: throw: if ‘udev_device_get_properties_list_entry’ throws an exception...
multipath-tools-0.13.0/libmultipath/uevent.c:87:17: danger: ‘alloc_uevent()’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   85|   
#   86|   	if (uev) {
#   87|-> 		INIT_LIST_HEAD(&uev->node);
#   88|   		INIT_LIST_HEAD(&uev->merge_node);
#   89|   	}

Error: GCC_ANALYZER_WARNING (CWE-126): [#def140]
multipath-tools-0.13.0/libmultipath/uevent.c:110:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
multipath-tools-0.13.0/libmultipath/uevent.c:671:5: enter_function: entry to ‘uevent_listen’
multipath-tools-0.13.0/libmultipath/uevent.c:684:12: branch_false: following ‘false’ branch (when ‘udev’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/uevent.c:688:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/uevent.c:692:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/uevent.c:698:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/uevent.c:702:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/uevent.c:706:24: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/uevent.c:707:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/uevent.c:712:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/uevent.c:712:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/uevent.c:717:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/uevent.c:722:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/uevent.c:722:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/uevent.c:733:27: throw: if ‘poll’ throws an exception...
multipath-tools-0.13.0/libmultipath/uevent.c:728:9: call_function: inlined call to ‘__pthread_cleanup_routine’ from ‘uevent_listen’
#  108|   	struct uevent *uev, *tmp;
#  109|   
#  110|-> 	list_for_each_entry_safe(uev, tmp, tmpq, node) {
#  111|   		list_del_init(&uev->node);
#  112|   		cleanup_uev(uev);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def141]
multipath-tools-0.13.0/libmultipath/uevent.c:110:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*tmpq.next’
multipath-tools-0.13.0/libmultipath/uevent.c:523:5: enter_function: entry to ‘uevent_dispatch’
multipath-tools-0.13.0/libmultipath/uevent.c:541:24: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/uevent.c:541:58: call_function: inlined call to ‘list_empty’ from ‘uevent_dispatch’
multipath-tools-0.13.0/libmultipath/uevent.c:541:24: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/uevent.c:542:25: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/uevent.c:542:25: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/libmultipath/uevent.c:536:17: call_function: inlined call to ‘__pthread_cleanup_routine’ from ‘uevent_dispatch’
multipath-tools-0.13.0/libmultipath/uevent.c:534:9: call_function: inlined call to ‘__pthread_cleanup_routine’ from ‘uevent_dispatch’
#  108|   	struct uevent *uev, *tmp;
#  109|   
#  110|-> 	list_for_each_entry_safe(uev, tmp, tmpq, node) {
#  111|   		list_del_init(&uev->node);
#  112|   		cleanup_uev(uev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
multipath-tools-0.13.0/libmultipath/wwids.c:33:21: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:235:1: enter_function: entry to ‘check_wwids_file’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: call_function: calling ‘lookup_wwid’ from ‘check_wwids_file’
#   31|   	int count;
#   32|   
#   33|-> 	while ((c = fgetc(f)) != EOF){
#   34|   		if (c != '/') {
#   35|   			if (fgets(buf, LINE_MAX, f) == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
multipath-tools-0.13.0/libmultipath/wwids.c:41:29: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:235:1: enter_function: entry to ‘check_wwids_file’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: call_function: calling ‘lookup_wwid’ from ‘check_wwids_file’
#   39|   		}
#   40|   		count = 0;
#   41|-> 		while ((c = fgetc(f)) != '/') {
#   42|   			if (c == EOF)
#   43|   				return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
multipath-tools-0.13.0/libmultipath/wwids.c:68:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:235:1: enter_function: entry to ‘check_wwids_file’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:251:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: following ‘false’ branch (when ‘write_wwid != 0’)...
multipath-tools-0.13.0/libmultipath/wwids.c:259:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:259:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:265:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: call_function: calling ‘write_out_wwid’ from ‘check_wwids_file’
#   66|   	ret = snprintf(buf, WWID_SIZE + 3, "/%s/\n", wwid);
#   67|   	if (ret >= (WWID_SIZE + 3) || ret < 0){
#   68|-> 		condlog(0, "can't format wwid for writing (%d) : %s",
#   69|   			ret, strerror(errno));
#   70|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
multipath-tools-0.13.0/libmultipath/wwids.c:74:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:235:1: enter_function: entry to ‘check_wwids_file’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:251:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: following ‘false’ branch (when ‘write_wwid != 0’)...
multipath-tools-0.13.0/libmultipath/wwids.c:259:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:259:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:265:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: call_function: calling ‘write_out_wwid’ from ‘check_wwids_file’
#   72|   	offset = lseek(fd, 0, SEEK_END);
#   73|   	if (offset < 0) {
#   74|-> 		condlog(0, "can't seek to the end of wwids file : %s",
#   75|   			strerror(errno));
#   76|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
multipath-tools-0.13.0/libmultipath/wwids.c:78:13: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:235:1: enter_function: entry to ‘check_wwids_file’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:251:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: following ‘false’ branch (when ‘write_wwid != 0’)...
multipath-tools-0.13.0/libmultipath/wwids.c:259:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:259:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:265:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: call_function: calling ‘write_out_wwid’ from ‘check_wwids_file’
#   76|   		return -1;
#   77|   	}
#   78|-> 	if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
#   79|   		condlog(0, "cannot write wwid to wwids file : %s",
#   80|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
multipath-tools-0.13.0/libmultipath/wwids.c:79:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:235:1: enter_function: entry to ‘check_wwids_file’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:251:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: following ‘false’ branch (when ‘write_wwid != 0’)...
multipath-tools-0.13.0/libmultipath/wwids.c:259:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:259:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:265:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: call_function: calling ‘write_out_wwid’ from ‘check_wwids_file’
#   77|   	}
#   78|   	if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
#   79|-> 		condlog(0, "cannot write wwid to wwids file : %s",
#   80|   			strerror(errno));
#   81|   		if (ftruncate(fd, offset))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
multipath-tools-0.13.0/libmultipath/wwids.c:82:25: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:235:1: enter_function: entry to ‘check_wwids_file’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:251:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: following ‘false’ branch (when ‘write_wwid != 0’)...
multipath-tools-0.13.0/libmultipath/wwids.c:259:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:259:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:265:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:272:15: call_function: calling ‘write_out_wwid’ from ‘check_wwids_file’
#   80|   			strerror(errno));
#   81|   		if (ftruncate(fd, offset))
#   82|-> 			condlog(0, "cannot truncate failed wwid write : %s",
#   83|   				strerror(errno));
#   84|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
multipath-tools-0.13.0/libmultipath/wwids.c:260:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:251:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: following ‘false’ branch (when ‘write_wwid != 0’)...
multipath-tools-0.13.0/libmultipath/wwids.c:259:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:259:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:260:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:260:17: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:260:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:260:17: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/libmultipath/wwids.c:260:17: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  258|   	}
#  259|   	if (!can_write) {
#  260|-> 		condlog(0, "wwids file is read-only. Can't write wwid");
#  261|   		ret = -1;
#  262|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:251:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: following ‘false’ branch (when ‘write_wwid != 0’)...
multipath-tools-0.13.0/libmultipath/wwids.c:259:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:259:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: throw: if ‘fflush’ throws an exception...
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  263|   	}
#  264|   
#  265|-> 	if (fflush(f) != 0) {
#  266|   		condlog(0, "cannot fflush wwids file stream : %s",
#  267|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
multipath-tools-0.13.0/libmultipath/wwids.c:266:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
multipath-tools-0.13.0/libmultipath/wwids.c:241:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:244:13: acquire_memory: allocated here
multipath-tools-0.13.0/libmultipath/wwids.c:245:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
multipath-tools-0.13.0/libmultipath/wwids.c:250:17: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:251:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:255:12: branch_false: following ‘false’ branch (when ‘write_wwid != 0’)...
multipath-tools-0.13.0/libmultipath/wwids.c:259:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:259:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:265:13: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:265:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:266:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:266:17: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:266:17: branch_true: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:266:17: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/libmultipath/wwids.c:266:17: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  264|   
#  265|   	if (fflush(f) != 0) {
#  266|-> 		condlog(0, "cannot fflush wwids file stream : %s",
#  267|   			strerror(errno));
#  268|   		ret = -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def152]
multipath-tools-0.13.0/libmultipath/wwids.c:399:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dfd’
multipath-tools-0.13.0/libmultipath/wwids.c:384:15: acquire_resource: opened here
multipath-tools-0.13.0/libmultipath/wwids.c:385:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/libmultipath/wwids.c:398:9: branch_false: ...to here
multipath-tools-0.13.0/libmultipath/wwids.c:399:14: throw: if ‘openat’ throws an exception...
multipath-tools-0.13.0/libmultipath/wwids.c:399:14: danger: ‘dfd’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  397|   
#  398|   	safe_sprintf(tmpfile, "%s.%lx", wwid, (long)getpid());
#  399|-> 	fd = openat(dfd, tmpfile, O_RDONLY | O_CREAT | O_EXCL, S_IRUSR);
#  400|   	if (fd >= 0)
#  401|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def153]
multipath-tools-0.13.0/multipath/main.c:402:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
multipath-tools-0.13.0/multipath/main.c:390:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:394:12: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:394:12: branch_true: following ‘true’ branch (when ‘k == 3’)...
multipath-tools-0.13.0/multipath/main.c:399:22: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:402:29: danger: dereference of NULL ‘pp’
#  400|   		select_find_multipaths_timeout(conf, pp);
#  401|   		wait = find_multipaths_check_timeout(
#  402|-> 			pp, pp->find_multipaths_timeout, &until);
#  403|   		if (wait != FIND_MULTIPATHS_WAITING)
#  404|   			k = PATH_IS_NOT_VALID;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def154]
multipath-tools-0.13.0/multipath/main.c:459:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/cmdline", "re")’
multipath-tools-0.13.0/multipath/main.c:451:13: acquire_resource: opened here
multipath-tools-0.13.0/multipath/main.c:452:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:457:14: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:457:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:458:21: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:458:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:459:25: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:459:25: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:459:25: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:459:25: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/multipath/main.c:459:25: danger: ‘fopen("/proc/cmdline", "re")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  457|   	if (!fgets(buf, sizeof(buf), f)) {
#  458|   		if (ferror(f))
#  459|-> 			condlog(0, "read of /proc/cmdline failed : %s",
#  460|   				strerror(errno));
#  461|   		else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
multipath-tools-0.13.0/multipath/main.c:459:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/cmdline", "re")’
multipath-tools-0.13.0/multipath/main.c:451:13: acquire_memory: allocated here
multipath-tools-0.13.0/multipath/main.c:452:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:457:14: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:457:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:458:21: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:458:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:459:25: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:459:25: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:459:25: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:459:25: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/multipath/main.c:459:25: danger: ‘fopen("/proc/cmdline", "re")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  457|   	if (!fgets(buf, sizeof(buf), f)) {
#  458|   		if (ferror(f))
#  459|-> 			condlog(0, "read of /proc/cmdline failed : %s",
#  460|   				strerror(errno));
#  461|   		else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
multipath-tools-0.13.0/multipath/main.c:462:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/cmdline", "re")’
multipath-tools-0.13.0/multipath/main.c:451:13: acquire_resource: opened here
multipath-tools-0.13.0/multipath/main.c:452:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:457:14: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:457:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:458:21: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:458:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:462:25: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:462:25: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:462:25: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:462:25: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/multipath/main.c:462:25: danger: ‘fopen("/proc/cmdline", "re")’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  460|   				strerror(errno));
#  461|   		else
#  462|-> 			condlog(0, "couldn't read /proc/cmdline");
#  463|   		fclose(f);
#  464|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
multipath-tools-0.13.0/multipath/main.c:462:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/cmdline", "re")’
multipath-tools-0.13.0/multipath/main.c:451:13: acquire_memory: allocated here
multipath-tools-0.13.0/multipath/main.c:452:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:457:14: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:457:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:458:21: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:458:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:462:25: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:462:25: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:462:25: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:462:25: throw: if ‘dlog’ throws an exception...
multipath-tools-0.13.0/multipath/main.c:462:25: danger: ‘fopen("/proc/cmdline", "re")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  460|   				strerror(errno));
#  461|   		else
#  462|-> 			condlog(0, "couldn't read /proc/cmdline");
#  463|   		fclose(f);
#  464|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
multipath-tools-0.13.0/multipath/main.c:698:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(udev_device_get_devnode(*<unknown>.udev), 128)’
multipath-tools-0.13.0/multipath/main.c:647:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:649:12: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:653:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:657:14: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:660:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:663:13: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:676:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipath/main.c:679:12: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:679:12: branch_false: following ‘false’ branch (when ‘r == 3’)...
multipath-tools-0.13.0/multipath/main.c:696:14: branch_false: ...to here
multipath-tools-0.13.0/multipath/main.c:696:14: acquire_resource: opened here
multipath-tools-0.13.0/multipath/main.c:697:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipath/main.c:698:17: branch_true: ...to here
multipath-tools-0.13.0/multipath/main.c:698:17: danger: ‘open(udev_device_get_devnode(*<unknown>.udev), 128)’ leaks here; was opened at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  696|   	fd = open(udev_device_get_devnode(pp->udev), O_RDONLY|O_EXCL);
#  697|   	if (fd >= 0)
#  698|-> 		close(fd);
#  699|   	else {
#  700|   		condlog(3, "%s: path %s is in use: %m", __func__, pp->dev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
multipath-tools-0.13.0/multipathd/cli.c:65:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
multipath-tools-0.13.0/multipathd/cli.c:467:1: enter_function: entry to ‘cli_init’
multipath-tools-0.13.0/multipathd/cli.c:468:13: call_function: calling ‘load_keys’ from ‘cli_init’
#   63|   		goto out;
#   64|   
#   65|-> 	if (!vector_alloc_slot(vec))
#   66|   		goto out1;
#   67|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
multipath-tools-0.13.0/multipathd/cli.c:65:14: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 24)’
multipath-tools-0.13.0/multipathd/cli.c:467:1: enter_function: entry to ‘cli_init’
multipath-tools-0.13.0/multipathd/cli.c:468:13: call_function: calling ‘load_keys’ from ‘cli_init’
#   63|   		goto out;
#   64|   
#   65|-> 	if (!vector_alloc_slot(vec))
#   66|   		goto out1;
#   67|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
multipath-tools-0.13.0/multipathd/cli.c:68:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
multipath-tools-0.13.0/multipathd/cli.c:467:1: enter_function: entry to ‘cli_init’
multipath-tools-0.13.0/multipathd/cli.c:468:13: call_function: calling ‘load_keys’ from ‘cli_init’
#   66|   		goto out1;
#   67|   
#   68|-> 	vector_set_slot(vec, kw);
#   69|   
#   70|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
multipath-tools-0.13.0/multipathd/cli.c:68:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 24)’
multipath-tools-0.13.0/multipathd/cli.c:467:1: enter_function: entry to ‘cli_init’
multipath-tools-0.13.0/multipathd/cli.c:468:13: call_function: calling ‘load_keys’ from ‘cli_init’
#   66|   		goto out1;
#   67|   
#   68|-> 	vector_set_slot(vec, kw);
#   69|   
#   70|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-415): [#def163]
multipath-tools-0.13.0/multipathd/fpin_handlers.c:560:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘fpin_li_marginal_dev_list_head.next + -40’
multipath-tools-0.13.0/multipathd/fpin_handlers.c:556:16: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/fpin_handlers.c:557:29: branch_true: ...to here
multipath-tools-0.13.0/multipathd/fpin_handlers.c:560:17: release_memory: first ‘free’ here
multipath-tools-0.13.0/multipathd/fpin_handlers.c:556:16: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/fpin_handlers.c:557:29: branch_true: ...to here
multipath-tools-0.13.0/multipathd/fpin_handlers.c:560:17: danger: second ‘free’ here; first ‘free’ was at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  558|   				struct marginal_dev_list, node);
#  559|   		list_del(&tmp_marg->node);
#  560|-> 		free(tmp_marg);
#  561|   	}
#  562|   	pthread_mutex_unlock(&fpin_li_marginal_dev_mutex);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def164]
multipath-tools-0.13.0/multipathd/fpin_handlers.c:575:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘els_marginal_list_head.next + -2056’
multipath-tools-0.13.0/multipathd/fpin_handlers.c:643:13: enter_function: entry to ‘receiver_cleanup_list’
multipath-tools-0.13.0/multipathd/fpin_handlers.c:646:9: call_function: calling ‘fpin_clean_els_marginal_list’ from ‘receiver_cleanup_list’
#  573|   					     node);
#  574|   		list_del(&els_marg->node);
#  575|-> 		free(els_marg);
#  576|   	}
#  577|   }

Error: GCC_ANALYZER_WARNING: [#def165]
multipath-tools-0.13.0/multipathd/fpin_handlers.c:691:23: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘fd’
multipath-tools-0.13.0/multipathd/fpin_handlers.c:672:14: acquire_resource: datagram socket created here
multipath-tools-0.13.0/multipathd/fpin_handlers.c:673:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/fpin_handlers.c:678:9: branch_false: ...to here
multipath-tools-0.13.0/multipathd/fpin_handlers.c:683:12: branch_false: following ‘false’ branch (when ‘ret != -1’)...
multipath-tools-0.13.0/multipathd/fpin_handlers.c:683:12: branch_false: ...to here
multipath-tools-0.13.0/multipathd/fpin_handlers.c:691:23: danger: ‘fd’ could be invalid
#  689|   
#  690|   		condlog(4, "Waiting for ELS...\n");
#  691|-> 		ret = read(fd, buf, DEF_RX_BUF_SIZE);
#  692|   		if (ret < 0) {
#  693|   			condlog(0, "failed to read the els frame (%d)", ret);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def166]
multipath-tools-0.13.0/multipathd/main.c:469:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mpp’
multipath-tools-0.13.0/multipathd/main.c:1820:1: enter_function: entry to ‘uev_trigger’
multipath-tools-0.13.0/multipathd/main.c:1838:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:1846:22: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:1846:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1847:22: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1847:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1854:30: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1854:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1855:29: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1855:29: call_function: calling ‘uev_add_map’ from ‘uev_trigger’
#  467|   {
#  468|   	if (poll_dmevents)
#  469|-> 		return watch_dmevents(mpp->alias);
#  470|   	else
#  471|   		return start_waiter_thread(mpp, vecs);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def167]
multipath-tools-0.13.0/multipathd/main.c:656:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mpp’
multipath-tools-0.13.0/multipathd/main.c:1820:1: enter_function: entry to ‘uev_trigger’
multipath-tools-0.13.0/multipathd/main.c:1838:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:1846:22: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:1846:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1847:22: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1847:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1854:30: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1854:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1855:29: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1855:29: call_function: calling ‘uev_add_map’ from ‘uev_trigger’
#  654|   	struct pathgroup *pgp;
#  655|   
#  656|-> 	vector_foreach_slot (mpp->pg, pgp, i)
#  657|   		vector_foreach_slot (pgp->paths, pp, j)
#  658|   			if (pp->initialized == INIT_OK &&

Error: GCC_ANALYZER_WARNING (CWE-476): [#def168]
multipath-tools-0.13.0/multipathd/main.c:690:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mpp’
multipath-tools-0.13.0/multipathd/main.c:1820:1: enter_function: entry to ‘uev_trigger’
multipath-tools-0.13.0/multipathd/main.c:1838:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:1846:22: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:1846:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1847:22: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1847:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1854:30: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1854:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1855:29: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1855:29: call_function: calling ‘uev_add_map’ from ‘uev_trigger’
#  688|   
#  689|   retry:
#  690|-> 	condlog(4, "%s: updating new map", mpp->alias);
#  691|   	if (adopt_paths(vecs->pathvec, mpp, NULL)) {
#  692|   		condlog(0, "%s: failed to adopt paths for new map update",

Error: GCC_ANALYZER_WARNING (CWE-476): [#def169]
multipath-tools-0.13.0/multipathd/main.c:692:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mpp’
multipath-tools-0.13.0/multipathd/main.c:1820:1: enter_function: entry to ‘uev_trigger’
multipath-tools-0.13.0/multipathd/main.c:1838:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:1846:22: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:1846:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1847:22: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1847:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1854:30: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1854:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1855:29: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1855:29: call_function: calling ‘uev_add_map’ from ‘uev_trigger’
#  690|   	condlog(4, "%s: updating new map", mpp->alias);
#  691|   	if (adopt_paths(vecs->pathvec, mpp, NULL)) {
#  692|-> 		condlog(0, "%s: failed to adopt paths for new map update",
#  693|   			mpp->alias);
#  694|   		retries = -1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def170]
multipath-tools-0.13.0/multipathd/main.c:698:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mpp’
multipath-tools-0.13.0/multipathd/main.c:1820:1: enter_function: entry to ‘uev_trigger’
multipath-tools-0.13.0/multipathd/main.c:1838:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:1846:22: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:1846:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1847:22: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1847:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1854:30: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1854:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1855:29: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1855:29: call_function: calling ‘uev_add_map’ from ‘uev_trigger’
#  696|   	}
#  697|   	verify_paths(mpp);
#  698|-> 	if (VECTOR_SIZE(mpp->paths) == 0 &&
#  699|   	    flush_map_nopaths(mpp, vecs))
#  700|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def171]
multipath-tools-0.13.0/multipathd/main.c:719:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mpp’
multipath-tools-0.13.0/multipathd/main.c:1820:1: enter_function: entry to ‘uev_trigger’
multipath-tools-0.13.0/multipathd/main.c:1838:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:1846:22: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:1846:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1847:22: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1847:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1854:30: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1854:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:1855:29: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:1855:29: call_function: calling ‘uev_add_map’ from ‘uev_trigger’
#  717|   fail:
#  718|   	if (new_map && wait_for_events(mpp, vecs)) {
#  719|-> 		condlog(0, "%s: failed to create new map", mpp->alias);
#  720|   		remove_map(mpp, vecs->pathvec, vecs->mpvec);
#  721|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def172]
multipath-tools-0.13.0/multipathd/main.c:2055:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.13.0/multipathd/main.c:2050:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:2055:13: danger: dereference of NULL ‘pgp’
# 2053|   	pgp = VECTOR_SLOT(pp->mpp->pg, pp->pgindex - 1);
# 2054|   
# 2055|-> 	if (pgp->status == PGSTATE_DISABLED) {
# 2056|   		condlog(2, "%s: enable group #%i", pp->mpp->alias, pp->pgindex);
# 2057|   		dm_enablegroup(pp->mpp->alias, pp->pgindex);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def173]
multipath-tools-0.13.0/multipathd/main.c:2076:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.13.0/multipathd/main.c:2072:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:2075:15: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:2076:9: danger: dereference of NULL ‘pgp’
# 2074|   
# 2075|   	pgp = VECTOR_SLOT(pp->mpp->pg, pp->pgindex - 1);
# 2076|-> 	vector_foreach_slot(pgp->paths, pp1, i) {
# 2077|   		if (pp1 == pp)
# 2078|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def174]
multipath-tools-0.13.0/multipathd/main.c:3376:21: warning[-Wanalyzer-null-argument]: use of NULL ‘new’ where non-null expected
multipath-tools-0.13.0/multipathd/main.c:3383:13: enter_function: entry to ‘reconfigure_check’
multipath-tools-0.13.0/multipathd/main.c:3388:12: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/main.c:3390:17: branch_true: ...to here
multipath-tools-0.13.0/multipathd/main.c:3396:13: call_function: calling ‘reconfigure_check_uid_attrs’ from ‘reconfigure_check’
# 3374|   		char *new = VECTOR_SLOT(new_attrs, i);
# 3375|   
# 3376|-> 		if (strcmp(old, new))
# 3377|   			return true;
# 3378|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def175]
multipath-tools-0.13.0/multipathd/main.c:4030:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dev_null_fd’
multipath-tools-0.13.0/multipathd/main.c:4034:1: enter_function: entry to ‘daemonize’
multipath-tools-0.13.0/multipathd/main.c:4039:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4046:9: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4050:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4053:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4056:23: acquire_resource: opened here
multipath-tools-0.13.0/multipathd/main.c:4057:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4063:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4063:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4068:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4068:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4073:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4073:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4078:22: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4037:13: call_function: calling ‘cleanup_close’ from ‘daemonize’
# 4028|   	if (*pfd != -1 && *pfd != STDIN_FILENO && *pfd != STDOUT_FILENO &&
# 4029|   	    *pfd != STDERR_FILENO)
# 4030|-> 		close(*pfd);
# 4031|   }
# 4032|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def176]
multipath-tools-0.13.0/multipathd/main.c:4063:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
multipath-tools-0.13.0/multipathd/main.c:4039:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4046:9: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4050:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4053:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4057:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4063:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4063:13: acquire_resource: opened here
multipath-tools-0.13.0/multipathd/main.c:4063:12: danger: ‘dup2(open("/dev/null", 2), 0)’ leaks here; was opened at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
# 4061|   	}
# 4062|   
# 4063|-> 	if (dup2(dev_null_fd, STDIN_FILENO) < 0) {
# 4064|   		fprintf(stderr, "cannot dup2 /dev/null to stdin : %s\n",
# 4065|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def177]
multipath-tools-0.13.0/multipathd/main.c:4068:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
multipath-tools-0.13.0/multipathd/main.c:4039:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4046:9: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4050:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4053:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4057:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4063:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4063:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4068:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4068:13: acquire_resource: opened here
multipath-tools-0.13.0/multipathd/main.c:4068:12: danger: ‘dup2(open("/dev/null", 2), 1)’ leaks here; was opened at [(11)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/10)
# 4066|   		_exit(0);
# 4067|   	}
# 4068|-> 	if (dup2(dev_null_fd, STDOUT_FILENO) < 0) {
# 4069|   		fprintf(stderr, "cannot dup2 /dev/null to stdout : %s\n",
# 4070|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
multipath-tools-0.13.0/multipathd/main.c:4073:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
multipath-tools-0.13.0/multipathd/main.c:4039:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4046:9: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4050:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4053:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4057:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4063:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4063:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4068:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4068:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4073:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4073:13: acquire_resource: opened here
multipath-tools-0.13.0/multipathd/main.c:4073:12: danger: ‘dup2(open("/dev/null", 2), 2)’ leaks here; was opened at [(13)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/12)
# 4071|   		_exit(0);
# 4072|   	}
# 4073|-> 	if (dup2(dev_null_fd, STDERR_FILENO) < 0) {
# 4074|   		fprintf(stderr, "cannot dup /dev/null to stderr : %s\n",
# 4075|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def179]
multipath-tools-0.13.0/multipathd/main.c:4080:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dev_null_fd’
multipath-tools-0.13.0/multipathd/main.c:4039:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4043:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4046:9: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4050:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.13.0/multipathd/main.c:4053:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4056:23: acquire_resource: opened here
multipath-tools-0.13.0/multipathd/main.c:4057:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4063:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4063:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4068:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4068:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4073:13: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4073:12: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/main.c:4078:22: branch_false: ...to here
multipath-tools-0.13.0/multipathd/main.c:4080:1: danger: ‘dev_null_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
# 4078|   	daemon_pid = getpid();
# 4079|   	return 0;
# 4080|-> }
# 4081|   
# 4082|   int

Error: GCC_ANALYZER_WARNING (CWE-476): [#def180]
multipath-tools-0.13.0/multipathd/multipathc.c:97:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘kw’
multipath-tools-0.13.0/multipathd/multipathc.c:53:12: branch_true: following ‘true’ branch (when ‘state == 0’)...
multipath-tools-0.13.0/multipathd/multipathc.c:55:27: branch_true: ...to here
multipath-tools-0.13.0/multipathd/multipathc.c:69:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/multipathc.c:91:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/multipathc.c:92:30: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/multipathc.c:97:30: branch_false: ...to here
multipath-tools-0.13.0/multipathd/multipathc.c:97:30: danger: dereference of NULL ‘kw’
#   95|   			 * parameter, not the keyword. Don't delete it.
#   96|   			 */
#   97|-> 			if (!kw->param) {
#   98|   				free_key(kw);
#   99|   				vector_del_slot(v, VECTOR_SIZE(v) - 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
multipath-tools-0.13.0/multipathd/multipathc.c:175:49: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*kw.str)’
multipath-tools-0.13.0/multipathd/multipathc.c:53:12: branch_true: following ‘true’ branch (when ‘state == 0’)...
multipath-tools-0.13.0/multipathd/multipathc.c:55:27: branch_true: ...to here
multipath-tools-0.13.0/multipathd/multipathc.c:69:20: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/multipathc.c:135:20: branch_false: following ‘false’ branch (when ‘r != 22’)...
multipath-tools-0.13.0/multipathd/multipathc.c:143:20: branch_false: ...to here
multipath-tools-0.13.0/multipathd/multipathc.c:143:20: branch_false: following ‘false’ branch (when ‘r != 2’)...
multipath-tools-0.13.0/multipathd/multipathc.c:143:20: branch_false: ...to here
multipath-tools-0.13.0/multipathd/multipathc.c:146:17: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/multipathc.c:152:28: branch_false: following ‘false’ branch (when ‘vlen <= 3’)...
multipath-tools-0.13.0/multipathd/multipathc.c:158:33: branch_false: ...to here
multipath-tools-0.13.0/multipathd/multipathc.c:174:44: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/multipathc.c:176:72: branch_true: ...to here
multipath-tools-0.13.0/multipathd/multipathc.c:176:65: acquire_memory: allocated here
multipath-tools-0.13.0/multipathd/multipathc.c:175:49: danger: ‘strdup(*kw.str)’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  173|   						continue;
#  174|   					if (vector_alloc_slot(completions))
#  175|-> 						vector_set_slot(completions,
#  176|   								strdup(kw->str));
#  177|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def182]
multipath-tools-0.13.0/multipathd/uxlsnr.c:515:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘kw’
multipath-tools-0.13.0/multipathd/uxlsnr.c:455:12: enter_function: entry to ‘client_state_machine’
multipath-tools-0.13.0/multipathd/uxlsnr.c:510:28: call_function: calling ‘parse_cmd’ from ‘client_state_machine’
multipath-tools-0.13.0/multipathd/uxlsnr.c:510:28: return_function: returning to ‘client_state_machine’ from ‘parse_cmd’
multipath-tools-0.13.0/multipathd/uxlsnr.c:511:20: branch_true: following ‘true’ branch...
multipath-tools-0.13.0/multipathd/uxlsnr.c:513:42: branch_true: ...to here
multipath-tools-0.13.0/multipathd/uxlsnr.c:515:28: branch_false: following ‘false’ branch...
multipath-tools-0.13.0/multipathd/uxlsnr.c:515:44: branch_false: ...to here
multipath-tools-0.13.0/multipathd/uxlsnr.c:515:44: danger: dereference of NULL ‘kw’
#  513|   			struct key *kw = VECTOR_SLOT(c->cmdvec, 0);
#  514|   
#  515|-> 			if (!c->is_root && kw->code != VRB_LIST) {
#  516|   				c->error = -EPERM;
#  517|   				condlog(0, "%s: cli[%d]: unauthorized cmd \"%s\"",

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-83.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namedevice-mapper-multipath-0.13.0-1.fc44
store-results-to/tmp/tmpn6xz970i/device-mapper-multipath-0.13.0-1.fc44.tar.xz
time-created2026-01-08 15:54:35
time-finished2026-01-08 15:56:13
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpn6xz970i/device-mapper-multipath-0.13.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpn6xz970i/device-mapper-multipath-0.13.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9