rdma-core-59.0-4.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-88): [#def1]
/usr/bin/dump_lfts.sh:8:19: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#    6|   #
#    7|   
#    8|-> /usr/bin/dump_fts $@
#    9|   echo ""
#   10|   echo "*** WARNING ***: this command has been replaced by dump_fts"

Error: SHELLCHECK_WARNING (CWE-88): [#def2]
/usr/bin/dump_mfts.sh:8:22: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#    6|   #
#    7|   
#    8|-> /usr/bin/dump_fts -M $@
#    9|   echo ""
#   10|   echo "*** WARNING ***: this command has been replaced by dump_fts -M"

Error: SHELLCHECK_WARNING (CWE-156): [#def3]
/usr/bin/ibcheckerrors:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-b] [-v] [-N | -nocolor]"\
#    7|   	    "[<topology-file> | -C ca_name -P ca_port -t(imeout) timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def4]
/usr/bin/ibcheckerrors:16:17: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined.
#   14|   }
#   15|   
#   16|-> trap user_abort SIGINT
#   17|   
#   18|   gflags=""

Error: SHELLCHECK_WARNING (CWE-563): [#def5]
/usr/bin/ibcheckerrors:22:1: warning[SC2034]: ntype appears unused. Verify use (or export if used externally).
#   20|   brief=""
#   21|   v=0
#   22|-> ntype=""
#   23|   nodeguid=""
#   24|   topofile=""

Error: SHELLCHECK_WARNING (CWE-563): [#def6]
/usr/bin/ibcheckerrors:23:1: warning[SC2034]: nodeguid appears unused. Verify use (or export if used externally).
#   21|   v=0
#   22|   ntype=""
#   23|-> nodeguid=""
#   24|   topofile=""
#   25|   ca_info=""

Error: SHELLCHECK_WARNING (CWE-156): [#def7]
/usr/bin/ibcheckerrs:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-b] [-v] [-G] [-T <threshold_file>]" \
#    7|   	    "[-s(how_thresholds)] [-N \| -nocolor] [-C ca_name] [-P ca_port]" \
#    8|   	    "[-t(imeout) timeout_ms] <lid|guid> [<port>]"

Error: SHELLCHECK_WARNING: [#def8]
/usr/bin/ibcheckerrs:20:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   18|   	fi
#   19|   	if [ "$verbose" = "yes" ]; then
#   20|-> 		echo -e "\\033[1;032m" $1 "\\033[0;39m"
#   21|   	fi
#   22|   }

Error: SHELLCHECK_WARNING: [#def9]
/usr/bin/ibcheckerrs:29:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   27|   		return
#   28|   	fi
#   29|-> 	echo -e "\\033[1;031m" $1 "\\033[0;39m"
#   30|   }
#   31|   

Error: SHELLCHECK_WARNING: [#def10]
/usr/bin/ibcheckerrs:143:15: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  141|   
#  142|   if [ "$suppress_deprecated" = "no" ]; then
#  143|-> /usr/bin/echo -e "*** WARNING ***: this command is deprecated; Please use \"ibqueryerrors\"\n\n" 1>&2
#  144|   fi
#  145|   

Error: SHELLCHECK_WARNING: [#def11]
/usr/bin/ibcheckerrs:148:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  146|   if [ "$guid_addr" ]; then
#  147|   	if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit 255} {print $3}'`; then
#  148|-> 		echo -n "guid $1 address resolution: "
#  149|   		red "FAILED"
#  150|   		exit 255

Error: SHELLCHECK_WARNING (CWE-563): [#def12]
/usr/bin/ibcheckerrs:152:2: warning[SC2034]: guid appears unused. Verify use (or export if used externally).
#  150|   		exit 255
#  151|   	fi
#  152|-> 	guid=$1
#  153|   else
#  154|   	lid=$1

Error: SHELLCHECK_WARNING (CWE-563): [#def13]
/usr/bin/ibcheckerrs:155:7: warning[SC2034]: temp appears unused. Verify use (or export if used externally).
#  153|   else
#  154|   	lid=$1
#  155|-> 	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#  156|   		echo -n "lid $1 address resolution: "
#  157|   		red "FAILED"

Error: SHELLCHECK_WARNING: [#def14]
/usr/bin/ibcheckerrs:156:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  154|   	lid=$1
#  155|   	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#  156|-> 		echo -n "lid $1 address resolution: "
#  157|   		red "FAILED"
#  158|   		exit 255

Error: SHELLCHECK_WARNING: [#def15]
/usr/bin/ibcheckerrs:168:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  166|   if echo $text | grep -q 'AllPortSelect not supported'; then
#  167|   	if [ "$verbose" = "yes" ]; then
#  168|-> 		echo -n "Error check on lid $lid ($nodename) port $portname: "
#  169|   		green "AllPortSelect not supported"
#  170|   	fi

Error: SHELLCHECK_WARNING: [#def16]
/usr/bin/ibcheckerrs:231:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  229|   }' 2>&1 && test $rv -eq 0 ; then
#  230|   	if [ "$verbose" = "yes" ]; then
#  231|-> 		echo -n "Error check on lid $lid ($nodename) port $portname: "
#  232|   		green OK
#  233|   	fi

Error: SHELLCHECK_WARNING: [#def17]
/usr/bin/ibcheckerrs:236:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  234|   	exit 0
#  235|   else
#  236|-> 	echo -n "Error check on lid $lid ($nodename) port $portname: "
#  237|   	red FAILED
#  238|   	exit 255

Error: SHELLCHECK_WARNING (CWE-156): [#def18]
/usr/bin/ibchecknet:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor]" \
#    7|   	    "[<topology-file> | -C ca_name -P ca_port -t(imeout) timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def19]
/usr/bin/ibchecknet:16:17: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined.
#   14|   }
#   15|   
#   16|-> trap user_abort SIGINT
#   17|   
#   18|   gflags=""

Error: SHELLCHECK_WARNING (CWE-563): [#def20]
/usr/bin/ibchecknet:21:1: warning[SC2034]: oldlid appears unused. Verify use (or export if used externally).
#   19|   verbose=""
#   20|   v=0
#   21|-> oldlid=""
#   22|   topofile=""
#   23|   ca_info=""

Error: SHELLCHECK_WARNING (CWE-457): [#def21]
/usr/bin/ibchecknet:82:74: warning[SC2154]: brief is referenced but not assigned.
#   80|   		return 1;
#   81|   	}
#   82|-> 	if (system("'$IBPATH'/ibcheckerrs -S '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
#   83|   		return  2;
#   84|   	return 0;

Error: SHELLCHECK_WARNING (CWE-156): [#def22]
/usr/bin/ibchecknode:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor] [-G]" \
#    7|   	    "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] <lid|guid>"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def23]
/usr/bin/ibchecknode:19:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   17|   	fi
#   18|   	if [ "$verbose" = "yes" ]; then
#   19|-> 		echo -e "\\033[1;032m" $1 "\\033[0;39m"
#   20|   	fi
#   21|   }

Error: SHELLCHECK_WARNING: [#def24]
/usr/bin/ibchecknode:28:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   26|   		return
#   27|   	fi
#   28|-> 	echo -e "\\033[1;031m" $1 "\\033[0;39m"
#   29|   }
#   30|   

Error: SHELLCHECK_WARNING: [#def25]
/usr/bin/ibchecknode:78:15: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   76|   
#   77|   if [ "$suppress_deprecated" = "no" ]; then
#   78|-> /usr/bin/echo -e "*** WARNING ***: this command is deprecated; Please use \"smpquery nodeinfo\"\n\n" 1>&2
#   79|   fi
#   80|   

Error: SHELLCHECK_WARNING: [#def26]
/usr/bin/ibchecknode:83:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   81|   if [ "$guid_addr" ]; then
#   82|   	if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit 255} {print $3}'`; then
#   83|-> 		echo -n "guid $1 address resolution: "
#   84|   		red "FAILED"
#   85|   		exit 255

Error: SHELLCHECK_WARNING (CWE-563): [#def27]
/usr/bin/ibchecknode:89:7: warning[SC2034]: temp appears unused. Verify use (or export if used externally).
#   87|   else
#   88|   	lid=$1
#   89|-> 	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#   90|   		echo -n "lid $1 address resolution: "
#   91|   		red "FAILED"

Error: SHELLCHECK_WARNING: [#def28]
/usr/bin/ibchecknode:90:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   88|   	lid=$1
#   89|   	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#   90|-> 		echo -n "lid $1 address resolution: "
#   91|   		red "FAILED"
#   92|   		exit 255

Error: SHELLCHECK_WARNING: [#def29]
/usr/bin/ibchecknode:100:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   98|   if $IBPATH/smpquery $ca_info nodeinfo $lid > /dev/null 2>&1 ; then
#   99|   	if [ "$verbose" = "yes" ]; then
#  100|-> 		echo -n "Node check lid $lid: "
#  101|   		green OK
#  102|   	fi

Error: SHELLCHECK_WARNING: [#def30]
/usr/bin/ibchecknode:105:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  103|   	exit 0
#  104|   else
#  105|-> 	echo -n "Node check lid $lid: "
#  106|   	red FAILED
#  107|   	exit 255

Error: SHELLCHECK_WARNING (CWE-156): [#def31]
/usr/bin/ibcheckport:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor] [-G]" \
#    7|   	   "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] <lid|guid> <port>"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def32]
/usr/bin/ibcheckport:19:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   17|   	fi
#   18|   	if [ "$verbose" = "yes" ]; then
#   19|-> 		echo -e "\\033[1;032m" $1 "\\033[0;39m"
#   20|   	fi
#   21|   }

Error: SHELLCHECK_WARNING: [#def33]
/usr/bin/ibcheckport:28:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   26|   		return
#   27|   	fi
#   28|-> 	echo -e "\\033[1;031m" $1 "\\033[0;39m"
#   29|   }
#   30|   

Error: SHELLCHECK_WARNING: [#def34]
/usr/bin/ibcheckport:80:15: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   78|   
#   79|   if [ "$suppress_deprecated" = "no" ]; then
#   80|-> /usr/bin/echo -e "*** WARNING ***: this command is deprecated\n\n" 1>&2
#   81|   fi
#   82|   

Error: SHELLCHECK_WARNING: [#def35]
/usr/bin/ibcheckport:85:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   83|   if [ "$guid_addr" ]; then
#   84|   	if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit 255} {print $3}'`; then
#   85|-> 		echo -n "guid $1 address resolution: "
#   86|   		red "FAILED"
#   87|   		exit 255

Error: SHELLCHECK_WARNING (CWE-563): [#def36]
/usr/bin/ibcheckport:89:2: warning[SC2034]: guid appears unused. Verify use (or export if used externally).
#   87|   		exit 255
#   88|   	fi
#   89|-> 	guid=$1
#   90|   else
#   91|   	lid=$1

Error: SHELLCHECK_WARNING (CWE-563): [#def37]
/usr/bin/ibcheckport:92:7: warning[SC2034]: temp appears unused. Verify use (or export if used externally).
#   90|   else
#   91|   	lid=$1
#   92|-> 	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#   93|   		echo -n "lid $1 address resolution: "
#   94|   		red "FAILED"

Error: SHELLCHECK_WARNING: [#def38]
/usr/bin/ibcheckport:93:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   91|   	lid=$1
#   92|   	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#   93|-> 		echo -n "lid $1 address resolution: "
#   94|   		red "FAILED"
#   95|   		exit 255

Error: SHELLCHECK_WARNING (CWE-477): [#def39]
/usr/bin/ibcheckport:101:19: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   99|   is_switch=`$IBPATH/smpquery $ca_info nodeinfo $lid $portnum | awk -F '[.:]*' '/^NodeType/{ if ($2 == "Switch") {print 1}}'`
#  100|   
#  101|-> if [ "$is_switch" -a "$portnum" == "0" ]; then
#  102|   	ignore_check=true
#  103|   fi

Error: SHELLCHECK_WARNING: [#def40]
/usr/bin/ibcheckport:101:33: warning[SC3014]: In POSIX sh, == in place of = is undefined.
#   99|   is_switch=`$IBPATH/smpquery $ca_info nodeinfo $lid $portnum | awk -F '[.:]*' '/^NodeType/{ if ($2 == "Switch") {print 1}}'`
#  100|   
#  101|-> if [ "$is_switch" -a "$portnum" == "0" ]; then
#  102|   	ignore_check=true
#  103|   fi

Error: SHELLCHECK_WARNING: [#def41]
/usr/bin/ibcheckport:149:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  147|   }' 2>&1 && test $rv -eq 0 ; then
#  148|   	if [ "$verbose" = "yes" ]; then
#  149|-> 		echo -n "Port check lid $lid port $portnum: "
#  150|   		green "OK"
#  151|   	fi

Error: SHELLCHECK_WARNING: [#def42]
/usr/bin/ibcheckport:154:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  152|   	exit 0
#  153|   else
#  154|-> 	echo -n "Port check lid $lid port $portnum: "
#  155|   	red "FAILED"
#  156|   	exit 255

Error: SHELLCHECK_WARNING (CWE-156): [#def43]
/usr/bin/ibcheckportstate:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor] [-G]" \
#    7|   	   "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] <lid|guid> <port>"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def44]
/usr/bin/ibcheckportstate:19:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   17|   	fi
#   18|   	if [ "$verbose" = "yes" ]; then
#   19|-> 		echo -e "\\033[1;032m" $1 "\\033[0;39m"
#   20|   	fi
#   21|   }

Error: SHELLCHECK_WARNING: [#def45]
/usr/bin/ibcheckportstate:28:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   26|   		return
#   27|   	fi
#   28|-> 	echo -e "\\033[1;031m" $1 "\\033[0;39m"
#   29|   }
#   30|   

Error: SHELLCHECK_WARNING: [#def46]
/usr/bin/ibcheckportstate:80:15: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   78|   
#   79|   if [ "$suppress_deprecated" = "no" ]; then
#   80|-> /usr/bin/echo -e "*** WARNING ***: this command is deprecated\n\n" 1>&2
#   81|   fi
#   82|   

Error: SHELLCHECK_WARNING: [#def47]
/usr/bin/ibcheckportstate:85:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   83|   if [ "$guid_addr" ]; then
#   84|   	if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit 255} {print $3}'`; then
#   85|-> 		echo -n "guid $1 address resolution: "
#   86|   		red "FAILED"
#   87|   		exit 255

Error: SHELLCHECK_WARNING (CWE-563): [#def48]
/usr/bin/ibcheckportstate:89:2: warning[SC2034]: guid appears unused. Verify use (or export if used externally).
#   87|   		exit 255
#   88|   	fi
#   89|-> 	guid=$1
#   90|   else
#   91|   	lid=$1

Error: SHELLCHECK_WARNING (CWE-563): [#def49]
/usr/bin/ibcheckportstate:92:7: warning[SC2034]: temp appears unused. Verify use (or export if used externally).
#   90|   else
#   91|   	lid=$1
#   92|-> 	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#   93|   		echo -n "lid $1 address resolution: "
#   94|   		red "FAILED"

Error: SHELLCHECK_WARNING: [#def50]
/usr/bin/ibcheckportstate:93:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   91|   	lid=$1
#   92|   	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#   93|-> 		echo -n "lid $1 address resolution: "
#   94|   		red "FAILED"
#   95|   		exit 255

Error: SHELLCHECK_WARNING: [#def51]
/usr/bin/ibcheckportstate:136:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  134|   }' 2>&1 && test $rv -eq 0 ; then
#  135|   	if [ "$verbose" = "yes" ]; then
#  136|-> 		echo -n "Port check lid $lid port $portnum: "
#  137|   		green "OK"
#  138|   	fi

Error: SHELLCHECK_WARNING: [#def52]
/usr/bin/ibcheckportstate:141:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  139|   	exit 0
#  140|   else
#  141|-> 	echo -n "Port check lid $lid port $portnum: "
#  142|   	red "FAILED"
#  143|   	exit 255

Error: SHELLCHECK_WARNING (CWE-156): [#def53]
/usr/bin/ibcheckportwidth:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor] [-G]" \
#    7|   	   "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] <lid|guid> <port>"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def54]
/usr/bin/ibcheckportwidth:19:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   17|   	fi
#   18|   	if [ "$verbose" = "yes" ]; then
#   19|-> 		echo -e "\\033[1;032m" $1 "\\033[0;39m"
#   20|   	fi
#   21|   }

Error: SHELLCHECK_WARNING: [#def55]
/usr/bin/ibcheckportwidth:28:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   26|   		return
#   27|   	fi
#   28|-> 	echo -e "\\033[1;031m" $1 "\\033[0;39m"
#   29|   }
#   30|   

Error: SHELLCHECK_WARNING: [#def56]
/usr/bin/ibcheckportwidth:80:15: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   78|   
#   79|   if [ "$suppress_deprecated" = "no" ]; then
#   80|-> /usr/bin/echo -e "*** WARNING ***: this command is deprecated\n\n" 1>&2
#   81|   fi
#   82|   

Error: SHELLCHECK_WARNING: [#def57]
/usr/bin/ibcheckportwidth:85:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   83|   if [ "$guid_addr" ]; then
#   84|   	if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit 255} {print $3}'`; then
#   85|-> 		echo -n "guid $1 address resolution: "
#   86|   		red "FAILED"
#   87|   		exit 255

Error: SHELLCHECK_WARNING (CWE-563): [#def58]
/usr/bin/ibcheckportwidth:89:2: warning[SC2034]: guid appears unused. Verify use (or export if used externally).
#   87|   		exit 255
#   88|   	fi
#   89|-> 	guid=$1
#   90|   else
#   91|   	lid=$1

Error: SHELLCHECK_WARNING (CWE-563): [#def59]
/usr/bin/ibcheckportwidth:92:7: warning[SC2034]: temp appears unused. Verify use (or export if used externally).
#   90|   else
#   91|   	lid=$1
#   92|-> 	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#   93|   		echo -n "lid $1 address resolution: "
#   94|   		red "FAILED"

Error: SHELLCHECK_WARNING: [#def60]
/usr/bin/ibcheckportwidth:93:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   91|   	lid=$1
#   92|   	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#   93|-> 		echo -n "lid $1 address resolution: "
#   94|   		red "FAILED"
#   95|   		exit 255

Error: SHELLCHECK_WARNING: [#def61]
/usr/bin/ibcheckportwidth:134:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  132|   }' 2>&1 && test $rv -eq 0 ; then
#  133|   	if [ "$verbose" = "yes" ]; then
#  134|-> 		echo -n "Port check lid $lid port $portnum: "
#  135|   		green "OK"
#  136|   	fi

Error: SHELLCHECK_WARNING: [#def62]
/usr/bin/ibcheckportwidth:139:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  137|   	exit 0
#  138|   else
#  139|-> 	echo -n "Port check lid $lid port $portnum: "
#  140|   	red "FAILED"
#  141|   	exit 255

Error: SHELLCHECK_WARNING (CWE-156): [#def63]
/usr/bin/ibcheckstate:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor]" \
#    7|   	    "[<topology-file> | -C ca_name -P ca_port -t(imeout) timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def64]
/usr/bin/ibcheckstate:16:17: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined.
#   14|   }
#   15|   
#   16|-> trap user_abort SIGINT
#   17|   
#   18|   gflags=""

Error: SHELLCHECK_WARNING (CWE-563): [#def65]
/usr/bin/ibcheckstate:21:1: warning[SC2034]: ntype appears unused. Verify use (or export if used externally).
#   19|   verbose=""
#   20|   v=0
#   21|-> ntype=""
#   22|   nodeguid=""
#   23|   oldlid=""

Error: SHELLCHECK_WARNING (CWE-563): [#def66]
/usr/bin/ibcheckstate:22:1: warning[SC2034]: nodeguid appears unused. Verify use (or export if used externally).
#   20|   v=0
#   21|   ntype=""
#   22|-> nodeguid=""
#   23|   oldlid=""
#   24|   topofile=""

Error: SHELLCHECK_WARNING (CWE-563): [#def67]
/usr/bin/ibcheckstate:23:1: warning[SC2034]: oldlid appears unused. Verify use (or export if used externally).
#   21|   ntype=""
#   22|   nodeguid=""
#   23|-> oldlid=""
#   24|   topofile=""
#   25|   ca_info=""

Error: SHELLCHECK_WARNING (CWE-156): [#def68]
/usr/bin/ibcheckwidth:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor]" \
#    7|   	    "[<topology-file> \| -C ca_name -P ca_port -t(imeout) timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def69]
/usr/bin/ibcheckwidth:16:17: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined.
#   14|   }
#   15|   
#   16|-> trap user_abort SIGINT
#   17|   
#   18|   gflags=""

Error: SHELLCHECK_WARNING (CWE-563): [#def70]
/usr/bin/ibcheckwidth:21:1: warning[SC2034]: ntype appears unused. Verify use (or export if used externally).
#   19|   verbose=""
#   20|   v=0
#   21|-> ntype=""
#   22|   nodeguid=""
#   23|   oldlid=""

Error: SHELLCHECK_WARNING (CWE-563): [#def71]
/usr/bin/ibcheckwidth:22:1: warning[SC2034]: nodeguid appears unused. Verify use (or export if used externally).
#   20|   v=0
#   21|   ntype=""
#   22|-> nodeguid=""
#   23|   oldlid=""
#   24|   topofile=""

Error: SHELLCHECK_WARNING (CWE-563): [#def72]
/usr/bin/ibcheckwidth:23:1: warning[SC2034]: oldlid appears unused. Verify use (or export if used externally).
#   21|   ntype=""
#   22|   nodeguid=""
#   23|-> oldlid=""
#   24|   topofile=""
#   25|   ca_info=""

Error: SHELLCHECK_WARNING (CWE-156): [#def73]
/usr/bin/ibclearcounters:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [<topology-file>" \
#    7|   	    "| -C ca_name -P ca_port -t(imeout) timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def74]
/usr/bin/ibclearcounters:16:17: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined.
#   14|   }
#   15|   
#   16|-> trap user_abort SIGINT
#   17|   
#   18|   gflags=""

Error: SHELLCHECK_WARNING (CWE-563): [#def75]
/usr/bin/ibclearcounters:19:1: warning[SC2034]: verbose appears unused. Verify use (or export if used externally).
#   17|   
#   18|   gflags=""
#   19|-> verbose=""
#   20|   v=0
#   21|   topofile=""

Error: SHELLCHECK_WARNING (CWE-563): [#def76]
/usr/bin/ibclearcounters:20:1: warning[SC2034]: v appears unused. Verify use (or export if used externally).
#   18|   gflags=""
#   19|   verbose=""
#   20|-> v=0
#   21|   topofile=""
#   22|   ca_info=""

Error: SHELLCHECK_WARNING (CWE-156): [#def77]
/usr/bin/ibclearerrors:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-N | -nocolor] [<topology-file>" \
#    7|   	    "| -C ca_name -P ca_port -t(imeout) timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def78]
/usr/bin/ibclearerrors:16:17: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined.
#   14|   }
#   15|   
#   16|-> trap user_abort SIGINT
#   17|   
#   18|   gflags=""

Error: SHELLCHECK_WARNING (CWE-563): [#def79]
/usr/bin/ibclearerrors:19:1: warning[SC2034]: verbose appears unused. Verify use (or export if used externally).
#   17|   
#   18|   gflags=""
#   19|-> verbose=""
#   20|   v=0
#   21|   oldlid=""

Error: SHELLCHECK_WARNING (CWE-563): [#def80]
/usr/bin/ibclearerrors:20:1: warning[SC2034]: v appears unused. Verify use (or export if used externally).
#   18|   gflags=""
#   19|   verbose=""
#   20|-> v=0
#   21|   oldlid=""
#   22|   topofile=""

Error: SHELLCHECK_WARNING (CWE-563): [#def81]
/usr/bin/ibclearerrors:21:1: warning[SC2034]: oldlid appears unused. Verify use (or export if used externally).
#   19|   verbose=""
#   20|   v=0
#   21|-> oldlid=""
#   22|   topofile=""
#   23|   ca_info=""

Error: SHELLCHECK_WARNING (CWE-156): [#def82]
/usr/bin/ibdatacounters:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-b] [-v] [-N | -nocolor]" \
#    7|   	    "[<topology-file> \| -C ca_name -P ca_port -t(imeout) timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def83]
/usr/bin/ibdatacounters:16:17: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined.
#   14|   }
#   15|   
#   16|-> trap user_abort SIGINT
#   17|   
#   18|   gflags=""

Error: SHELLCHECK_WARNING (CWE-563): [#def84]
/usr/bin/ibdatacounters:22:1: warning[SC2034]: ntype appears unused. Verify use (or export if used externally).
#   20|   brief=""
#   21|   v=0
#   22|-> ntype=""
#   23|   nodeguid=""
#   24|   topofile=""

Error: SHELLCHECK_WARNING (CWE-563): [#def85]
/usr/bin/ibdatacounters:23:1: warning[SC2034]: nodeguid appears unused. Verify use (or export if used externally).
#   21|   v=0
#   22|   ntype=""
#   23|-> nodeguid=""
#   24|   topofile=""
#   25|   ca_info=""

Error: SHELLCHECK_WARNING (CWE-156): [#def86]
/usr/bin/ibdatacounts:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [-b] [-v] [-G] [-N | -nocolor]" \
#    7|   	    "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] <lid|guid>" \
#    8|   	    "[<port>]"

Error: SHELLCHECK_WARNING: [#def87]
/usr/bin/ibdatacounts:20:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   18|   	fi
#   19|   	if [ "$verbose" = "yes" ]; then
#   20|-> 		echo -e "\\033[1;032m" $1 "\\033[0;39m"
#   21|   	fi
#   22|   }

Error: SHELLCHECK_WARNING: [#def88]
/usr/bin/ibdatacounts:29:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   27|   		return
#   28|   	fi
#   29|-> 	echo -e "\\033[1;031m" $1 "\\033[0;39m"
#   30|   }
#   31|   

Error: SHELLCHECK_WARNING: [#def89]
/usr/bin/ibdatacounts:99:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   97|   if [ "$guid_addr" ]; then
#   98|   	if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit 255} {print $3}'`; then
#   99|-> 		echo -n "guid $1 address resolution: "
#  100|   		red "FAILED"
#  101|   		exit 255

Error: SHELLCHECK_WARNING (CWE-563): [#def90]
/usr/bin/ibdatacounts:103:2: warning[SC2034]: guid appears unused. Verify use (or export if used externally).
#  101|   		exit 255
#  102|   	fi
#  103|-> 	guid=$1
#  104|   else
#  105|   	lid=$1

Error: SHELLCHECK_WARNING (CWE-563): [#def91]
/usr/bin/ibdatacounts:106:7: warning[SC2034]: temp appears unused. Verify use (or export if used externally).
#  104|   else
#  105|   	lid=$1
#  106|-> 	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#  107|   		echo -n "lid $1 address resolution: "
#  108|   		red "FAILED"

Error: SHELLCHECK_WARNING: [#def92]
/usr/bin/ibdatacounts:107:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  105|   	lid=$1
#  106|   	if ! temp=`$IBPATH/ibaddr $ca_info -L $1 | awk '/failed/{exit 255} {print $1}'`; then
#  107|-> 		echo -n "lid $1 address resolution: "
#  108|   		red "FAILED"
#  109|   		exit 255

Error: SHELLCHECK_WARNING: [#def93]
/usr/bin/ibdatacounts:116:15: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  114|   
#  115|   if [ "$suppress_deprecated" = "no" ]; then
#  116|-> /usr/bin/echo -e "*** WARNING ***: this command is deprecated; Please use \"ibqueryerrors --counters\"\n\n" 1>&2
#  117|   fi
#  118|   

Error: SHELLCHECK_WARNING: [#def94]
/usr/bin/ibdatacounts:164:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  162|   }' 2>&1 && test $rv -eq 0 ; then
#  163|   	if [ "$verbose" = "yes" ]; then
#  164|-> 		echo -n "Error on lid $lid ($nodename) port $portname: "
#  165|   		green OK
#  166|   	fi

Error: SHELLCHECK_WARNING: [#def95]
/usr/bin/ibdatacounts:169:7: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  167|   	exit 0
#  168|   else
#  169|-> 	echo -n "Error on lid $lid ($nodename) port $portname: "
#  170|   	red FAILED
#  171|   	exit 255

Error: SHELLCHECK_WARNING (CWE-156): [#def96]
/usr/bin/ibhosts:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [<topology-file> | -y mkey" \
#    7|   	    "-C ca_name -P ca_port -t timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING (CWE-88): [#def97]
/usr/bin/ibnodes:5:17: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#    3|   IBPATH=${IBPATH:-/usr/bin}
#    4|   
#    5|-> $IBPATH/ibhosts $@; $IBPATH/ibswitches $@

Error: SHELLCHECK_WARNING (CWE-88): [#def98]
/usr/bin/ibnodes:5:40: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#    3|   IBPATH=${IBPATH:-/usr/bin}
#    4|   
#    5|-> $IBPATH/ibhosts $@; $IBPATH/ibswitches $@

Error: SHELLCHECK_WARNING (CWE-156): [#def99]
/usr/bin/ibrouters:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [<topology-file> | -y mkey" \
#    7|   	    "-C ca_name -P ca_port -t timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING (CWE-569): [#def100]
/usr/bin/ibstatus:20:23: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#   18|   
#   19|   fatal() {
#   20|-> 	echo "Fatal error: " $*
#   21|   	exit 255
#   22|   }

Error: SHELLCHECK_WARNING (CWE-156): [#def101]
/usr/bin/ibstatus:28:24: warning[SC2046]: Quote this to prevent word splitting.
#   26|   	port_dir="$infiniband_base/$1/ports/$2"
#   27|   	echo "Infiniband device '$1' port $2 status:"
#   28|-> 	echo "	default gid:	" `[ -r $port_dir/gids/0 ] && cat $port_dir/gids/0 || echo unknown`
#   29|   	echo "	base lid:	" `[ -r $port_dir/lid ] && cat $port_dir/lid || echo unknown`
#   30|   	echo "	sm lid:		" `[ -r $port_dir/sm_lid ] && cat $port_dir/sm_lid || echo unknown`

Error: SHELLCHECK_WARNING (CWE-156): [#def102]
/usr/bin/ibstatus:29:21: warning[SC2046]: Quote this to prevent word splitting.
#   27|   	echo "Infiniband device '$1' port $2 status:"
#   28|   	echo "	default gid:	" `[ -r $port_dir/gids/0 ] && cat $port_dir/gids/0 || echo unknown`
#   29|-> 	echo "	base lid:	" `[ -r $port_dir/lid ] && cat $port_dir/lid || echo unknown`
#   30|   	echo "	sm lid:		" `[ -r $port_dir/sm_lid ] && cat $port_dir/sm_lid || echo unknown`
#   31|   	echo "	state:		" `[ -r $port_dir/state ] && cat $port_dir/state || echo unknown`

Error: SHELLCHECK_WARNING (CWE-156): [#def103]
/usr/bin/ibstatus:30:20: warning[SC2046]: Quote this to prevent word splitting.
#   28|   	echo "	default gid:	" `[ -r $port_dir/gids/0 ] && cat $port_dir/gids/0 || echo unknown`
#   29|   	echo "	base lid:	" `[ -r $port_dir/lid ] && cat $port_dir/lid || echo unknown`
#   30|-> 	echo "	sm lid:		" `[ -r $port_dir/sm_lid ] && cat $port_dir/sm_lid || echo unknown`
#   31|   	echo "	state:		" `[ -r $port_dir/state ] && cat $port_dir/state || echo unknown`
#   32|   	echo "	phys state:	" `[ -r $port_dir/phys_state ] && cat $port_dir/phys_state || echo unknown`

Error: SHELLCHECK_WARNING (CWE-156): [#def104]
/usr/bin/ibstatus:31:19: warning[SC2046]: Quote this to prevent word splitting.
#   29|   	echo "	base lid:	" `[ -r $port_dir/lid ] && cat $port_dir/lid || echo unknown`
#   30|   	echo "	sm lid:		" `[ -r $port_dir/sm_lid ] && cat $port_dir/sm_lid || echo unknown`
#   31|-> 	echo "	state:		" `[ -r $port_dir/state ] && cat $port_dir/state || echo unknown`
#   32|   	echo "	phys state:	" `[ -r $port_dir/phys_state ] && cat $port_dir/phys_state || echo unknown`
#   33|   	echo "	rate:		" `[ -r $port_dir/rate ] && cat $port_dir/rate || echo unknown`

Error: SHELLCHECK_WARNING (CWE-156): [#def105]
/usr/bin/ibstatus:32:23: warning[SC2046]: Quote this to prevent word splitting.
#   30|   	echo "	sm lid:		" `[ -r $port_dir/sm_lid ] && cat $port_dir/sm_lid || echo unknown`
#   31|   	echo "	state:		" `[ -r $port_dir/state ] && cat $port_dir/state || echo unknown`
#   32|-> 	echo "	phys state:	" `[ -r $port_dir/phys_state ] && cat $port_dir/phys_state || echo unknown`
#   33|   	echo "	rate:		" `[ -r $port_dir/rate ] && cat $port_dir/rate || echo unknown`
#   34|   	echo "	link_layer:	" `[ -r $port_dir/link_layer ] && cat $port_dir/link_layer || echo IB`

Error: SHELLCHECK_WARNING (CWE-156): [#def106]
/usr/bin/ibstatus:33:18: warning[SC2046]: Quote this to prevent word splitting.
#   31|   	echo "	state:		" `[ -r $port_dir/state ] && cat $port_dir/state || echo unknown`
#   32|   	echo "	phys state:	" `[ -r $port_dir/phys_state ] && cat $port_dir/phys_state || echo unknown`
#   33|-> 	echo "	rate:		" `[ -r $port_dir/rate ] && cat $port_dir/rate || echo unknown`
#   34|   	echo "	link_layer:	" `[ -r $port_dir/link_layer ] && cat $port_dir/link_layer || echo IB`
#   35|   	echo

Error: SHELLCHECK_WARNING (CWE-156): [#def107]
/usr/bin/ibstatus:34:23: warning[SC2046]: Quote this to prevent word splitting.
#   32|   	echo "	phys state:	" `[ -r $port_dir/phys_state ] && cat $port_dir/phys_state || echo unknown`
#   33|   	echo "	rate:		" `[ -r $port_dir/rate ] && cat $port_dir/rate || echo unknown`
#   34|-> 	echo "	link_layer:	" `[ -r $port_dir/link_layer ] && cat $port_dir/link_layer || echo IB`
#   35|   	echo
#   36|   }

Error: SHELLCHECK_WARNING (CWE-156): [#def108]
/usr/bin/ibswitches:6:14: warning[SC2046]: Quote this to prevent word splitting.
#    4|   
#    5|   usage() {
#    6|-> 	echo Usage: `basename $0` "[-h] [<topology-file> | -y mkey" \
#    7|   	    "-C ca_name -P ca_port -t timeout_ms]"
#    8|   	exit 255

Error: SHELLCHECK_WARNING: [#def109]
/usr/bin/set_nodedesc.sh:8:10: warning[SC3028]: In POSIX sh, HOSTNAME is undefined.
#    6|   
#    7|   ib_sysfs="/sys/class/infiniband"
#    8|-> newname="$HOSTNAME"
#    9|   
#   10|   echo ""

Error: SHELLCHECK_WARNING (CWE-398): [#def110]
/usr/bin/set_nodedesc.sh:14:1: warning[SC2113]: 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.
#   12|   echo ""
#   13|   
#   14|-> function usage
#   15|   {
#   16|   	echo "Usage: `basename $0` [-hv] [<name>]"

Error: SHELLCHECK_WARNING: [#def111]
/usr/bin/set_nodedesc.sh:21:48: warning[SC3028]: In POSIX sh, HOSTNAME is undefined.
#   19|   	echo "   -v view all node descriptors"
#   20|   	echo "   [<name>] set name to name specified."
#   21|-> 	echo "      Default is to use the hostname: \"$HOSTNAME\""
#   22|   	exit 2
#   23|   }

Error: SHELLCHECK_WARNING (CWE-398): [#def112]
/usr/bin/set_nodedesc.sh:25:1: warning[SC2113]: 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.
#   23|   }
#   24|   
#   25|-> function viewall
#   26|   {
#   27|      for hca in `ls $ib_sysfs`; do

Error: SHELLCHECK_WARNING (CWE-398): [#def113]
/usr/bin/set_nodedesc.sh:27:15: error[SC2045]: Iterating over ls output is fragile. Use globs.
#   25|   function viewall
#   26|   {
#   27|->    for hca in `ls $ib_sysfs`; do
#   28|         if [ -f $ib_sysfs/$hca/node_desc ]; then
#   29|            echo -n "$hca: "

Error: SHELLCHECK_WARNING: [#def114]
/usr/bin/set_nodedesc.sh:29:15: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   27|      for hca in `ls $ib_sysfs`; do
#   28|         if [ -f $ib_sysfs/$hca/node_desc ]; then
#   29|->          echo -n "$hca: "
#   30|            cat $ib_sysfs/$hca/node_desc
#   31|         else

Error: SHELLCHECK_WARNING: [#def115]
/usr/bin/set_nodedesc.sh:40:4: warning[SC2220]: Invalid flags are not handled. Add a *) case.
#   38|   while getopts "hv" flag
#   39|   do
#   40|->    case $flag in
#   41|         "h") usage;;
#   42|         "v") viewall;;

Error: SHELLCHECK_WARNING (CWE-398): [#def116]
/usr/bin/set_nodedesc.sh:52:12: error[SC2045]: Iterating over ls output is fragile. Use globs.
#   50|   fi
#   51|   
#   52|-> for hca in `ls $ib_sysfs`; do
#   53|      if [ -f $ib_sysfs/$hca/node_desc ]; then
#   54|         echo -n "$newname" >> $ib_sysfs/$hca/node_desc

Error: SHELLCHECK_WARNING: [#def117]
/usr/bin/set_nodedesc.sh:54:12: warning[SC3037]: In POSIX sh, echo flags are undefined.
#   52|   for hca in `ls $ib_sysfs`; do
#   53|      if [ -f $ib_sysfs/$hca/node_desc ]; then
#   54|->       echo -n "$newname" >> $ib_sysfs/$hca/node_desc
#   55|      else
#   56|         logger -s "Failed to set node_desc for : $hca"

Error: SHELLCHECK_WARNING (CWE-477): [#def118]
/usr/lib/dracut/modules.d/05rdma/module-setup.sh:4:19: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#    2|   
#    3|   check() {
#    4|-> 	[ -n "$hostonly" -a -d /sys/class/infiniband_verbs/uverbs0 ] && return 0
#    5|   	[ -n "$hostonly" ] && return 255
#    6|   	return 0

Error: SHELLCHECK_WARNING (CWE-457): [#def119]
/usr/lib/dracut/modules.d/05rdma/module-setup.sh:26:19: warning[SC2154]: systemdsystemunitdir is referenced but not assigned.
#   24|   	inst_rules 60-rdma-persistent-naming.rules 70-persistent-ipoib.rules 75-rdma-description.rules 90-rdma-hw-modules.rules 90-rdma-ulp-modules.rules 90-rdma-umad.rules
#   25|   	inst_multiple -o \
#   26|->                   $systemdsystemunitdir/rdma-hw.target \
#   27|                     $systemdsystemunitdir/rdma-load-modules@.service
#   28|   

Error: SHELLCHECK_WARNING (CWE-457): [#def120]
/usr/lib/dracut/modules.d/05rdma/module-setup.sh:33:25: warning[SC2154]: initdir is referenced but not assigned.
#   31|   		rdma-load-modules@roce.service \
#   32|   		rdma-load-modules@infiniband.service; do
#   33|-> 		$SYSTEMCTL -q --root "$initdir" add-wants initrd.target "$i"
#   34|   	done
#   35|   }

Error: SHELLCHECK_WARNING: [#def121]
/usr/lib/dracut/modules.d/05rdma/module-setup.sh:38:23: error[SC2283]: Remove spaces around = to assign (or use [ ] to compare, or quote '=' if literal).
#   36|   
#   37|   installkernel() {
#   38|-> 	hostonly='' instmods =drivers/infiniband =drivers/net/ethernet/mellanox =drivers/net/ethernet/chelsio =drivers/net/ethernet/cisco =drivers/net/ethernet/emulex =drivers/target
#   39|   	hostonly='' instmods crc-t10dif crct10dif_common xprtrdma svcrdma
#   40|   }

Error: SHELLCHECK_WARNING (CWE-252): [#def122]
/usr/libexec/mlx4-setup.sh:4:1: warning[SC2164]: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.
#    2|   dir="/sys/bus/pci/drivers/mlx4_core"
#    3|   [ ! -d $dir ] && exit 1
#    4|-> pushd $dir >/dev/null
#    5|   
#    6|   function set_dual_port() {

Error: SHELLCHECK_WARNING (CWE-252): [#def123]
/usr/libexec/mlx4-setup.sh:10:2: warning[SC2164]: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.
#    8|   	port1=$2
#    9|   	port2=$3
#   10|-> 	pushd $device >/dev/null
#   11|   	cur_p1=`cat mlx4_port1`
#   12|   	cur_p2=`cat mlx4_port2`

Error: SHELLCHECK_WARNING (CWE-252): [#def124]
/usr/libexec/mlx4-setup.sh:20:4: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#   18|   		if [ "$port2" != "eth" ]; then
#   19|   			echo "In order for port1 to be eth, port2 to must also be eth"
#   20|-> 			popd >/dev/null
#   21|   			return
#   22|   		fi

Error: SHELLCHECK_WARNING (CWE-477): [#def125]
/usr/libexec/mlx4-setup.sh:23:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   21|   			return
#   22|   		fi
#   23|-> 		if [ "$cur_p2" != "eth" -a "$cur_p2" != "auto (eth)" ]; then
#   24|   			tries=0
#   25|   			echo "$port2" > mlx4_port2 2>/dev/null

Error: SHELLCHECK_WARNING (CWE-477): [#def126]
/usr/libexec/mlx4-setup.sh:28:31: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   26|   			sleep .25
#   27|   			cur_p2=`cat mlx4_port2`
#   28|-> 			while [ "$cur_p2" != "eth" -a "$cur_p2" != "auto (eth)" -a $tries -lt 10 ]; do
#   29|   				sleep .25
#   30|   				let tries++

Error: SHELLCHECK_WARNING (CWE-477): [#def127]
/usr/libexec/mlx4-setup.sh:28:60: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   26|   			sleep .25
#   27|   			cur_p2=`cat mlx4_port2`
#   28|-> 			while [ "$cur_p2" != "eth" -a "$cur_p2" != "auto (eth)" -a $tries -lt 10 ]; do
#   29|   				sleep .25
#   30|   				let tries++

Error: SHELLCHECK_WARNING (CWE-477): [#def128]
/usr/libexec/mlx4-setup.sh:33:28: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   31|   				cur_p2=`cat mlx4_port2`
#   32|   			done
#   33|-> 			if [ "$cur_p2" != "eth" -a "$cur_p2" != "auto (eth)" ]; then
#   34|   				echo "Failed to set port2 to eth mode"
#   35|   				popd >/dev/null

Error: SHELLCHECK_WARNING (CWE-252): [#def129]
/usr/libexec/mlx4-setup.sh:35:5: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#   33|   			if [ "$cur_p2" != "eth" -a "$cur_p2" != "auto (eth)" ]; then
#   34|   				echo "Failed to set port2 to eth mode"
#   35|-> 				popd >/dev/null
#   36|   				return
#   37|   			fi

Error: SHELLCHECK_WARNING (CWE-477): [#def130]
/usr/libexec/mlx4-setup.sh:39:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   37|   			fi
#   38|   		fi
#   39|-> 		if [ "$cur_p1" != "eth" -a "$cur_p1" != "auto (eth)" ]; then
#   40|   			tries=0
#   41|   			echo "$port1" > mlx4_port1 2>/dev/null

Error: SHELLCHECK_WARNING (CWE-477): [#def131]
/usr/libexec/mlx4-setup.sh:44:31: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   42|   			sleep .25
#   43|   			cur_p1=`cat mlx4_port1`
#   44|-> 			while [ "$cur_p1" != "eth" -a "$cur_p1" != "auto (eth)" -a $tries -lt 10 ]; do
#   45|   				sleep .25
#   46|   				let tries++

Error: SHELLCHECK_WARNING (CWE-477): [#def132]
/usr/libexec/mlx4-setup.sh:44:60: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   42|   			sleep .25
#   43|   			cur_p1=`cat mlx4_port1`
#   44|-> 			while [ "$cur_p1" != "eth" -a "$cur_p1" != "auto (eth)" -a $tries -lt 10 ]; do
#   45|   				sleep .25
#   46|   				let tries++

Error: SHELLCHECK_WARNING (CWE-477): [#def133]
/usr/libexec/mlx4-setup.sh:49:28: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   47|   				cur_p1=`cat mlx4_port1`
#   48|   			done
#   49|-> 			if [ "$cur_p1" != "eth" -a "$cur_p1" != "auto (eth)" ]; then
#   50|   				echo "Failed to set port1 to eth mode"
#   51|   			fi

Error: SHELLCHECK_WARNING (CWE-252): [#def134]
/usr/libexec/mlx4-setup.sh:53:3: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#   51|   			fi
#   52|   		fi
#   53|-> 		popd >/dev/null
#   54|   		return
#   55|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def135]
/usr/libexec/mlx4-setup.sh:60:29: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   58|   	# so we should be able to successfully set the ports in
#   59|   	# port1 then port2 order
#   60|-> 	if [ "$cur_p1" != "$port1" -o "$cur_p2" != "$port2" ]; then
#   61|   		# Try setting the ports in order first
#   62|   		echo "$port1" > mlx4_port1 2>/dev/null ; sleep .1

Error: SHELLCHECK_WARNING (CWE-477): [#def136]
/usr/libexec/mlx4-setup.sh:68:29: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   66|   	fi
#   67|   
#   68|-> 	if [ "$cur_p1" != "$port1" -o "$cur_p2" != "$port2" ]; then
#   69|   		# Try reverse order this time
#   70|   		echo "$port2" > mlx4_port2 2>/dev/null ; sleep .1

Error: SHELLCHECK_WARNING (CWE-477): [#def137]
/usr/libexec/mlx4-setup.sh:76:29: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   74|   	fi
#   75|   
#   76|-> 	if [ "$cur_p1" != "$port1" -o "$cur_p2" != "$port2" ]; then
#   77|   		echo "Error setting port type on mlx4 device $device"
#   78|   	fi

Error: SHELLCHECK_WARNING (CWE-252): [#def138]
/usr/libexec/mlx4-setup.sh:80:2: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#   78|   	fi
#   79|   
#   80|-> 	popd >/dev/null
#   81|   	return
#   82|   }

Error: SHELLCHECK_WARNING (CWE-477): [#def139]
/usr/libexec/mlx4-setup.sh:88:28: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   86|   	[ -d "$device" ] || continue
#   87|   	[ -z "$port1" ] && continue
#   88|-> 	[ -f "$device/mlx4_port2" -a -z "$port2" ] && continue
#   89|   	[ -f "$device/mlx4_port2" ] && set_dual_port $device $port1 $port2 || echo "$port1" > "$device/mlx4_port1"
#   90|   done

Error: SHELLCHECK_WARNING (CWE-252): [#def140]
/usr/libexec/mlx4-setup.sh:91:1: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#   89|   	[ -f "$device/mlx4_port2" ] && set_dual_port $device $port1 $port2 || echo "$port1" > "$device/mlx4_port1"
#   90|   done
#   91|-> popd 2&>/dev/null

Error: SHELLCHECK_WARNING (CWE-138): [#def141]
/usr/libexec/truescale-serdes.cmds:61:15: error[SC2145]: Argument mixes string and array. Use * or separate argument.
#   59|   warn_and_log()
#   60|   {
#   61|->     echo "$0: $@"
#   62|       logger -t infinipath "$@"
#   63|   }

Error: SHELLCHECK_WARNING (CWE-563): [#def142]
/usr/libexec/truescale-serdes.cmds:69:19: warning[SC2034]: bay_h1 appears unused. Verify use (or export if used externally).
#   67|       local -i nunit=0 bay bl2xB=0 full=0
#   68|       local parmf sysinfo bayinfo mez1bus mez2bus mez3bus=0 tbay
#   69|->     local -a parm bay_h1
#   70|       for parm in parameters/${serdes_parm} ${serdes_parm}; do
#   71|   	if [ -e /sys/module/ib_qib/$parm ]; then

Error: SHELLCHECK_WARNING (CWE-140): [#def143]
/usr/libexec/truescale-serdes.cmds:100:11: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#   98|   
#   99|       read pbase < $parmf
#  100|->     parm=($(echo ${qb}*))
#  101|       nunit=${#parm[*]}
#  102|   

Error: SHELLCHECK_WARNING (CWE-457): [#def144]
/usr/libexec/truescale-serdes.cmds:169:38: warning[SC2154]: mez1_bus is referenced but not assigned (did you mean 'mez1bus'?).
#  167|   	    pbase="${pbase} ${nunit},2=${mez3p2_idx[$bay]},${m3_bay_h1[$bay]}"
#  168|   	else
#  169|-> 	    warn_and_log Mismatch on mezbus ${mez1_bus},${mez2_bus},${mez3_bus} \
#  170|   		and unit ${nunit}, no serdes setup
#  171|   	fi

Error: SHELLCHECK_WARNING (CWE-457): [#def145]
/usr/libexec/truescale-serdes.cmds:169:50: warning[SC2154]: mez2_bus is referenced but not assigned (did you mean 'mez2bus'?).
#  167|   	    pbase="${pbase} ${nunit},2=${mez3p2_idx[$bay]},${m3_bay_h1[$bay]}"
#  168|   	else
#  169|-> 	    warn_and_log Mismatch on mezbus ${mez1_bus},${mez2_bus},${mez3_bus} \
#  170|   		and unit ${nunit}, no serdes setup
#  171|   	fi

Error: SHELLCHECK_WARNING (CWE-457): [#def146]
/usr/libexec/truescale-serdes.cmds:169:62: warning[SC2154]: mez3_bus is referenced but not assigned (did you mean 'mez3bus'?).
#  167|   	    pbase="${pbase} ${nunit},2=${mez3p2_idx[$bay]},${m3_bay_h1[$bay]}"
#  168|   	else
#  169|-> 	    warn_and_log Mismatch on mezbus ${mez1_bus},${mez2_bus},${mez3_bus} \
#  170|   		and unit ${nunit}, no serdes setup
#  171|   	fi

Error: SHELLCHECK_WARNING (CWE-563): [#def147]
/usr/libexec/truescale-serdes.cmds:186:5: warning[SC2034]: bp0_idx appears unused. Verify use (or export if used externally).
#  184|   
#  185|       # tx settings for Dell Backplane v1.0
#  186|->     bp0_idx=( 0 22 23 24 25 26 24 27 28 22 23 24 25 26 24 27 28 )
#  187|       # tx settings for Dell Backplane v1.1
#  188|       bp1_idx=( 0 29 29 30 31 32 33 30 29 29 29 30 31 32 33 30 29 )

Error: SHELLCHECK_WARNING (CWE-563): [#def148]
/usr/libexec/truescale-serdes.cmds:188:5: warning[SC2034]: bp1_idx appears unused. Verify use (or export if used externally).
#  186|       bp0_idx=( 0 22 23 24 25 26 24 27 28 22 23 24 25 26 24 27 28 )
#  187|       # tx settings for Dell Backplane v1.1
#  188|->     bp1_idx=( 0 29 29 30 31 32 33 30 29 29 29 30 31 32 33 30 29 )
#  189|       
#  190|       for parm in parameters/${serdes_parm} ${serdes_parm}; do

Error: SHELLCHECK_WARNING (CWE-140): [#def149]
/usr/libexec/truescale-serdes.cmds:202:12: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  200|   
#  201|       read pbase < $parmf
#  202|->     parm=( $(echo ${qb}*) )
#  203|       nunit=${#parm[*]}
#  204|   

Error: SHELLCHECK_WARNING (CWE-477): [#def150]
/usr/libexec/truescale-serdes.cmds:207:22: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  205|       if [ -e /sys/module/ib_qib/parameters/qme_bp ]; then
#  206|   	read bpver < /sys/module/ib_qib/parameters/qme_bp
#  207|-> 	if [ ${bpver} -ne 0 -a ${bpver} -ne 1 ]; then
#  208|   	    warn_and_log "Invalid Dell backplane version (${bpver}). Defaulting to 1."
#  209|   	    bpver=1

Error: GCC_ANALYZER_WARNING (CWE-775): [#def151]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:341:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  339|   	struct acmp_dest *dest, **tdest;
#  340|   
#  341|-> 	tdest = tfind(addr, &ep->dest_map[addr_type - 1], acmp_compare_dest);
#  342|   	if (tdest) {
#  343|   		dest = *tdest;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def152]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:341:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  339|   	struct acmp_dest *dest, **tdest;
#  340|   
#  341|-> 	tdest = tfind(addr, &ep->dest_map[addr_type - 1], acmp_compare_dest);
#  342|   	if (tdest) {
#  343|   		dest = *tdest;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:341:17: warning[-Wanalyzer-malloc-leak]: leak of ‘addr_ctx’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2387:12: enter_function: entry to ‘__acmp_add_addr’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2416:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2417:12: branch_false: following ‘false’ branch (when ‘addr_ctx’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2421:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2424:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:61: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:16: call_function: calling ‘acmp_acquire_dest’ from ‘__acmp_add_addr’
#  339|   	struct acmp_dest *dest, **tdest;
#  340|   
#  341|-> 	tdest = tfind(addr, &ep->dest_map[addr_type - 1], acmp_compare_dest);
#  342|   	if (tdest) {
#  343|   		dest = *tdest;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:341:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  339|   	struct acmp_dest *dest, **tdest;
#  340|   
#  341|-> 	tdest = tfind(addr, &ep->dest_map[addr_type - 1], acmp_compare_dest);
#  342|   	if (tdest) {
#  343|   		dest = *tdest;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:341:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  339|   	struct acmp_dest *dest, **tdest;
#  340|   
#  341|-> 	tdest = tfind(addr, &ep->dest_map[addr_type - 1], acmp_compare_dest);
#  342|   	if (tdest) {
#  343|   		dest = *tdest;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:341:17: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  339|   	struct acmp_dest *dest, **tdest;
#  340|   
#  341|-> 	tdest = tfind(addr, &ep->dest_map[addr_type - 1], acmp_compare_dest);
#  342|   	if (tdest) {
#  343|   		dest = *tdest;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def157]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:345:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  343|   		dest = *tdest;
#  344|   		(void) atomic_inc(&dest->refcnt);
#  345|-> 		acm_log(2, "%s\n", dest->name);
#  346|   	} else {
#  347|   		dest = NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:345:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  343|   		dest = *tdest;
#  344|   		(void) atomic_inc(&dest->refcnt);
#  345|-> 		acm_log(2, "%s\n", dest->name);
#  346|   	} else {
#  347|   		dest = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:345:17: warning[-Wanalyzer-malloc-leak]: leak of ‘addr_ctx’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2387:12: enter_function: entry to ‘__acmp_add_addr’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2416:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2417:12: branch_false: following ‘false’ branch (when ‘addr_ctx’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2421:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2424:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:61: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:16: call_function: calling ‘acmp_acquire_dest’ from ‘__acmp_add_addr’
#  343|   		dest = *tdest;
#  344|   		(void) atomic_inc(&dest->refcnt);
#  345|-> 		acm_log(2, "%s\n", dest->name);
#  346|   	} else {
#  347|   		dest = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:345:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  343|   		dest = *tdest;
#  344|   		(void) atomic_inc(&dest->refcnt);
#  345|-> 		acm_log(2, "%s\n", dest->name);
#  346|   	} else {
#  347|   		dest = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:345:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  343|   		dest = *tdest;
#  344|   		(void) atomic_inc(&dest->refcnt);
#  345|-> 		acm_log(2, "%s\n", dest->name);
#  346|   	} else {
#  347|   		dest = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:345:17: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  343|   		dest = *tdest;
#  344|   		(void) atomic_inc(&dest->refcnt);
#  345|-> 		acm_log(2, "%s\n", dest->name);
#  346|   	} else {
#  347|   		dest = NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def163]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:348:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  346|   	} else {
#  347|   		dest = NULL;
#  348|-> 		acm_format_name(2, log_data, sizeof log_data,
#  349|   				addr_type, addr, ACM_MAX_ADDRESS);
#  350|   		acm_log(2, "%s not found\n", log_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:348:17: warning[-Wanalyzer-malloc-leak]: leak of ‘addr_ctx’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2387:12: enter_function: entry to ‘__acmp_add_addr’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2416:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2417:12: branch_false: following ‘false’ branch (when ‘addr_ctx’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2421:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2424:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:61: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:16: call_function: calling ‘acmp_acquire_dest’ from ‘__acmp_add_addr’
#  346|   	} else {
#  347|   		dest = NULL;
#  348|-> 		acm_format_name(2, log_data, sizeof log_data,
#  349|   				addr_type, addr, ACM_MAX_ADDRESS);
#  350|   		acm_log(2, "%s not found\n", log_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:348:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  346|   	} else {
#  347|   		dest = NULL;
#  348|-> 		acm_format_name(2, log_data, sizeof log_data,
#  349|   				addr_type, addr, ACM_MAX_ADDRESS);
#  350|   		acm_log(2, "%s not found\n", log_data);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:350:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  348|   		acm_format_name(2, log_data, sizeof log_data,
#  349|   				addr_type, addr, ACM_MAX_ADDRESS);
#  350|-> 		acm_log(2, "%s not found\n", log_data);
#  351|   	}
#  352|   	return dest;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:350:17: warning[-Wanalyzer-malloc-leak]: leak of ‘addr_ctx’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2387:12: enter_function: entry to ‘__acmp_add_addr’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2416:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2417:12: branch_false: following ‘false’ branch (when ‘addr_ctx’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2421:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2424:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:61: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:16: call_function: calling ‘acmp_acquire_dest’ from ‘__acmp_add_addr’
#  348|   		acm_format_name(2, log_data, sizeof log_data,
#  349|   				addr_type, addr, ACM_MAX_ADDRESS);
#  350|-> 		acm_log(2, "%s not found\n", log_data);
#  351|   	}
#  352|   	return dest;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:350:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  348|   		acm_format_name(2, log_data, sizeof log_data,
#  349|   				addr_type, addr, ACM_MAX_ADDRESS);
#  350|-> 		acm_log(2, "%s not found\n", log_data);
#  351|   	}
#  352|   	return dest;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def169]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:368:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  366|   acmp_remove_dest(struct acmp_ep *ep, struct acmp_dest *dest)
#  367|   {
#  368|-> 	acm_log(2, "%s\n", dest->name);
#  369|   	if (!tdelete(dest->address, &ep->dest_map[dest->addr_type - 1],
#  370|   		     acmp_compare_dest))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:368:9: warning[-Wanalyzer-malloc-leak]: leak of ‘addr_ctx’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2387:12: enter_function: entry to ‘__acmp_add_addr’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2416:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2417:12: branch_false: following ‘false’ branch (when ‘addr_ctx’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2421:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2424:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:61: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:16: call_function: calling ‘acmp_acquire_dest’ from ‘__acmp_add_addr’
#  366|   acmp_remove_dest(struct acmp_ep *ep, struct acmp_dest *dest)
#  367|   {
#  368|-> 	acm_log(2, "%s\n", dest->name);
#  369|   	if (!tdelete(dest->address, &ep->dest_map[dest->addr_type - 1],
#  370|   		     acmp_compare_dest))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:368:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  366|   acmp_remove_dest(struct acmp_ep *ep, struct acmp_dest *dest)
#  367|   {
#  368|-> 	acm_log(2, "%s\n", dest->name);
#  369|   	if (!tdelete(dest->address, &ep->dest_map[dest->addr_type - 1],
#  370|   		     acmp_compare_dest))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:382:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  380|   	int64_t rec_expr_minutes;
#  381|   
#  382|-> 	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|   	acm_log(2, "%s\n", log_data);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def173]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:382:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  380|   	int64_t rec_expr_minutes;
#  381|   
#  382|-> 	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|   	acm_log(2, "%s\n", log_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:382:9: warning[-Wanalyzer-malloc-leak]: leak of ‘addr_ctx’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2387:12: enter_function: entry to ‘__acmp_add_addr’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2416:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2417:12: branch_false: following ‘false’ branch (when ‘addr_ctx’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2421:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2424:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:61: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:16: call_function: calling ‘acmp_acquire_dest’ from ‘__acmp_add_addr’
#  380|   	int64_t rec_expr_minutes;
#  381|   
#  382|-> 	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|   	acm_log(2, "%s\n", log_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:382:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  380|   	int64_t rec_expr_minutes;
#  381|   
#  382|-> 	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|   	acm_log(2, "%s\n", log_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:382:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  380|   	int64_t rec_expr_minutes;
#  381|   
#  382|-> 	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|   	acm_log(2, "%s\n", log_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:382:9: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  380|   	int64_t rec_expr_minutes;
#  381|   
#  382|-> 	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|   	acm_log(2, "%s\n", log_data);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:384:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  382|   	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|-> 	acm_log(2, "%s\n", log_data);
#  385|   	pthread_mutex_lock(&ep->lock);
#  386|   	dest = acmp_get_dest(ep, addr_type, addr);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def179]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:384:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  382|   	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|-> 	acm_log(2, "%s\n", log_data);
#  385|   	pthread_mutex_lock(&ep->lock);
#  386|   	dest = acmp_get_dest(ep, addr_type, addr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:384:9: warning[-Wanalyzer-malloc-leak]: leak of ‘addr_ctx’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2387:12: enter_function: entry to ‘__acmp_add_addr’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2416:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2417:12: branch_false: following ‘false’ branch (when ‘addr_ctx’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2421:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2424:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:61: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:16: call_function: calling ‘acmp_acquire_dest’ from ‘__acmp_add_addr’
#  382|   	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|-> 	acm_log(2, "%s\n", log_data);
#  385|   	pthread_mutex_lock(&ep->lock);
#  386|   	dest = acmp_get_dest(ep, addr_type, addr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:384:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  382|   	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|-> 	acm_log(2, "%s\n", log_data);
#  385|   	pthread_mutex_lock(&ep->lock);
#  386|   	dest = acmp_get_dest(ep, addr_type, addr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def182]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:384:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  382|   	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|-> 	acm_log(2, "%s\n", log_data);
#  385|   	pthread_mutex_lock(&ep->lock);
#  386|   	dest = acmp_get_dest(ep, addr_type, addr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:384:9: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
#  382|   	acm_format_name(2, log_data, sizeof log_data,
#  383|   			addr_type, addr, ACM_MAX_ADDRESS);
#  384|-> 	acm_log(2, "%s\n", log_data);
#  385|   	pthread_mutex_lock(&ep->lock);
#  386|   	dest = acmp_get_dest(ep, addr_type, addr);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def184]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:391:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  389|   		rec_expr_minutes = dest->addr_timeout - time_stamp_min();
#  390|   		if (rec_expr_minutes <= 0) {
#  391|-> 			acm_log(2, "Record expired\n");
#  392|   			acmp_remove_dest(ep, dest);
#  393|   			dest = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:391:25: warning[-Wanalyzer-malloc-leak]: leak of ‘addr_ctx’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2387:12: enter_function: entry to ‘__acmp_add_addr’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2416:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2417:12: branch_false: following ‘false’ branch (when ‘addr_ctx’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2421:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2424:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:61: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2429:16: call_function: calling ‘acmp_acquire_dest’ from ‘__acmp_add_addr’
#  389|   		rec_expr_minutes = dest->addr_timeout - time_stamp_min();
#  390|   		if (rec_expr_minutes <= 0) {
#  391|-> 			acm_log(2, "Record expired\n");
#  392|   			acmp_remove_dest(ep, dest);
#  393|   			dest = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:391:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2288:13: enter_function: entry to ‘acmp_parse_hosts_file’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2327:24: call_function: calling ‘acmp_acquire_dest’ from ‘acmp_parse_hosts_file’
#  389|   		rec_expr_minutes = dest->addr_timeout - time_stamp_min();
#  390|   		if (rec_expr_minutes <= 0) {
#  391|-> 			acm_log(2, "Record expired\n");
#  392|   			acmp_remove_dest(ep, dest);
#  393|   			dest = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:423:9: warning[-Wanalyzer-malloc-leak]: leak of ‘req’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:1728:16: enter_function: entry to ‘acmp_queue_req’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:1733:15: call_function: calling ‘acmp_alloc_req’ from ‘acmp_queue_req’
#  421|   	req->id = id;
#  422|   	memcpy(&req->msg, msg, sizeof(req->msg));
#  423|-> 	acm_log(2, "id %" PRIu64 ", req %p\n", id, req);
#  424|   	return req;
#  425|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def188]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2114:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: call_function: calling ‘acmp_parse_osm_fullv1_lid2guid’ from ‘acmp_parse_osm_fullv1’
# 2112|   			continue;
# 2113|   		if (lid2guid[lid])
# 2114|-> 			acm_log(0, "ERROR - duplicate lid %u\n", lid);
# 2115|   		else
# 2116|   			lid2guid[lid] = htobe64(guid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2114:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: call_function: calling ‘acmp_parse_osm_fullv1_lid2guid’ from ‘acmp_parse_osm_fullv1’
# 2112|   			continue;
# 2113|   		if (lid2guid[lid])
# 2114|-> 			acm_log(0, "ERROR - duplicate lid %u\n", lid);
# 2115|   		else
# 2116|   			lid2guid[lid] = htobe64(guid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2114:25: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: call_function: calling ‘acmp_parse_osm_fullv1_lid2guid’ from ‘acmp_parse_osm_fullv1’
# 2112|   			continue;
# 2113|   		if (lid2guid[lid])
# 2114|-> 			acm_log(0, "ERROR - duplicate lid %u\n", lid);
# 2115|   		else
# 2116|   			lid2guid[lid] = htobe64(guid);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2136:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2134|   	uint8_t addr_type;
# 2135|   
# 2136|-> 	acm_get_gid((struct acm_port *)ep->port->port, 0, &sgid);
# 2137|   
# 2138|   	/* Search for endpoint's SLID */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2136:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2134|   	uint8_t addr_type;
# 2135|   
# 2136|-> 	acm_get_gid((struct acm_port *)ep->port->port, 0, &sgid);
# 2137|   
# 2138|   	/* Search for endpoint's SLID */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2136:9: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2134|   	uint8_t addr_type;
# 2135|   
# 2136|-> 	acm_get_gid((struct acm_port *)ep->port->port, 0, &sgid);
# 2137|   
# 2138|   	/* Search for endpoint's SLID */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def194]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2213:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2211|   
# 2212|   		if (!lid2guid[dlid]) {
# 2213|-> 			acm_log(0, "ERROR - dlid %u not found in lid2guid table\n", dlid);
# 2214|   			continue;
# 2215|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2213:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2211|   
# 2212|   		if (!lid2guid[dlid]) {
# 2213|-> 			acm_log(0, "ERROR - dlid %u not found in lid2guid table\n", dlid);
# 2214|   			continue;
# 2215|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2213:25: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2211|   
# 2212|   		if (!lid2guid[dlid]) {
# 2213|-> 			acm_log(0, "ERROR - dlid %u not found in lid2guid table\n", dlid);
# 2214|   			continue;
# 2215|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def197]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2275:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_true: following ‘true’ branch (when ‘lid2guid’ is NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2275:17: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2275:17: danger: ‘fopen(&route_data_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/0)
# 2273|   	lid2guid = calloc(IB_LID_MCAST_START, sizeof(*lid2guid));
# 2274|   	if (!lid2guid) {
# 2275|-> 		acm_log(0, "ERROR - no memory for path record parsing\n");
# 2276|   		goto err;
# 2277|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2275:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_true: following ‘true’ branch (when ‘lid2guid’ is NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2275:17: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2275:17: danger: ‘fopen(&route_data_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/0)
# 2273|   	lid2guid = calloc(IB_LID_MCAST_START, sizeof(*lid2guid));
# 2274|   	if (!lid2guid) {
# 2275|-> 		acm_log(0, "ERROR - no memory for path record parsing\n");
# 2276|   		goto err;
# 2277|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def199]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2280:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2280:9: danger: ‘fopen(&route_data_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/0)
# 2278|   
# 2279|   	acmp_parse_osm_fullv1_lid2guid(f, lid2guid);
# 2280|-> 	rewind(f);
# 2281|   	ret = acmp_parse_osm_fullv1_paths(f, lid2guid, ep);
# 2282|   	free(lid2guid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2280:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2280:9: danger: ‘fopen(&route_data_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/0)
# 2278|   
# 2279|   	acmp_parse_osm_fullv1_lid2guid(f, lid2guid);
# 2280|-> 	rewind(f);
# 2281|   	ret = acmp_parse_osm_fullv1_paths(f, lid2guid, ep);
# 2282|   	free(lid2guid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2280:9: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2280:9: danger: ‘lid2guid’ leaks here; was allocated at [(3)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/2)
# 2278|   
# 2279|   	acmp_parse_osm_fullv1_lid2guid(f, lid2guid);
# 2280|-> 	rewind(f);
# 2281|   	ret = acmp_parse_osm_fullv1_paths(f, lid2guid, ep);
# 2282|   	free(lid2guid);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def202]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2310:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2307:21: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2307:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2310:17: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2310:17: danger: ‘fopen(&addr_data_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/0)
# 2308|   			continue;
# 2309|   
# 2310|-> 		acm_log(2, "%s", s);
# 2311|   		if (inet_pton(AF_INET6, gid, &ib_addr) <= 0) {
# 2312|   			acm_log(0, "ERROR - %s is not IB GID\n", gid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2310:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2307:21: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2307:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2310:17: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2310:17: danger: ‘fopen(&addr_data_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/0)
# 2308|   			continue;
# 2309|   
# 2310|-> 		acm_log(2, "%s", s);
# 2311|   		if (inet_pton(AF_INET6, gid, &ib_addr) <= 0) {
# 2312|   			acm_log(0, "ERROR - %s is not IB GID\n", gid);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def204]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2312:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2311:20: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2312:25: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2312:25: danger: ‘fopen(&addr_data_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/0)
# 2310|   		acm_log(2, "%s", s);
# 2311|   		if (inet_pton(AF_INET6, gid, &ib_addr) <= 0) {
# 2312|-> 			acm_log(0, "ERROR - %s is not IB GID\n", gid);
# 2313|   			continue;
# 2314|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2312:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&addr_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2311:20: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2312:25: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2312:25: danger: ‘fopen(&addr_data_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/0)
# 2310|   		acm_log(2, "%s", s);
# 2311|   		if (inet_pton(AF_INET6, gid, &ib_addr) <= 0) {
# 2312|-> 			acm_log(0, "ERROR - %s is not IB GID\n", gid);
# 2313|   			continue;
# 2314|   		}

Error: GCC_ANALYZER_WARNING (CWE-126): [#def206]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2324:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2298:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2303:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2304:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2316:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2319:28: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2319:27: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2324:25: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2324:25: danger: out-of-bounds read from byte 46 till byte 63 but ‘addr’ ends at byte 46
# 2322|   		} else {
# 2323|   			addr_type = ACM_ADDRESS_NAME;
# 2324|-> 			strncpy((char *)name, addr, ACM_MAX_ADDRESS);
# 2325|   		}
# 2326|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2833:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2842:12: enter_function: entry to ‘acmp_open_dev’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2876:15: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2877:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2883:58: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2884:38: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2885:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2888:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2893:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2898:24: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2899:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2904:21: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2905:17: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2905:17: call_function: calling ‘acmp_init_port’ from ‘acmp_open_dev’
# 2831|   			   uint8_t port_num)
# 2832|   {
# 2833|-> 	acm_log(1, "%s %d\n", dev->verbs->device->name, port_num);
# 2834|   	port->dev = dev;
# 2835|   	port->port_num = port_num;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2892:19: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2876:15: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2877:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2883:58: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2884:38: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2885:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2888:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2892:19: danger: ‘dev’ leaks here; was allocated at [(5)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/4)
# 2890|   	dev->port_cnt = attr.phys_port_cnt;
# 2891|   
# 2892|-> 	dev->pd = ibv_alloc_pd(dev->verbs);
# 2893|   	if (!dev->pd) {
# 2894|   		acm_log(0, "ERROR - unable to allocate PD\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2894:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2876:15: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2877:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2883:58: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2884:38: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2885:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2888:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2893:12: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2894:17: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2894:17: danger: ‘dev’ leaks here; was allocated at [(5)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/4)
# 2892|   	dev->pd = ibv_alloc_pd(dev->verbs);
# 2893|   	if (!dev->pd) {
# 2894|-> 		acm_log(0, "ERROR - unable to allocate PD\n");
# 2895|   		goto err1;
# 2896|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2898:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2876:15: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2877:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2883:58: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2884:38: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2885:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2888:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2893:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2898:24: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2898:24: danger: ‘dev’ leaks here; was allocated at [(5)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/4)
# 2896|   	}
# 2897|   
# 2898|-> 	dev->channel = ibv_create_comp_channel(dev->verbs);
# 2899|   	if (!dev->channel) {
# 2900|   		acm_log(0, "ERROR - unable to create comp channel\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2900:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2876:15: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2877:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2883:58: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2884:38: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2885:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2888:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2893:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2898:24: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2899:12: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2900:17: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2900:17: danger: ‘dev’ leaks here; was allocated at [(5)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/4)
# 2898|   	dev->channel = ibv_create_comp_channel(dev->verbs);
# 2899|   	if (!dev->channel) {
# 2900|-> 		acm_log(0, "ERROR - unable to create comp channel\n");
# 2901|   		goto err2;
# 2902|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2926:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2876:15: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2877:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2883:58: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2884:38: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2885:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2888:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2893:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2898:24: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2899:12: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2900:17: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2926:9: danger: ‘dev’ leaks here; was allocated at [(5)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/4)
# 2924|   	ibv_destroy_comp_channel(dev->channel);
# 2925|   err2:
# 2926|-> 	ibv_dealloc_pd(dev->pd);
# 2927|   err1:
# 2928|   	free(dev);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def213]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2979:35: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(acm_get_opts_file(), "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2941:13: enter_function: entry to ‘acmp_set_options’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2948:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2948:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2951:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2952:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2952:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2955:21: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2955:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2958:22: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2958:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2960:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2960:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2962:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2962:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2964:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2964:25: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2966:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2966:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2968:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2968:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2970:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2970:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2972:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2972:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2974:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2974:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2976:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2976:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2978:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2978:25: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2979:35: call_function: inlined call to ‘atoi’ from ‘acmp_set_options’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2979:35: danger: ‘fopen(acm_get_opts_file(), "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/1)
# 2977|   			recv_depth = atoi(value);
# 2978|   		else if (!strcasecmp("min_mtu", opt))
# 2979|-> 			min_mtu = acm_convert_mtu(atoi(value));
# 2980|   		else if (!strcasecmp("min_rate", opt))
# 2981|   			min_rate = acm_convert_rate(atoi(value));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2979:35: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(acm_get_opts_file(), "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2941:13: enter_function: entry to ‘acmp_set_options’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2948:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2948:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2951:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2952:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2952:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2955:21: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2955:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2958:22: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2958:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2960:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2960:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2962:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2962:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2964:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2964:25: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2966:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2966:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2968:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2968:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2970:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2970:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2972:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2972:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2974:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2974:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2976:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2976:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2978:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2978:25: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2979:35: call_function: inlined call to ‘atoi’ from ‘acmp_set_options’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2979:35: danger: ‘fopen(acm_get_opts_file(), "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/1)
# 2977|   			recv_depth = atoi(value);
# 2978|   		else if (!strcasecmp("min_mtu", opt))
# 2979|-> 			min_mtu = acm_convert_mtu(atoi(value));
# 2980|   		else if (!strcasecmp("min_rate", opt))
# 2981|   			min_rate = acm_convert_rate(atoi(value));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def215]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2981:36: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(acm_get_opts_file(), "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2941:13: enter_function: entry to ‘acmp_set_options’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2948:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2948:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2951:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2952:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2952:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2955:21: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2955:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2958:22: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2958:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2960:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2960:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2962:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2962:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2964:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2964:25: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2966:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2966:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2968:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2968:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2970:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2970:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2972:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2972:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2974:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2974:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2976:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2976:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2978:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2978:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2980:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2980:25: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2981:36: call_function: inlined call to ‘atoi’ from ‘acmp_set_options’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2981:36: danger: ‘fopen(acm_get_opts_file(), "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/1)
# 2979|   			min_mtu = acm_convert_mtu(atoi(value));
# 2980|   		else if (!strcasecmp("min_rate", opt))
# 2981|-> 			min_rate = acm_convert_rate(atoi(value));
# 2982|   		else if (!strcasecmp("route_preload", opt))
# 2983|   			route_preload = acmp_convert_route_preload(value);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2981:36: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(acm_get_opts_file(), "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2941:13: enter_function: entry to ‘acmp_set_options’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2948:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2948:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2951:16: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2952:21: branch_true: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2952:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2955:21: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2955:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2958:22: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2958:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2960:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2960:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2962:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2962:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2964:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2964:25: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2966:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2966:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2968:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2968:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2970:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2970:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2972:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2972:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2974:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2974:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2976:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2976:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2978:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2978:25: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2980:27: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2980:25: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2981:36: call_function: inlined call to ‘atoi’ from ‘acmp_set_options’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2981:36: danger: ‘fopen(acm_get_opts_file(), "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/1)
# 2979|   			min_mtu = acm_convert_mtu(atoi(value));
# 2980|   		else if (!strcasecmp("min_rate", opt))
# 2981|-> 			min_rate = acm_convert_rate(atoi(value));
# 2982|   		else if (!strcasecmp("route_preload", opt))
# 2983|   			route_preload = acmp_convert_route_preload(value);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def217]
rdma-core-59.0/ibacm/src/acm_util.c:65:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&buf, "r")’
rdma-core-59.0/ibacm/src/acm_util.c:55:13: acquire_resource: opened here
rdma-core-59.0/ibacm/src/acm_util.c:56:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/acm_util.c:61:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/acm_util.c:61:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/acm_util.c:65:17: branch_false: ...to here
rdma-core-59.0/ibacm/src/acm_util.c:65:17: danger: ‘fopen(&buf, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   63|   		ret = 0;
#   64|   	} else {
#   65|-> 		acm_log(0, "failed to read pkey\n");
#   66|   		ret = -1;
#   67|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
rdma-core-59.0/ibacm/src/acm_util.c:65:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&buf, "r")’
rdma-core-59.0/ibacm/src/acm_util.c:55:13: acquire_memory: allocated here
rdma-core-59.0/ibacm/src/acm_util.c:56:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/acm_util.c:61:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/acm_util.c:61:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/acm_util.c:65:17: branch_false: ...to here
rdma-core-59.0/ibacm/src/acm_util.c:65:17: danger: ‘fopen(&buf, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   63|   		ret = 0;
#   64|   	} else {
#   65|-> 		acm_log(0, "failed to read pkey\n");
#   66|   		ret = -1;
#   67|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def219]
rdma-core-59.0/ibacm/src/acm_util.c:93:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&buf, "r")’
rdma-core-59.0/ibacm/src/acm_util.c:80:13: acquire_resource: opened here
rdma-core-59.0/ibacm/src/acm_util.c:81:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/acm_util.c:86:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/acm_util.c:86:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/acm_util.c:93:17: branch_false: ...to here
rdma-core-59.0/ibacm/src/acm_util.c:93:17: danger: ‘fopen(&buf, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   91|   		ret = 0;
#   92|   	} else {
#   93|-> 		acm_log(0, "failed to read sgid\n");
#   94|   		ret = -1;
#   95|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
rdma-core-59.0/ibacm/src/acm_util.c:93:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&buf, "r")’
rdma-core-59.0/ibacm/src/acm_util.c:80:13: acquire_memory: allocated here
rdma-core-59.0/ibacm/src/acm_util.c:81:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/acm_util.c:86:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/acm_util.c:86:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/acm_util.c:93:17: branch_false: ...to here
rdma-core-59.0/ibacm/src/acm_util.c:93:17: danger: ‘fopen(&buf, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   91|   		ret = 0;
#   92|   	} else {
#   93|-> 		acm_log(0, "failed to read sgid\n");
#   94|   		ret = -1;
#   95|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def221]
rdma-core-59.0/ibacm/src/acme.c:608:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘src.ss_family’
rdma-core-59.0/ibacm/src/acme.c:978:12: enter_function: entry to ‘query_svcs’
rdma-core-59.0/ibacm/src/acme.c:984:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/ibacm/src/acme.c:989:21: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/src/acme.c:990:23: branch_true: ...to here
rdma-core-59.0/ibacm/src/acme.c:991:20: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/acme.c:997:21: branch_false: ...to here
rdma-core-59.0/ibacm/src/acme.c:997:20: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/src/acme.c:998:31: branch_true: ...to here
rdma-core-59.0/ibacm/src/acme.c:998:31: call_function: calling ‘resolve’ from ‘query_svcs’
#  606|   	}
#  607|   
#  608|-> 	if (src_addr && src.ss_family != dest.ss_family) {
#  609|   		printf("source and destination address families don't match\n");
#  610|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def222]
rdma-core-59.0/ibacm/src/acme.c:1026:14: warning[-Wanalyzer-null-argument]: use of NULL ‘arg’ where non-null expected
rdma-core-59.0/ibacm/src/acme.c:1041:5: enter_function: entry to ‘main’
rdma-core-59.0/ibacm/src/acme.c:1047:16: branch_true: following ‘true’ branch (when ‘op != -1’)...
rdma-core-59.0/ibacm/src/acme.c:1048:17: branch_true: ...to here
rdma-core-59.0/ibacm/src/acme.c:1086:29: call_function: inlined call to ‘opt_arg’ from ‘main’
rdma-core-59.0/ibacm/src/acme.c:1086:29: call_function: inlined call to ‘opt_arg’ from ‘main’
rdma-core-59.0/ibacm/src/acme.c:1086:28: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/src/acme.c:1087:33: call_function: inlined call to ‘opt_arg’ from ‘main’
 branch_false: ...to here
rdma-core-59.0/ibacm/src/acme.c:1087:33: call_function: calling ‘parse_perf_arg’ from ‘main’
# 1024|   static void parse_perf_arg(char *arg)
# 1025|   {
# 1026|-> 	if (!strncasecmp("col", arg, 3)) {
# 1027|   		perf_query = PERF_QUERY_COL;
# 1028|   	} else if (!strncasecmp("all", arg, 3)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
rdma-core-59.0/ibacm/src/libacm.c:435:15: warning[-Wanalyzer-malloc-leak]: leak of ‘host_edata’
rdma-core-59.0/ibacm/src/libacm.c:413:12: branch_false: following ‘false’ branch (when ‘ret == 16’)...
rdma-core-59.0/ibacm/src/libacm.c:416:15: branch_false: ...to here
rdma-core-59.0/ibacm/src/libacm.c:417:12: branch_false: following ‘false’ branch (when ‘ret == 16’)...
rdma-core-59.0/ibacm/src/libacm.c:422:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/libacm.c:422:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/libacm.c:427:15: branch_false: ...to here
rdma-core-59.0/ibacm/src/libacm.c:429:22: acquire_memory: allocated here
rdma-core-59.0/ibacm/src/libacm.c:430:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/libacm.c:435:15: branch_false: ...to here
rdma-core-59.0/ibacm/src/libacm.c:435:15: danger: ‘host_edata’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  433|   	}
#  434|   
#  435|-> 	ret = recv(sock, (char *)netw_edata, len, 0);
#  436|   	if (ret != len) {
#  437|   		ret = ACM_STATUS_EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
rdma-core-59.0/ibacm/src/libacm.c:435:15: warning[-Wanalyzer-malloc-leak]: leak of ‘netw_edata’
rdma-core-59.0/ibacm/src/libacm.c:413:12: branch_false: following ‘false’ branch (when ‘ret == 16’)...
rdma-core-59.0/ibacm/src/libacm.c:416:15: branch_false: ...to here
rdma-core-59.0/ibacm/src/libacm.c:417:12: branch_false: following ‘false’ branch (when ‘ret == 16’)...
rdma-core-59.0/ibacm/src/libacm.c:422:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/libacm.c:422:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/libacm.c:427:15: branch_false: ...to here
rdma-core-59.0/ibacm/src/libacm.c:428:22: acquire_memory: allocated here
rdma-core-59.0/ibacm/src/libacm.c:430:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/libacm.c:435:15: branch_false: ...to here
rdma-core-59.0/ibacm/src/libacm.c:435:15: danger: ‘netw_edata’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  433|   	}
#  434|   
#  435|-> 	ret = recv(sock, (char *)netw_edata, len, 0);
#  436|   	if (ret != len) {
#  437|   		ret = ACM_STATUS_EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def225]
rdma-core-59.0/ibacm/src/parse.c:58:25: warning[-Wanalyzer-null-argument]: use of NULL ‘str_buf’ where non-null expected
rdma-core-59.0/ibacm/src/parse.c:73:8: enter_function: entry to ‘parse’
rdma-core-59.0/ibacm/src/parse.c:82:12: branch_false: following ‘false’ branch (when ‘cpy’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:85:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:85:12: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/src/parse.c:86:17: branch_true: ...to here
rdma-core-59.0/ibacm/src/parse.c:94:12: branch_false: following ‘false’ branch (when ‘next’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:103:27: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:103:27: call_function: calling ‘expand’ from ‘parse’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#   56|   			snprintf(buf, sizeof buf, "%s%0*d", basename, width, from);
#   57|   			str_buf = realloc(str_buf, size + strlen(buf)+1);
#   58|-> 			strcpy(&str_buf[size], buf);
#   59|   
#   60|   			from++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
rdma-core-59.0/ibacm/src/parse.c:62:25: warning[-Wanalyzer-malloc-leak]: leak of ‘str_buf’
rdma-core-59.0/ibacm/src/parse.c:73:8: enter_function: entry to ‘parse’
rdma-core-59.0/ibacm/src/parse.c:82:12: branch_false: following ‘false’ branch (when ‘cpy’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:85:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:85:12: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/src/parse.c:86:17: branch_true: ...to here
rdma-core-59.0/ibacm/src/parse.c:94:12: branch_false: following ‘false’ branch (when ‘next’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:103:27: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:103:27: call_function: calling ‘expand’ from ‘parse’
#   60|   			from++;
#   61|   			cnt++;
#   62|-> 			size += strlen(buf)+1;
#   63|   		}
#   64|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def227]
rdma-core-59.0/ibacm/src/parse.c:95:28: warning[-Wanalyzer-null-argument]: use of NULL ‘token’ where non-null expected
rdma-core-59.0/ibacm/src/parse.c:82:12: branch_false: following ‘false’ branch (when ‘cpy’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:85:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:85:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/parse.c:90:25: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:94:12: branch_true: following ‘true’ branch (when ‘next’ is NULL)...
rdma-core-59.0/ibacm/src/parse.c:95:28: branch_true: ...to here
rdma-core-59.0/ibacm/src/parse.c:95:28: danger: argument 1 (‘token’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#   93|   
#   94|   	if (!next) {
#   95|-> 		str_size = strlen(token) + 1;
#   96|   		str_buf = malloc(str_size);
#   97|   		if (!str_buf)

Error: GCC_ANALYZER_WARNING (CWE-131): [#def228]
rdma-core-59.0/ibacm/src/parse.c:106:16: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
rdma-core-59.0/ibacm/src/parse.c:82:12: branch_false: following ‘false’ branch (when ‘cpy’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:85:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:85:12: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/src/parse.c:86:17: branch_true: ...to here
rdma-core-59.0/ibacm/src/parse.c:94:12: branch_true: following ‘true’ branch (when ‘next’ is NULL)...
rdma-core-59.0/ibacm/src/parse.c:95:28: branch_true: ...to here
rdma-core-59.0/ibacm/src/parse.c:97:20: branch_false: following ‘false’ branch (when ‘str_buf’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:100:17: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:106:16: danger: allocated 17 bytes and assigned to ‘char **’ here; ‘sizeof (char *)’ is ‘8’
#  104|   	}
#  105|   
#  106|-> 	ptrs = malloc((sizeof str_buf * (cnt + 1)) + str_size);
#  107|   	if (!ptrs)
#  108|   		goto out_str_buf;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def229]
rdma-core-59.0/ibacm/src/parse.c:115:9: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
rdma-core-59.0/ibacm/src/parse.c:73:8: enter_function: entry to ‘parse’
rdma-core-59.0/ibacm/src/parse.c:82:12: branch_false: following ‘false’ branch (when ‘cpy’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:85:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:85:12: branch_true: following ‘true’ branch...
rdma-core-59.0/ibacm/src/parse.c:86:17: branch_true: ...to here
rdma-core-59.0/ibacm/src/parse.c:94:12: branch_false: following ‘false’ branch (when ‘next’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:103:27: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:103:27: call_function: calling ‘expand’ from ‘parse’
rdma-core-59.0/ibacm/src/parse.c:103:27: return_function: returning to ‘parse’ from ‘expand’
rdma-core-59.0/ibacm/src/parse.c:107:12: branch_false: following ‘false’ branch (when ‘ptrs’ is non-NULL)...
rdma-core-59.0/ibacm/src/parse.c:110:22: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:113:21: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/src/parse.c:115:13: branch_false: ...to here
rdma-core-59.0/ibacm/src/parse.c:115:9: danger: out-of-bounds write from byte 8 till byte 15 but region ends at byte 8
#  113|   	for (i = 1; i < cnt; i++)
#  114|   		ptrs[i] = index(ptrs[i - 1], 0) + 1;
#  115|-> 	ptrs[i] = NULL;
#  116|   
#  117|   	if (count)

Error: CPPCHECK_WARNING (CWE-457): [#def230]
rdma-core-59.0/infiniband-diags/dump_fts.c:166: error[uninitvar]: Uninitialized variable: str
#  164|   			}
#  165|   			*s = 0;
#  166|-> 			printf("            %s\n", str);
#  167|   		}
#  168|   		for (i = 0, s = str; i <= nports; i++)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def231]
rdma-core-59.0/infiniband-diags/ibdiag_common.c:885:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
rdma-core-59.0/infiniband-diags/ibdiag_common.c:902:5: enter_function: entry to ‘snprint_field’
rdma-core-59.0/infiniband-diags/ibdiag_common.c:908:9: acquire_resource: ‘va_start’ called here
rdma-core-59.0/infiniband-diags/ibdiag_common.c:909:15: call_function: calling ‘vsnprint_field’ from ‘snprint_field’
#  883|   	int len, i, ret;
#  884|   
#  885|-> 	len = strlen(mad_field_name(f));
#  886|   	if (len + 2 > n || spacing + 1 > n)
#  887|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def232]
rdma-core-59.0/infiniband-diags/ibdiag_common.c:889:22: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
rdma-core-59.0/infiniband-diags/ibdiag_common.c:902:5: enter_function: entry to ‘snprint_field’
rdma-core-59.0/infiniband-diags/ibdiag_common.c:908:9: acquire_resource: ‘va_start’ called here
rdma-core-59.0/infiniband-diags/ibdiag_common.c:909:15: call_function: calling ‘vsnprint_field’ from ‘snprint_field’
#  887|   		return 0;
#  888|   
#  889|-> 	strncpy(buf, mad_field_name(f), n);
#  890|   	buf[len] = ':';
#  891|   	for (i = len+1; i < spacing+1; i++) {

Error: GCC_ANALYZER_WARNING (CWE-121): [#def233]
rdma-core-59.0/infiniband-diags/ibdiag_common.c:897:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
rdma-core-59.0/infiniband-diags/ibdiag_common.c:915:6: enter_function: entry to ‘dump_portinfo’
rdma-core-59.0/infiniband-diags/ibdiag_common.c:921:39: branch_true: following ‘true’ branch (when ‘field != 74’)...
 branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibdiag_common.c:924:20: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/ibdiag_common.c:925:25: call_function: calling ‘snprint_field’ from ‘dump_portinfo’
#  895|   	ret = vsnprintf(&buf[spacing+1], n - spacing, format, va_args);
#  896|   	if (ret >= n - spacing)
#  897|-> 		buf[n] = '\0';
#  898|   
#  899|   	return ret + spacing;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:60:9: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:54:18: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:55:12: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:58:22: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:60:9: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   58|   	char *name = ca_name ? ca_name : ibd_ca;
#   59|   
#   60|-> 	resolve_sm_portid(name, ibd_ca_port, &handle->dport);
#   61|   	if (!handle->dport.lid) {
#   62|   		IBWARN("No SM/SA found on port %s:%d",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:123:9: warning[-Wanalyzer-malloc-leak]: leak of ‘umad’
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:119:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:120:12: branch_false: following ‘false’ branch (when ‘umad’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:123:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:123:9: danger: ‘umad’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  121|   		IBPANIC("cannot alloc mem for umad: %s\n", strerror(errno));
#  122|   
#  123|-> 	mad_build_pkt(umad, &rpc, &h->dport, NULL, data);
#  124|   
#  125|   	mad_set_field64(umad_get_mad(umad), 0, IB_SA_MKEY_F, sm_key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:139:15: warning[-Wanalyzer-malloc-leak]: leak of ‘umad’
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:120:12: branch_false: following ‘false’ branch (when ‘umad’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:123:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:131:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:140:12: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:141:21: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:141:20: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:142:50: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:143:28: branch_false: following ‘false’ branch (when ‘new_umad’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:149:25: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibdiag_sa.c:139:15: danger: ‘umad’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  137|   
#  138|   recv_mad:
#  139|-> 	ret = umad_recv(h->fd, umad, &len, ibd_timeout);
#  140|   	if (ret < 0) {
#  141|   		if (errno == ENOSPC) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def237]
rdma-core-59.0/infiniband-diags/iblinkinfo.c:293:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘out_header_flag’
rdma-core-59.0/infiniband-diags/iblinkinfo.c:454:12: enter_function: entry to ‘diff_node’
rdma-core-59.0/infiniband-diags/iblinkinfo.c:464:12: branch_true: following ‘true’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/infiniband-diags/iblinkinfo.c:465:17: branch_true: ...to here
rdma-core-59.0/infiniband-diags/iblinkinfo.c:465:17: call_function: calling ‘diff_node_iter’ from ‘diff_node’
#  291|   				out_prefix ? out_prefix : "",
#  292|   				nodetype_str(node), remap);
#  293|-> 		(*out_header_flag)++;
#  294|   		free(remap);
#  295|   	}

Error: GCC_ANALYZER_WARNING (CWE-787): [#def238]
rdma-core-59.0/infiniband-diags/ibnetdiscover.c:179:9: warning[-Wanalyzer-out-of-bounds]: buffer overflow
rdma-core-59.0/infiniband-diags/ibnetdiscover.c:427:13: enter_function: entry to ‘out_ca_port’
rdma-core-59.0/infiniband-diags/ibnetdiscover.c:444:9: call_function: calling ‘node_name’ from ‘out_ca_port’
#  177|   		break;
#  178|   	}
#  179|-> 	sprintf(buf + 2, "-%016" PRIx64 "\"", node->guid);
#  180|   
#  181|   	return buf;

Error: GCC_ANALYZER_WARNING (CWE-479): [#def239]
rdma-core-59.0/infiniband-diags/ibping.c:153:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘fprintf’ from within signal handler
rdma-core-59.0/infiniband-diags/ibping.c:195:5: enter_function: entry to ‘main’
rdma-core-59.0/infiniband-diags/ibping.c:221:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:224:19: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:225:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:228:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:228:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:240:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:240:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:244:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:244:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:248:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:149:13: enter_function: entry to ‘report’
rdma-core-59.0/infiniband-diags/ibping.c:153:9: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:153:9: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:153:9: danger: call to ‘fprintf’ from within signal handler
#  151|   	total_time = time_stamp() - start;
#  152|   
#  153|-> 	DEBUG("out due signal %d", sig);
#  154|   
#  155|   	printf("\n--- %s (%s) ibping statistics ---\n", last_host,

Error: GCC_ANALYZER_WARNING (CWE-479): [#def240]
rdma-core-59.0/infiniband-diags/ibping.c:155:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘printf’ from within signal handler
rdma-core-59.0/infiniband-diags/ibping.c:195:5: enter_function: entry to ‘main’
rdma-core-59.0/infiniband-diags/ibping.c:221:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:224:19: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:225:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:228:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:228:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:240:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:240:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:244:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:244:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:248:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:149:13: enter_function: entry to ‘report’
rdma-core-59.0/infiniband-diags/ibping.c:155:9: danger: call to ‘printf’ from within signal handler
#  153|   	DEBUG("out due signal %d", sig);
#  154|   
#  155|-> 	printf("\n--- %s (%s) ibping statistics ---\n", last_host,
#  156|   	       portid2str(&portid));
#  157|   	printf("%" PRIu64 " packets transmitted, %" PRIu64 " received, %" PRIu64

Error: GCC_ANALYZER_WARNING (CWE-479): [#def241]
rdma-core-59.0/infiniband-diags/ibping.c:157:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘printf’ from within signal handler
rdma-core-59.0/infiniband-diags/ibping.c:195:5: enter_function: entry to ‘main’
rdma-core-59.0/infiniband-diags/ibping.c:221:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:224:19: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:225:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:228:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:228:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:240:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:240:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:244:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:244:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:248:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:149:13: enter_function: entry to ‘report’
rdma-core-59.0/infiniband-diags/ibping.c:157:9: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:157:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:157:9: danger: call to ‘printf’ from within signal handler
#  155|   	printf("\n--- %s (%s) ibping statistics ---\n", last_host,
#  156|   	       portid2str(&portid));
#  157|-> 	printf("%" PRIu64 " packets transmitted, %" PRIu64 " received, %" PRIu64
#  158|   	       "%% packet loss, time %" PRIu64 " ms\n", ntrans, replied,
#  159|   	       (lost != 0) ? lost * 100 / ntrans : 0, total_time / 1000);

Error: GCC_ANALYZER_WARNING (CWE-479): [#def242]
rdma-core-59.0/infiniband-diags/ibping.c:160:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘printf’ from within signal handler
rdma-core-59.0/infiniband-diags/ibping.c:195:5: enter_function: entry to ‘main’
rdma-core-59.0/infiniband-diags/ibping.c:221:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:224:19: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:225:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:228:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:228:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:240:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:240:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:244:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:244:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:248:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:149:13: enter_function: entry to ‘report’
rdma-core-59.0/infiniband-diags/ibping.c:157:9: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:157:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:160:9: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:160:9: danger: call to ‘printf’ from within signal handler
#  158|   	       "%% packet loss, time %" PRIu64 " ms\n", ntrans, replied,
#  159|   	       (lost != 0) ? lost * 100 / ntrans : 0, total_time / 1000);
#  160|-> 	printf("rtt min/avg/max = %" PRIu64 ".%03" PRIu64 "/%" PRIu64 ".%03"
#  161|   	       PRIu64 "/%" PRIu64 ".%03" PRIu64 " ms\n",
#  162|   	       minrtt == ~0ull ? 0 : minrtt / 1000,

Error: GCC_ANALYZER_WARNING (CWE-479): [#def243]
rdma-core-59.0/infiniband-diags/ibping.c:168:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
rdma-core-59.0/infiniband-diags/ibping.c:195:5: enter_function: entry to ‘main’
rdma-core-59.0/infiniband-diags/ibping.c:221:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:224:19: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:225:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:228:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:228:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:240:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:240:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:244:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:244:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:248:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:149:13: enter_function: entry to ‘report’
rdma-core-59.0/infiniband-diags/ibping.c:157:9: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:157:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibping.c:160:9: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibping.c:168:9: danger: call to ‘exit’ from within signal handler
#  166|   	       maxrtt % 1000);
#  167|   
#  168|-> 	exit(0);
#  169|   }
#  170|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def244]
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:112:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(threshold_file, "r")’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:128:13: enter_function: entry to ‘set_thresholds’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:132:24: acquire_resource: opened here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:138:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:141:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:143:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:148:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:149:16: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:150:28: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:161:17: call_function: calling ‘set_thres’ from ‘set_thresholds’
#  110|   	char tmp[256];
#  111|   	for (f = IB_PC_EXT_ERR_SYM_F; f <= IB_PC_EXT_XMT_WAIT_F; f++) {
#  112|-> 		if (strcmp(name, mad_field_name(f)) == 0) {
#  113|   			mad_encode_field(thresholds, f, &val);
#  114|   			snprintf(tmp, 255, "[%s = %" PRIu64 "]", name, val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:112:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(threshold_file, "r")’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:128:13: enter_function: entry to ‘set_thresholds’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:132:24: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:138:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:141:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:143:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:148:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:149:16: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:150:28: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:161:17: call_function: calling ‘set_thres’ from ‘set_thresholds’
#  110|   	char tmp[256];
#  111|   	for (f = IB_PC_EXT_ERR_SYM_F; f <= IB_PC_EXT_XMT_WAIT_F; f++) {
#  112|-> 		if (strcmp(name, mad_field_name(f)) == 0) {
#  113|   			mad_encode_field(thresholds, f, &val);
#  114|   			snprintf(tmp, 255, "[%s = %" PRIu64 "]", name, val);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def246]
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:113:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(threshold_file, "r")’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:128:13: enter_function: entry to ‘set_thresholds’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:132:24: acquire_resource: opened here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:138:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:141:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:143:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:148:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:149:16: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:150:28: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:161:17: call_function: calling ‘set_thres’ from ‘set_thresholds’
#  111|   	for (f = IB_PC_EXT_ERR_SYM_F; f <= IB_PC_EXT_XMT_WAIT_F; f++) {
#  112|   		if (strcmp(name, mad_field_name(f)) == 0) {
#  113|-> 			mad_encode_field(thresholds, f, &val);
#  114|   			snprintf(tmp, 255, "[%s = %" PRIu64 "]", name, val);
#  115|   			threshold_str = realloc(threshold_str,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:113:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(threshold_file, "r")’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:128:13: enter_function: entry to ‘set_thresholds’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:132:24: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:138:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:141:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:143:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:148:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:149:16: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:150:28: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:161:17: call_function: calling ‘set_thres’ from ‘set_thresholds’
#  111|   	for (f = IB_PC_EXT_ERR_SYM_F; f <= IB_PC_EXT_XMT_WAIT_F; f++) {
#  112|   		if (strcmp(name, mad_field_name(f)) == 0) {
#  113|-> 			mad_encode_field(thresholds, f, &val);
#  114|   			snprintf(tmp, 255, "[%s = %" PRIu64 "]", name, val);
#  115|   			threshold_str = realloc(threshold_str,

Error: GCC_ANALYZER_WARNING (CWE-465): [#def248]
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:117:28: warning[-Wanalyzer-deref-before-check]: check of ‘threshold_str’ for NULL after already dereferencing it
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:111:39: branch_true: following ‘true’ branch (when ‘f != 657’)...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:112:21: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:112:20: branch_true: following ‘true’ branch (when the strings are equal)...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:113:25: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:117:28: danger: pointer ‘threshold_str’ is checked for NULL here but it was already dereferenced at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  115|   			threshold_str = realloc(threshold_str,
#  116|   					strlen(threshold_str)+strlen(tmp)+1);
#  117|-> 			if (!threshold_str) {
#  118|   				fprintf(stderr, "Failed to allocate memory: "
#  119|   					"%s\n", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def249]
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:143:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(threshold_file, "r")’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:132:24: acquire_resource: opened here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:138:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:141:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:143:12: danger: ‘fopen(threshold_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  141|   	snprintf(str, 63, "Thresholds: ");
#  142|   	threshold_str = malloc(strlen(str)+1);
#  143|-> 	if (!threshold_str) {
#  144|   		fprintf(stderr, "Failed to allocate memory: %s\n",
#  145|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:143:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(threshold_file, "r")’
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:132:24: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:138:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:141:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibqueryerrors.c:143:12: danger: ‘fopen(threshold_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  141|   	snprintf(str, 63, "Thresholds: ");
#  142|   	threshold_str = malloc(strlen(str)+1);
#  143|-> 	if (!threshold_str) {
#  144|   		fprintf(stderr, "Failed to allocate memory: %s\n",
#  145|   			strerror(errno));

Error: CPPCHECK_WARNING (CWE-457): [#def251]
rdma-core-59.0/infiniband-diags/ibroute.c:192: error[uninitvar]: Uninitialized variable: str
#  190|   			}
#  191|   			*s = 0;
#  192|-> 			printf("            %s\n", str);
#  193|   		}
#  194|   		for (i = 0, s = str; i <= nports; i++)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def252]
rdma-core-59.0/infiniband-diags/ibstat.c:124:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
rdma-core-59.0/infiniband-diags/ibstat.c:274:5: enter_function: entry to ‘main’
rdma-core-59.0/infiniband-diags/ibstat.c:302:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
rdma-core-59.0/infiniband-diags/ibstat.c:303:28: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:305:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibstat.c:308:23: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:315:12: branch_true: following ‘true’ branch (when ‘argc != 0’)...
rdma-core-59.0/infiniband-diags/ibstat.c:316:22: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:316:42: branch_true: following ‘true’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibstat.c:317:30: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:319:20: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibstat.c:323:17: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:329:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:336:33: branch_true: following ‘true’ branch (when ‘node != last_node’)...
rdma-core-59.0/infiniband-diags/ibstat.c:337:17: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:338:20: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibstat.c:340:26: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:340:26: call_function: calling ‘ca_stat’ from ‘main’
#  122|   		int e = errno;
#  123|   		close(fd);
#  124|-> 		errno = e;
#  125|   		return ret_code();
#  126|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def253]
rdma-core-59.0/infiniband-diags/ibstat.c:133:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
rdma-core-59.0/infiniband-diags/ibstat.c:274:5: enter_function: entry to ‘main’
rdma-core-59.0/infiniband-diags/ibstat.c:302:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
rdma-core-59.0/infiniband-diags/ibstat.c:303:28: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:305:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibstat.c:308:23: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:315:12: branch_true: following ‘true’ branch (when ‘argc != 0’)...
rdma-core-59.0/infiniband-diags/ibstat.c:316:22: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:316:42: branch_true: following ‘true’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibstat.c:317:30: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:319:20: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibstat.c:323:17: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:329:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:336:33: branch_true: following ‘true’ branch (when ‘node != last_node’)...
rdma-core-59.0/infiniband-diags/ibstat.c:337:17: branch_true: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:338:20: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/ibstat.c:340:26: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibstat.c:340:26: call_function: calling ‘ca_stat’ from ‘main’
#  131|   		*s = 0;
#  132|   
#  133|-> 	close(fd);
#  134|   	return 0;
#  135|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
rdma-core-59.0/infiniband-diags/ibtracert.c:140:14: warning[-Wanalyzer-malloc-leak]: leak of ‘node’
rdma-core-59.0/infiniband-diags/ibtracert.c:535:14: enter_function: entry to ‘find_mcpath’
rdma-core-59.0/infiniband-diags/ibtracert.c:546:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/ibtracert.c:547:12: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibtracert.c:550:16: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibtracert.c:551:12: branch_false: following ‘false’ branch (when ‘port’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibtracert.c:556:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibtracert.c:556:13: call_function: calling ‘get_node’ from ‘find_mcpath’
#  138|   
#  139|   	memset(ni, 0, sizeof(node->nodeinfo));
#  140|-> 	if (!smp_query_via(ni, portid, IB_ATTR_NODE_INFO, 0, timeout, srcport))
#  141|   		return -1;
#  142|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
rdma-core-59.0/infiniband-diags/ibtracert.c:140:14: warning[-Wanalyzer-malloc-leak]: leak of ‘port’
rdma-core-59.0/infiniband-diags/ibtracert.c:535:14: enter_function: entry to ‘find_mcpath’
rdma-core-59.0/infiniband-diags/ibtracert.c:547:12: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibtracert.c:550:16: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibtracert.c:550:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/ibtracert.c:551:12: branch_false: following ‘false’ branch (when ‘port’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibtracert.c:556:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibtracert.c:556:13: call_function: calling ‘get_node’ from ‘find_mcpath’
#  138|   
#  139|   	memset(ni, 0, sizeof(node->nodeinfo));
#  140|-> 	if (!smp_query_via(ni, portid, IB_ATTR_NODE_INFO, 0, timeout, srcport))
#  141|   		return -1;
#  142|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
rdma-core-59.0/infiniband-diags/ibtracert.c:144:14: warning[-Wanalyzer-malloc-leak]: leak of ‘port’
rdma-core-59.0/infiniband-diags/ibtracert.c:535:14: enter_function: entry to ‘find_mcpath’
rdma-core-59.0/infiniband-diags/ibtracert.c:547:12: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibtracert.c:550:16: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibtracert.c:550:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/ibtracert.c:551:12: branch_false: following ‘false’ branch (when ‘port’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibtracert.c:556:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibtracert.c:556:13: call_function: calling ‘get_node’ from ‘find_mcpath’
#  142|   
#  143|   	memset(nd, 0, sizeof(node->nodedesc));
#  144|-> 	if (!smp_query_via(nd, portid, IB_ATTR_NODE_DESC, 0, timeout, srcport))
#  145|   		return -1;
#  146|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
rdma-core-59.0/infiniband-diags/ibtracert.c:155:14: warning[-Wanalyzer-malloc-leak]: leak of ‘port’
rdma-core-59.0/infiniband-diags/ibtracert.c:535:14: enter_function: entry to ‘find_mcpath’
rdma-core-59.0/infiniband-diags/ibtracert.c:547:12: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibtracert.c:550:16: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibtracert.c:550:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/ibtracert.c:551:12: branch_false: following ‘false’ branch (when ‘port’ is non-NULL)...
rdma-core-59.0/infiniband-diags/ibtracert.c:556:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/ibtracert.c:556:13: call_function: calling ‘get_node’ from ‘find_mcpath’
#  153|   
#  154|   	memset(pi, 0, sizeof(port->portinfo));
#  155|-> 	if (!smp_query_via(pi, portid, IB_ATTR_PORT_INFO, 0, timeout, srcport))
#  156|   		return -1;
#  157|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:69:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:312:12: enter_function: entry to ‘rereg_and_test_port’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:323:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:324:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:330:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:331:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:337:16: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:338:24: branch_true: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:345:20: branch_false: following ‘false’ branch (when ‘i != 50’)...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:337:16: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:348:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:350:9: call_function: calling ‘rereg_send_all’ from ‘rereg_and_test_port’
#   67|   {
#   68|   	memset(data, 0, IB_SA_DATA_SIZE);
#   69|-> 	mad_set_array(data, 0, IB_SA_MCM_MGID_F, mgid);
#   70|   	mad_set_array(data, 0, IB_SA_MCM_PORTGID_F, port_gid);
#   71|   	mad_set_field(data, 0, IB_SA_MCM_JOIN_STATE_F, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:69:9: warning[-Wanalyzer-malloc-leak]: leak of ‘umad’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:263:12: enter_function: entry to ‘rereg_query_all’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:274:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:275:12: branch_false: following ‘false’ branch (when ‘umad’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:280:21: branch_true: following ‘true’ branch (when ‘i < cnt’)...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:282:57: branch_true: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:281:23: call_function: calling ‘rereg_send’ from ‘rereg_query_all’
#   67|   {
#   68|   	memset(data, 0, IB_SA_DATA_SIZE);
#   69|-> 	mad_set_array(data, 0, IB_SA_MCM_MGID_F, mgid);
#   70|   	mad_set_array(data, 0, IB_SA_MCM_PORTGID_F, port_gid);
#   71|   	mad_set_field(data, 0, IB_SA_MCM_JOIN_STATE_F, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:70:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:312:12: enter_function: entry to ‘rereg_and_test_port’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:323:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:324:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:330:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:331:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:337:16: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:338:24: branch_true: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:345:20: branch_false: following ‘false’ branch (when ‘i != 50’)...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:337:16: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:348:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:350:9: call_function: calling ‘rereg_send_all’ from ‘rereg_and_test_port’
#   68|   	memset(data, 0, IB_SA_DATA_SIZE);
#   69|   	mad_set_array(data, 0, IB_SA_MCM_MGID_F, mgid);
#   70|-> 	mad_set_array(data, 0, IB_SA_MCM_PORTGID_F, port_gid);
#   71|   	mad_set_field(data, 0, IB_SA_MCM_JOIN_STATE_F, 1);
#   72|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:70:9: warning[-Wanalyzer-malloc-leak]: leak of ‘umad’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:263:12: enter_function: entry to ‘rereg_query_all’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:274:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:275:12: branch_false: following ‘false’ branch (when ‘umad’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:280:21: branch_true: following ‘true’ branch (when ‘i < cnt’)...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:282:57: branch_true: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:281:23: call_function: calling ‘rereg_send’ from ‘rereg_query_all’
#   68|   	memset(data, 0, IB_SA_DATA_SIZE);
#   69|   	mad_set_array(data, 0, IB_SA_MCM_MGID_F, mgid);
#   70|-> 	mad_set_array(data, 0, IB_SA_MCM_PORTGID_F, port_gid);
#   71|   	mad_set_field(data, 0, IB_SA_MCM_JOIN_STATE_F, 1);
#   72|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:71:9: warning[-Wanalyzer-malloc-leak]: leak of ‘umad’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:263:12: enter_function: entry to ‘rereg_query_all’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:274:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:275:12: branch_false: following ‘false’ branch (when ‘umad’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:280:21: branch_true: following ‘true’ branch (when ‘i < cnt’)...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:282:57: branch_true: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:281:23: call_function: calling ‘rereg_send’ from ‘rereg_query_all’
#   69|   	mad_set_array(data, 0, IB_SA_MCM_MGID_F, mgid);
#   70|   	mad_set_array(data, 0, IB_SA_MCM_PORTGID_F, port_gid);
#   71|-> 	mad_set_field(data, 0, IB_SA_MCM_JOIN_STATE_F, 1);
#   72|   
#   73|   	return be64toh(IB_MCR_COMPMASK_MGID | IB_MCR_COMPMASK_PORT_GID |

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:91:9: warning[-Wanalyzer-malloc-leak]: leak of ‘umad’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:263:12: enter_function: entry to ‘rereg_query_all’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:274:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:275:12: branch_false: following ‘false’ branch (when ‘umad’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:280:21: branch_true: following ‘true’ branch (when ‘i < cnt’)...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:282:57: branch_true: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:281:23: call_function: calling ‘rereg_send’ from ‘rereg_query_all’
#   89|   	rpc.dataoffs = IB_SA_DATA_OFFS;
#   90|   
#   91|-> 	mad_build_pkt(umad, &rpc, dport, NULL, data);
#   92|   }
#   93|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:152:19: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:312:12: enter_function: entry to ‘rereg_and_test_port’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:323:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:324:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:330:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:331:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:337:16: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:348:9: branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:350:9: call_function: calling ‘rereg_send_all’ from ‘rereg_and_test_port’
#  150|   {
#  151|   	uint8_t *umad;
#  152|-> 	int len = umad_size() + 256;
#  153|   	unsigned i;
#  154|   	int ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:189:23: warning[-Wanalyzer-malloc-leak]: leak of ‘umad’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:206:12: enter_function: entry to ‘rereg_recv_all’
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:217:16: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:218:12: branch_false: following ‘false’ branch (when ‘umad’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/mcm_rereg_test.c:224:16: call_function: calling ‘rereg_recv’ from ‘rereg_recv_all’
#  187|   	int len = length;
#  188|   
#  189|-> 	while ((ret = umad_recv(port, umad, &len, tmo)) < 0 &&
#  190|   	       errno == ETIMEDOUT) {
#  191|   		if (retry++ > 3)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
rdma-core-59.0/infiniband-diags/saquery.c:368:40: warning[-Wanalyzer-malloc-leak]: leak of ‘node_name’
rdma-core-59.0/infiniband-diags/saquery.c:1104:12: enter_function: entry to ‘print_multicast_member_records’
rdma-core-59.0/infiniband-diags/saquery.c:1113:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/saquery.c:1116:15: branch_false: ...to here
rdma-core-59.0/infiniband-diags/saquery.c:1117:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/infiniband-diags/saquery.c:1120:21: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/saquery.c:1122:33: branch_true: ...to here
rdma-core-59.0/infiniband-diags/saquery.c:1124:17: call_function: calling ‘dump_multicast_member_record’ from ‘print_multicast_member_records’
#  366|   	 */
#  367|   	for (i = 0; i < nr_result->result_cnt; i++) {
#  368|-> 		ib_node_record_t *nr = sa_get_query_rec(nr_result->p_result_madw, i);
#  369|   		if (nr->node_info.port_guid ==
#  370|   		    p_mcmr->port_gid.unicast.interface_id) {

Error: CPPCHECK_WARNING (CWE-758): [#def267]
rdma-core-59.0/infiniband-diags/saquery.c:975: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  973|   	attr.port_info.capability_mask = capability_mask;
#  974|   
#  975|-> 	return get_any_records(h, IB_SA_ATTR_PORTINFORECORD, 1 << 31,
#  976|   			       IB_PIR_COMPMASK_CAPMASK, &attr, sizeof(attr), result);
#  977|   }

Error: CPPCHECK_WARNING (CWE-476): [#def268]
rdma-core-59.0/infiniband-diags/saquery.c:1530: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: src_lid
# 1528|   		{
# 1529|   			src_lid = strdup(optarg);
# 1530|-> 			dst_lid = strchr(src_lid, ':');
# 1531|   			if (!dst_lid)
# 1532|   				ibdiag_show_usage();

Error: GCC_ANALYZER_WARNING (CWE-688): [#def269]
rdma-core-59.0/infiniband-diags/saquery.c:1530:35: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘src_lid’ where non-null expected
rdma-core-59.0/infiniband-diags/saquery.c:1529:35: acquire_memory: this call could return NULL
rdma-core-59.0/infiniband-diags/saquery.c:1530:35: danger: argument 1 (‘strdup(optarg)’) from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_strchr’ must be non-null
# 1528|   		{
# 1529|   			src_lid = strdup(optarg);
# 1530|-> 			dst_lid = strchr(src_lid, ':');
# 1531|   			if (!dst_lid)
# 1532|   				ibdiag_show_usage();

Error: CPPCHECK_WARNING (CWE-476): [#def270]
rdma-core-59.0/infiniband-diags/saquery.c:1541: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: src_addr
# 1539|   		{
# 1540|   			char *src_addr = strdup(optarg);
# 1541|-> 			char *dst_addr = strchr(src_addr, '-');
# 1542|   			if (!dst_addr)
# 1543|   				ibdiag_show_usage();

Error: GCC_ANALYZER_WARNING (CWE-688): [#def271]
rdma-core-59.0/infiniband-diags/saquery.c:1541:42: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘src_addr’ where non-null expected
rdma-core-59.0/infiniband-diags/saquery.c:1540:42: acquire_memory: this call could return NULL
rdma-core-59.0/infiniband-diags/saquery.c:1541:42: danger: argument 1 (‘src_addr’) from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_strchr’ must be non-null
# 1539|   		{
# 1540|   			char *src_addr = strdup(optarg);
# 1541|-> 			char *dst_addr = strchr(src_addr, '-');
# 1542|   			if (!dst_addr)
# 1543|   				ibdiag_show_usage();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
rdma-core-59.0/infiniband-diags/saquery.c:1543:33: warning[-Wanalyzer-malloc-leak]: leak of ‘src_addr’
rdma-core-59.0/infiniband-diags/saquery.c:1540:42: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/saquery.c:1542:28: branch_true: following ‘true’ branch (when ‘dst_addr’ is NULL)...
rdma-core-59.0/infiniband-diags/saquery.c:1543:33: branch_true: ...to here
rdma-core-59.0/infiniband-diags/saquery.c:1543:33: danger: ‘src_addr’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1541|   			char *dst_addr = strchr(src_addr, '-');
# 1542|   			if (!dst_addr)
# 1543|-> 				ibdiag_show_usage();
# 1544|   			*dst_addr++ = '\0';
# 1545|   			if (inet_pton(AF_INET6, src_addr, &p->sgid) <= 0)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def273]
rdma-core-59.0/infiniband-diags/saquery.c:1544:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dst_addr’
rdma-core-59.0/infiniband-diags/saquery.c:1542:28: branch_true: following ‘true’ branch (when ‘dst_addr’ is NULL)...
rdma-core-59.0/infiniband-diags/saquery.c:1543:33: branch_true: ...to here
rdma-core-59.0/infiniband-diags/saquery.c:1544:25: danger: dereference of NULL ‘dst_addr’
# 1542|   			if (!dst_addr)
# 1543|   				ibdiag_show_usage();
# 1544|-> 			*dst_addr++ = '\0';
# 1545|   			if (inet_pton(AF_INET6, src_addr, &p->sgid) <= 0)
# 1546|   				ibdiag_show_usage();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
rdma-core-59.0/infiniband-diags/saquery.c:1546:33: warning[-Wanalyzer-malloc-leak]: leak of ‘src_addr’
rdma-core-59.0/infiniband-diags/saquery.c:1540:42: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/saquery.c:1542:28: branch_false: following ‘false’ branch (when ‘dst_addr’ is non-NULL)...
rdma-core-59.0/infiniband-diags/saquery.c:1544:26: branch_false: ...to here
rdma-core-59.0/infiniband-diags/saquery.c:1545:28: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/saquery.c:1546:33: branch_true: ...to here
rdma-core-59.0/infiniband-diags/saquery.c:1546:33: danger: ‘src_addr’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 1544|   			*dst_addr++ = '\0';
# 1545|   			if (inet_pton(AF_INET6, src_addr, &p->sgid) <= 0)
# 1546|-> 				ibdiag_show_usage();
# 1547|   			if (inet_pton(AF_INET6, dst_addr, &p->dgid) <= 0)
# 1548|   				ibdiag_show_usage();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
rdma-core-59.0/infiniband-diags/saquery.c:1548:33: warning[-Wanalyzer-malloc-leak]: leak of ‘src_addr’
rdma-core-59.0/infiniband-diags/saquery.c:1540:42: acquire_memory: allocated here
rdma-core-59.0/infiniband-diags/saquery.c:1542:28: branch_false: following ‘false’ branch (when ‘dst_addr’ is non-NULL)...
rdma-core-59.0/infiniband-diags/saquery.c:1544:26: branch_false: ...to here
rdma-core-59.0/infiniband-diags/saquery.c:1547:28: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/saquery.c:1548:33: branch_true: ...to here
rdma-core-59.0/infiniband-diags/saquery.c:1548:33: danger: ‘src_addr’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 1546|   				ibdiag_show_usage();
# 1547|   			if (inet_pton(AF_INET6, dst_addr, &p->dgid) <= 0)
# 1548|-> 				ibdiag_show_usage();
# 1549|   			free(src_addr);
# 1550|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
rdma-core-59.0/infiniband-diags/smpdump.c:229:15: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, umad_size() + 256)’
rdma-core-59.0/infiniband-diags/smpdump.c:170:5: enter_function: entry to ‘main’
rdma-core-59.0/infiniband-diags/smpdump.c:206:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/smpdump.c:210:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/smpdump.c:210:12: branch_true: following ‘true’ branch...
rdma-core-59.0/infiniband-diags/smpdump.c:211:24: branch_true: ...to here
rdma-core-59.0/infiniband-diags/smpdump.c:214:12: branch_false: following ‘false’ branch (when ‘argc <= 2’)...
rdma-core-59.0/infiniband-diags/smpdump.c:217:13: branch_false: ...to here
rdma-core-59.0/infiniband-diags/smpdump.c:217:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/smpdump.c:220:23: branch_false: ...to here
rdma-core-59.0/infiniband-diags/smpdump.c:220:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/smpdump.c:223:26: branch_false: ...to here
rdma-core-59.0/infiniband-diags/smpdump.c:223:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/smpdump.c:226:36: branch_false: ...to here
rdma-core-59.0/infiniband-diags/smpdump.c:226:22: call_function: inlined call to ‘umad_alloc’ from ‘main’
rdma-core-59.0/infiniband-diags/smpdump.c:226:12: branch_false: following ‘false’ branch...
rdma-core-59.0/infiniband-diags/smpdump.c:229:15: branch_false: ...to here
rdma-core-59.0/infiniband-diags/smpdump.c:229:15: danger: ‘calloc(1, umad_size() + 256)’ leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  227|   		IBPANIC("can't alloc MAD");
#  228|   
#  229|-> 	smp = umad_get_mad(umad);
#  230|   
#  231|   	if (mgmt_class == IB_SMI_DIRECT_CLASS)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def277]
rdma-core-59.0/iwpmd/iwarp_pm_common.c:117:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pm_sock’
rdma-core-59.0/iwpmd/iwarp_pm_common.c:102:19: acquire_resource: datagram socket created here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:103:12: branch_false: following ‘false’ branch (when ‘pm_sock >= 0’)...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:110:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:116:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:118:53: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:117:17: danger: ‘pm_sock’ leaks here
#  115|   
#  116|   	if (bind(pm_sock, &bind_addr.sock_addr, sizeof(struct sockaddr_in))) {
#  117|-> 		syslog(LOG_WARNING, "create_iwpm_socket_v4: Unable to bind socket (port = %u). %s.\n",
#  118|   				bind_port, strerror(errno));
#  119|   		close(pm_sock);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def278]
rdma-core-59.0/iwpmd/iwarp_pm_common.c:119:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pm_sock’
rdma-core-59.0/iwpmd/iwarp_pm_common.c:102:19: acquire_resource: datagram socket created here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:103:12: branch_false: following ‘false’ branch (when ‘pm_sock >= 0’)...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:110:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:116:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:118:53: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:119:17: danger: ‘pm_sock’ leaks here
#  117|   		syslog(LOG_WARNING, "create_iwpm_socket_v4: Unable to bind socket (port = %u). %s.\n",
#  118|   				bind_port, strerror(errno));
#  119|-> 		close(pm_sock);
#  120|   		pm_sock = -errno;
#  121|   		goto create_socket_v4_exit;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def279]
rdma-core-59.0/iwpmd/iwarp_pm_common.c:182:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pm_sock’
rdma-core-59.0/iwpmd/iwarp_pm_common.c:156:19: acquire_resource: datagram socket created here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:157:12: branch_false: following ‘false’ branch (when ‘pm_sock >= 0’)...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:164:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:166:12: branch_false: following ‘false’ branch (when ‘ret_value >= 0’)...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:175:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:181:13: acquire_resource: socket created here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:181:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:183:53: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:182:17: danger: ‘pm_sock’ leaks here
#  180|   
#  181|   	if (bind(pm_sock, &bind_addr.sock_addr, sizeof(struct sockaddr_in6))) {
#  182|-> 		syslog(LOG_WARNING, "create_iwpm_socket_v6: Unable to bind socket (port = %u). %s.\n",
#  183|   				bind_port, strerror(errno));
#  184|   		close(pm_sock);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def280]
rdma-core-59.0/iwpmd/iwarp_pm_common.c:184:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pm_sock’
rdma-core-59.0/iwpmd/iwarp_pm_common.c:156:19: acquire_resource: datagram socket created here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:157:12: branch_false: following ‘false’ branch (when ‘pm_sock >= 0’)...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:164:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:166:12: branch_false: following ‘false’ branch (when ‘ret_value >= 0’)...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:175:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:181:13: acquire_resource: socket created here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:181:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:183:53: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:184:17: danger: ‘pm_sock’ leaks here
#  182|   		syslog(LOG_WARNING, "create_iwpm_socket_v6: Unable to bind socket (port = %u). %s.\n",
#  183|   				bind_port, strerror(errno));
#  184|-> 		close(pm_sock);
#  185|   		pm_sock = -errno;
#  186|   		goto create_socket_v6_exit;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def281]
rdma-core-59.0/iwpmd/iwarp_pm_common.c:234:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘nl_sock’
rdma-core-59.0/iwpmd/iwarp_pm_common.c:218:19: acquire_resource: socket created here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:219:12: branch_false: following ‘false’ branch (when ‘nl_sock >= 0’)...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:227:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:233:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:235:42: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:234:17: danger: ‘nl_sock’ leaks here
#  232|   
#  233|   	if (bind(nl_sock, &bind_addr.sock_addr, sizeof(struct sockaddr_nl))) {
#  234|-> 		syslog(LOG_WARNING, "create_netlink_socket: Unable to bind socket. %s.\n",
#  235|   				strerror(errno));
#  236|   		close(nl_sock);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def282]
rdma-core-59.0/iwpmd/iwarp_pm_common.c:236:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘nl_sock’
rdma-core-59.0/iwpmd/iwarp_pm_common.c:218:19: acquire_resource: socket created here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:219:12: branch_false: following ‘false’ branch (when ‘nl_sock >= 0’)...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:227:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:233:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_common.c:235:42: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_common.c:236:17: danger: ‘nl_sock’ leaks here
#  234|   		syslog(LOG_WARNING, "create_netlink_socket: Unable to bind socket. %s.\n",
#  235|   				strerror(errno));
#  236|-> 		close(nl_sock);
#  237|   		nl_sock = -errno;
#  238|   		goto create_nl_socket_exit;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def283]
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:226:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socket((int)addr_family, 1, 0)’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:193:21: acquire_resource: stream socket created here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:194:12: branch_false: following ‘false’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:199:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:206:20: branch_false: following ‘false’ branch (when ‘requested_port == 0’)...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:208:17: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:226:12: danger: ‘socket((int)addr_family, 1, 0)’ leaks here
#  224|   	}
#  225|   
#  226|-> 	if (bind(*new_sock, &bind_addr.sock_addr, sizeof(bind_addr))) {
#  227|   		str_err = "Unable to bind the socket";
#  228|   		goto get_tcp_port_error;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def284]
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:242:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘new_sd’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:278:19: enter_function: entry to ‘create_iwpm_mapped_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:286:12: branch_false: following ‘false’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:39: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:21: call_function: calling ‘get_iwpm_tcp_port’ from ‘create_iwpm_mapped_port’
#  240|   	return 0;
#  241|   get_tcp_port_error:
#  242|-> 	syslog(LOG_WARNING, "get_iwpm_tcp_port: %s (addr family = %04X, requested port = %04X).\n",
#  243|   				str_err, addr_family, be16toh(requested_port));
#  244|   	return -errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def285]
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:257:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘new_sd’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:278:19: enter_function: entry to ‘create_iwpm_mapped_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:286:12: branch_false: following ‘false’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:39: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:21: call_function: calling ‘get_iwpm_tcp_port’ from ‘create_iwpm_mapped_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:21: return_function: returning to ‘create_iwpm_mapped_port’ from ‘get_iwpm_tcp_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:20: branch_false: following ‘false’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:292:21: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:292:21: call_function: calling ‘get_iwpm_port’ from ‘create_iwpm_mapped_port’
#  255|   	iwpm_port = malloc(sizeof(iwpm_mapped_port));
#  256|   	if (!iwpm_port) {
#  257|-> 		syslog(LOG_WARNING, "get_iwpm_port: Unable to allocate a mapped port.\n");
#  258|   		return NULL;
#  259|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def286]
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:268:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘new_sd’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:278:19: enter_function: entry to ‘create_iwpm_mapped_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:286:12: branch_false: following ‘false’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:39: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:21: call_function: calling ‘get_iwpm_tcp_port’ from ‘create_iwpm_mapped_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:21: return_function: returning to ‘create_iwpm_mapped_port’ from ‘get_iwpm_tcp_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:20: branch_false: following ‘false’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:292:21: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:292:21: call_function: calling ‘get_iwpm_port’ from ‘create_iwpm_mapped_port’
#  266|   	iwpm_port->sd = sd;
#  267|   	atomic_init(&iwpm_port->ref_cnt, 1);
#  268|-> 	if (is_wcard_ipaddr(local_addr))
#  269|   		iwpm_port->wcard = 1;
#  270|   	return iwpm_port;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:268:13: warning[-Wanalyzer-malloc-leak]: leak of ‘iwpm_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:255:21: acquire_memory: allocated here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:256:12: branch_false: following ‘false’ branch (when ‘iwpm_port’ is non-NULL)...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:260:9: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:268:13: danger: ‘iwpm_port’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  266|   	iwpm_port->sd = sd;
#  267|   	atomic_init(&iwpm_port->ref_cnt, 1);
#  268|-> 	if (is_wcard_ipaddr(local_addr))
#  269|   		iwpm_port->wcard = 1;
#  270|   	return iwpm_port;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def288]
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:293:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘new_sd’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:278:19: enter_function: entry to ‘create_iwpm_mapped_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:286:12: branch_false: following ‘false’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:39: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:21: call_function: calling ‘get_iwpm_tcp_port’ from ‘create_iwpm_mapped_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:21: return_function: returning to ‘create_iwpm_mapped_port’ from ‘get_iwpm_tcp_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:289:20: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:290:25: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:293:16: danger: ‘new_sd’ leaks here
#  291|   	}
#  292|   	iwpm_port = get_iwpm_port(client_idx, local_addr, &mapped_addr, new_sd);
#  293|-> 	return iwpm_port;
#  294|   
#  295|   create_mapped_port_error:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def289]
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:329:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘new_sd’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:306:19: enter_function: entry to ‘reopen_iwpm_mapped_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:318:14: branch_false: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:318:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:319:21: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:319:21: call_function: calling ‘get_iwpm_tcp_port’ from ‘reopen_iwpm_mapped_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:319:21: return_function: returning to ‘reopen_iwpm_mapped_port’ from ‘get_iwpm_tcp_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:319:20: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:320:25: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:328:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:329:17: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:329:17: danger: ‘new_sd’ leaks here
#  327|   			str_err);
#  328|   	if (new_sd >= 0)
#  329|-> 		close(new_sd);
#  330|   	return NULL;
#  331|   }

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def290]
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:447:17: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘((iwpm_mapped_port)*((struct list_node *)iwpm_port)).sd’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:514:6: enter_function: entry to ‘free_iwpm_mapped_ports’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:518:29: call_function: inlined call to ‘list_pop_’ from ‘free_iwpm_mapped_ports’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:519:17: call_function: calling ‘free_iwpm_port’ from ‘free_iwpm_mapped_ports’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:519:17: return_function: returning to ‘free_iwpm_mapped_ports’ from ‘free_iwpm_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:518:29: call_function: inlined call to ‘list_pop_’ from ‘free_iwpm_mapped_ports’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:519:17: call_function: calling ‘free_iwpm_port’ from ‘free_iwpm_mapped_ports’
#  445|   {
#  446|   	if (iwpm_port->sd != -1)
#  447|-> 		close(iwpm_port->sd);
#  448|   	free(iwpm_port);
#  449|   }

Error: CPPCHECK_WARNING (CWE-401): [#def291]
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:508: error[memleak]: Memory leak: pending_msg
#  506|   	/* signal the thread that a new message has been posted */
#  507|   	pthread_cond_signal(&cond_pending_msg);
#  508|-> 	return 0;
#  509|   }
#  510|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
rdma-core-59.0/iwpmd/iwarp_pm_server.c:690:9: warning[-Wanalyzer-malloc-leak]: leak of ‘send_msg’
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1392:12: enter_function: entry to ‘iwarp_port_mapper’
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1417:25: branch_true: following ‘true’ branch (when ‘__i != 16’)...
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1417:25: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1445:20: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1446:29: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1446:28: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1447:39: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1447:39: call_function: calling ‘process_iwpm_msg’ from ‘iwarp_port_mapper’
#  688|   		return -ENOMEM;
#  689|   	}
#  690|-> 	form_iwpm_accept(&send_msg->data, msg_parms);
#  691|   	form_iwpm_send_msg(pm_sock, recv_addr, msg_parms->msize, send_msg);
#  692|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def293]
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1519:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/iwpmd.conf", "r")’
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1517:14: acquire_resource: opened here
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1518:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1519:17: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1519:17: danger: ‘fopen("/etc/iwpmd.conf", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1517|   	fp = fopen(IWPM_CONFIG_FILE, "r");
# 1518|   	if (fp) {
# 1519|-> 		parse_iwpm_config(fp);
# 1520|   		fclose(fp);
# 1521|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1519:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/iwpmd.conf", "r")’
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1517:14: acquire_memory: allocated here
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1518:12: branch_true: following ‘true’ branch...
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1519:17: branch_true: ...to here
rdma-core-59.0/iwpmd/iwarp_pm_server.c:1519:17: danger: ‘fopen("/etc/iwpmd.conf", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1517|   	fp = fopen(IWPM_CONFIG_FILE, "r");
# 1518|   	if (fp) {
# 1519|-> 		parse_iwpm_config(fp);
# 1520|   		fclose(fp);
# 1521|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
rdma-core-59.0/kernel-boot/rdma_rename.c:143:15: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(physfn_pcidev)’
rdma-core-59.0/kernel-boot/rdma_rename.c:293:12: enter_function: entry to ‘get_virtfn_info’
rdma-core-59.0/kernel-boot/rdma_rename.c:303:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: acquire_memory: allocated here
rdma-core-59.0/kernel-boot/rdma_rename.c:308:12: branch_false: following ‘false’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:317:9: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:319:15: call_function: calling ‘fill_pci_info’ from ‘get_virtfn_info’
#  141|   
#  142|   	ret = 0;
#  143|-> 	dir = opendir(slots);
#  144|   	if (!dir)
#  145|   		goto err_dir;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
rdma-core-59.0/kernel-boot/rdma_rename.c:150:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(physfn_pcidev)’
rdma-core-59.0/kernel-boot/rdma_rename.c:293:12: enter_function: entry to ‘get_virtfn_info’
rdma-core-59.0/kernel-boot/rdma_rename.c:303:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: acquire_memory: allocated here
rdma-core-59.0/kernel-boot/rdma_rename.c:308:12: branch_false: following ‘false’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:317:9: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:319:15: call_function: calling ‘fill_pci_info’ from ‘get_virtfn_info’
#  148|   		goto out;
#  149|   
#  150|-> 	while ((dent = readdir(dir))) {
#  151|   		char *str, address[256];
#  152|   		FILE *fp;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
rdma-core-59.0/kernel-boot/rdma_rename.c:150:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(slots)’
rdma-core-59.0/kernel-boot/rdma_rename.c:139:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/kernel-boot/rdma_rename.c:143:15: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:143:15: acquire_memory: allocated here
rdma-core-59.0/kernel-boot/rdma_rename.c:144:12: branch_false: following ‘false’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:147:13: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:147:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:150:24: danger: ‘opendir(slots)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  148|   		goto out;
#  149|   
#  150|-> 	while ((dent = readdir(dir))) {
#  151|   		char *str, address[256];
#  152|   		FILE *fp;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
rdma-core-59.0/kernel-boot/rdma_rename.c:188:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(physfn_pcidev)’
rdma-core-59.0/kernel-boot/rdma_rename.c:293:12: enter_function: entry to ‘get_virtfn_info’
rdma-core-59.0/kernel-boot/rdma_rename.c:303:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: acquire_memory: allocated here
rdma-core-59.0/kernel-boot/rdma_rename.c:308:12: branch_false: following ‘false’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:317:9: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:319:15: call_function: calling ‘fill_pci_info’ from ‘get_virtfn_info’
#  186|   	}
#  187|   out:
#  188|-> 	closedir(dir);
#  189|   err_dir:
#  190|   	free(slots);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
rdma-core-59.0/kernel-boot/rdma_rename.c:188:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(slots)’
rdma-core-59.0/kernel-boot/rdma_rename.c:139:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/kernel-boot/rdma_rename.c:143:15: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:143:15: acquire_memory: allocated here
rdma-core-59.0/kernel-boot/rdma_rename.c:144:12: branch_false: following ‘false’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:147:13: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:147:12: branch_true: following ‘true’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:148:17: branch_true: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:188:9: danger: ‘opendir(slots)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  186|   	}
#  187|   out:
#  188|-> 	closedir(dir);
#  189|   err_dir:
#  190|   	free(slots);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
rdma-core-59.0/kernel-boot/rdma_rename.c:270:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(physfn_pcidev)’
rdma-core-59.0/kernel-boot/rdma_rename.c:293:12: enter_function: entry to ‘get_virtfn_info’
rdma-core-59.0/kernel-boot/rdma_rename.c:303:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: acquire_memory: allocated here
rdma-core-59.0/kernel-boot/rdma_rename.c:308:12: branch_false: following ‘false’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:317:9: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:319:15: call_function: calling ‘fill_pci_info’ from ‘get_virtfn_info’
#  268|   		     &p->func);
#  269|   	if (ret != 4) {
#  270|-> 		pr_err("%s: Failed to read PCI BOF\n", d->curr);
#  271|   		return -ENOENT;
#  272|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
rdma-core-59.0/kernel-boot/rdma_rename.c:284:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(physfn_pcidev)’
rdma-core-59.0/kernel-boot/rdma_rename.c:293:12: enter_function: entry to ‘get_virtfn_info’
rdma-core-59.0/kernel-boot/rdma_rename.c:303:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: acquire_memory: allocated here
rdma-core-59.0/kernel-boot/rdma_rename.c:308:12: branch_false: following ‘false’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:317:9: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:319:15: call_function: calling ‘fill_pci_info’ from ‘get_virtfn_info’
#  282|   		 */
#  283|   		p->func += p->slot * 8;
#  284|-> 		pr_dbg("%s: This is ARI device, new PCI BOF is %04x:%02x:%02x.%u\n",
#  285|   		       d->curr, p->domain, p->bus, p->slot, p->func);
#  286|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
rdma-core-59.0/kernel-boot/rdma_rename.c:323:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(physfn_pcidev)’
rdma-core-59.0/kernel-boot/rdma_rename.c:293:12: enter_function: entry to ‘get_virtfn_info’
rdma-core-59.0/kernel-boot/rdma_rename.c:303:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: acquire_memory: allocated here
rdma-core-59.0/kernel-boot/rdma_rename.c:308:12: branch_false: following ‘false’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:317:9: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:319:15: call_function: calling ‘fill_pci_info’ from ‘get_virtfn_info’
rdma-core-59.0/kernel-boot/rdma_rename.c:319:15: return_function: returning to ‘get_virtfn_info’ from ‘fill_pci_info’
rdma-core-59.0/kernel-boot/rdma_rename.c:320:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:323:24: danger: ‘opendir(physfn_pcidev)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3)
#  321|   		goto err_dir;
#  322|   
#  323|-> 	while ((dent = readdir(dir))) {
#  324|   		const char *s = "virtfn";
#  325|   		struct pci_info v = {};

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
rdma-core-59.0/kernel-boot/rdma_rename.c:355:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(physfn_pcidev)’
rdma-core-59.0/kernel-boot/rdma_rename.c:303:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:307:15: acquire_memory: allocated here
rdma-core-59.0/kernel-boot/rdma_rename.c:308:12: branch_false: following ‘false’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:317:9: branch_false: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:320:12: branch_true: following ‘true’ branch...
rdma-core-59.0/kernel-boot/rdma_rename.c:321:17: branch_true: ...to here
rdma-core-59.0/kernel-boot/rdma_rename.c:355:9: danger: ‘opendir(physfn_pcidev)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  353|   
#  354|   err_dir:
#  355|-> 	closedir(dir);
#  356|   err_free:
#  357|   	free(physfn_pcidev);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def304]
rdma-core-59.0/libibmad/mad.c:132:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘drpath’
rdma-core-59.0/libibmad/mad.c:161:5: enter_function: entry to ‘mad_build_pkt’
rdma-core-59.0/libibmad/mad.c:192:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/mad.c:192:13: branch_false: ...to here
rdma-core-59.0/libibmad/mad.c:192:13: call_function: calling ‘mad_encode’ from ‘mad_build_pkt’
#  130|   		/* word 9 */
#  131|   		mad_set_field(buf, 0, IB_DRSMP_DRDLID_F,
#  132|-> 			      drpath->drdlid ? drpath->drdlid : 0xffff);
#  133|   		mad_set_field(buf, 0, IB_DRSMP_DRSLID_F,
#  134|   			      drpath->drslid ? drpath->drslid : 0xffff);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
rdma-core-59.0/libibmad/rpc.c:404:24: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
rdma-core-59.0/libibmad/rpc.c:380:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:386:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:386:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:392:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:397:13: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:398:12: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:402:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:404:24: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  402|   	memset(p, 0, sizeof(*p));
#  403|   
#  404|-> 	if ((port_id = umad_open_port(dev_name, dev_port)) < 0) {
#  405|   		IBWARN("can't open UMAD port (%s:%d)", dev_name, dev_port);
#  406|   		if (!errno)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
rdma-core-59.0/libibmad/rpc.c:421:21: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
rdma-core-59.0/libibmad/rpc.c:380:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:386:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:386:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:392:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:397:13: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:398:12: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:402:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:404:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:412:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:414:16: branch_true: following ‘true’ branch (when ‘num_classes != 0’)...
rdma-core-59.0/libibmad/rpc.c:416:29: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:421:21: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  419|   			rmpp_version = 1;
#  420|   		if (mgmt < 0 || mgmt >= MAX_CLASS ||
#  421|-> 		    mad_register_client_via(mgmt, rmpp_version, p) < 0) {
#  422|   			IBWARN("client_register for mgmt %d failed", mgmt);
#  423|   			if (!errno)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
rdma-core-59.0/libibmad/rpc.c:425:25: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
rdma-core-59.0/libibmad/rpc.c:380:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:386:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:386:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:392:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:397:13: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:398:12: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:402:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:404:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:412:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:414:16: branch_true: following ‘true’ branch (when ‘num_classes != 0’)...
rdma-core-59.0/libibmad/rpc.c:416:29: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:418:20: branch_false: following ‘false’ branch (when ‘mgmt != 3’)...
rdma-core-59.0/libibmad/rpc.c:420:21: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:420:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibmad/rpc.c:422:25: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:425:25: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  423|   			if (!errno)
#  424|   				errno = EINVAL;
#  425|-> 			umad_close_port(port_id);
#  426|   			free(p);
#  427|   			return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
rdma-core-59.0/libibmad/rpc.c:447:14: warning[-Wanalyzer-malloc-leak]: leak of ‘gsi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:529:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  445|   	int gsi_port_id = -1;
#  446|   	int rc = -1;
#  447|-> 	rc = umad_get_smi_gsi_pair_by_ca_name(ca_name, portnum, &ca_pair, enforce_smi);
#  448|   
#  449|   	if (rc < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
rdma-core-59.0/libibmad/rpc.c:447:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ports_pair’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:536:22: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  445|   	int gsi_port_id = -1;
#  446|   	int rc = -1;
#  447|-> 	rc = umad_get_smi_gsi_pair_by_ca_name(ca_name, portnum, &ca_pair, enforce_smi);
#  448|   
#  449|   	if (rc < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
rdma-core-59.0/libibmad/rpc.c:447:14: warning[-Wanalyzer-malloc-leak]: leak of ‘smi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:522:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  445|   	int gsi_port_id = -1;
#  446|   	int rc = -1;
#  447|-> 	rc = umad_get_smi_gsi_pair_by_ca_name(ca_name, portnum, &ca_pair, enforce_smi);
#  448|   
#  449|   	if (rc < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
rdma-core-59.0/libibmad/rpc.c:453:23: warning[-Wanalyzer-malloc-leak]: leak of ‘gsi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:529:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  451|   		return rc;
#  452|   	}
#  453|-> 	smi_port_id = umad_open_port(ca_pair.smi_name, ca_pair.smi_preferred_port);
#  454|   
#  455|   	if (smi_port_id < 0 && enforce_smi) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
rdma-core-59.0/libibmad/rpc.c:453:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ports_pair’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:536:22: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  451|   		return rc;
#  452|   	}
#  453|-> 	smi_port_id = umad_open_port(ca_pair.smi_name, ca_pair.smi_preferred_port);
#  454|   
#  455|   	if (smi_port_id < 0 && enforce_smi) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
rdma-core-59.0/libibmad/rpc.c:453:23: warning[-Wanalyzer-malloc-leak]: leak of ‘smi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:522:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  451|   		return rc;
#  452|   	}
#  453|-> 	smi_port_id = umad_open_port(ca_pair.smi_name, ca_pair.smi_preferred_port);
#  454|   
#  455|   	if (smi_port_id < 0 && enforce_smi) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
rdma-core-59.0/libibmad/rpc.c:460:23: warning[-Wanalyzer-malloc-leak]: leak of ‘gsi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:529:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  458|   	}
#  459|   
#  460|-> 	gsi_port_id = umad_open_port(ca_pair.gsi_name, ca_pair.gsi_preferred_port);
#  461|   
#  462|   	if (gsi_port_id < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
rdma-core-59.0/libibmad/rpc.c:460:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ports_pair’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:536:22: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  458|   	}
#  459|   
#  460|-> 	gsi_port_id = umad_open_port(ca_pair.gsi_name, ca_pair.gsi_preferred_port);
#  461|   
#  462|   	if (gsi_port_id < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
rdma-core-59.0/libibmad/rpc.c:460:23: warning[-Wanalyzer-malloc-leak]: leak of ‘smi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:522:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  458|   	}
#  459|   
#  460|-> 	gsi_port_id = umad_open_port(ca_pair.gsi_name, ca_pair.gsi_preferred_port);
#  461|   
#  462|   	if (gsi_port_id < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
rdma-core-59.0/libibmad/rpc.c:464:17: warning[-Wanalyzer-malloc-leak]: leak of ‘gsi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:529:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  462|   	if (gsi_port_id < 0) {
#  463|   		IBWARN("Can't open GSI UMAD port (%s) (%s:%d)", strerror(-gsi_port_id), ca_pair.gsi_name, ca_pair.gsi_preferred_port);
#  464|-> 		umad_close_port(smi_port_id);
#  465|   		return gsi_port_id;
#  466|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
rdma-core-59.0/libibmad/rpc.c:464:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ports_pair’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:536:22: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  462|   	if (gsi_port_id < 0) {
#  463|   		IBWARN("Can't open GSI UMAD port (%s) (%s:%d)", strerror(-gsi_port_id), ca_pair.gsi_name, ca_pair.gsi_preferred_port);
#  464|-> 		umad_close_port(smi_port_id);
#  465|   		return gsi_port_id;
#  466|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
rdma-core-59.0/libibmad/rpc.c:464:17: warning[-Wanalyzer-malloc-leak]: leak of ‘smi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:522:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
#  462|   	if (gsi_port_id < 0) {
#  463|   		IBWARN("Can't open GSI UMAD port (%s) (%s:%d)", strerror(-gsi_port_id), ca_pair.gsi_name, ca_pair.gsi_preferred_port);
#  464|-> 		umad_close_port(smi_port_id);
#  465|   		return gsi_port_id;
#  466|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def320]
rdma-core-59.0/libibmad/rpc.c:554:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gsi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:529:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’
rdma-core-59.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:552:16: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:554:16: danger: ‘gsi’ leaks here; was allocated at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
#  552|   	memset(ports_pair->smi.port->class_agents, 0xff, sizeof ports_pair->smi.port->class_agents);
#  553|   	memset(ports_pair->gsi.port->class_agents, 0xff, sizeof ports_pair->gsi.port->class_agents);
#  554|-> 	while (num_classes--) {
#  555|   		uint8_t rmpp_version = 0;
#  556|   		int mgmt = *mgmt_classes++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
rdma-core-59.0/libibmad/rpc.c:554:16: warning[-Wanalyzer-malloc-leak]: leak of ‘smi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:522:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’
rdma-core-59.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:552:16: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:554:16: danger: ‘smi’ leaks here; was allocated at [(6)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/5)
#  552|   	memset(ports_pair->smi.port->class_agents, 0xff, sizeof ports_pair->smi.port->class_agents);
#  553|   	memset(ports_pair->gsi.port->class_agents, 0xff, sizeof ports_pair->gsi.port->class_agents);
#  554|-> 	while (num_classes--) {
#  555|   		uint8_t rmpp_version = 0;
#  556|   		int mgmt = *mgmt_classes++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
rdma-core-59.0/libibmad/rpc.c:561:21: warning[-Wanalyzer-malloc-leak]: leak of ‘gsi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:529:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’
rdma-core-59.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:552:16: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:554:16: branch_true: following ‘true’ branch (when ‘num_classes != 0’)...
rdma-core-59.0/libibmad/rpc.c:556:29: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:560:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:561:21: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:561:21: danger: ‘gsi’ leaks here; was allocated at [(8)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/7)
#  559|   			rmpp_version = 1;
#  560|   		if (mgmt < 0 || mgmt >= MAX_CLASS || !p ||
#  561|-> 		    mad_register_client_via(mgmt, rmpp_version, p) < 0) {
#  562|   			IBWARN("client_register for mgmt %d failed", mgmt);
#  563|   			if (!errno)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
rdma-core-59.0/libibmad/rpc.c:561:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ports_pair’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:536:22: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’
rdma-core-59.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:552:16: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:554:16: branch_true: following ‘true’ branch (when ‘num_classes != 0’)...
rdma-core-59.0/libibmad/rpc.c:556:29: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:560:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:561:21: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:561:21: danger: ‘ports_pair’ leaks here; was allocated at [(10)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/9)
#  559|   			rmpp_version = 1;
#  560|   		if (mgmt < 0 || mgmt >= MAX_CLASS || !p ||
#  561|-> 		    mad_register_client_via(mgmt, rmpp_version, p) < 0) {
#  562|   			IBWARN("client_register for mgmt %d failed", mgmt);
#  563|   			if (!errno)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def324]
rdma-core-59.0/libibmad/rpc.c:561:21: warning[-Wanalyzer-malloc-leak]: leak of ‘smi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:522:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’
rdma-core-59.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:552:16: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:554:16: branch_true: following ‘true’ branch (when ‘num_classes != 0’)...
rdma-core-59.0/libibmad/rpc.c:556:29: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:560:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:561:21: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:561:21: danger: ‘smi’ leaks here; was allocated at [(6)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/5)
#  559|   			rmpp_version = 1;
#  560|   		if (mgmt < 0 || mgmt >= MAX_CLASS || !p ||
#  561|-> 		    mad_register_client_via(mgmt, rmpp_version, p) < 0) {
#  562|   			IBWARN("client_register for mgmt %d failed", mgmt);
#  563|   			if (!errno)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
rdma-core-59.0/libibmad/rpc.c:572:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ports_pair’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:536:22: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’
rdma-core-59.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:552:16: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:554:16: branch_true: following ‘true’ branch (when ‘num_classes != 0’)...
rdma-core-59.0/libibmad/rpc.c:556:29: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:557:40: call_function: calling ‘get_port_for_class’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:557:40: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_port_for_class’
rdma-core-59.0/libibmad/rpc.c:560:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:561:21: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:560:21: branch_true: following ‘true’ branch...
rdma-core-59.0/libibmad/rpc.c:562:25: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:572:9: danger: ‘ports_pair’ leaks here; was allocated at [(10)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/9)
#  570|   
#  571|    mad_reg_error:
#  572|-> 	umad_close_port(ports_pair->smi.port->port_id);
#  573|   	umad_close_port(ports_pair->gsi.port->port_id);
#  574|    get_smi_error:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
rdma-core-59.0/libibmad/rpc.c:572:9: warning[-Wanalyzer-malloc-leak]: leak of ‘smi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:522:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’
rdma-core-59.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:552:16: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:554:16: branch_true: following ‘true’ branch (when ‘num_classes != 0’)...
rdma-core-59.0/libibmad/rpc.c:556:29: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:557:40: call_function: calling ‘get_port_for_class’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:557:40: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_port_for_class’
rdma-core-59.0/libibmad/rpc.c:560:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:561:21: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:560:21: branch_true: following ‘true’ branch...
rdma-core-59.0/libibmad/rpc.c:562:25: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:572:9: danger: ‘smi’ leaks here; was allocated at [(6)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/5)
#  570|   
#  571|    mad_reg_error:
#  572|-> 	umad_close_port(ports_pair->smi.port->port_id);
#  573|   	umad_close_port(ports_pair->gsi.port->port_id);
#  574|    get_smi_error:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
rdma-core-59.0/libibmad/rpc.c:573:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ports_pair’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:536:22: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’
rdma-core-59.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:552:16: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:554:16: branch_true: following ‘true’ branch (when ‘num_classes != 0’)...
rdma-core-59.0/libibmad/rpc.c:556:29: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:557:40: call_function: calling ‘get_port_for_class’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:557:40: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_port_for_class’
rdma-core-59.0/libibmad/rpc.c:560:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:561:21: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:560:21: branch_true: following ‘true’ branch...
rdma-core-59.0/libibmad/rpc.c:562:25: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:573:9: danger: ‘ports_pair’ leaks here; was allocated at [(10)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/9)
#  571|    mad_reg_error:
#  572|   	umad_close_port(ports_pair->smi.port->port_id);
#  573|-> 	umad_close_port(ports_pair->gsi.port->port_id);
#  574|    get_smi_error:
#  575|   	free(ports_pair);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
rdma-core-59.0/libibmad/rpc.c:573:9: warning[-Wanalyzer-malloc-leak]: leak of ‘smi’
rdma-core-59.0/libibmad/rpc.c:497:26: enter_function: entry to ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:505:12: branch_false: following ‘false’ branch (when ‘num_classes <= 255’)...
rdma-core-59.0/libibmad/rpc.c:511:13: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:511:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:517:27: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:522:15: acquire_memory: allocated here
rdma-core-59.0/libibmad/rpc.c:523:12: branch_false: following ‘false’ branch (when ‘smi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:527:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:530:12: branch_false: following ‘false’ branch (when ‘gsi’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:534:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:537:12: branch_false: following ‘false’ branch (when ‘ports_pair’ is non-NULL)...
rdma-core-59.0/libibmad/rpc.c:541:9: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:545:13: call_function: calling ‘get_smi_gsi_pair’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:545:13: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_smi_gsi_pair’
rdma-core-59.0/libibmad/rpc.c:545:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:552:16: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:554:16: branch_true: following ‘true’ branch (when ‘num_classes != 0’)...
rdma-core-59.0/libibmad/rpc.c:556:29: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:557:40: call_function: calling ‘get_port_for_class’ from ‘mad_rpc_open_port2’
rdma-core-59.0/libibmad/rpc.c:557:40: return_function: returning to ‘mad_rpc_open_port2’ from ‘get_port_for_class’
rdma-core-59.0/libibmad/rpc.c:560:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibmad/rpc.c:561:21: branch_false: ...to here
rdma-core-59.0/libibmad/rpc.c:560:21: branch_true: following ‘true’ branch...
rdma-core-59.0/libibmad/rpc.c:562:25: branch_true: ...to here
rdma-core-59.0/libibmad/rpc.c:573:9: danger: ‘smi’ leaks here; was allocated at [(6)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/5)
#  571|    mad_reg_error:
#  572|   	umad_close_port(ports_pair->smi.port->port_id);
#  573|-> 	umad_close_port(ports_pair->gsi.port->port_id);
#  574|    get_smi_error:
#  575|   	free(ports_pair);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
rdma-core-59.0/libibmad/serv.c:177:22: warning[-Wanalyzer-malloc-leak]: leak of ‘mad’
rdma-core-59.0/libibmad/serv.c:171:7: enter_function: entry to ‘mad_receive_via’
rdma-core-59.0/libibmad/serv.c:173:21: branch_true: following ‘true’ branch (when ‘umad’ is NULL)...
rdma-core-59.0/libibmad/serv.c:173:49: branch_true: ...to here
rdma-core-59.0/libibmad/serv.c:173:35: call_function: inlined call to ‘umad_alloc’ from ‘mad_receive_via’
rdma-core-59.0/libibmad/serv.c:177:22: danger: ‘mad’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  175|   	int length = IB_MAD_SIZE;
#  176|   
#  177|-> 	if ((agent = umad_recv(srcport->port_id, mad, &length,
#  178|   			       mad_get_timeout(srcport, timeout))) < 0) {
#  179|   		if (!umad)

Error: CPPCHECK_WARNING (CWE-476): [#def330]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:263: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cbdata
#  261|   		if (rc > 0) {
#  262|   			struct ni_cbdata * cbdata = malloc(sizeof(*cbdata));
#  263|-> 			cbdata->node = node;
#  264|   			cbdata->port_num = port_num;
#  265|   			query_node_info(engine, &path, cbdata);

Error: CPPCHECK_WARNING (CWE-476): [#def331]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:264: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cbdata
#  262|   			struct ni_cbdata * cbdata = malloc(sizeof(*cbdata));
#  263|   			cbdata->node = node;
#  264|-> 			cbdata->port_num = port_num;
#  265|   			query_node_info(engine, &path, cbdata);
#  266|   		}

Error: CPPCHECK_WARNING (CWE-476): [#def332]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:312: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cbdata
#  310|   		if (rc > 0) {
#  311|   			struct ni_cbdata * cbdata = malloc(sizeof(*cbdata));
#  312|-> 			cbdata->node = node;
#  313|   			cbdata->port_num = port_num;
#  314|   			query_node_info(engine, &path, cbdata);

Error: CPPCHECK_WARNING (CWE-476): [#def333]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:313: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cbdata
#  311|   			struct ni_cbdata * cbdata = malloc(sizeof(*cbdata));
#  312|   			cbdata->node = node;
#  313|-> 			cbdata->port_num = port_num;
#  314|   			query_node_info(engine, &path, cbdata);
#  315|   		}

Error: CPPCHECK_WARNING (CWE-476): [#def334]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:423: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cbdata
#  421|   		if (rc > 0) {
#  422|   			struct ni_cbdata * cbdata = malloc(sizeof(*cbdata));
#  423|-> 			cbdata->node = node;
#  424|   			cbdata->port_num = port_num;
#  425|   			query_node_info(engine, &path, cbdata);

Error: CPPCHECK_WARNING (CWE-476): [#def335]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:424: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cbdata
#  422|   			struct ni_cbdata * cbdata = malloc(sizeof(*cbdata));
#  423|   			cbdata->node = node;
#  424|-> 			cbdata->port_num = port_num;
#  425|   			query_node_info(engine, &path, cbdata);
#  426|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:466:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rc’
rdma-core-59.0/libibnetdisc/ibnetdisc.c:459:27: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/ibnetdisc.c:460:12: branch_false: following ‘false’ branch (when ‘rc’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc.c:466:53: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc.c:466:9: danger: ‘rc’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  464|   
#  465|   	/* decode just a couple of fields for quicker reference. */
#  466|-> 	mad_decode_field(node_info, IB_NODE_GUID_F, &rc->guid);
#  467|   	mad_decode_field(node_info, IB_NODE_TYPE_F, &rc->type);
#  468|   	mad_decode_field(node_info, IB_NODE_NPORTS_F, &rc->numports);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def337]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:630:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/libibnetdisc/ibnetdisc.c:627:14: enter_function: entry to ‘ibnd_find_node_dr’
rdma-core-59.0/libibnetdisc/ibnetdisc.c:629:27: call_function: calling ‘ibnd_find_port_dr’ from ‘ibnd_find_node_dr’
rdma-core-59.0/libibnetdisc/ibnetdisc.c:629:27: return_function: returning to ‘ibnd_find_node_dr’ from ‘ibnd_find_port_dr’
rdma-core-59.0/libibnetdisc/ibnetdisc.c:630:16: danger: dereference of NULL ‘ibnd_find_port_dr(fabric,  dr_str)’
#  628|   {
#  629|   	ibnd_port_t *rc = ibnd_find_port_dr(fabric, dr_str);
#  630|-> 	return rc->node;
#  631|   }
#  632|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def338]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:678:9: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
rdma-core-59.0/libibnetdisc/ibnetdisc.c:754:15: enter_function: entry to ‘allocate_fabric_internal’
rdma-core-59.0/libibnetdisc/ibnetdisc.c:756:27: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/ibnetdisc.c:757:12: branch_true: following ‘true’ branch (when ‘f’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc.c:758:17: branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc.c:758:17: call_function: calling ‘create_lid2guid’ from ‘allocate_fabric_internal’
#  676|   void create_lid2guid(f_internal_t *f_int)
#  677|   {
#  678|-> 	cl_qmap_init(&f_int->lid2guid);
#  679|   }
#  680|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
rdma-core-59.0/libibnetdisc/ibnetdisc.c:707:37: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
rdma-core-59.0/libibnetdisc/ibnetdisc.c:698:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc.c:701:38: branch_true: following ‘true’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc.c:704:32: branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc.c:704:32: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/ibnetdisc.c:705:28: branch_true: following ‘true’ branch (when ‘item’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc.c:706:33: branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc.c:707:37: danger: ‘item’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  705|   			if (item) {
#  706|   				item->port = port;
#  707|-> 				if (cl_qmap_insert(&f_int->lid2guid, lid,
#  708|   						   &item->cl_map) != &item->cl_map) {
#  709|   					/* Port is already in map, release item */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def340]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:258:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: acquire_resource: opened here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:660:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:661:25: branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:692:9: call_function: calling ‘_destroy_ibnd_fabric_cache’ from ‘ibnd_load_fabric’
#  256|   	free(node_cache->port_cache_keys);
#  257|   	if (!node_cache->node_stored_to_fabric && node_cache->node)
#  258|-> 		destroy_node(node_cache->node);
#  259|   	free(node_cache);
#  260|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:258:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fabric_cache’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:660:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:661:25: branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:692:9: call_function: calling ‘_destroy_ibnd_fabric_cache’ from ‘ibnd_load_fabric’
#  256|   	free(node_cache->port_cache_keys);
#  257|   	if (!node_cache->node_stored_to_fabric && node_cache->node)
#  258|-> 		destroy_node(node_cache->node);
#  259|   	free(node_cache);
#  260|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:258:17: warning[-Wanalyzer-malloc-leak]: leak of ‘node_cache’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:659:21: branch_true: following ‘true’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:660:21: branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:660:21: call_function: calling ‘_load_node’ from ‘ibnd_load_fabric’
#  256|   	free(node_cache->port_cache_keys);
#  257|   	if (!node_cache->node_stored_to_fabric && node_cache->node)
#  258|-> 		destroy_node(node_cache->node);
#  259|   	free(node_cache);
#  260|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:258:17: warning[-Wanalyzer-malloc-leak]: leak of ‘node’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:659:21: branch_true: following ‘true’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:660:21: branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:660:21: call_function: calling ‘_load_node’ from ‘ibnd_load_fabric’
#  256|   	free(node_cache->port_cache_keys);
#  257|   	if (!node_cache->node_stored_to_fabric && node_cache->node)
#  258|-> 		destroy_node(node_cache->node);
#  259|   	free(node_cache);
#  260|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def344]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:514:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: acquire_resource: opened here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:659:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:664:21: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: call_function: calling ‘_find_node’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: return_function: returning to ‘ibnd_load_fabric’ from ‘_find_node’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:670:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:675:35: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:677:13: call_function: calling ‘_rebuild_nodes’ from ‘ibnd_load_fabric’
#  512|   	 * Otherwise, mostly unnecessary to do this.
#  513|   	 */
#  514|-> 	int rc = add_to_portguid_hash(port_cache->port,
#  515|   				      fabric_cache->f_int->fabric.portstbl);
#  516|   	if (rc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:514:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fabric_cache’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:659:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:664:21: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: call_function: calling ‘_find_node’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: return_function: returning to ‘ibnd_load_fabric’ from ‘_find_node’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:670:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:675:35: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:677:13: call_function: calling ‘_rebuild_nodes’ from ‘ibnd_load_fabric’
#  512|   	 * Otherwise, mostly unnecessary to do this.
#  513|   	 */
#  514|-> 	int rc = add_to_portguid_hash(port_cache->port,
#  515|   				      fabric_cache->f_int->fabric.portstbl);
#  516|   	if (rc) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def346]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:543:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: acquire_resource: opened here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:659:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:664:21: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: call_function: calling ‘_find_node’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: return_function: returning to ‘ibnd_load_fabric’ from ‘_find_node’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:670:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:675:35: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:677:13: call_function: calling ‘_rebuild_nodes’ from ‘ibnd_load_fabric’
#  541|   		fabric_cache->f_int->fabric.nodes = node;
#  542|   
#  543|-> 		int rc = add_to_nodeguid_hash(node_cache->node,
#  544|   					      fabric_cache->
#  545|   					      f_int->

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:543:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fabric_cache’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:659:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:664:21: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: call_function: calling ‘_find_node’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: return_function: returning to ‘ibnd_load_fabric’ from ‘_find_node’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:670:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:675:35: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:677:13: call_function: calling ‘_rebuild_nodes’ from ‘ibnd_load_fabric’
#  541|   		fabric_cache->f_int->fabric.nodes = node;
#  542|   
#  543|-> 		int rc = add_to_nodeguid_hash(node_cache->node,
#  544|   					      fabric_cache->
#  545|   					      f_int->

Error: GCC_ANALYZER_WARNING (CWE-775): [#def348]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:553:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: acquire_resource: opened here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:659:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:664:21: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: call_function: calling ‘_find_node’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: return_function: returning to ‘ibnd_load_fabric’ from ‘_find_node’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:670:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:675:35: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:677:13: call_function: calling ‘_rebuild_nodes’ from ‘ibnd_load_fabric’
#  551|   		}
#  552|   
#  553|-> 		add_to_type_list(node_cache->node, fabric_cache->f_int);
#  554|   
#  555|   		node_cache->node_stored_to_fabric++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:553:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fabric_cache’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:659:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:664:21: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: call_function: calling ‘_find_node’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:671:15: return_function: returning to ‘ibnd_load_fabric’ from ‘_find_node’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:670:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:675:35: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:677:13: call_function: calling ‘_rebuild_nodes’ from ‘ibnd_load_fabric’
#  551|   		}
#  552|   
#  553|-> 		add_to_type_list(node_cache->node, fabric_cache->f_int);
#  554|   
#  555|   		node_cache->node_stored_to_fabric++;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def350]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:648:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: acquire_resource: opened here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:648:17: danger: ‘open(file, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  646|   	memset(fabric_cache, '\0', sizeof(ibnd_fabric_cache_t));
#  647|   
#  648|-> 	f_int = allocate_fabric_internal();
#  649|   	if (!f_int) {
#  650|   		IBND_DEBUG("OOM: fabric\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:648:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fabric_cache’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:648:17: danger: ‘fabric_cache’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  646|   	memset(fabric_cache, '\0', sizeof(ibnd_fabric_cache_t));
#  647|   
#  648|-> 	f_int = allocate_fabric_internal();
#  649|   	if (!f_int) {
#  650|   		IBND_DEBUG("OOM: fabric\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def352]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:691:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: acquire_resource: opened here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:657:17: branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:691:9: danger: ‘open(file, 0)’ leaks here; was opened at [(4)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/3)
#  689|   
#  690|   cleanup:
#  691|-> 	ibnd_destroy_fabric((ibnd_fabric_t *)f_int);
#  692|   	_destroy_ibnd_fabric_cache(fabric_cache);
#  693|   	close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:691:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fabric_cache’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:620:16: enter_function: entry to ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:630:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:19: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:635:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:641:37: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:642:12: branch_false: following ‘false’ branch (when ‘fabric_cache’ is non-NULL)...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:646:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:649:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:654:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: call_function: calling ‘_load_header_info’ from ‘ibnd_load_fabric’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:13: return_function: returning to ‘ibnd_load_fabric’ from ‘_load_header_info’
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:656:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:657:17: branch_true: ...to here
rdma-core-59.0/libibnetdisc/ibnetdisc_cache.c:691:9: danger: ‘fabric_cache’ leaks here; was allocated at [(6)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/5)
#  689|   
#  690|   cleanup:
#  691|-> 	ibnd_destroy_fabric((ibnd_fabric_t *)f_int);
#  692|   	_destroy_ibnd_fabric_cache(fabric_cache);
#  693|   	close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
rdma-core-59.0/libibnetdisc/query_smp.c:137:25: warning[-Wanalyzer-malloc-leak]: leak of ‘smp’
rdma-core-59.0/libibnetdisc/query_smp.c:122:27: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/query_smp.c:123:12: branch_false: following ‘false’ branch (when ‘smp’ is non-NULL)...
rdma-core-59.0/libibnetdisc/query_smp.c:128:9: branch_false: ...to here
rdma-core-59.0/libibnetdisc/query_smp.c:137:25: danger: ‘smp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  135|   	smp->rpc.datasz = IB_SMP_DATA_SIZE;
#  136|   	smp->rpc.dataoffs = IB_SMP_DATA_OFFS;
#  137|-> 	smp->rpc.trid = mad_trid();
#  138|   	smp->rpc.mkey = engine->cfg->mkey;
#  139|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
rdma-core-59.0/libibnetdisc/tests/testleaks.c:110:32: warning[-Wanalyzer-malloc-leak]: leak of ‘from’
rdma-core-59.0/libibnetdisc/tests/testleaks.c:103:20: branch_false: following ‘false’ branch (when ‘ch != -1’)...
rdma-core-59.0/libibnetdisc/tests/testleaks.c:105:17: branch_false: ...to here
rdma-core-59.0/libibnetdisc/tests/testleaks.c:110:32: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/tests/testleaks.c:103:20: branch_false: following ‘false’ branch (when ‘ch != -1’)...
rdma-core-59.0/libibnetdisc/tests/testleaks.c:105:17: branch_false: ...to here
rdma-core-59.0/libibnetdisc/tests/testleaks.c:110:32: danger: ‘from’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  108|   			break;
#  109|   		case 'f':
#  110|-> 			from = strdup(optarg);
#  111|   			break;
#  112|   		case 'C':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
rdma-core-59.0/libibnetdisc/tests/testleaks.c:138:25: warning[-Wanalyzer-malloc-leak]: leak of ‘from’
rdma-core-59.0/libibnetdisc/tests/testleaks.c:103:20: branch_false: following ‘false’ branch (when ‘ch != -1’)...
rdma-core-59.0/libibnetdisc/tests/testleaks.c:105:17: branch_false: ...to here
rdma-core-59.0/libibnetdisc/tests/testleaks.c:110:32: acquire_memory: allocated here
rdma-core-59.0/libibnetdisc/tests/testleaks.c:103:20: branch_true: following ‘true’ branch (when ‘ch == -1’)...
 branch_true: ...to here
rdma-core-59.0/libibnetdisc/tests/testleaks.c:135:16: branch_true: following ‘true’ branch (when ‘iters == -1’)...
rdma-core-59.0/libibnetdisc/tests/testleaks.c:136:20: branch_true: ...to here
rdma-core-59.0/libibnetdisc/tests/testleaks.c:136:20: branch_true: following ‘true’ branch (when ‘from’ is non-NULL)...
rdma-core-59.0/libibnetdisc/tests/testleaks.c:138:25: branch_true: ...to here
rdma-core-59.0/libibnetdisc/tests/testleaks.c:138:25: danger: ‘from’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  136|   		if (from) {
#  137|   			/* only scan part of the fabric */
#  138|-> 			str2drpath(&(port_id.drpath), from, 0, 0);
#  139|   			if ((fabric = ibnd_discover_fabric(ca, ca_port,
#  140|   							   &port_id, &config))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def357]
rdma-core-59.0/libibumad/sysfs.c:69:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
rdma-core-59.0/libibumad/sysfs.c:63:19: acquire_resource: opened here
rdma-core-59.0/libibumad/sysfs.c:63:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/sysfs.c:66:18: branch_false: ...to here
rdma-core-59.0/libibumad/sysfs.c:66:12: branch_true: following ‘true’ branch (when ‘r < 0’)...
rdma-core-59.0/libibumad/sysfs.c:67:25: branch_true: ...to here
rdma-core-59.0/libibumad/sysfs.c:69:17: danger: ‘open(&path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   67|   		int e = errno;
#   68|   		close(fd);
#   69|-> 		errno = e;
#   70|   		return ret_code();
#   71|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def358]
rdma-core-59.0/libibumad/sysfs.c:78:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
rdma-core-59.0/libibumad/sysfs.c:63:19: acquire_resource: opened here
rdma-core-59.0/libibumad/sysfs.c:63:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/sysfs.c:66:18: branch_false: ...to here
rdma-core-59.0/libibumad/sysfs.c:66:12: branch_false: following ‘false’ branch (when ‘r >= 0’)...
rdma-core-59.0/libibumad/sysfs.c:73:13: branch_false: ...to here
rdma-core-59.0/libibumad/sysfs.c:78:9: danger: ‘open(&path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   76|   		*s = 0;
#   77|   
#   78|-> 	close(fd);
#   79|   	return 0;
#   80|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def359]
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:73:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:374:12: enter_function: entry to ‘test_port’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:386:16: acquire_memory: allocated here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:387:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:393:13: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:394:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:401:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:403:16: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:417:9: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:419:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: branch_true: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: call_function: calling ‘query_all’ from ‘test_port’
#   71|   static void build_user_mad_addr(uint8_t *umad)
#   72|   {
#   73|-> 	umad_set_addr(umad, umad_port.sm_lid, 1, umad_port.sm_sl, UMAD_QKEY);
#   74|   
#   75|   	/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:73:9: warning[-Wanalyzer-malloc-leak]: leak of ‘umad’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:374:12: enter_function: entry to ‘test_port’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:387:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:393:13: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:394:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:401:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:403:16: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:417:9: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:419:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:422:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:422:17: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:425:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:425:17: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:430:17: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:430:17: call_function: calling ‘rereg_send_all’ from ‘test_port’
#   71|   static void build_user_mad_addr(uint8_t *umad)
#   72|   {
#   73|-> 	umad_set_addr(umad, umad_port.sm_lid, 1, umad_port.sm_sl, UMAD_QKEY);
#   74|   
#   75|   	/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def361]
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:79:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:374:12: enter_function: entry to ‘test_port’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:386:16: acquire_memory: allocated here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:387:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:393:13: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:394:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:401:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:403:16: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:417:9: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:419:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: branch_true: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: call_function: calling ‘query_all’ from ‘test_port’
#   77|   	 * as umad was originally cleared to
#   78|   	 */
#   79|-> 	umad_set_grh(umad, NULL);
#   80|   	umad_set_pkey(umad, 0);		/* just pkey index 0 for now !!! */
#   81|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:80:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:374:12: enter_function: entry to ‘test_port’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:386:16: acquire_memory: allocated here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:387:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:393:13: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:394:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:401:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:403:16: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:417:9: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:419:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: branch_true: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: call_function: calling ‘query_all’ from ‘test_port’
#   78|   	 */
#   79|   	umad_set_grh(umad, NULL);
#   80|-> 	umad_set_pkey(umad, 0);		/* just pkey index 0 for now !!! */
#   81|   }
#   82|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:199:32: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:374:12: enter_function: entry to ‘test_port’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:386:16: acquire_memory: allocated here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:387:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:393:13: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:394:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:401:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:403:16: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:417:9: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:419:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:422:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:422:17: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:425:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:425:17: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:430:17: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:430:17: call_function: calling ‘rereg_send_all’ from ‘test_port’
#  197|   	info("%s... cnt = %u\n", __func__, cnt);
#  198|   
#  199|-> 	umad = calloc(1, len + umad_size());
#  200|   	if (!umad) {
#  201|   		err("cannot alloc mem for umad: %s\n", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:328:32: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:374:12: enter_function: entry to ‘test_port’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:386:16: acquire_memory: allocated here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:387:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:393:13: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:394:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:401:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:403:16: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:417:9: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:419:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: branch_true: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: call_function: calling ‘query_all’ from ‘test_port’
#  326|   	memcpy(mcgid, mgid, 16);
#  327|   
#  328|-> 	umad = calloc(1, len + umad_size());
#  329|   	if (!umad) {
#  330|   		err("cannot alloc mem for umad: %s\n", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def365]
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:334:15: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:374:12: enter_function: entry to ‘test_port’
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:386:16: acquire_memory: allocated here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:387:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:393:13: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:394:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:401:18: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:403:16: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:417:9: branch_false: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:419:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: branch_true: ...to here
rdma-core-59.0/libibumad/tests/umad_sa_mcm_rereg_test.c:420:17: call_function: calling ‘query_all’ from ‘test_port’
#  332|   	}
#  333|   	build_user_mad_addr(umad);
#  334|-> 	mad = umad_get_mad(umad);
#  335|   
#  336|   	for (i = 0; i < cnt; i++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
rdma-core-59.0/libibumad/umad.c:180:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  178|   		return -EIO;
#  179|   
#  180|-> 	if (sys_read_uint(port_dir, SYS_PORT_LMC, &port->lmc) < 0)
#  181|   		return -EIO;
#  182|   	if (sys_read_uint(port_dir, SYS_PORT_SMLID, &port->sm_lid) < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
rdma-core-59.0/libibumad/umad.c:182:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  180|   	if (sys_read_uint(port_dir, SYS_PORT_LMC, &port->lmc) < 0)
#  181|   		return -EIO;
#  182|-> 	if (sys_read_uint(port_dir, SYS_PORT_SMLID, &port->sm_lid) < 0)
#  183|   		return -EIO;
#  184|   	if (sys_read_uint(port_dir, SYS_PORT_SMSL, &port->sm_sl) < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
rdma-core-59.0/libibumad/umad.c:184:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  182|   	if (sys_read_uint(port_dir, SYS_PORT_SMLID, &port->sm_lid) < 0)
#  183|   		return -EIO;
#  184|-> 	if (sys_read_uint(port_dir, SYS_PORT_SMSL, &port->sm_sl) < 0)
#  185|   		return -EIO;
#  186|   	if (sys_read_uint(port_dir, SYS_PORT_LID, &port->base_lid) < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
rdma-core-59.0/libibumad/umad.c:186:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  184|   	if (sys_read_uint(port_dir, SYS_PORT_SMSL, &port->sm_sl) < 0)
#  185|   		return -EIO;
#  186|-> 	if (sys_read_uint(port_dir, SYS_PORT_LID, &port->base_lid) < 0)
#  187|   		return -EIO;
#  188|   	if (sys_read_uint(port_dir, SYS_PORT_STATE, &port->state) < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
rdma-core-59.0/libibumad/umad.c:188:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  186|   	if (sys_read_uint(port_dir, SYS_PORT_LID, &port->base_lid) < 0)
#  187|   		return -EIO;
#  188|-> 	if (sys_read_uint(port_dir, SYS_PORT_STATE, &port->state) < 0)
#  189|   		return -EIO;
#  190|   	if (sys_read_uint(port_dir, SYS_PORT_PHY_STATE, &port->phys_state) < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
rdma-core-59.0/libibumad/umad.c:190:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  188|   	if (sys_read_uint(port_dir, SYS_PORT_STATE, &port->state) < 0)
#  189|   		return -EIO;
#  190|-> 	if (sys_read_uint(port_dir, SYS_PORT_PHY_STATE, &port->phys_state) < 0)
#  191|   		return -EIO;
#  192|   	if (sys_read_uint(port_dir, SYS_PORT_RATE, &port->rate) < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
rdma-core-59.0/libibumad/umad.c:192:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  190|   	if (sys_read_uint(port_dir, SYS_PORT_PHY_STATE, &port->phys_state) < 0)
#  191|   		return -EIO;
#  192|-> 	if (sys_read_uint(port_dir, SYS_PORT_RATE, &port->rate) < 0)
#  193|   		return -EIO;
#  194|   	if (sys_read_uint(port_dir, SYS_PORT_CAPMASK, &capmask) < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
rdma-core-59.0/libibumad/umad.c:194:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  192|   	if (sys_read_uint(port_dir, SYS_PORT_RATE, &port->rate) < 0)
#  193|   		return -EIO;
#  194|-> 	if (sys_read_uint(port_dir, SYS_PORT_CAPMASK, &capmask) < 0)
#  195|   		return -EIO;
#  196|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def374]
rdma-core-59.0/libibumad/umad.c:468:18: warning[-Wanalyzer-malloc-leak]: leak of ‘found_ca_name’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  466|   		 ca->ca_name);
#  467|   
#  468|-> 	if ((r = sys_read_uint(dir_name, SYS_NODE_TYPE, &ca->node_type)) < 0)
#  469|   		return r;
#  470|   	if (sys_read_string(dir_name, SYS_CA_FW_VERS, ca->fw_ver,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
rdma-core-59.0/libibumad/umad.c:470:13: warning[-Wanalyzer-malloc-leak]: leak of ‘found_ca_name’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  468|   	if ((r = sys_read_uint(dir_name, SYS_NODE_TYPE, &ca->node_type)) < 0)
#  469|   		return r;
#  470|-> 	if (sys_read_string(dir_name, SYS_CA_FW_VERS, ca->fw_ver,
#  471|   			    sizeof ca->fw_ver) < 0)
#  472|   		ca->fw_ver[0] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
rdma-core-59.0/libibumad/umad.c:473:13: warning[-Wanalyzer-malloc-leak]: leak of ‘found_ca_name’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  471|   			    sizeof ca->fw_ver) < 0)
#  472|   		ca->fw_ver[0] = '\0';
#  473|-> 	if (sys_read_string(dir_name, SYS_CA_HW_VERS, ca->hw_ver,
#  474|   			    sizeof ca->hw_ver) < 0)
#  475|   		ca->hw_ver[0] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
rdma-core-59.0/libibumad/umad.c:476:18: warning[-Wanalyzer-malloc-leak]: leak of ‘found_ca_name’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  474|   			    sizeof ca->hw_ver) < 0)
#  475|   		ca->hw_ver[0] = '\0';
#  476|-> 	if ((r = sys_read_string(dir_name, SYS_CA_TYPE, ca->ca_type,
#  477|   				 sizeof ca->ca_type)) < 0)
#  478|   		ca->ca_type[0] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
rdma-core-59.0/libibumad/umad.c:479:18: warning[-Wanalyzer-malloc-leak]: leak of ‘found_ca_name’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  477|   				 sizeof ca->ca_type)) < 0)
#  478|   		ca->ca_type[0] = '\0';
#  479|-> 	if ((r = sys_read_guid(dir_name, SYS_CA_NODE_GUID, &ca->node_guid)) < 0)
#  480|   		return r;
#  481|   	if ((r =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
rdma-core-59.0/libibumad/umad.c:491:18: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  489|   		return -ENOENT;
#  490|   
#  491|-> 	if ((r = scandir(dir_name, &namelist, NULL, alphasort)) < 0) {
#  492|   		ret = errno < 0 ? errno : -EIO;
#  493|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
rdma-core-59.0/libibumad/umad.c:528:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  526|   	free(namelist);
#  527|   
#  528|-> 	closedir(dir);
#  529|   	put_ca(ca);
#  530|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
rdma-core-59.0/libibumad/umad.c:538:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dir_name)’
rdma-core-59.0/libibumad/umad.c:814:5: enter_function: entry to ‘umad_get_port’
rdma-core-59.0/libibumad/umad.c:822:13: call_function: calling ‘resolve_ca_name’ from ‘umad_get_port’
#  536|   error:
#  537|   	closedir(dir);
#  538|-> 	release_ca(ca);
#  539|   
#  540|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
rdma-core-59.0/libibumad/umad.c:612:13: warning[-Wanalyzer-malloc-leak]: leak of ‘tail’
rdma-core-59.0/libibumad/umad.c:1301:26: enter_function: entry to ‘umad_get_ca_device_list’
rdma-core-59.0/libibumad/umad.c:1314:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1320:16: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/umad.c:1321:29: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1329:24: acquire_memory: allocated here
rdma-core-59.0/libibumad/umad.c:1330:20: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/libibumad/umad.c:1337:20: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1337:20: branch_true: following ‘true’ branch (when ‘head’ is NULL)...
rdma-core-59.0/libibumad/umad.c:1343:17: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1320:16: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/umad.c:1321:29: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1321:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/libibumad/umad.c:1322:22: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1321:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/libibumad/umad.c:1325:22: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1325:22: call_function: calling ‘is_ib_type’ from ‘umad_get_ca_device_list’
#  610|   	snprintf(dir_name, sizeof(dir_name), "%s/%s", SYS_INFINIBAND, ca_name);
#  611|   
#  612|-> 	if (sys_read_uint(dir_name, SYS_NODE_TYPE, &type) < 0)
#  613|   		return 0;
#  614|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
rdma-core-59.0/libibumad/umad.c:1287:9: warning[-Wanalyzer-malloc-leak]: leak of ‘nodes_array’
rdma-core-59.0/libibumad/umad.c:1261:12: branch_false: following ‘false’ branch (when ‘size != 0’)...
rdma-core-59.0/libibumad/umad.c:1264:12: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1264:12: branch_false: following ‘false’ branch (when ‘size > 1’)...
rdma-core-59.0/libibumad/umad.c:1267:23: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1267:23: acquire_memory: allocated here
rdma-core-59.0/libibumad/umad.c:1268:12: branch_false: following ‘false’ branch (when ‘nodes_array’ is non-NULL)...
rdma-core-59.0/libibumad/umad.c:1273:9: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1274:21: branch_true: following ‘true’ branch (when ‘size > i’)...
rdma-core-59.0/libibumad/umad.c:1275:20: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1275:20: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/libibumad/umad.c:1279:28: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1274:21: branch_true: following ‘true’ branch (when ‘size > i’)...
rdma-core-59.0/libibumad/umad.c:1275:20: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1275:20: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/libibumad/umad.c:1279:28: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1282:12: branch_false: following ‘false’ branch (when ‘node’ is NULL)...
rdma-core-59.0/libibumad/umad.c:1287:9: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1287:9: danger: ‘nodes_array’ leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4)
# 1285|   	}
# 1286|   
# 1287|-> 	qsort(nodes_array, size, sizeof(struct umad_device_node *),
# 1288|   	      umad_ca_device_list_compare_function);
# 1289|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
rdma-core-59.0/libibumad/umad.c:1320:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/sys/class/infiniband")’
rdma-core-59.0/libibumad/umad.c:1313:15: acquire_memory: allocated here
rdma-core-59.0/libibumad/umad.c:1314:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1320:25: danger: ‘opendir("/sys/class/infiniband")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 1318|   	}
# 1319|   
# 1320|-> 	while ((entry = readdir(dir))) {
# 1321|   		if ((strcmp(entry->d_name, ".") == 0) ||
# 1322|   		    (strcmp(entry->d_name, "..") == 0))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
rdma-core-59.0/libibumad/umad.c:1320:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tail’
rdma-core-59.0/libibumad/umad.c:1314:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1320:16: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/umad.c:1321:29: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1329:24: acquire_memory: allocated here
rdma-core-59.0/libibumad/umad.c:1330:20: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/libibumad/umad.c:1337:20: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1337:20: branch_true: following ‘true’ branch (when ‘head’ is NULL)...
rdma-core-59.0/libibumad/umad.c:1343:17: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1320:25: danger: ‘tail’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
# 1318|   	}
# 1319|   
# 1320|-> 	while ((entry = readdir(dir))) {
# 1321|   		if ((strcmp(entry->d_name, ".") == 0) ||
# 1322|   		    (strcmp(entry->d_name, "..") == 0))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
rdma-core-59.0/libibumad/umad.c:1352:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tail’
rdma-core-59.0/libibumad/umad.c:1314:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1320:16: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/umad.c:1321:29: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1329:24: acquire_memory: allocated here
rdma-core-59.0/libibumad/umad.c:1330:20: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
rdma-core-59.0/libibumad/umad.c:1337:20: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1337:20: branch_true: following ‘true’ branch (when ‘head’ is NULL)...
rdma-core-59.0/libibumad/umad.c:1343:17: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1320:16: branch_false: following ‘false’ branch...
rdma-core-59.0/libibumad/umad.c:1350:9: branch_false: ...to here
rdma-core-59.0/libibumad/umad.c:1350:9: branch_true: following ‘true’ branch...
rdma-core-59.0/libibumad/umad.c:1350:9: branch_true: ...to here
rdma-core-59.0/libibumad/umad.c:1352:9: danger: ‘tail’ leaks here; was allocated at [(5)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/4)
# 1350|   	DEBUG("return %zu cas", cas_num);
# 1351|   exit:
# 1352|-> 	closedir(dir);
# 1353|   	errno = errsv;
# 1354|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
rdma-core-59.0/libibverbs/cmd.c:210:15: warning[-Wanalyzer-malloc-leak]: leak of ‘resp’
rdma-core-59.0/libibverbs/cmd.c:203:17: acquire_memory: allocated here
rdma-core-59.0/libibverbs/cmd.c:204:12: branch_false: following ‘false’ branch (when ‘resp’ is non-NULL)...
rdma-core-59.0/libibverbs/cmd.c:207:25: branch_false: ...to here
rdma-core-59.0/libibverbs/cmd.c:210:15: danger: ‘resp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  208|   	cmd.ne        = ne;
#  209|   
#  210|-> 	ret = execute_cmd_write_no_uhw(ibcq->context, IB_USER_VERBS_CMD_POLL_CQ,
#  211|   				       &cmd, sizeof(cmd), resp, rsize);
#  212|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def388]
rdma-core-59.0/libibverbs/cmd_device.c:312:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir_path)’
rdma-core-59.0/libibverbs/cmd_device.c:443:5: enter_function: entry to ‘__ibv_query_gid_ex’
rdma-core-59.0/libibverbs/cmd_device.c:459:9: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/cmd_device.c:461:9: branch_true: ...to here
rdma-core-59.0/libibverbs/cmd_device.c:462:20: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/libibverbs/cmd_device.c:465:23: branch_false: ...to here
rdma-core-59.0/libibverbs/cmd_device.c:465:23: call_function: calling ‘query_sysfs_gid_entry’ from ‘__ibv_query_gid_ex’
#  310|   		} else {
#  311|   			closedir(dir);
#  312|-> 			errno = EFAULT;
#  313|   			return -1;
#  314|   		}

Error: COMPILER_WARNING (CWE-126): [#def389]
rdma-core-59.0/libibverbs/cmd_fallback.c:296:13: warning[-Wstringop-overread]: ‘write’ reading 32 bytes from a region of size 24
#  296 |         if (write(ctx->cmd_fd, req, req_size) != req_size)
#      |             ^
rdma-core-59.0/libibverbs/kern-abi.h: scope_hint: In function ‘ibv_cmd_destroy_flow’
rdma-core-59.0/libibverbs/kern-abi.h:216:1: note: source object ‘hdr’ of size 24
#  216 | DECLARE_CMD_EXX(IB_USER_VERBS_EX_CMD_DESTROY_FLOW, ibv_destroy_flow, ib_uverbs_destroy_flow, empty);
#      | ^
/usr/include/unistd.h:378:16: note: in a call to function ‘write’ declared with attribute ‘access (read_only, 2, 3)’
#  378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
#      |                ^
#  294|   		memset(resp, 0, resp_size);
#  295|   
#  296|-> 	if (write(ctx->cmd_fd, req, req_size) != req_size)
#  297|   		return errno;
#  298|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def390]
rdma-core-59.0/libibverbs/cmd_qp.c:90:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘qp’
rdma-core-59.0/libibverbs/cmd_qp.c:422:5: enter_function: entry to ‘ibv_cmd_create_qp_ex2’
rdma-core-59.0/libibverbs/cmd_qp.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/cmd_qp.c:446:16: branch_false: ...to here
rdma-core-59.0/libibverbs/cmd_qp.c:446:16: call_function: calling ‘ibv_icmd_create_qp’ from ‘ibv_cmd_create_qp_ex2’
#   88|   	uint32_t create_flags = 0;
#   89|   
#   90|-> 	qp->context = context;
#   91|   
#   92|   	switch (attr_ex->qp_type) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def391]
rdma-core-59.0/libibverbs/cmd_srq.c:40:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘vsrq’
rdma-core-59.0/libibverbs/cmd_srq.c:201:5: enter_function: entry to ‘ibv_cmd_create_srq’
rdma-core-59.0/libibverbs/cmd_srq.c:214:15: call_function: calling ‘ibv_icmd_create_srq’ from ‘ibv_cmd_create_srq’
#   38|   		     uint32_t srq_num)
#   39|   {
#   40|-> 	vsrq->srq_type = (attr_ex->comp_mask & IBV_SRQ_INIT_ATTR_TYPE) ?
#   41|   		attr_ex->srq_type : IBV_SRQT_BASIC;
#   42|   	if (vsrq->srq_type == IBV_SRQT_XRC) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def392]
rdma-core-59.0/libibverbs/cmd_srq.c:66:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘srq’
rdma-core-59.0/libibverbs/cmd_srq.c:223:5: enter_function: entry to ‘ibv_cmd_create_srq_ex’
rdma-core-59.0/libibverbs/cmd_srq.c:233:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/cmd_srq.c:238:14: branch_false: ...to here
rdma-core-59.0/libibverbs/cmd_srq.c:238:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/cmd_srq.c:243:16: branch_false: ...to here
rdma-core-59.0/libibverbs/cmd_srq.c:243:16: call_function: calling ‘ibv_icmd_create_srq’ from ‘ibv_cmd_create_srq_ex’
#   64|   	enum ibv_srq_type srq_type;
#   65|   
#   66|-> 	srq->pd = pd;
#   67|   	srq->context = pd->context;
#   68|   	pthread_mutex_init(&srq->mutex, NULL);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def393]
rdma-core-59.0/libibverbs/cmd_srq.c:169:52: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘vxrcd’
rdma-core-59.0/libibverbs/cmd_srq.c:166:28: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/cmd_srq.c:169:52: branch_false: ...to here
rdma-core-59.0/libibverbs/cmd_srq.c:169:52: danger: dereference of NULL ‘vxrcd’
#  167|   				req->max_num_tags = attr_ex->tm_cap.max_num_tags;
#  168|   			else
#  169|-> 				req->xrcd_handle = vxrcd->handle;
#  170|   
#  171|   			ret = execute_write_bufs(

Error: GCC_ANALYZER_WARNING (CWE-401): [#def394]
rdma-core-59.0/libibverbs/compat-1_0.c:478:20: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/compat-1_0.c:474:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/compat-1_0.c:475:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/compat-1_0.c:478:20: branch_false: ...to here
rdma-core-59.0/libibverbs/compat-1_0.c:478:20: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  476|   		return NULL;
#  477|   
#  478|-> 	real_ctx = ibv_open_device(device->real_device);
#  479|   	if (!real_ctx) {
#  480|   		free(ctx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def395]
rdma-core-59.0/libibverbs/compat-1_0.c:632:19: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/libibverbs/compat-1_0.c:628:14: acquire_memory: allocated here
rdma-core-59.0/libibverbs/compat-1_0.c:629:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/libibverbs/compat-1_0.c:632:19: branch_false: ...to here
rdma-core-59.0/libibverbs/compat-1_0.c:632:19: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  630|   		return NULL;
#  631|   
#  632|-> 	real_pd = ibv_alloc_pd(context->real_context);
#  633|   	if (!real_pd) {
#  634|   		free(pd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def396]
rdma-core-59.0/libibverbs/compat-1_0.c:711:19: warning[-Wanalyzer-malloc-leak]: leak of ‘cq’
rdma-core-59.0/libibverbs/compat-1_0.c:707:14: acquire_memory: allocated here
rdma-core-59.0/libibverbs/compat-1_0.c:708:12: branch_false: following ‘false’ branch (when ‘cq’ is non-NULL)...
rdma-core-59.0/libibverbs/compat-1_0.c:711:19: branch_false: ...to here
rdma-core-59.0/libibverbs/compat-1_0.c:711:19: danger: ‘cq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  709|   		return NULL;
#  710|   
#  711|-> 	real_cq = ibv_create_cq(context->real_context, cqe, cq_context,
#  712|   				channel, comp_vector);
#  713|   	if (!real_cq) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def397]
rdma-core-59.0/libibverbs/compat-1_0.c:789:20: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/libibverbs/compat-1_0.c:785:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/compat-1_0.c:786:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/libibverbs/compat-1_0.c:789:20: branch_false: ...to here
rdma-core-59.0/libibverbs/compat-1_0.c:789:20: danger: ‘srq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  787|   		return NULL;
#  788|   
#  789|-> 	real_srq = ibv_create_srq(pd->real_pd, srq_init_attr);
#  790|   	if (!real_srq) {
#  791|   		free(srq);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def398]
rdma-core-59.0/libibverbs/compat-1_0.c:858:19: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/libibverbs/compat-1_0.c:845:14: acquire_memory: allocated here
rdma-core-59.0/libibverbs/compat-1_0.c:846:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/libibverbs/compat-1_0.c:849:37: branch_false: ...to here
rdma-core-59.0/libibverbs/compat-1_0.c:852:37: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/compat-1_0.c:852:9: branch_false: ...to here
rdma-core-59.0/libibverbs/compat-1_0.c:858:19: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  856|   	real_init_attr.sq_sig_all = qp_init_attr->sq_sig_all;
#  857|   
#  858|-> 	real_qp = ibv_create_qp(pd->real_pd, &real_init_attr);
#  859|   	if (!real_qp) {
#  860|   		free(qp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def399]
rdma-core-59.0/libibverbs/compat-1_0.c:938:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/libibverbs/compat-1_0.c:934:14: acquire_memory: allocated here
rdma-core-59.0/libibverbs/compat-1_0.c:935:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/libibverbs/compat-1_0.c:938:19: branch_false: ...to here
rdma-core-59.0/libibverbs/compat-1_0.c:938:19: danger: ‘ah’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  936|   		return NULL;
#  937|   
#  938|-> 	real_ah = ibv_create_ah(pd->real_pd, attr);
#  939|   	if (!real_ah) {
#  940|   		free(ah);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
rdma-core-59.0/libibverbs/device.c:88:17: warning[-Wanalyzer-malloc-leak]: leak of ‘l’
rdma-core-59.0/libibverbs/device.c:75:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/device.c:80:20: branch_false: ...to here
rdma-core-59.0/libibverbs/device.c:80:13: acquire_memory: allocated here
rdma-core-59.0/libibverbs/device.c:81:12: branch_false: following ‘false’ branch (when ‘l’ is non-NULL)...
rdma-core-59.0/libibverbs/device.c:86:9: branch_false: ...to here
rdma-core-59.0/libibverbs/device.c:86:9: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/device.c:87:18: branch_true: ...to here
rdma-core-59.0/libibverbs/device.c:88:17: danger: ‘l’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   86|   	list_for_each(&device_list, device, entry) {
#   87|   		l[i] = &device->device;
#   88|-> 		ibverbs_device_hold(l[i]);
#   89|   		i++;
#   90|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def401]
rdma-core-59.0/libibverbs/device.c:236:9: warning[-Wanalyzer-malloc-leak]: leak of ‘drv_context’
rdma-core-59.0/libibverbs/device.c:265:7: enter_function: entry to ‘_verbs_init_and_alloc_context’
rdma-core-59.0/libibverbs/device.c:273:23: acquire_memory: allocated here
rdma-core-59.0/libibverbs/device.c:274:12: branch_false: following ‘false’ branch (when ‘drv_context’ is non-NULL)...
rdma-core-59.0/libibverbs/device.c:280:33: branch_false: ...to here
rdma-core-59.0/libibverbs/device.c:282:13: call_function: calling ‘verbs_init_context’ from ‘_verbs_init_and_alloc_context’
#  234|   	struct ibv_context *context = &context_ex->context;
#  235|   
#  236|-> 	ibverbs_device_hold(device);
#  237|   
#  238|   	context->device = device;

Error: GCC_ANALYZER_WARNING (CWE-465): [#def402]
rdma-core-59.0/libibverbs/dynamic_driver.c:78:21: warning[-Wanalyzer-deref-before-check]: check of ‘config’ for NULL after already dereferencing it
rdma-core-59.0/libibverbs/dynamic_driver.c:65:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibverbs/dynamic_driver.c:71:16: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/dynamic_driver.c:72:26: branch_true: ...to here
rdma-core-59.0/libibverbs/dynamic_driver.c:73:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/dynamic_driver.c:76:25: branch_false: ...to here
rdma-core-59.0/libibverbs/dynamic_driver.c:78:20: branch_true: following ‘true’ branch (when the strings are equal)...
rdma-core-59.0/libibverbs/dynamic_driver.c:78:53: branch_true: ...to here
rdma-core-59.0/libibverbs/dynamic_driver.c:78:21: danger: pointer ‘config’ is checked for NULL here but it was already dereferenced at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   76|   		field = strsep(&config, "\n\t ");
#   77|   
#   78|-> 		if (strcmp(field, "driver") == 0 && config != NULL) {
#   79|   			struct ibv_driver_name *driver_name;
#   80|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
rdma-core-59.0/libibverbs/dynamic_driver.c:130:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/etc/libibverbs.d")’
rdma-core-59.0/libibverbs/dynamic_driver.c:122:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/dynamic_driver.c:123:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibverbs/dynamic_driver.c:130:24: danger: ‘opendir("/etc/libibverbs.d")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  128|   	}
#  129|   
#  130|-> 	while ((dent = readdir(conf_dir))) {
#  131|   		struct stat buf;
#  132|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
rdma-core-59.0/libibverbs/examples/devinfo.c:719:38: warning[-Wanalyzer-malloc-leak]: leak of ‘ib_devname’
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:717:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:719:38: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:717:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:719:38: danger: ‘ib_devname’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  717|   		switch (c) {
#  718|   		case 'd':
#  719|-> 			ib_devname = strdup(optarg);
#  720|   			break;
#  721|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def405]
rdma-core-59.0/libibverbs/examples/devinfo.c:735:52: warning[-Wanalyzer-malloc-leak]: leak of ‘ib_devname’
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:717:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:719:38: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:717:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:735:52: danger: ‘ib_devname’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  733|   
#  734|   		case 'l':
#  735|-> 			dev_list = orig_dev_list = ibv_get_device_list(&num_of_hcas);
#  736|   			if (!dev_list) {
#  737|   				perror("Failed to get IB devices list");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def406]
rdma-core-59.0/libibverbs/examples/devinfo.c:745:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ib_devname’
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:717:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:719:38: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:717:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:736:28: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/devinfo.c:742:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:744:32: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/devinfo.c:745:33: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:745:33: danger: ‘ib_devname’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  743|   
#  744|   			while (*dev_list) {
#  745|-> 				printf("\t%s\n", ibv_get_device_name(*dev_list));
#  746|   				++dev_list;
#  747|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def407]
rdma-core-59.0/libibverbs/examples/devinfo.c:761:36: warning[-Wanalyzer-malloc-leak]: leak of ‘ib_devname’
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:717:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:719:38: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:761:36: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:761:36: danger: ‘ib_devname’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  759|   	}
#  760|   
#  761|-> 	dev_list = orig_dev_list = ibv_get_device_list(NULL);
#  762|   	if (!dev_list) {
#  763|   		perror("Failed to get IB devices list");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
rdma-core-59.0/libibverbs/examples/devinfo.c:769:30: warning[-Wanalyzer-malloc-leak]: leak of ‘ib_devname’
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:717:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:719:38: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/devinfo.c:714:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
rdma-core-59.0/libibverbs/examples/devinfo.c:761:36: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:762:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/devinfo.c:767:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:767:12: branch_true: following ‘true’ branch (when ‘ib_devname’ is non-NULL)...
 branch_true: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:768:24: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/devinfo.c:769:30: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/devinfo.c:769:30: danger: ‘ib_devname’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  767|   	if (ib_devname) {
#  768|   		while (*dev_list) {
#  769|-> 			if (!strcmp(ibv_get_device_name(*dev_list), ib_devname))
#  770|   				break;
#  771|   			++dev_list;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def409]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:188:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:177:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:179:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:185:14: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:185:23: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:186:26: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:186:26: acquire_resource: socket created here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:187:20: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:188:30: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:188:30: danger: ‘sockfd’ leaks here
#  186|   		sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
#  187|   		if (sockfd >= 0) {
#  188|-> 			if (!connect(sockfd, t->ai_addr, t->ai_addrlen))
#  189|   				break;
#  190|   			close(sockfd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:356:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:356:24: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  354|   	memset(ctx->buf, 0x7b, size);
#  355|   
#  356|-> 	ctx->context = ibv_open_device(ib_dev);
#  357|   	if (!ctx->context) {
#  358|   		fprintf(stderr, "Couldn't get context for %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def411]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:356:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:356:24: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  354|   	memset(ctx->buf, 0x7b, size);
#  355|   
#  356|-> 	ctx->context = ibv_open_device(ib_dev);
#  357|   	if (!ctx->context) {
#  358|   		fprintf(stderr, "Couldn't get context for %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:358:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:358:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:358:17: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  356|   	ctx->context = ibv_open_device(ib_dev);
#  357|   	if (!ctx->context) {
#  358|-> 		fprintf(stderr, "Couldn't get context for %s\n",
#  359|   			ibv_get_device_name(ib_dev));
#  360|   		goto clean_buffer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def413]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:358:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:358:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:358:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  356|   	ctx->context = ibv_open_device(ib_dev);
#  357|   	if (!ctx->context) {
#  358|-> 		fprintf(stderr, "Couldn't get context for %s\n",
#  359|   			ibv_get_device_name(ib_dev));
#  360|   		goto clean_buffer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def414]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  362|   
#  363|   	if (use_event) {
#  364|-> 		ctx->channel = ibv_create_comp_channel(ctx->context);
#  365|   		if (!ctx->channel) {
#  366|   			fprintf(stderr, "Couldn't create completion channel\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  362|   
#  363|   	if (use_event) {
#  364|-> 		ctx->channel = ibv_create_comp_channel(ctx->context);
#  365|   		if (!ctx->channel) {
#  366|   			fprintf(stderr, "Couldn't create completion channel\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:372:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:372:19: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  370|   		ctx->channel = NULL;
#  371|   
#  372|-> 	ctx->pd = ibv_alloc_pd(ctx->context);
#  373|   	if (!ctx->pd) {
#  374|   		fprintf(stderr, "Couldn't allocate PD\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:372:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:372:19: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  370|   		ctx->channel = NULL;
#  371|   
#  372|-> 	ctx->pd = ibv_alloc_pd(ctx->context);
#  373|   	if (!ctx->pd) {
#  374|   		fprintf(stderr, "Couldn't allocate PD\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:435:27: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  472|   		ctx->cq_s.cq_ex = ibv_create_cq_ex(ctx->context, &attr_ex);
#  473|   	} else {
#  474|-> 		ctx->cq_s.cq = ibv_create_cq(ctx->context, rx_depth + 1, NULL,
#  475|   					     ctx->channel, 0);
#  476|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:435:27: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  472|   		ctx->cq_s.cq_ex = ibv_create_cq_ex(ctx->context, &attr_ex);
#  473|   	} else {
#  474|-> 		ctx->cq_s.cq = ibv_create_cq(ctx->context, rx_depth + 1, NULL,
#  475|   					     ctx->channel, 0);
#  476|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:515:35: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:34: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:27: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:14: call_function: inlined call to ‘pp_cq’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:485:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:497:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:515:35: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:515:35: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/1)
#  513|   			ctx->qp = ibv_create_qp_ex(ctx->context, &init_attr_ex);
#  514|   		} else {
#  515|-> 			ctx->qp = ibv_create_qp(ctx->pd, &init_attr);
#  516|   		}
#  517|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:524:36: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:365:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:372:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:34: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:27: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:14: call_function: inlined call to ‘pp_cq’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:485:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:513:35: call_function: calling ‘ibv_create_qp_ex’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:513:35: return_function: returning to ‘pp_init_ctx’ from ‘ibv_create_qp_ex’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:518:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:523:21: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:523:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:524:36: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:524:36: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/1)
#  522|   
#  523|   		if (use_new_send)
#  524|-> 			ctx->qpx = ibv_qp_to_qp_ex(ctx->qp);
#  525|   
#  526|   		ibv_query_qp(ctx->qp, &attr, IBV_QP_CAP, &init_attr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def422]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:526:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:34: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:27: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:14: call_function: inlined call to ‘pp_cq’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:485:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:497:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:515:35: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:518:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:523:21: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:523:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:526:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:526:17: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/1)
#  524|   			ctx->qpx = ibv_qp_to_qp_ex(ctx->qp);
#  525|   
#  526|-> 		ibv_query_qp(ctx->qp, &attr, IBV_QP_CAP, &init_attr);
#  527|   		if (init_attr.cap.max_inline_data >= size && !use_dm)
#  528|   			ctx->send_flags |= IBV_SEND_INLINE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def423]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:539:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:34: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:27: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:14: call_function: inlined call to ‘pp_cq’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:485:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:497:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:515:35: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:518:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:523:21: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:523:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:526:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:539:21: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/1)
#  537|   		};
#  538|   
#  539|-> 		if (ibv_modify_qp(ctx->qp, &attr,
#  540|   				  IBV_QP_STATE              |
#  541|   				  IBV_QP_PKEY_INDEX         |

Error: GCC_ANALYZER_WARNING (CWE-401): [#def424]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:552:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:34: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:27: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:14: call_function: inlined call to ‘pp_cq’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:485:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:497:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:515:35: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:518:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:523:21: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:523:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:526:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:539:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:544:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:552:9: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/1)
#  550|   
#  551|   clean_qp:
#  552|-> 	ibv_destroy_qp(ctx->qp);
#  553|   
#  554|   clean_cq:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def425]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:555:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:365:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:372:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:34: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:27: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:14: call_function: inlined call to ‘pp_cq’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:485:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:555:9: call_function: inlined call to ‘pp_cq’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:555:9: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/1)
#  553|   
#  554|   clean_cq:
#  555|-> 	ibv_destroy_cq(pp_cq(ctx));
#  556|   
#  557|   clean_mr:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def426]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:558:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:792:5: enter_function: entry to ‘main’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:933:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:934:30: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:940:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:945:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:945:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:945:22: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:945:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:950:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:950:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:959:21: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:962:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:967:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:967:12: branch_true: following ‘true’ branch (when ‘ib_devname’ is NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:968:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:969:20: branch_false: following ‘false’ branch (when ‘ib_dev’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:985:15: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:985:15: call_function: calling ‘pp_init_ctx’ from ‘main’
#  556|   
#  557|   clean_mr:
#  558|-> 	ibv_dereg_mr(ctx->mr);
#  559|   
#  560|   clean_dm:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def427]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:565:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:383:21: call_function: calling ‘ibv_query_device_ex’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:383:21: return_function: returning to ‘pp_init_ctx’ from ‘ibv_query_device_ex’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:565:9: danger: ‘<unknown>’ leaks here; was allocated at [(4)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/3)
#  563|   
#  564|   clean_pd:
#  565|-> 	ibv_dealloc_pd(ctx->pd);
#  566|   
#  567|   clean_comp_channel:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def428]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:565:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:383:21: call_function: calling ‘ibv_query_device_ex’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:383:21: return_function: returning to ‘pp_init_ctx’ from ‘ibv_query_device_ex’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:565:9: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/1)
#  563|   
#  564|   clean_pd:
#  565|-> 	ibv_dealloc_pd(ctx->pd);
#  566|   
#  567|   clean_comp_channel:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def429]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:569:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:365:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:372:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:568:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:569:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:569:17: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
#  567|   clean_comp_channel:
#  568|   	if (ctx->channel)
#  569|-> 		ibv_destroy_comp_channel(ctx->channel);
#  570|   
#  571|   clean_device:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def430]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:569:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:365:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:372:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:568:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:569:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:569:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
#  567|   clean_comp_channel:
#  568|   	if (ctx->channel)
#  569|-> 		ibv_destroy_comp_channel(ctx->channel);
#  570|   
#  571|   clean_device:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:572:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:365:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:366:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:572:9: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/2)
#  570|   
#  571|   clean_device:
#  572|-> 	ibv_close_device(ctx->context);
#  573|   
#  574|   clean_buffer:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def432]
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:572:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:364:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:365:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:366:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:572:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
#  570|   
#  571|   clean_device:
#  572|-> 	ibv_close_device(ctx->context);
#  573|   
#  574|   clean_buffer:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def433]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:178:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:164:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:167:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:169:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:175:14: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:175:23: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:176:26: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:176:26: acquire_resource: socket created here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:177:20: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:178:30: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:178:30: danger: ‘sockfd’ leaks here
#  176|   		sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
#  177|   		if (sockfd >= 0) {
#  178|-> 			if (!connect(sockfd, t->ai_addr, t->ai_addrlen))
#  179|   				break;
#  180|   			close(sockfd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:212:33: warning[-Wanalyzer-malloc-leak]: leak of ‘rem_dest’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:164:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:167:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:169:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:175:14: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:177:20: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:178:30: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:188:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
 branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:193:21: branch_true: following ‘true’ branch (when ‘i != 256’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:194:41: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:197:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:193:33: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:193:21: branch_true: following ‘true’ branch (when ‘i != 256’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:194:41: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:197:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:193:33: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:203:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:204:12: branch_false: following ‘false’ branch (when ‘rem_dest’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:207:21: branch_true: following ‘true’ branch (when ‘i != 256’)...
 branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:209:24: branch_true: following ‘true’ branch (when ‘n <= 51’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:210:29: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:211:28: branch_true: following ‘true’ branch (when ‘r < 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:212:33: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:212:33: danger: ‘rem_dest’ leaks here; was allocated at [(18)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/17)
#  210|   			r = read(sockfd, msg + n, sizeof msg - n);
#  211|   			if (r < 0) {
#  212|-> 				perror("client read");
#  213|   				fprintf(stderr, "%d/%d: Couldn't read remote address [%d]\n",
#  214|   					n, (int) sizeof msg, i);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:305:33: warning[-Wanalyzer-malloc-leak]: leak of ‘rem_dest’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:255:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:258:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:260:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:266:14: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:268:20: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:269:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:283:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:288:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:291:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:296:20: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:296:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:297:12: branch_false: following ‘false’ branch (when ‘rem_dest’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:300:21: branch_true: following ‘true’ branch (when ‘i != 256’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:301:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:302:24: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:303:29: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:304:28: branch_true: following ‘true’ branch (when ‘r < 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:305:33: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:305:33: danger: ‘rem_dest’ leaks here; was allocated at [(13)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/12)
#  303|   			r = read(connfd, msg + n, sizeof msg - n);
#  304|   			if (r < 0) {
#  305|-> 				perror("server read");
#  306|   				fprintf(stderr, "%d/%d: Couldn't read remote address [%d]\n",
#  307|   					n, (int) sizeof msg, i);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:346:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rem_dest’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:255:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:258:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:260:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:266:14: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:268:20: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:269:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:283:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:288:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:291:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:296:20: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:296:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:297:12: branch_false: following ‘false’ branch (when ‘rem_dest’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:300:21: branch_true: following ‘true’ branch (when ‘i != 256’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:301:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:302:24: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:303:29: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:304:28: branch_false: following ‘false’ branch (when ‘r >= 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:310:27: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:302:24: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:303:29: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:304:28: branch_true: following ‘true’ branch (when ‘r < 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:305:33: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:346:9: danger: ‘rem_dest’ leaks here; was allocated at [(13)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/12)
#  344|   
#  345|   out:
#  346|-> 	close(connfd);
#  347|   	return rem_dest;
#  348|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:375:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:375:24: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  373|   	memset(ctx->buf, 0, size);
#  374|   
#  375|-> 	ctx->context = ibv_open_device(ib_dev);
#  376|   	if (!ctx->context) {
#  377|   		fprintf(stderr, "Couldn't get context for %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def438]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:375:24: warning[-Wanalyzer-malloc-leak]: leak of ‘memalign((long unsigned int)page_size, (long unsigned int)size)’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:367:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:375:24: danger: ‘memalign((long unsigned int)page_size, (long unsigned int)size)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  373|   	memset(ctx->buf, 0, size);
#  374|   
#  375|-> 	ctx->context = ibv_open_device(ib_dev);
#  376|   	if (!ctx->context) {
#  377|   		fprintf(stderr, "Couldn't get context for %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:377:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:377:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:377:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  375|   	ctx->context = ibv_open_device(ib_dev);
#  376|   	if (!ctx->context) {
#  377|-> 		fprintf(stderr, "Couldn't get context for %s\n",
#  378|   			ibv_get_device_name(ib_dev));
#  379|   		goto clean_buffer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:377:17: warning[-Wanalyzer-malloc-leak]: leak of ‘memalign((long unsigned int)page_size, (long unsigned int)size)’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:367:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:377:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:377:17: danger: ‘memalign((long unsigned int)page_size, (long unsigned int)size)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  375|   	ctx->context = ibv_open_device(ib_dev);
#  376|   	if (!ctx->context) {
#  377|-> 		fprintf(stderr, "Couldn't get context for %s\n",
#  378|   			ibv_get_device_name(ib_dev));
#  379|   		goto clean_buffer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def441]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  398|   
#  399|   	if (use_event) {
#  400|-> 		ctx->channel = ibv_create_comp_channel(ctx->context);
#  401|   		if (!ctx->channel) {
#  402|   			fprintf(stderr, "Couldn't create completion channel\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: warning[-Wanalyzer-malloc-leak]: leak of ‘memalign((long unsigned int)page_size, (long unsigned int)size)’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:367:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: danger: ‘memalign((long unsigned int)page_size, (long unsigned int)size)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  398|   
#  399|   	if (use_event) {
#  400|-> 		ctx->channel = ibv_create_comp_channel(ctx->context);
#  401|   		if (!ctx->channel) {
#  402|   			fprintf(stderr, "Couldn't create completion channel\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def443]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:408:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:408:19: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  406|   		ctx->channel = NULL;
#  407|   
#  408|-> 	ctx->pd = ibv_alloc_pd(ctx->context);
#  409|   	if (!ctx->pd) {
#  410|   		fprintf(stderr, "Couldn't allocate PD\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:408:19: warning[-Wanalyzer-malloc-leak]: leak of ‘memalign((long unsigned int)page_size, (long unsigned int)size)’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:367:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:408:19: danger: ‘memalign((long unsigned int)page_size, (long unsigned int)size)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  406|   		ctx->channel = NULL;
#  407|   
#  408|-> 	ctx->pd = ibv_alloc_pd(ctx->context);
#  409|   	if (!ctx->pd) {
#  410|   		fprintf(stderr, "Couldn't allocate PD\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def445]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/1)
#  418|   	}
#  419|   
#  420|-> 	ctx->cq = ibv_create_cq(ctx->context, rx_depth + num_qp, NULL,
#  421|   				ctx->channel, 0);
#  422|   	if (!ctx->cq) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:435:28: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:422:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:428:42: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:435:28: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/1)
#  433|   		};
#  434|   
#  435|-> 		ctx->srq = ibv_create_srq(ctx->pd, &attr);
#  436|   		if (!ctx->srq)  {
#  437|   			fprintf(stderr, "Couldn't create SRQ\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:455:30: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:422:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:428:42: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:436:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:21: branch_true: following ‘true’ branch (when ‘i < num_qp’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:444:41: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:455:30: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/1)
#  453|   		};
#  454|   
#  455|-> 		ctx->qp[i] = ibv_create_qp(ctx->pd, &init_attr);
#  456|   		if (!ctx->qp[i])  {
#  457|   			fprintf(stderr, "Couldn't create QP[%d]\n", i);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:460:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:422:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:428:42: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:436:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:21: branch_true: following ‘true’ branch (when ‘i < num_qp’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:444:41: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:456:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:460:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:460:17: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/1)
#  458|   			goto clean_qps;
#  459|   		}
#  460|-> 		ibv_query_qp(ctx->qp[i], &attr, IBV_QP_CAP, &init_attr);
#  461|   		if (init_attr.cap.max_inline_data >= size) {
#  462|   			ctx->send_flags |= IBV_SEND_INLINE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def449]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:474:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:422:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:428:42: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:436:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:21: branch_true: following ‘true’ branch (when ‘i < num_qp’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:444:41: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:456:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:460:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:21: branch_false: following ‘false’ branch (when ‘i >= num_qp’)...
 branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:466:21: branch_true: following ‘true’ branch (when ‘i < num_qp’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:467:36: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:474:21: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/1)
#  472|   		};
#  473|   
#  474|-> 		if (ibv_modify_qp(ctx->qp[i], &attr,
#  475|   				  IBV_QP_STATE              |
#  476|   				  IBV_QP_PKEY_INDEX         |

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:491:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:401:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:408:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:422:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:428:42: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:436:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:21: branch_true: following ‘true’ branch (when ‘i < num_qp’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:444:41: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:456:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:460:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:21: branch_true: following ‘true’ branch (when ‘i < num_qp’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:444:41: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:490:19: branch_true: following ‘true’ branch (when ‘i != -1’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:491:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:491:17: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/1)
#  489|   clean_qps:
#  490|   	for (--i; i >= 0; --i)
#  491|-> 		ibv_destroy_qp(ctx->qp[i]);
#  492|   
#  493|   	ibv_destroy_srq(ctx->srq);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def451]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:493:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:422:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:428:42: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:436:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:442:21: branch_true: following ‘true’ branch (when ‘i < num_qp’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:444:41: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:490:19: branch_false: following ‘false’ branch (when ‘i == -1’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:493:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:493:9: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/1)
#  491|   		ibv_destroy_qp(ctx->qp[i]);
#  492|   
#  493|-> 	ibv_destroy_srq(ctx->srq);
#  494|   
#  495|   clean_cq:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:496:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:422:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:428:42: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:436:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:437:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:496:9: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/1)
#  494|   
#  495|   clean_cq:
#  496|-> 	ibv_destroy_cq(ctx->cq);
#  497|   
#  498|   clean_mr:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:499:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:420:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:422:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:423:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:499:9: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/1)
#  497|   
#  498|   clean_mr:
#  499|-> 	ibv_dereg_mr(ctx->mr);
#  500|   
#  501|   clean_pd:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:502:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:415:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:416:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:502:9: danger: ‘ctx’ leaks here; was allocated at [(2)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/1)
#  500|   
#  501|   clean_pd:
#  502|-> 	ibv_dealloc_pd(ctx->pd);
#  503|   
#  504|   clean_comp_channel:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:506:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:401:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:408:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:410:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:505:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:506:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:506:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#  504|   clean_comp_channel:
#  505|   	if (ctx->channel)
#  506|-> 		ibv_destroy_comp_channel(ctx->channel);
#  507|   
#  508|   clean_device:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:506:17: warning[-Wanalyzer-malloc-leak]: leak of ‘memalign((long unsigned int)page_size, (long unsigned int)size)’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:367:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:401:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:408:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:410:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:505:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:506:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:506:17: danger: ‘memalign((long unsigned int)page_size, (long unsigned int)size)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/2)
#  504|   clean_comp_channel:
#  505|   	if (ctx->channel)
#  506|-> 		ibv_destroy_comp_channel(ctx->channel);
#  507|   
#  508|   clean_device:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:509:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:358:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:401:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:402:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:509:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0)
#  507|   
#  508|   clean_device:
#  509|-> 	ibv_close_device(ctx->context);
#  510|   
#  511|   clean_buffer:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:509:9: warning[-Wanalyzer-malloc-leak]: leak of ‘memalign((long unsigned int)page_size, (long unsigned int)size)’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:367:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:400:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:401:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:402:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:509:9: danger: ‘memalign((long unsigned int)page_size, (long unsigned int)size)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  507|   
#  508|   clean_device:
#  509|-> 	ibv_close_device(ctx->context);
#  510|   
#  511|   clean_buffer:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def459]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:155:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:141:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:144:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:146:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:152:14: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:152:23: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:153:26: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:153:26: acquire_resource: socket created here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:154:20: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:155:30: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:155:30: danger: ‘sockfd’ leaks here
#  153|   		sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
#  154|   		if (sockfd >= 0) {
#  155|-> 			if (!connect(sockfd, t->ai_addr, t->ai_addrlen))
#  156|   				break;
#  157|   			close(sockfd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:322:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:313:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:322:24: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  320|   	memset(ctx->buf, 0x7b, size);
#  321|   
#  322|-> 	ctx->context = ibv_open_device(ib_dev);
#  323|   	if (!ctx->context) {
#  324|   		fprintf(stderr, "Couldn't get context for %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def461]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:322:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:322:24: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  320|   	memset(ctx->buf, 0x7b, size);
#  321|   
#  322|-> 	ctx->context = ibv_open_device(ib_dev);
#  323|   	if (!ctx->context) {
#  324|   		fprintf(stderr, "Couldn't get context for %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:324:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:313:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:324:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:324:17: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  322|   	ctx->context = ibv_open_device(ib_dev);
#  323|   	if (!ctx->context) {
#  324|-> 		fprintf(stderr, "Couldn't get context for %s\n",
#  325|   			ibv_get_device_name(ib_dev));
#  326|   		goto clean_buffer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:324:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:324:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:324:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  322|   	ctx->context = ibv_open_device(ib_dev);
#  323|   	if (!ctx->context) {
#  324|-> 		fprintf(stderr, "Couldn't get context for %s\n",
#  325|   			ibv_get_device_name(ib_dev));
#  326|   		goto clean_buffer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:313:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  328|   
#  329|   	if (use_event) {
#  330|-> 		ctx->channel = ibv_create_comp_channel(ctx->context);
#  331|   		if (!ctx->channel) {
#  332|   			fprintf(stderr, "Couldn't create completion channel\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  328|   
#  329|   	if (use_event) {
#  330|-> 		ctx->channel = ibv_create_comp_channel(ctx->context);
#  331|   		if (!ctx->channel) {
#  332|   			fprintf(stderr, "Couldn't create completion channel\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:338:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:313:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:338:19: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  336|   		ctx->channel = NULL;
#  337|   
#  338|-> 	ctx->pd = ibv_alloc_pd(ctx->context);
#  339|   	if (!ctx->pd) {
#  340|   		fprintf(stderr, "Couldn't allocate PD\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:338:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:338:19: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  336|   		ctx->channel = NULL;
#  337|   
#  338|-> 	ctx->pd = ibv_alloc_pd(ctx->context);
#  339|   	if (!ctx->pd) {
#  340|   		fprintf(stderr, "Couldn't allocate PD\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:350:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:344:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:345:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:350:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:350:19: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  348|   	}
#  349|   
#  350|-> 	ctx->cq = ibv_create_cq(ctx->context, rx_depth + 1, NULL,
#  351|   				ctx->channel, 0);
#  352|   	if (!ctx->cq) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:371:27: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:344:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:345:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:350:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:359:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:371:27: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  369|   		};
#  370|   
#  371|-> 		ctx->qp = ibv_create_qp(ctx->pd, &init_attr);
#  372|   		if (!ctx->qp)  {
#  373|   			fprintf(stderr, "Couldn't create QP\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def470]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:376:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:344:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:345:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:350:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:359:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:372:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:376:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:376:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  374|   			goto clean_cq;
#  375|   		}
#  376|-> 		ibv_query_qp(ctx->qp, &attr, IBV_QP_CAP, &init_attr);
#  377|   		if (init_attr.cap.max_inline_data >= size) {
#  378|   			ctx->send_flags |= IBV_SEND_INLINE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def471]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:390:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:344:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:345:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:350:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:359:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:372:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:376:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:390:21: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  388|   		};
#  389|   
#  390|-> 		if (ibv_modify_qp(ctx->qp, &attr,
#  391|   				  IBV_QP_STATE              |
#  392|   				  IBV_QP_PKEY_INDEX         |

Error: GCC_ANALYZER_WARNING (CWE-401): [#def472]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:403:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:344:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:345:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:350:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:359:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:372:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:376:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:390:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:395:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:403:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  401|   
#  402|   clean_qp:
#  403|-> 	ibv_destroy_qp(ctx->qp);
#  404|   
#  405|   clean_cq:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def473]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:406:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:344:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:345:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:350:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:359:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:406:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  404|   
#  405|   clean_cq:
#  406|-> 	ibv_destroy_cq(ctx->cq);
#  407|   
#  408|   clean_mr:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def474]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:409:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:344:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:345:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:350:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:352:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:353:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:409:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  407|   
#  408|   clean_mr:
#  409|-> 	ibv_dereg_mr(ctx->mr);
#  410|   
#  411|   clean_pd:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def475]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:412:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:336:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:344:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:345:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:346:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:412:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  410|   
#  411|   clean_pd:
#  412|-> 	ibv_dealloc_pd(ctx->pd);
#  413|   
#  414|   clean_comp_channel:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def476]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:416:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:313:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:331:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:338:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:340:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:415:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:416:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:416:17: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  414|   clean_comp_channel:
#  415|   	if (ctx->channel)
#  416|-> 		ibv_destroy_comp_channel(ctx->channel);
#  417|   
#  418|   clean_device:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def477]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:416:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:331:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:338:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:339:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:340:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:415:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:416:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:416:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  414|   clean_comp_channel:
#  415|   	if (ctx->channel)
#  416|-> 		ibv_destroy_comp_channel(ctx->channel);
#  417|   
#  418|   clean_device:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def478]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:419:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:313:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:331:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:332:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:419:9: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  417|   
#  418|   clean_device:
#  419|-> 	ibv_close_device(ctx->context);
#  420|   
#  421|   clean_buffer:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def479]
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:419:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:305:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:306:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:309:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:314:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:320:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:323:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:329:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:330:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:331:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:332:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/uc_pingpong.c:419:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  417|   
#  418|   clean_device:
#  419|-> 	ibv_close_device(ctx->context);
#  420|   
#  421|   clean_buffer:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def480]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:155:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:141:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:144:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:146:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:152:14: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:152:23: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:153:26: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:153:26: acquire_resource: socket created here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:154:20: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:155:30: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:155:30: danger: ‘sockfd’ leaks here
#  153|   		sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
#  154|   		if (sockfd >= 0) {
#  155|-> 			if (!connect(sockfd, t->ai_addr, t->ai_addrlen))
#  156|   				break;
#  157|   			close(sockfd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def481]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:318:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:309:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:318:24: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  316|   	memset(ctx->buf, 0x7b, size + 40);
#  317|   
#  318|-> 	ctx->context = ibv_open_device(ib_dev);
#  319|   	if (!ctx->context) {
#  320|   		fprintf(stderr, "Couldn't get context for %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def482]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:318:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:318:24: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  316|   	memset(ctx->buf, 0x7b, size + 40);
#  317|   
#  318|-> 	ctx->context = ibv_open_device(ib_dev);
#  319|   	if (!ctx->context) {
#  320|   		fprintf(stderr, "Couldn't get context for %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def483]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:320:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:309:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:320:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:320:17: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  318|   	ctx->context = ibv_open_device(ib_dev);
#  319|   	if (!ctx->context) {
#  320|-> 		fprintf(stderr, "Couldn't get context for %s\n",
#  321|   			ibv_get_device_name(ib_dev));
#  322|   		goto clean_buffer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def484]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:320:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:320:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:320:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  318|   	ctx->context = ibv_open_device(ib_dev);
#  319|   	if (!ctx->context) {
#  320|-> 		fprintf(stderr, "Couldn't get context for %s\n",
#  321|   			ibv_get_device_name(ib_dev));
#  322|   		goto clean_buffer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def485]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:341:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:309:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:341:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:341:32: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  339|   
#  340|   	if (use_event) {
#  341|-> 		ctx->channel = ibv_create_comp_channel(ctx->context);
#  342|   		if (!ctx->channel) {
#  343|   			fprintf(stderr, "Couldn't create completion channel\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def486]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:341:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:341:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:341:32: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  339|   
#  340|   	if (use_event) {
#  341|-> 		ctx->channel = ibv_create_comp_channel(ctx->context);
#  342|   		if (!ctx->channel) {
#  343|   			fprintf(stderr, "Couldn't create completion channel\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def487]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:349:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:309:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:349:19: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  347|   		ctx->channel = NULL;
#  348|   
#  349|-> 	ctx->pd = ibv_alloc_pd(ctx->context);
#  350|   	if (!ctx->pd) {
#  351|   		fprintf(stderr, "Couldn't allocate PD\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def488]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:349:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:349:19: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  347|   		ctx->channel = NULL;
#  348|   
#  349|-> 	ctx->pd = ibv_alloc_pd(ctx->context);
#  350|   	if (!ctx->pd) {
#  351|   		fprintf(stderr, "Couldn't allocate PD\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def489]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:361:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:355:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:356:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:361:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:361:19: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  359|   	}
#  360|   
#  361|-> 	ctx->cq = ibv_create_cq(ctx->context, rx_depth + 1, NULL,
#  362|   				ctx->channel, 0);
#  363|   	if (!ctx->cq) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def490]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:382:27: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:355:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:356:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:361:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:363:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:370:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:382:27: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  380|   		};
#  381|   
#  382|-> 		ctx->qp = ibv_create_qp(ctx->pd, &init_attr);
#  383|   		if (!ctx->qp)  {
#  384|   			fprintf(stderr, "Couldn't create QP\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def491]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:388:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:355:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:356:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:361:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:363:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:370:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:383:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:388:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:388:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  386|   		}
#  387|   
#  388|-> 		ibv_query_qp(ctx->qp, &attr, IBV_QP_CAP, &init_attr);
#  389|   		if (init_attr.cap.max_inline_data >= size) {
#  390|   			ctx->send_flags |= IBV_SEND_INLINE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def492]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:402:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:355:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:356:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:361:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:363:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:370:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:383:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:388:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:402:21: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  400|   		};
#  401|   
#  402|-> 		if (ibv_modify_qp(ctx->qp, &attr,
#  403|   				  IBV_QP_STATE              |
#  404|   				  IBV_QP_PKEY_INDEX         |

Error: GCC_ANALYZER_WARNING (CWE-401): [#def493]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:415:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:355:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:356:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:361:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:363:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:370:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:383:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:388:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:402:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:407:25: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:415:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  413|   
#  414|   clean_qp:
#  415|-> 	ibv_destroy_qp(ctx->qp);
#  416|   
#  417|   clean_cq:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def494]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:418:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:355:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:356:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:361:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:363:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:370:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:418:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  416|   
#  417|   clean_cq:
#  418|-> 	ibv_destroy_cq(ctx->cq);
#  419|   
#  420|   clean_mr:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def495]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:421:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:355:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:356:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:361:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:421:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  419|   
#  420|   clean_mr:
#  421|-> 	ibv_dereg_mr(ctx->mr);
#  422|   
#  423|   clean_pd:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def496]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:424:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:347:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:355:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:424:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  422|   
#  423|   clean_pd:
#  424|-> 	ibv_dealloc_pd(ctx->pd);
#  425|   
#  426|   clean_comp_channel:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def497]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:428:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:309:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:341:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:342:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:349:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:351:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:427:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:428:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:428:17: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  426|   clean_comp_channel:
#  427|   	if (ctx->channel)
#  428|-> 		ibv_destroy_comp_channel(ctx->channel);
#  429|   
#  430|   clean_device:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def498]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:428:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:333:29: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:334:20: branch_false: following ‘false’ branch (when ‘size <= mtu’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:340:12: branch_true: following ‘true’ branch (when ‘use_event != 0’)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:341:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:342:20: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:349:19: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:350:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:351:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:427:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:428:17: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:428:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  426|   clean_comp_channel:
#  427|   	if (ctx->channel)
#  428|-> 		ibv_destroy_comp_channel(ctx->channel);
#  429|   
#  430|   clean_device:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def499]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:431:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:309:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:431:9: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  429|   
#  430|   clean_device:
#  431|-> 	ibv_close_device(ctx->context);
#  432|   
#  433|   clean_buffer:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def500]
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:431:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:431:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  429|   
#  430|   clean_device:
#  431|-> 	ibv_close_device(ctx->context);
#  432|   
#  433|   clean_buffer:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def501]
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:583:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:570:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:573:15: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:574:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:580:14: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:580:23: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:581:26: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:581:26: acquire_resource: socket created here
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:582:20: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:583:30: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/xsrq_pingpong.c:583:30: danger: ‘sockfd’ leaks here
#  581|   		sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
#  582|   		if (sockfd >= 0) {
#  583|-> 			if (!connect(sockfd, t->ai_addr, t->ai_addrlen))
#  584|   				break;
#  585|   			close(sockfd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def502]
rdma-core-59.0/libibverbs/ibdev_nl.c:61:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&path)’
rdma-core-59.0/libibverbs/ibdev_nl.c:46:12: enter_function: entry to ‘find_uverbs_sysfs’
rdma-core-59.0/libibverbs/ibdev_nl.c:53:14: call_function: inlined call to ‘__good_snprintf’ from ‘find_uverbs_sysfs’
rdma-core-59.0/libibverbs/ibdev_nl.c:57:21: branch_true: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:57:21: acquire_memory: allocated here
rdma-core-59.0/libibverbs/ibdev_nl.c:58:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:61:24: danger: ‘opendir(&path)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   59|   		return ENOSYS;
#   60|   
#   61|-> 	while ((dent = readdir(class_dir))) {
#   62|   		int uv_dirfd;
#   63|   		bool failed;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def503]
rdma-core-59.0/libibverbs/ibdev_nl.c:161:32: warning[-Wanalyzer-malloc-leak]: leak of ‘sysfs_dev’
rdma-core-59.0/libibverbs/ibdev_nl.c:148:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:150:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:151:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:152:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:153:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:154:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:157:21: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:157:21: acquire_memory: allocated here
rdma-core-59.0/libibverbs/ibdev_nl.c:158:12: branch_false: following ‘false’ branch (when ‘sysfs_dev’ is non-NULL)...
rdma-core-59.0/libibverbs/ibdev_nl.c:161:32: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:161:32: danger: ‘sysfs_dev’ leaks here; was allocated at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#  159|   		return NLE_NOMEM;
#  160|   
#  161|-> 	sysfs_dev->ibdev_idx = nla_get_u32(tb[RDMA_NLDEV_ATTR_DEV_INDEX]);
#  162|   	sysfs_dev->num_ports = nla_get_u32(tb[RDMA_NLDEV_ATTR_PORT_INDEX]);
#  163|   	sysfs_dev->node_guid = nla_get_u64(tb[RDMA_NLDEV_ATTR_NODE_GUID]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def504]
rdma-core-59.0/libibverbs/ibdev_nl.c:162:32: warning[-Wanalyzer-malloc-leak]: leak of ‘sysfs_dev’
rdma-core-59.0/libibverbs/ibdev_nl.c:148:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:150:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:151:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:152:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:153:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:154:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:157:21: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:157:21: acquire_memory: allocated here
rdma-core-59.0/libibverbs/ibdev_nl.c:158:12: branch_false: following ‘false’ branch (when ‘sysfs_dev’ is non-NULL)...
rdma-core-59.0/libibverbs/ibdev_nl.c:161:32: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:162:32: danger: ‘sysfs_dev’ leaks here; was allocated at [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
#  160|   
#  161|   	sysfs_dev->ibdev_idx = nla_get_u32(tb[RDMA_NLDEV_ATTR_DEV_INDEX]);
#  162|-> 	sysfs_dev->num_ports = nla_get_u32(tb[RDMA_NLDEV_ATTR_PORT_INDEX]);
#  163|   	sysfs_dev->node_guid = nla_get_u64(tb[RDMA_NLDEV_ATTR_NODE_GUID]);
#  164|   	sysfs_dev->flags |= VSYSFS_READ_NODE_GUID;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def505]
rdma-core-59.0/libibverbs/ibdev_nl.c:163:32: warning[-Wanalyzer-malloc-leak]: leak of ‘sysfs_dev’
rdma-core-59.0/libibverbs/ibdev_nl.c:148:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:150:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:151:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:152:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:153:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:154:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:157:21: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:157:21: acquire_memory: allocated here
rdma-core-59.0/libibverbs/ibdev_nl.c:158:12: branch_false: following ‘false’ branch (when ‘sysfs_dev’ is non-NULL)...
rdma-core-59.0/libibverbs/ibdev_nl.c:161:32: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:163:32: danger: ‘sysfs_dev’ leaks here; was allocated at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  161|   	sysfs_dev->ibdev_idx = nla_get_u32(tb[RDMA_NLDEV_ATTR_DEV_INDEX]);
#  162|   	sysfs_dev->num_ports = nla_get_u32(tb[RDMA_NLDEV_ATTR_PORT_INDEX]);
#  163|-> 	sysfs_dev->node_guid = nla_get_u64(tb[RDMA_NLDEV_ATTR_NODE_GUID]);
#  164|   	sysfs_dev->flags |= VSYSFS_READ_NODE_GUID;
#  165|   	if (!check_snprintf(sysfs_dev->ibdev_name,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def506]
rdma-core-59.0/libibverbs/ibdev_nl.c:165:14: warning[-Wanalyzer-malloc-leak]: leak of ‘sysfs_dev’
rdma-core-59.0/libibverbs/ibdev_nl.c:148:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:150:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:151:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:152:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:153:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:154:14: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:150:13: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/ibdev_nl.c:157:21: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:157:21: acquire_memory: allocated here
rdma-core-59.0/libibverbs/ibdev_nl.c:158:12: branch_false: following ‘false’ branch (when ‘sysfs_dev’ is non-NULL)...
rdma-core-59.0/libibverbs/ibdev_nl.c:161:32: branch_false: ...to here
rdma-core-59.0/libibverbs/ibdev_nl.c:165:14: danger: ‘sysfs_dev’ leaks here; was allocated at [(13)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/12)
#  163|   	sysfs_dev->node_guid = nla_get_u64(tb[RDMA_NLDEV_ATTR_NODE_GUID]);
#  164|   	sysfs_dev->flags |= VSYSFS_READ_NODE_GUID;
#  165|-> 	if (!check_snprintf(sysfs_dev->ibdev_name,
#  166|   			    sizeof(sysfs_dev->ibdev_name), "%s",
#  167|   			    nla_get_string(tb[RDMA_NLDEV_ATTR_DEV_NAME])))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def507]
rdma-core-59.0/libibverbs/init.c:166:20: warning[-Wanalyzer-malloc-leak]: leak of ‘sysfs_dev’
rdma-core-59.0/libibverbs/init.c:551:5: enter_function: entry to ‘ibverbs_get_device_list’
rdma-core-59.0/libibverbs/init.c:561:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/init.c:562:23: branch_true: ...to here
rdma-core-59.0/libibverbs/init.c:562:23: call_function: calling ‘find_sysfs_devs’ from ‘ibverbs_get_device_list’
#  164|   	sysfs_dev->ibdev_idx = -1;
#  165|   
#  166|-> 	uv_dirfd = openat(dirfd, uverbs, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
#  167|   	if (uv_dirfd == -1)
#  168|   		goto err_alloc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def508]
rdma-core-59.0/libibverbs/init.c:170:13: warning[-Wanalyzer-malloc-leak]: leak of ‘sysfs_dev’
rdma-core-59.0/libibverbs/init.c:551:5: enter_function: entry to ‘ibverbs_get_device_list’
rdma-core-59.0/libibverbs/init.c:561:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/init.c:562:23: branch_true: ...to here
rdma-core-59.0/libibverbs/init.c:562:23: call_function: calling ‘find_sysfs_devs’ from ‘ibverbs_get_device_list’
#  168|   		goto err_alloc;
#  169|   
#  170|-> 	if (ibv_read_sysfs_file_at(uv_dirfd, "ibdev", sysfs_dev->ibdev_name,
#  171|   				   sizeof(sysfs_dev->ibdev_name)) < 0)
#  172|   		goto err_fd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def509]
rdma-core-59.0/libibverbs/init.c:220:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&class_path)’
rdma-core-59.0/libibverbs/init.c:551:5: enter_function: entry to ‘ibverbs_get_device_list’
rdma-core-59.0/libibverbs/init.c:561:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/init.c:562:23: branch_true: ...to here
rdma-core-59.0/libibverbs/init.c:562:23: call_function: calling ‘find_sysfs_devs’ from ‘ibverbs_get_device_list’
#  218|   		return ENOSYS;
#  219|   
#  220|-> 	while ((dent = readdir(class_dir))) {
#  221|   		if (dent->d_name[0] == '.')
#  222|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def510]
rdma-core-59.0/libibverbs/memory.c:559:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/libibverbs/memory.c:624:12: enter_function: entry to ‘ibv_madvise_range’
rdma-core-59.0/libibverbs/memory.c:647:15: branch_true: following ‘true’ branch (when ‘advice == 10’)...
rdma-core-59.0/libibverbs/memory.c:649:16: branch_true: ...to here
rdma-core-59.0/libibverbs/memory.c:649:16: call_function: calling ‘get_start_node’ from ‘ibv_madvise_range’
#  557|   
#  558|   	node = __mm_find_start(start, end);
#  559|-> 	if (node->start < start)
#  560|   		node = split_range(node, start);
#  561|   	else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def511]
rdma-core-59.0/libibverbs/neigh.c:230:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock_fd’
rdma-core-59.0/libibverbs/neigh.c:205:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/neigh.c:210:9: branch_false: ...to here
rdma-core-59.0/libibverbs/neigh.c:214:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/neigh.c:220:29: branch_false: ...to here
rdma-core-59.0/libibverbs/neigh.c:224:19: acquire_resource: socket created here
rdma-core-59.0/libibverbs/neigh.c:226:12: branch_false: following ‘false’ branch (when ‘sock_fd != -1’)...
rdma-core-59.0/libibverbs/neigh.c:228:15: branch_false: ...to here
rdma-core-59.0/libibverbs/neigh.c:229:12: branch_true: following ‘true’ branch (when ‘err != 0’)...
rdma-core-59.0/libibverbs/neigh.c:230:17: branch_true: ...to here
rdma-core-59.0/libibverbs/neigh.c:230:17: danger: ‘sock_fd’ leaks here
#  228|   	err = bind(sock_fd, &addr_src.sktaddr.s, addr_src.len);
#  229|   	if (err) {
#  230|-> 		close(sock_fd);
#  231|   		return -1;
#  232|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def512]
rdma-core-59.0/libibverbs/neigh.c:281:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock_fd’
rdma-core-59.0/libibverbs/neigh.c:291:24: enter_function: entry to ‘process_get_neigh_mac’
rdma-core-59.0/libibverbs/neigh.c:307:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/neigh.c:310:15: branch_false: ...to here
rdma-core-59.0/libibverbs/neigh.c:312:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/neigh.c:316:52: branch_false: ...to here
rdma-core-59.0/libibverbs/neigh.c:317:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/neigh.c:320:9: call_function: inlined call to ‘set_neigh_filter’ from ‘process_get_neigh_mac’
rdma-core-59.0/libibverbs/neigh.c:328:15: call_function: calling ‘create_socket’ from ‘process_get_neigh_mac’
rdma-core-59.0/libibverbs/neigh.c:328:15: return_function: returning to ‘process_get_neigh_mac’ from ‘create_socket’
rdma-core-59.0/libibverbs/neigh.c:330:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/neigh.c:333:15: branch_false: ...to here
rdma-core-59.0/libibverbs/neigh.c:333:15: call_function: calling ‘try_send_to’ from ‘process_get_neigh_mac’
#  279|   
#  280|   	do {
#  281|-> 		err = sendto(sock_fd, buff, buf_size, 0,
#  282|   			     &addr_dst->sktaddr.s,
#  283|   			     addr_dst->len);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def513]
rdma-core-59.0/libibverbs/sysfs.c:67:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘dup’ where non-null expected
rdma-core-59.0/libibverbs/sysfs.c:52:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/sysfs.c:59:13: branch_false: ...to here
rdma-core-59.0/libibverbs/sysfs.c:59:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/sysfs.c:60:23: branch_true: ...to here
rdma-core-59.0/libibverbs/sysfs.c:62:12: branch_true: following ‘true’ branch (when ‘env’ is non-NULL)...
rdma-core-59.0/libibverbs/sysfs.c:66:36: branch_true: ...to here
rdma-core-59.0/libibverbs/sysfs.c:66:36: acquire_memory: this call could return NULL
rdma-core-59.0/libibverbs/sysfs.c:67:23: danger: argument 1 (‘dup’) from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#   65|   
#   66|   		sysfs_path = dup = strndup(env, IBV_SYSFS_PATH_MAX);
#   67|-> 		len = strlen(dup);
#   68|   		while (len > 0 && dup[len - 1] == '/') {
#   69|   			--len;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def514]
rdma-core-59.0/libibverbs/verbs.c:561:13: warning[-Wanalyzer-malloc-leak]: leak of ‘channel’
rdma-core-59.0/libibverbs/verbs.c:550:26: enter_function: entry to ‘ibv_create_comp_channel’
rdma-core-59.0/libibverbs/verbs.c:556:19: acquire_memory: allocated here
rdma-core-59.0/libibverbs/verbs.c:557:12: branch_false: following ‘false’ branch (when ‘channel’ is non-NULL)...
rdma-core-59.0/libibverbs/verbs.c:561:13: call_function: inlined call to ‘ioctl_ptr_to_u64’ from ‘ibv_create_comp_channel’
rdma-core-59.0/libibverbs/verbs.c:561:13: danger: ‘channel’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#  559|   
#  560|   	req.core_payload = (struct ib_uverbs_create_comp_channel){};
#  561|-> 	if (execute_cmd_write(context, IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
#  562|   			      &req, sizeof(req), &resp, sizeof(resp))) {
#  563|   		free(channel);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def515]
rdma-core-59.0/librdmacm/acm.c:150:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/librdmacm/acm.c:322:6: enter_function: entry to ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:330:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:333:9: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:390:15: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:392:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:395:9: call_function: calling ‘ucma_ib_save_resp’ from ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:395:9: return_function: returning to ‘ucma_ib_resolve’ from ‘ucma_ib_save_resp’
rdma-core-59.0/librdmacm/acm.c:397:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/acm.c:398:17: call_function: calling ‘ucma_resolve_af_ib’ from ‘ucma_ib_resolve’
#  148|   	src->sib_flowinfo = htobe32(be32toh(path->flowlabel_hoplimit) >> 8);
#  149|   	memcpy(&src->sib_addr, &path->sgid, 16);
#  150|-> 	ucma_set_sid(ib_rai->ai_port_space, rai->ai_src_addr, src);
#  151|   
#  152|   	dst->sib_family = AF_IB;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
rdma-core-59.0/librdmacm/acm.c:150:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dst’
rdma-core-59.0/librdmacm/acm.c:322:6: enter_function: entry to ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:330:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:333:9: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:390:15: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:392:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:395:9: call_function: calling ‘ucma_ib_save_resp’ from ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:395:9: return_function: returning to ‘ucma_ib_resolve’ from ‘ucma_ib_save_resp’
rdma-core-59.0/librdmacm/acm.c:397:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/acm.c:398:17: call_function: calling ‘ucma_resolve_af_ib’ from ‘ucma_ib_resolve’
#  148|   	src->sib_flowinfo = htobe32(be32toh(path->flowlabel_hoplimit) >> 8);
#  149|   	memcpy(&src->sib_addr, &path->sgid, 16);
#  150|-> 	ucma_set_sid(ib_rai->ai_port_space, rai->ai_src_addr, src);
#  151|   
#  152|   	dst->sib_family = AF_IB;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def517]
rdma-core-59.0/librdmacm/acm.c:150:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ib_rai’
rdma-core-59.0/librdmacm/acm.c:322:6: enter_function: entry to ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:330:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:333:9: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:390:15: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:392:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:395:9: call_function: calling ‘ucma_ib_save_resp’ from ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:395:9: return_function: returning to ‘ucma_ib_resolve’ from ‘ucma_ib_save_resp’
rdma-core-59.0/librdmacm/acm.c:397:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/acm.c:398:17: call_function: calling ‘ucma_resolve_af_ib’ from ‘ucma_ib_resolve’
#  148|   	src->sib_flowinfo = htobe32(be32toh(path->flowlabel_hoplimit) >> 8);
#  149|   	memcpy(&src->sib_addr, &path->sgid, 16);
#  150|-> 	ucma_set_sid(ib_rai->ai_port_space, rai->ai_src_addr, src);
#  151|   
#  152|   	dst->sib_family = AF_IB;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def518]
rdma-core-59.0/librdmacm/acm.c:150:9: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
rdma-core-59.0/librdmacm/acm.c:322:6: enter_function: entry to ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:330:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:333:9: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:390:15: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:392:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:395:9: call_function: calling ‘ucma_ib_save_resp’ from ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:395:9: return_function: returning to ‘ucma_ib_resolve’ from ‘ucma_ib_save_resp’
rdma-core-59.0/librdmacm/acm.c:397:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/acm.c:398:17: call_function: calling ‘ucma_resolve_af_ib’ from ‘ucma_ib_resolve’
#  148|   	src->sib_flowinfo = htobe32(be32toh(path->flowlabel_hoplimit) >> 8);
#  149|   	memcpy(&src->sib_addr, &path->sgid, 16);
#  150|-> 	ucma_set_sid(ib_rai->ai_port_space, rai->ai_src_addr, src);
#  151|   
#  152|   	dst->sib_family = AF_IB;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def519]
rdma-core-59.0/librdmacm/acm.c:156:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/librdmacm/acm.c:322:6: enter_function: entry to ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:330:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:333:9: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:390:15: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:392:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:395:9: call_function: calling ‘ucma_ib_save_resp’ from ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:395:9: return_function: returning to ‘ucma_ib_resolve’ from ‘ucma_ib_save_resp’
rdma-core-59.0/librdmacm/acm.c:397:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/acm.c:398:17: call_function: calling ‘ucma_resolve_af_ib’ from ‘ucma_ib_resolve’
#  154|   	dst->sib_flowinfo = htobe32(be32toh(path->flowlabel_hoplimit) >> 8);
#  155|   	memcpy(&dst->sib_addr, &path->dgid, 16);
#  156|-> 	ucma_set_sid(ib_rai->ai_port_space, rai->ai_dst_addr, dst);
#  157|   
#  158|   	ib_rai->ai_src_addr = (struct sockaddr *) src;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def520]
rdma-core-59.0/librdmacm/acm.c:156:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dst’
rdma-core-59.0/librdmacm/acm.c:322:6: enter_function: entry to ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:330:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:333:9: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:390:15: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:392:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:395:9: call_function: calling ‘ucma_ib_save_resp’ from ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:395:9: return_function: returning to ‘ucma_ib_resolve’ from ‘ucma_ib_save_resp’
rdma-core-59.0/librdmacm/acm.c:397:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/acm.c:398:17: call_function: calling ‘ucma_resolve_af_ib’ from ‘ucma_ib_resolve’
#  154|   	dst->sib_flowinfo = htobe32(be32toh(path->flowlabel_hoplimit) >> 8);
#  155|   	memcpy(&dst->sib_addr, &path->dgid, 16);
#  156|-> 	ucma_set_sid(ib_rai->ai_port_space, rai->ai_dst_addr, dst);
#  157|   
#  158|   	ib_rai->ai_src_addr = (struct sockaddr *) src;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def521]
rdma-core-59.0/librdmacm/acm.c:156:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ib_rai’
rdma-core-59.0/librdmacm/acm.c:322:6: enter_function: entry to ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:330:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:333:9: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:390:15: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:392:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:395:9: call_function: calling ‘ucma_ib_save_resp’ from ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:395:9: return_function: returning to ‘ucma_ib_resolve’ from ‘ucma_ib_save_resp’
rdma-core-59.0/librdmacm/acm.c:397:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/acm.c:398:17: call_function: calling ‘ucma_resolve_af_ib’ from ‘ucma_ib_resolve’
#  154|   	dst->sib_flowinfo = htobe32(be32toh(path->flowlabel_hoplimit) >> 8);
#  155|   	memcpy(&dst->sib_addr, &path->dgid, 16);
#  156|-> 	ucma_set_sid(ib_rai->ai_port_space, rai->ai_dst_addr, dst);
#  157|   
#  158|   	ib_rai->ai_src_addr = (struct sockaddr *) src;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def522]
rdma-core-59.0/librdmacm/acm.c:241:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ib_rai’
rdma-core-59.0/librdmacm/acm.c:322:6: enter_function: entry to ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:330:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:333:9: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:390:15: branch_false: ...to here
rdma-core-59.0/librdmacm/acm.c:392:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/acm.c:395:9: call_function: calling ‘ucma_ib_save_resp’ from ‘ucma_ib_resolve’
rdma-core-59.0/librdmacm/acm.c:395:9: return_function: returning to ‘ucma_ib_resolve’ from ‘ucma_ib_save_resp’
rdma-core-59.0/librdmacm/acm.c:397:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/acm.c:398:17: call_function: calling ‘ucma_resolve_af_ib’ from ‘ucma_ib_resolve’
#  239|   
#  240|   err:
#  241|-> 	rdma_freeaddrinfo(ib_rai);
#  242|   }
#  243|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def523]
rdma-core-59.0/librdmacm/addrinfo.c:115:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/librdmacm/addrinfo.c:237:5: enter_function: entry to ‘rdma_getaddrinfo’
rdma-core-59.0/librdmacm/addrinfo.c:248:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:251:15: branch_false: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:252:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:255:12: branch_false: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:258:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:259:23: branch_true: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:259:23: call_function: calling ‘ucma_getaddrinfo’ from ‘rdma_getaddrinfo’
#  113|   	__be16 port;
#  114|   
#  115|-> 	port = addr ? ucma_get_port(addr) : 0;
#  116|   	sib->sib_sid = htobe64(((uint64_t) ps << 16) + be16toh(port));
#  117|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def524]
rdma-core-59.0/librdmacm/addrinfo.c:115:23: warning[-Wanalyzer-malloc-leak]: leak of ‘rai’
rdma-core-59.0/librdmacm/addrinfo.c:237:5: enter_function: entry to ‘rdma_getaddrinfo’
rdma-core-59.0/librdmacm/addrinfo.c:248:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:251:15: branch_false: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:251:15: acquire_memory: allocated here
rdma-core-59.0/librdmacm/addrinfo.c:252:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:255:12: branch_false: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:258:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:259:23: branch_true: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:259:23: call_function: calling ‘ucma_getaddrinfo’ from ‘rdma_getaddrinfo’
#  113|   	__be16 port;
#  114|   
#  115|-> 	port = addr ? ucma_get_port(addr) : 0;
#  116|   	sib->sib_sid = htobe64(((uint64_t) ps << 16) + be16toh(port));
#  117|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def525]
rdma-core-59.0/librdmacm/addrinfo.c:225:23: warning[-Wanalyzer-malloc-leak]: leak of ‘rai’
rdma-core-59.0/librdmacm/addrinfo.c:237:5: enter_function: entry to ‘rdma_getaddrinfo’
rdma-core-59.0/librdmacm/addrinfo.c:248:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:251:15: branch_false: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:251:15: acquire_memory: allocated here
rdma-core-59.0/librdmacm/addrinfo.c:252:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:255:12: branch_false: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:258:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:259:23: branch_true: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:259:23: call_function: calling ‘ucma_getaddrinfo’ from ‘rdma_getaddrinfo’
#  223|   	if (hints != &nohints) {
#  224|   		ucma_convert_to_ai(&ai_hints, hints);
#  225|-> 		ret = getaddrinfo(node, service, &ai_hints, &ai);
#  226|   	} else {
#  227|   		ret = getaddrinfo(node, service, NULL, &ai);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def526]
rdma-core-59.0/librdmacm/addrinfo.c:227:23: warning[-Wanalyzer-malloc-leak]: leak of ‘rai’
rdma-core-59.0/librdmacm/addrinfo.c:237:5: enter_function: entry to ‘rdma_getaddrinfo’
rdma-core-59.0/librdmacm/addrinfo.c:248:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:251:15: branch_false: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:251:15: acquire_memory: allocated here
rdma-core-59.0/librdmacm/addrinfo.c:252:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:255:12: branch_false: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:258:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/addrinfo.c:259:23: branch_true: ...to here
rdma-core-59.0/librdmacm/addrinfo.c:259:23: call_function: calling ‘ucma_getaddrinfo’ from ‘rdma_getaddrinfo’
#  225|   		ret = getaddrinfo(node, service, &ai_hints, &ai);
#  226|   	} else {
#  227|-> 		ret = getaddrinfo(node, service, NULL, &ai);
#  228|   	}
#  229|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def527]
rdma-core-59.0/librdmacm/cma.c:188:14: warning[-Wanalyzer-malloc-leak]: leak of ‘id_priv’
rdma-core-59.0/librdmacm/cma.c:2317:12: enter_function: entry to ‘ucma_process_conn_req’
rdma-core-59.0/librdmacm/cma.c:2323:19: call_function: calling ‘ucma_alloc_id’ from ‘ucma_process_conn_req’
#  186|   	struct nl_sock *nl;
#  187|   
#  188|-> 	nl = rdmanl_socket_alloc();
#  189|   	if (!nl)
#  190|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
rdma-core-59.0/librdmacm/cma.c:191:13: warning[-Wanalyzer-malloc-leak]: leak of ‘id_priv’
rdma-core-59.0/librdmacm/cma.c:2317:12: enter_function: entry to ‘ucma_process_conn_req’
rdma-core-59.0/librdmacm/cma.c:2323:19: call_function: calling ‘ucma_alloc_id’ from ‘ucma_process_conn_req’
#  189|   	if (!nl)
#  190|   		return -1;
#  191|-> 	if (rdmanl_get_chardev(nl, -1, "rdma_cm", check_abi_version_nl_cb,
#  192|   			       NULL))
#  193|   		goto err_socket;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def529]
rdma-core-59.0/librdmacm/cma.c:200:9: warning[-Wanalyzer-malloc-leak]: leak of ‘id_priv’
rdma-core-59.0/librdmacm/cma.c:2317:12: enter_function: entry to ‘ucma_process_conn_req’
rdma-core-59.0/librdmacm/cma.c:2323:19: call_function: calling ‘ucma_alloc_id’ from ‘ucma_process_conn_req’
#  198|   
#  199|   err_socket:
#  200|-> 	nl_socket_free(nl);
#  201|   	return -1;
#  202|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
rdma-core-59.0/librdmacm/cma.c:208:14: warning[-Wanalyzer-malloc-leak]: leak of ‘id_priv’
rdma-core-59.0/librdmacm/cma.c:2317:12: enter_function: entry to ‘ucma_process_conn_req’
rdma-core-59.0/librdmacm/cma.c:2323:19: call_function: calling ‘ucma_alloc_id’ from ‘ucma_process_conn_req’
#  206|   	char value[8];
#  207|   
#  208|-> 	if ((ibv_read_sysfs_file(ibv_get_sysfs_path(),
#  209|   				 "class/misc/rdma_cm/abi_version",
#  210|   				 value, sizeof value) < 0) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def531]
rdma-core-59.0/librdmacm/cma.c:211:14: warning[-Wanalyzer-malloc-leak]: leak of ‘id_priv’
rdma-core-59.0/librdmacm/cma.c:2317:12: enter_function: entry to ‘ucma_process_conn_req’
rdma-core-59.0/librdmacm/cma.c:2323:19: call_function: calling ‘ucma_alloc_id’ from ‘ucma_process_conn_req’
#  209|   				 "class/misc/rdma_cm/abi_version",
#  210|   				 value, sizeof value) < 0) &&
#  211|-> 	    (ibv_read_sysfs_file(ibv_get_sysfs_path(),
#  212|   				 "class/infiniband_ucma/abi_version",
#  213|   				 value, sizeof value) < 0)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def532]
rdma-core-59.0/librdmacm/cma.c:273:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cma_dev’
rdma-core-59.0/librdmacm/cma.c:2498:5: enter_function: entry to ‘rdma_get_cm_event’
rdma-core-59.0/librdmacm/cma.c:2506:15: call_function: calling ‘ucma_init’ from ‘rdma_get_cm_event’
#  271|   		return NULL;
#  272|   
#  273|-> 	cma_dev->guid = ibv_get_device_guid(dev);
#  274|   	cma_dev->ibv_idx = ibv_get_device_index(dev);
#  275|   	cma_dev->dev = dev;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def533]
rdma-core-59.0/librdmacm/cma.c:274:28: warning[-Wanalyzer-malloc-leak]: leak of ‘cma_dev’
rdma-core-59.0/librdmacm/cma.c:2498:5: enter_function: entry to ‘rdma_get_cm_event’
rdma-core-59.0/librdmacm/cma.c:2506:15: call_function: calling ‘ucma_init’ from ‘rdma_get_cm_event’
#  272|   
#  273|   	cma_dev->guid = ibv_get_device_guid(dev);
#  274|-> 	cma_dev->ibv_idx = ibv_get_device_index(dev);
#  275|   	cma_dev->dev = dev;
#  276|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def534]
rdma-core-59.0/librdmacm/cma.c:322:20: warning[-Wanalyzer-malloc-leak]: leak of ‘id_priv’
rdma-core-59.0/librdmacm/cma.c:2317:12: enter_function: entry to ‘ucma_process_conn_req’
rdma-core-59.0/librdmacm/cma.c:2323:19: call_function: calling ‘ucma_alloc_id’ from ‘ucma_process_conn_req’
#  320|   	int i, j, numb_dev;
#  321|   
#  322|-> 	new_list = ibv_get_device_list(&numb_dev);
#  323|   	if (!new_list)
#  324|   		return ERR(ENODEV);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def535]
rdma-core-59.0/librdmacm/cma.c:2117:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘resp.id’
rdma-core-59.0/librdmacm/cma.c:2068:12: branch_false: following ‘false’ branch (when ‘mc’ is non-NULL)...
rdma-core-59.0/librdmacm/cma.c:2071:9: branch_false: ...to here
rdma-core-59.0/librdmacm/cma.c:2075:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/cma.c:2080:9: branch_false: ...to here
rdma-core-59.0/librdmacm/cma.c:2096:20: branch_false: following ‘false’ branch (when ‘ret == 160’)...
 branch_false: ...to here
rdma-core-59.0/librdmacm/cma.c:2117:22: danger: use of uninitialized value ‘resp.id’ here
# 2115|   	VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
# 2116|   
# 2117|-> 	mc->handle = resp.id;
# 2118|   	return ucma_complete(id);
# 2119|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def536]
rdma-core-59.0/librdmacm/examples/common.c:242:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘listen_sock’
rdma-core-59.0/librdmacm/examples/common.c:224:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/common.c:229:47: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/common.c:229:23: acquire_resource: socket created here
rdma-core-59.0/librdmacm/examples/common.c:230:12: branch_false: following ‘false’ branch (when ‘listen_sock != -1’)...
rdma-core-59.0/librdmacm/examples/common.c:235:9: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/common.c:236:15: acquire_resource: socket created here
rdma-core-59.0/librdmacm/examples/common.c:237:12: branch_true: following ‘true’ branch (when ‘ret != 0’)...
rdma-core-59.0/librdmacm/examples/common.c:238:23: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/common.c:242:17: danger: ‘listen_sock’ leaks here
#  240|   			fprintf(stderr, "unexpected bind error: %s (%d)\n",
#  241|   				strerror(errno), errno);
#  242|-> 		close(listen_sock);
#  243|   		goto free;
#  244|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def537]
rdma-core-59.0/librdmacm/examples/common.c:269:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(listen_sock, 0, 0)’
rdma-core-59.0/librdmacm/examples/common.c:252:5: enter_function: entry to ‘oob_root_setup’
rdma-core-59.0/librdmacm/examples/common.c:257:15: call_function: calling ‘oob_init_root’ from ‘oob_root_setup’
rdma-core-59.0/librdmacm/examples/common.c:257:15: return_function: returning to ‘oob_root_setup’ from ‘oob_init_root’
rdma-core-59.0/librdmacm/examples/common.c:258:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/common.c:261:15: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/common.c:262:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
 branch_false: ...to here
rdma-core-59.0/librdmacm/examples/common.c:267:21: branch_true: following ‘true’ branch (when ‘i < cnt’)...
rdma-core-59.0/librdmacm/examples/common.c:268:17: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/common.c:269:20: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/common.c:273:17: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/common.c:267:21: branch_true: following ‘true’ branch (when ‘i < cnt’)...
rdma-core-59.0/librdmacm/examples/common.c:268:17: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/common.c:269:21: danger: ‘accept(listen_sock, 0, 0)’ leaks here
#  267|   	for (i = 0; i < cnt; i++) {
#  268|   		root->sock[i] = accept(listen_sock, NULL, NULL);
#  269|-> 		if (root->sock[i] == -1) {
#  270|   			ret = -errno;
#  271|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def538]
rdma-core-59.0/librdmacm/examples/common.c:305:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*sock’
rdma-core-59.0/librdmacm/examples/common.c:293:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/common.c:298:41: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/common.c:299:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/common.c:303:9: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/common.c:305:15: acquire_resource: socket created here
rdma-core-59.0/librdmacm/examples/common.c:305:15: danger: ‘*sock’ leaks here
#  303|   	setsockopt(*sock, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay));
#  304|   
#  305|-> 	ret = connect(*sock, ai->ai_addr, ai->ai_addrlen);
#  306|   out:
#  307|   	freeaddrinfo(ai);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def539]
rdma-core-59.0/librdmacm/examples/rcopy.c:128:23: warning[-Wanalyzer-malloc-leak]: leak of ‘msg’
rdma-core-59.0/librdmacm/examples/rcopy.c:422:12: enter_function: entry to ‘client_open’
rdma-core-59.0/librdmacm/examples/rcopy.c:432:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:435:15: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:436:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/librdmacm/examples/rcopy.c:439:28: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:441:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:446:28: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:447:15: acquire_memory: allocated here
rdma-core-59.0/librdmacm/examples/rcopy.c:448:12: branch_false: following ‘false’ branch (when ‘msg’ is non-NULL)...
rdma-core-59.0/librdmacm/examples/rcopy.c:453:9: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:458:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:461:15: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:461:15: call_function: calling ‘msg_get_resp’ from ‘client_open’
#  126|   
#  127|   	for (offset = 0; offset < len; offset += ret) {
#  128|-> 		ret = rrecv(rs, msg + offset, len - offset, 0);
#  129|   		if (ret <= 0)
#  130|   			return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def540]
rdma-core-59.0/librdmacm/examples/rcopy.c:128:23: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
rdma-core-59.0/librdmacm/examples/rcopy.c:339:13: enter_function: entry to ‘server_process’
rdma-core-59.0/librdmacm/examples/rcopy.c:345:23: call_function: calling ‘msg_recv_hdr’ from ‘server_process’
rdma-core-59.0/librdmacm/examples/rcopy.c:345:23: return_function: returning to ‘server_process’ from ‘msg_recv_hdr’
rdma-core-59.0/librdmacm/examples/rcopy.c:346:20: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:349:25: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:351:31: call_function: calling ‘server_open’ from ‘server_process’
#  126|   
#  127|   	for (offset = 0; offset < len; offset += ret) {
#  128|-> 		ret = rrecv(rs, msg + offset, len - offset, 0);
#  129|   		if (ret <= 0)
#  130|   			return ret;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def541]
rdma-core-59.0/librdmacm/examples/rcopy.c:202:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rs_socket(*res.ai_family, *res.ai_socktype, *res.ai_protocol)’
rdma-core-59.0/librdmacm/examples/rcopy.c:369:12: enter_function: entry to ‘server_run’
rdma-core-59.0/librdmacm/examples/rcopy.c:375:15: call_function: calling ‘server_listen’ from ‘server_run’
#  200|   
#  201|   	ret = 1;
#  202|-> 	ret = rsetsockopt(rs, SOL_SOCKET, SO_REUSEADDR, &ret, sizeof ret);
#  203|   	if (ret) {
#  204|   		perror("rsetsockopt failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def542]
rdma-core-59.0/librdmacm/examples/rcopy.c:258:9: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
rdma-core-59.0/librdmacm/examples/rcopy.c:339:13: enter_function: entry to ‘server_process’
rdma-core-59.0/librdmacm/examples/rcopy.c:345:23: call_function: calling ‘msg_recv_hdr’ from ‘server_process’
rdma-core-59.0/librdmacm/examples/rcopy.c:345:23: return_function: returning to ‘server_process’ from ‘msg_recv_hdr’
rdma-core-59.0/librdmacm/examples/rcopy.c:346:20: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:349:25: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:351:31: call_function: calling ‘server_open’ from ‘server_process’
#  256|   
#  257|   	printf("%s, ", path);
#  258|-> 	fflush(NULL);
#  259|   	fd = open(path, O_RDWR | O_CREAT | O_TRUNC, msg->data);
#  260|   	if (fd < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def543]
rdma-core-59.0/librdmacm/examples/rcopy.c:259:14: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
rdma-core-59.0/librdmacm/examples/rcopy.c:339:13: enter_function: entry to ‘server_process’
rdma-core-59.0/librdmacm/examples/rcopy.c:345:23: call_function: calling ‘msg_recv_hdr’ from ‘server_process’
rdma-core-59.0/librdmacm/examples/rcopy.c:345:23: return_function: returning to ‘server_process’ from ‘msg_recv_hdr’
rdma-core-59.0/librdmacm/examples/rcopy.c:346:20: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:349:25: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:351:31: call_function: calling ‘server_open’ from ‘server_process’
#  257|   	printf("%s, ", path);
#  258|   	fflush(NULL);
#  259|-> 	fd = open(path, O_RDWR | O_CREAT | O_TRUNC, msg->data);
#  260|   	if (fd < 0) {
#  261|   		printf("unable to open destination file\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def544]
rdma-core-59.0/librdmacm/examples/rcopy.c:410:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rs_socket(*res.ai_family, *res.ai_socktype, *res.ai_protocol)’
rdma-core-59.0/librdmacm/examples/rcopy.c:394:12: enter_function: entry to ‘client_connect’
rdma-core-59.0/librdmacm/examples/rcopy.c:400:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:405:61: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:405:14: call_function: calling ‘rs_socket’ from ‘client_connect’
rdma-core-59.0/librdmacm/examples/rcopy.c:405:14: return_function: returning to ‘client_connect’ from ‘rs_socket’
rdma-core-59.0/librdmacm/examples/rcopy.c:406:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:410:45: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:410:15: danger: ‘rs_socket(*res.ai_family, *res.ai_socktype, *res.ai_protocol)’ leaks here
#  408|   	}
#  409|   
#  410|-> 	ret = rconnect(rs, res->ai_addr, res->ai_addrlen);
#  411|   	if (ret) {
#  412|   		perror("rconnect failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def545]
rdma-core-59.0/librdmacm/examples/rcopy.c:457:15: warning[-Wanalyzer-malloc-leak]: leak of ‘msg’
rdma-core-59.0/librdmacm/examples/rcopy.c:432:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:435:15: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:436:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
rdma-core-59.0/librdmacm/examples/rcopy.c:439:28: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:441:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rcopy.c:446:28: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:447:15: acquire_memory: allocated here
rdma-core-59.0/librdmacm/examples/rcopy.c:448:12: branch_false: following ‘false’ branch (when ‘msg’ is non-NULL)...
rdma-core-59.0/librdmacm/examples/rcopy.c:453:9: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rcopy.c:457:15: danger: ‘msg’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  455|   	msg->hdr.data = (uint32_t) stats.st_mode;
#  456|   	strcpy(msg->path, dst_file);
#  457|-> 	ret = rsend(rs, msg, msg->hdr.len, 0);
#  458|   	if (ret != msg->hdr.len)
#  459|   		goto err3;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def546]
rdma-core-59.0/librdmacm/examples/riostream.c:371:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ai’
rdma-core-59.0/librdmacm/examples/riostream.c:498:12: enter_function: entry to ‘run’
rdma-core-59.0/librdmacm/examples/riostream.c:503:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:508:13: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:508:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:509:23: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:509:23: call_function: calling ‘server_listen’ from ‘run’
#  369|   
#  370|   	lrs = rai ? rs_socket(rai->ai_family, SOCK_STREAM, 0) :
#  371|-> 		    rs_socket(ai->ai_family, SOCK_STREAM, 0);
#  372|   	if (lrs < 0) {
#  373|   		ret = lrs;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def547]
rdma-core-59.0/librdmacm/examples/riostream.c:385:47: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ai’
rdma-core-59.0/librdmacm/examples/riostream.c:498:12: enter_function: entry to ‘run’
rdma-core-59.0/librdmacm/examples/riostream.c:503:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:508:13: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:508:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:509:23: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:509:23: call_function: calling ‘server_listen’ from ‘run’
#  383|   
#  384|   	ret = rai ? rbind(lrs, rai->ai_src_addr, rai->ai_src_len) :
#  385|-> 		    rbind(lrs, ai->ai_addr, ai->ai_addrlen);
#  386|   	if (ret) {
#  387|   		perror("rbind");

Error: GCC_ANALYZER_WARNING (CWE-457): [#def548]
rdma-core-59.0/librdmacm/examples/riostream.c:402:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ai’
rdma-core-59.0/librdmacm/examples/riostream.c:498:12: enter_function: entry to ‘run’
rdma-core-59.0/librdmacm/examples/riostream.c:503:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:508:13: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:508:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:509:23: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:509:23: call_function: calling ‘server_listen’ from ‘run’
#  400|   		rdma_freeaddrinfo(rai);
#  401|   	else
#  402|-> 		freeaddrinfo(ai);
#  403|   	return ret;
#  404|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def549]
rdma-core-59.0/librdmacm/examples/riostream.c:451:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ai’
rdma-core-59.0/librdmacm/examples/riostream.c:443:15: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:443:26: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:445:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
rdma-core-59.0/librdmacm/examples/riostream.c:450:18: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:450:14: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:451:32: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:451:32: danger: use of uninitialized value ‘ai’ here
#  449|   
#  450|   	rs = rai ? rs_socket(rai->ai_family, SOCK_STREAM, 0) :
#  451|-> 		   rs_socket(ai->ai_family, SOCK_STREAM, 0);
#  452|   	if (rs < 0) {
#  453|   		ret = rs;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def550]
rdma-core-59.0/librdmacm/examples/riostream.c:494:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ai’
rdma-core-59.0/librdmacm/examples/riostream.c:498:12: enter_function: entry to ‘run’
rdma-core-59.0/librdmacm/examples/riostream.c:503:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:508:13: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:508:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:514:9: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:516:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:517:17: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:518:23: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/examples/riostream.c:518:34: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/riostream.c:518:34: call_function: calling ‘client_connect’ from ‘run’
#  492|   		rdma_freeaddrinfo(rai);
#  493|   	else
#  494|-> 		freeaddrinfo(ai);
#  495|   	return ret;
#  496|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def551]
rdma-core-59.0/librdmacm/examples/rstream.c:335:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ai’
rdma-core-59.0/librdmacm/examples/rstream.c:499:12: enter_function: entry to ‘run’
rdma-core-59.0/librdmacm/examples/rstream.c:504:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/examples/rstream.c:509:13: branch_false: ...to here
rdma-core-59.0/librdmacm/examples/rstream.c:509:12: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/examples/rstream.c:510:23: branch_true: ...to here
rdma-core-59.0/librdmacm/examples/rstream.c:510:23: call_function: calling ‘server_listen’ from ‘run’
#  333|   
#  334|   	lrs = rai ? rs_socket(rai->ai_family, SOCK_STREAM, 0) :
#  335|-> 		    rs_socket(ai->ai_family, SOCK_STREAM, 0);
#  336|   	if (lrs < 0) {
#  337|   		ret = lrs;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def552]
rdma-core-59.0/librdmacm/rsocket.c:699:31: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
rdma-core-59.0/librdmacm/rsocket.c:3976:5: enter_function: entry to ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: call_function: calling ‘idm_lookup’ from ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: return_function: returning to ‘rfcntl’ from ‘idm_lookup’
rdma-core-59.0/librdmacm/rsocket.c:3984:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3986:9: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3986:9: acquire_resource: ‘va_start’ called here
rdma-core-59.0/librdmacm/rsocket.c:3993:20: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3994:31: branch_true: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3994:31: call_function: calling ‘rs_set_nonblocking’ from ‘rfcntl’
#  697|   	if (rs->type == SOCK_STREAM) {
#  698|   		if (rs->cm_id->recv_cq_channel)
#  699|-> 			ret = fcntl(rs->cm_id->recv_cq_channel->fd, F_SETFL, arg);
#  700|   
#  701|   		if (rs->state == rs_listening)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def553]
rdma-core-59.0/librdmacm/rsocket.c:702:31: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
rdma-core-59.0/librdmacm/rsocket.c:3976:5: enter_function: entry to ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: call_function: calling ‘idm_lookup’ from ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: return_function: returning to ‘rfcntl’ from ‘idm_lookup’
rdma-core-59.0/librdmacm/rsocket.c:3984:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3986:9: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3986:9: acquire_resource: ‘va_start’ called here
rdma-core-59.0/librdmacm/rsocket.c:3993:20: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3994:31: branch_true: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3994:31: call_function: calling ‘rs_set_nonblocking’ from ‘rfcntl’
#  700|   
#  701|   		if (rs->state == rs_listening)
#  702|-> 			ret = fcntl(rs->accept_queue[0], F_SETFL, arg);
#  703|   		else if (!ret && rs->state < rs_connected)
#  704|   			ret = fcntl(rs->cm_id->channel->fd, F_SETFL, arg);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def554]
rdma-core-59.0/librdmacm/rsocket.c:704:31: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
rdma-core-59.0/librdmacm/rsocket.c:3976:5: enter_function: entry to ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: call_function: calling ‘idm_lookup’ from ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: return_function: returning to ‘rfcntl’ from ‘idm_lookup’
rdma-core-59.0/librdmacm/rsocket.c:3984:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3986:9: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3986:9: acquire_resource: ‘va_start’ called here
rdma-core-59.0/librdmacm/rsocket.c:3993:20: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3994:31: branch_true: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3994:31: call_function: calling ‘rs_set_nonblocking’ from ‘rfcntl’
#  702|   			ret = fcntl(rs->accept_queue[0], F_SETFL, arg);
#  703|   		else if (!ret && rs->state < rs_connected)
#  704|-> 			ret = fcntl(rs->cm_id->channel->fd, F_SETFL, arg);
#  705|   	} else {
#  706|   		ret = fcntl(rs->epfd, F_SETFL, arg);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def555]
rdma-core-59.0/librdmacm/rsocket.c:706:23: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
rdma-core-59.0/librdmacm/rsocket.c:3976:5: enter_function: entry to ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: call_function: calling ‘idm_lookup’ from ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: return_function: returning to ‘rfcntl’ from ‘idm_lookup’
rdma-core-59.0/librdmacm/rsocket.c:3984:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3986:9: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3986:9: acquire_resource: ‘va_start’ called here
rdma-core-59.0/librdmacm/rsocket.c:3993:20: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3994:31: branch_true: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3994:31: call_function: calling ‘rs_set_nonblocking’ from ‘rfcntl’
#  704|   			ret = fcntl(rs->cm_id->channel->fd, F_SETFL, arg);
#  705|   	} else {
#  706|-> 		ret = fcntl(rs->epfd, F_SETFL, arg);
#  707|   		if (!ret && rs->qp_list) {
#  708|   			qp = rs->qp_list;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def556]
rdma-core-59.0/librdmacm/rsocket.c:710:39: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
rdma-core-59.0/librdmacm/rsocket.c:3976:5: enter_function: entry to ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: call_function: calling ‘idm_lookup’ from ‘rfcntl’
rdma-core-59.0/librdmacm/rsocket.c:3983:14: return_function: returning to ‘rfcntl’ from ‘idm_lookup’
rdma-core-59.0/librdmacm/rsocket.c:3984:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3986:9: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3986:9: acquire_resource: ‘va_start’ called here
rdma-core-59.0/librdmacm/rsocket.c:3993:20: branch_true: following ‘true’ branch...
rdma-core-59.0/librdmacm/rsocket.c:3994:31: branch_true: ...to here
rdma-core-59.0/librdmacm/rsocket.c:3994:31: call_function: calling ‘rs_set_nonblocking’ from ‘rfcntl’
#  708|   			qp = rs->qp_list;
#  709|   			do {
#  710|-> 				ret = fcntl(qp->cm_id->recv_cq_channel->fd,
#  711|   					    F_SETFL, arg);
#  712|   				qp = ds_next_qp(qp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def557]
rdma-core-59.0/librdmacm/rsocket.c:1533:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
rdma-core-59.0/librdmacm/rsocket.c:4427:13: enter_function: entry to ‘udp_svc_process_rs’
rdma-core-59.0/librdmacm/rsocket.c:4438:12: branch_false: following ‘false’ branch (when ‘ret > 15’)...
rdma-core-59.0/librdmacm/rsocket.c:4442:14: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4445:21: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4451:15: call_function: calling ‘ds_get_dest’ from ‘udp_svc_process_rs’
# 1531|   		return sock;
# 1532|   
# 1533|-> 	ret = connect(sock, dest_addr, dest_len);
# 1534|   	if (ret)
# 1535|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def558]
rdma-core-59.0/librdmacm/rsocket.c:1600:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/librdmacm/rsocket.c:4427:13: enter_function: entry to ‘udp_svc_process_rs’
rdma-core-59.0/librdmacm/rsocket.c:4438:12: branch_false: following ‘false’ branch (when ‘ret > 15’)...
rdma-core-59.0/librdmacm/rsocket.c:4442:14: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4445:21: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4451:15: call_function: calling ‘ds_get_dest’ from ‘udp_svc_process_rs’
# 1598|   
# 1599|   	qp->rs = rs;
# 1600|-> 	ret = rdma_create_id(NULL, &qp->cm_id, qp, RDMA_PS_UDP);
# 1601|   	if (ret)
# 1602|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def559]
rdma-core-59.0/librdmacm/rsocket.c:4051:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘iomr’
rdma-core-59.0/librdmacm/rsocket.c:4040:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4042:14: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4042:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4046:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4050:24: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4050:24: acquire_memory: this call could return NULL
rdma-core-59.0/librdmacm/rsocket.c:4051:17: danger: ‘iomr’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
# 4049|   	} else {
# 4050|   		iomr = calloc(1, sizeof(*iomr));
# 4051|-> 		iomr->index = -1;
# 4052|   	}
# 4053|   	if (!iomr) {

Error: GCC_ANALYZER_WARNING (CWE-131): [#def560]
rdma-core-59.0/librdmacm/rsocket.c:4232:9: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
rdma-core-59.0/librdmacm/rsocket.c:4220:12: branch_false: following ‘false’ branch (when ‘set’ is non-NULL)...
rdma-core-59.0/librdmacm/rsocket.c:4223:9: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4226:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4231:14: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4232:9: danger: assigned to ‘struct rsocket **’ here; ‘sizeof (struct rsocket *)’ is ‘8’
# 4230|   
# 4231|   	free(svc->rss);
# 4232|-> 	svc->rss = rss;
# 4233|   	svc->contexts = contexts;
# 4234|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def561]
rdma-core-59.0/librdmacm/rsocket.c:4417:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&hdr’
rdma-core-59.0/librdmacm/rsocket.c:4407:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4412:9: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4417:9: danger: use of uninitialized value ‘&hdr’ here
# 4415|   
# 4416|   	ds_format_hdr(&hdr, src);
# 4417|-> 	memcpy((void *) msg, &hdr, hdr.length);
# 4418|   	memcpy((void *) msg + hdr.length, buf, len);
# 4419|   	sge.addr = (uintptr_t) msg;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def562]
rdma-core-59.0/providers/bnxt_re/main.c:311:16: warning[-Wanalyzer-malloc-leak]: leak of ‘rdev’
rdma-core-59.0/providers/bnxt_re/main.c:307:16: acquire_memory: allocated here
rdma-core-59.0/providers/bnxt_re/main.c:308:12: branch_false: following ‘false’ branch (when ‘rdev’ is non-NULL)...
rdma-core-59.0/providers/bnxt_re/main.c:311:16: branch_false: ...to here
rdma-core-59.0/providers/bnxt_re/main.c:311:16: danger: ‘rdev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  309|   		return NULL;
#  310|   
#  311|-> 	return &rdev->vdev;
#  312|   }
#  313|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def563]
rdma-core-59.0/providers/bnxt_re/memory.c:72:13: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’
rdma-core-59.0/providers/bnxt_re/memory.c:61:15: acquire_memory: allocated here
rdma-core-59.0/providers/bnxt_re/memory.c:62:12: branch_false: following ‘false’ branch (when ‘mem’ is non-NULL)...
rdma-core-59.0/providers/bnxt_re/memory.c:65:16: branch_false: ...to here
rdma-core-59.0/providers/bnxt_re/memory.c:69:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/bnxt_re/memory.c:72:13: branch_false: ...to here
rdma-core-59.0/providers/bnxt_re/memory.c:72:13: danger: ‘mem’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   70|   		goto bail;
#   71|   
#   72|-> 	if (ibv_dontfork_range(mem->va_head, size))
#   73|   		goto unmap;
#   74|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def564]
rdma-core-59.0/providers/bnxt_re/verbs.c:2930:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/bnxt_re/verbs.c:2924:14: acquire_memory: allocated here
rdma-core-59.0/providers/bnxt_re/verbs.c:2925:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/bnxt_re/verbs.c:2928:9: branch_false: ...to here
rdma-core-59.0/providers/bnxt_re/verbs.c:2930:18: danger: ‘ah’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 2928|   	pthread_mutex_lock(&uctx->shlock);
# 2929|   	memset(&resp, 0, sizeof(resp));
# 2930|-> 	status = ibv_cmd_create_ah(ibvpd, &ah->ibvah, attr,
# 2931|   				   &resp, sizeof(resp));
# 2932|   	if (status) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def565]
rdma-core-59.0/providers/cxgb4/cq.c:59:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&cqe’
rdma-core-59.0/providers/cxgb4/cq.c:929:6: enter_function: entry to ‘c4iw_flush_srqidx’
rdma-core-59.0/providers/cxgb4/cq.c:934:9: call_function: calling ‘insert_recv_cqe’ from ‘c4iw_flush_srqidx’
#   57|   		cqe.b64.u.srcqe.abs_rqe_idx = htobe32(srqidx);
#   58|   
#   59|-> 	memcpy(Q_ENTRY(cq->sw_queue, cq->sw_pidx), &cqe, CQE_SIZE(&cqe));
#   60|   	t4_swcq_produce(cq);
#   61|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def566]
rdma-core-59.0/providers/cxgb4/qp.c:604:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘len16’
rdma-core-59.0/providers/cxgb4/qp.c:474:5: enter_function: entry to ‘c4iw_post_send’
rdma-core-59.0/providers/cxgb4/qp.c:495:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/cxgb4/qp.c:510:13: branch_false: ...to here
rdma-core-59.0/providers/cxgb4/qp.c:524:16: branch_false: following ‘false’ branch (when ‘wr’ is NULL)...
rdma-core-59.0/providers/cxgb4/qp.c:603:13: call_function: inlined call to ‘t4_wq_db_enabled’ from ‘c4iw_post_send’
rdma-core-59.0/providers/cxgb4/qp.c:604:17: danger: use of uninitialized value ‘len16’ here
#  602|   	}
#  603|   	if (t4_wq_db_enabled(&qhp->wq)) {
#  604|-> 		t4_ring_sq_db(&qhp->wq, idx, dev_is_t4(qhp->rhp),
#  605|   			      len16, wqe);
#  606|   	} else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def567]
rdma-core-59.0/providers/cxgb4/verbs.c:95:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/cxgb4/verbs.c:91:14: acquire_memory: allocated here
rdma-core-59.0/providers/cxgb4/verbs.c:92:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/cxgb4/verbs.c:95:13: branch_false: ...to here
rdma-core-59.0/providers/cxgb4/verbs.c:95:13: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   93|   		return NULL;
#   94|   
#   95|-> 	if (ibv_cmd_alloc_pd(context, &pd->ibv_pd, &cmd, sizeof cmd,
#   96|   			     &resp.ibv_resp, sizeof resp)) {
#   97|   		free(pd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def568]
rdma-core-59.0/providers/cxgb4/verbs.c:131:13: warning[-Wanalyzer-malloc-leak]: leak of ‘mhp’
rdma-core-59.0/providers/cxgb4/verbs.c:127:15: acquire_memory: allocated here
rdma-core-59.0/providers/cxgb4/verbs.c:128:12: branch_false: following ‘false’ branch (when ‘mhp’ is non-NULL)...
rdma-core-59.0/providers/cxgb4/verbs.c:131:13: branch_false: ...to here
rdma-core-59.0/providers/cxgb4/verbs.c:131:13: danger: ‘mhp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  129|   		return NULL;
#  130|   
#  131|-> 	if (ibv_cmd_reg_mr(pd, addr, length, hca_va,
#  132|   			   access, &mhp->vmr, &cmd, sizeof(cmd),
#  133|   			   &resp, sizeof resp)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def569]
rdma-core-59.0/providers/cxgb4/verbs.c:191:15: warning[-Wanalyzer-malloc-leak]: leak of ‘chp’
rdma-core-59.0/providers/cxgb4/verbs.c:178:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/cxgb4/verbs.c:183:15: branch_false: ...to here
rdma-core-59.0/providers/cxgb4/verbs.c:183:15: acquire_memory: allocated here
rdma-core-59.0/providers/cxgb4/verbs.c:184:12: branch_false: following ‘false’ branch (when ‘chp’ is non-NULL)...
rdma-core-59.0/providers/cxgb4/verbs.c:188:9: branch_false: ...to here
rdma-core-59.0/providers/cxgb4/verbs.c:191:15: danger: ‘chp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  189|   	cmd.flags = C4IW_64B_CQE;
#  190|   
#  191|-> 	ret = ibv_cmd_create_cq(context, cqe, channel, comp_vector,
#  192|   				&chp->ibv_cq, &cmd.ibv_cmd, sizeof(cmd),
#  193|   				&resp.ibv_resp, sizeof resp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def570]
rdma-core-59.0/providers/cxgb4/verbs.c:293:15: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/cxgb4/verbs.c:288:15: acquire_memory: allocated here
rdma-core-59.0/providers/cxgb4/verbs.c:289:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/providers/cxgb4/verbs.c:292:9: branch_false: ...to here
rdma-core-59.0/providers/cxgb4/verbs.c:293:15: danger: ‘srq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  291|   
#  292|   	memset(&resp, 0, sizeof(resp));
#  293|-> 	ret = ibv_cmd_create_srq(pd, &srq->ibv_srq, attr, &cmd,
#  294|   			sizeof(cmd), &resp.ibv_resp, sizeof(resp));
#  295|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
rdma-core-59.0/providers/cxgb4/verbs.c:433:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qhp’
rdma-core-59.0/providers/cxgb4/verbs.c:428:15: acquire_memory: allocated here
rdma-core-59.0/providers/cxgb4/verbs.c:429:12: branch_false: following ‘false’ branch (when ‘qhp’ is non-NULL)...
rdma-core-59.0/providers/cxgb4/verbs.c:432:9: branch_false: ...to here
rdma-core-59.0/providers/cxgb4/verbs.c:433:15: danger: ‘qhp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  431|   
#  432|   	memset(&resp, 0, sizeof(resp));
#  433|-> 	ret = ibv_cmd_create_qp(pd, &qhp->ibv_qp, attr, &cmd,
#  434|   				sizeof cmd, &resp.ibv_resp, sizeof resp);
#  435|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def572]
rdma-core-59.0/providers/cxgb4/verbs.c:538:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qhp’
rdma-core-59.0/providers/cxgb4/verbs.c:533:15: acquire_memory: allocated here
rdma-core-59.0/providers/cxgb4/verbs.c:534:12: branch_false: following ‘false’ branch (when ‘qhp’ is non-NULL)...
rdma-core-59.0/providers/cxgb4/verbs.c:537:9: branch_false: ...to here
rdma-core-59.0/providers/cxgb4/verbs.c:538:15: danger: ‘qhp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  536|   
#  537|   	memset(&resp, 0, sizeof(resp));
#  538|-> 	ret = ibv_cmd_create_qp(pd, &qhp->ibv_qp, attr, &cmd,
#  539|   				sizeof cmd, &resp.ibv_resp, sizeof resp);
#  540|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def573]
rdma-core-59.0/providers/efa/efa.c:131:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/efa/efa.c:125:15: acquire_memory: allocated here
rdma-core-59.0/providers/efa/efa.c:126:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/efa/efa.c:129:22: branch_false: ...to here
rdma-core-59.0/providers/efa/efa.c:131:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  129|   	dev->pg_sz = sysconf(_SC_PAGESIZE);
#  130|   
#  131|-> 	return &dev->vdev;
#  132|   }
#  133|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def574]
rdma-core-59.0/providers/efa/verbs.c:210:15: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/efa/verbs.c:206:14: acquire_memory: allocated here
rdma-core-59.0/providers/efa/verbs.c:207:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/efa/verbs.c:210:15: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:210:15: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  208|   		return NULL;
#  209|   
#  210|-> 	err = ibv_cmd_alloc_pd(ibvctx, &pd->ibvpd, &cmd, sizeof(cmd),
#  211|   			       &resp.ibv_resp, sizeof(resp));
#  212|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def575]
rdma-core-59.0/providers/efa/verbs.c:275:16: warning[-Wanalyzer-malloc-leak]: leak of ‘parent_domain’
rdma-core-59.0/providers/efa/verbs.c:228:16: enter_function: entry to ‘efa_alloc_parent_domain’
rdma-core-59.0/providers/efa/verbs.c:234:13: call_function: inlined call to ‘ibv_check_alloc_parent_domain’ from ‘efa_alloc_parent_domain’
rdma-core-59.0/providers/efa/verbs.c:239:30: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:239:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:249:13: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:249:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:254:25: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:254:25: acquire_memory: allocated here
rdma-core-59.0/providers/efa/verbs.c:255:12: branch_false: following ‘false’ branch (when ‘parent_domain’ is non-NULL)...
rdma-core-59.0/providers/efa/verbs.c:260:9: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:262:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:267:9: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:272:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:275:16: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:275:16: danger: ‘parent_domain’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  273|   		parent_domain->pd_context = attr->pd_context;
#  274|   
#  275|-> 	return &parent_domain->pd.ibvpd;
#  276|   }
#  277|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def576]
rdma-core-59.0/providers/efa/verbs.c:327:15: warning[-Wanalyzer-malloc-leak]: leak of ‘mr’
rdma-core-59.0/providers/efa/verbs.c:323:14: acquire_memory: allocated here
rdma-core-59.0/providers/efa/verbs.c:324:12: branch_false: following ‘false’ branch (when ‘mr’ is non-NULL)...
rdma-core-59.0/providers/efa/verbs.c:327:15: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:327:15: danger: ‘mr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  325|   		return NULL;
#  326|   
#  327|-> 	err = ibv_cmd_reg_dmabuf_mr(ibvpd, offset, length, iova, fd, acc,
#  328|   				    &mr->vmr, NULL);
#  329|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def577]
rdma-core-59.0/providers/efa/verbs.c:350:15: warning[-Wanalyzer-malloc-leak]: leak of ‘mr’
rdma-core-59.0/providers/efa/verbs.c:346:14: acquire_memory: allocated here
rdma-core-59.0/providers/efa/verbs.c:347:12: branch_false: following ‘false’ branch (when ‘mr’ is non-NULL)...
rdma-core-59.0/providers/efa/verbs.c:350:15: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:350:15: danger: ‘mr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  348|   		return NULL;
#  349|   
#  350|-> 	err = ibv_cmd_reg_mr(ibvpd, sva, len, hca_va, access, &mr->vmr,
#  351|   			     &cmd, sizeof(cmd), &resp, sizeof(resp));
#  352|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def578]
rdma-core-59.0/providers/efa/verbs.c:1048:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cq’
rdma-core-59.0/providers/efa/verbs.c:1000:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:1001:14: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:1000:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:1008:13: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:1014:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:1026:50: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:1025:14: acquire_memory: allocated here
rdma-core-59.0/providers/efa/verbs.c:1027:12: branch_false: following ‘false’ branch (when ‘cq’ is non-NULL)...
rdma-core-59.0/providers/efa/verbs.c:1030:13: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:1037:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:1044:12: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:1044:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:1047:40: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:1048:15: danger: ‘cq’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
# 1046|   
# 1047|   	attr->cqe = roundup_pow_of_two(attr->cqe);
# 1048|-> 	err = ibv_cmd_create_cq_ex(ibvctx, attr, &prov_attr, &cq->verbs_cq,
# 1049|   				   &cmd.ibv_cmd, sizeof(cmd),
# 1050|   				   &resp.ibv_resp, sizeof(resp), cmd_flags);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def579]
rdma-core-59.0/providers/efa/verbs.c:1679:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/efa/verbs.c:1728:16: enter_function: entry to ‘efa_create_qp’
rdma-core-59.0/providers/efa/verbs.c:1735:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:1742:9: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:1746:17: call_function: calling ‘create_qp’ from ‘efa_create_qp’
# 1677|   	req.sl = efa_attr->sl;
# 1678|   
# 1679|-> 	err = ibv_cmd_create_qp_ex(ibvctx, &qp->verbs_qp,
# 1680|   				   attr, &req.ibv_cmd, sizeof(req),
# 1681|   				   &resp.ibv_resp, sizeof(resp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def580]
rdma-core-59.0/providers/efa/verbs.c:2760:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/efa/verbs.c:2756:14: acquire_memory: allocated here
rdma-core-59.0/providers/efa/verbs.c:2757:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/efa/verbs.c:2760:15: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:2760:15: danger: ‘ah’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 2758|   		return NULL;
# 2759|   
# 2760|-> 	err = ibv_cmd_create_ah(ibvpd, &ah->ibvah, attr,
# 2761|   				&resp.ibv_resp, sizeof(resp));
# 2762|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def581]
rdma-core-59.0/providers/efa/verbs.c:2811:16: warning[-Wanalyzer-malloc-leak]: leak of ‘td’
rdma-core-59.0/providers/efa/verbs.c:2796:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/efa/verbs.c:2802:14: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:2802:14: acquire_memory: allocated here
rdma-core-59.0/providers/efa/verbs.c:2803:12: branch_false: following ‘false’ branch (when ‘td’ is non-NULL)...
rdma-core-59.0/providers/efa/verbs.c:2808:9: branch_false: ...to here
rdma-core-59.0/providers/efa/verbs.c:2811:16: danger: ‘td’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 2809|   	atomic_init(&td->refcount, 0);
# 2810|   
# 2811|-> 	return &td->ibvtd;
# 2812|   }
# 2813|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def582]
rdma-core-59.0/providers/erdma/erdma.c:109:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/erdma/erdma.c:105:15: acquire_memory: allocated here
rdma-core-59.0/providers/erdma/erdma.c:106:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/erdma/erdma.c:109:16: branch_false: ...to here
rdma-core-59.0/providers/erdma/erdma.c:109:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  107|   		return NULL;
#  108|   
#  109|-> 	return &dev->ibv_dev;
#  110|   }
#  111|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def583]
rdma-core-59.0/providers/erdma/erdma_verbs.c:78:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/erdma/erdma_verbs.c:74:14: acquire_memory: allocated here
rdma-core-59.0/providers/erdma/erdma_verbs.c:75:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/erdma/erdma_verbs.c:78:13: branch_false: ...to here
rdma-core-59.0/providers/erdma/erdma_verbs.c:78:13: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   76|   		return NULL;
#   77|   
#   78|-> 	if (ibv_cmd_alloc_pd(ctx, pd, &cmd, sizeof(cmd), &resp, sizeof(resp))) {
#   79|   		free(pd);
#   80|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def584]
rdma-core-59.0/providers/erdma/erdma_verbs.c:110:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vmr’
rdma-core-59.0/providers/erdma/erdma_verbs.c:106:15: acquire_memory: allocated here
rdma-core-59.0/providers/erdma/erdma_verbs.c:107:12: branch_false: following ‘false’ branch (when ‘vmr’ is non-NULL)...
rdma-core-59.0/providers/erdma/erdma_verbs.c:110:15: branch_false: ...to here
rdma-core-59.0/providers/erdma/erdma_verbs.c:110:15: danger: ‘vmr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  108|   		return NULL;
#  109|   
#  110|-> 	ret = ibv_cmd_reg_mr(pd, addr, len, hca_va, access, vmr, &cmd,
#  111|   			     sizeof(cmd), &resp, sizeof(resp));
#  112|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def585]
rdma-core-59.0/providers/hfi1verbs/hfiverbs.c:200:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/hfi1verbs/hfiverbs.c:194:15: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/hfiverbs.c:195:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/hfiverbs.c:198:28: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/hfiverbs.c:200:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  198|   	dev->abi_version = sysfs_dev->abi_ver;
#  199|   
#  200|-> 	return &dev->ibv_dev;
#  201|   }
#  202|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def586]
rdma-core-59.0/providers/hfi1verbs/verbs.c:114:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/hfi1verbs/verbs.c:110:14: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/verbs.c:111:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/verbs.c:114:13: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/verbs.c:114:13: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  112|   		return NULL;
#  113|   
#  114|-> 	if (ibv_cmd_alloc_pd(context, pd, &cmd, sizeof cmd,
#  115|   			     &resp, sizeof resp)) {
#  116|   		free(pd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def587]
rdma-core-59.0/providers/hfi1verbs/verbs.c:147:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vmr’
rdma-core-59.0/providers/hfi1verbs/verbs.c:143:15: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/verbs.c:144:12: branch_false: following ‘false’ branch (when ‘vmr’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/verbs.c:147:15: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/verbs.c:147:15: danger: ‘vmr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  145|   		return NULL;
#  146|   
#  147|-> 	ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, vmr, &cmd,
#  148|   			     sizeof(cmd), &resp, sizeof(resp));
#  149|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def588]
rdma-core-59.0/providers/hfi1verbs/verbs.c:184:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cq’
rdma-core-59.0/providers/hfi1verbs/verbs.c:180:14: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/verbs.c:181:12: branch_false: following ‘false’ branch (when ‘cq’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/verbs.c:184:15: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/verbs.c:184:15: danger: ‘cq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  182|   		return NULL;
#  183|   
#  184|-> 	ret = ibv_cmd_create_cq(context, cqe, channel, comp_vector,
#  185|   				&cq->ibv_cq, NULL, 0,
#  186|   				&resp.ibv_resp, sizeof resp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def589]
rdma-core-59.0/providers/hfi1verbs/verbs.c:216:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cq’
rdma-core-59.0/providers/hfi1verbs/verbs.c:212:14: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/verbs.c:213:12: branch_false: following ‘false’ branch (when ‘cq’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/verbs.c:216:15: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/verbs.c:216:15: danger: ‘cq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  214|   		return NULL;
#  215|   
#  216|-> 	ret = ibv_cmd_create_cq(context, cqe, channel, comp_vector,
#  217|   				cq, NULL, 0, NULL, 0);
#  218|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def590]
rdma-core-59.0/providers/hfi1verbs/verbs.c:331:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/hfi1verbs/verbs.c:327:14: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/verbs.c:328:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/verbs.c:331:15: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/verbs.c:331:15: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  329|   		return NULL;
#  330|   
#  331|-> 	ret = ibv_cmd_create_qp(pd, &qp->ibv_qp, attr, &cmd, sizeof cmd,
#  332|   				&resp.ibv_resp, sizeof resp);
#  333|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def591]
rdma-core-59.0/providers/hfi1verbs/verbs.c:375:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/hfi1verbs/verbs.c:371:14: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/verbs.c:372:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/verbs.c:375:15: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/verbs.c:375:15: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  373|   		return NULL;
#  374|   
#  375|-> 	ret = ibv_cmd_create_qp(pd, qp, attr, &cmd, sizeof cmd,
#  376|   				&resp, sizeof resp);
#  377|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def592]
rdma-core-59.0/providers/hfi1verbs/verbs.c:535:15: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/hfi1verbs/verbs.c:531:15: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/verbs.c:532:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/verbs.c:535:15: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/verbs.c:535:15: danger: ‘srq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  533|   		return NULL;
#  534|   
#  535|-> 	ret = ibv_cmd_create_srq(pd, &srq->ibv_srq, attr, &cmd, sizeof cmd,
#  536|   				 &resp.ibv_resp, sizeof resp);
#  537|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def593]
rdma-core-59.0/providers/hfi1verbs/verbs.c:571:15: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/hfi1verbs/verbs.c:567:15: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/verbs.c:568:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/verbs.c:571:15: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/verbs.c:571:15: danger: ‘srq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  569|   		return NULL;
#  570|   
#  571|-> 	ret = ibv_cmd_create_srq(pd, srq, attr, &cmd, sizeof cmd,
#  572|   				 &resp, sizeof resp);
#  573|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def594]
rdma-core-59.0/providers/hfi1verbs/verbs.c:688:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/hfi1verbs/verbs.c:683:14: acquire_memory: allocated here
rdma-core-59.0/providers/hfi1verbs/verbs.c:684:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/hfi1verbs/verbs.c:687:9: branch_false: ...to here
rdma-core-59.0/providers/hfi1verbs/verbs.c:688:13: danger: ‘ah’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  686|   
#  687|   	memset(&resp, 0, sizeof(resp));
#  688|-> 	if (ibv_cmd_create_ah(pd, ah, attr, &resp, sizeof(resp))) {
#  689|   		free(ah);
#  690|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def595]
rdma-core-59.0/providers/hns/hns_roce_u.c:264:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/hns/hns_roce_u.c:257:15: acquire_memory: allocated here
rdma-core-59.0/providers/hns/hns_roce_u.c:258:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/hns/hns_roce_u.c:261:21: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u.c:264:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  262|   	dev->hw_version = dev->u_hw->hw_version;
#  263|   	dev->page_size = sysconf(_SC_PAGESIZE);
#  264|-> 	return &dev->ibv_dev;
#  265|   }
#  266|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def596]
rdma-core-59.0/providers/hns/hns_roce_u_db.c:66:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/hns/hns_roce_u_db.c:47:33: enter_function: entry to ‘hns_roce_add_db_page’
rdma-core-59.0/providers/hns/hns_roce_u_db.c:56:12: branch_false: following ‘false’ branch (when ‘page’ is non-NULL)...
rdma-core-59.0/providers/hns/hns_roce_u_db.c:60:24: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_db.c:62:24: call_function: calling ‘bitmap_alloc1’ from ‘hns_roce_add_db_page’
rdma-core-59.0/providers/hns/hns_roce_u_db.c:62:24: return_function: returning to ‘hns_roce_add_db_page’ from ‘bitmap_alloc1’
rdma-core-59.0/providers/hns/hns_roce_u_db.c:63:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/hns/hns_roce_u_db.c:66:13: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_db.c:66:13: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   64|   		goto err_map;
#   65|   
#   66|-> 	if (hns_roce_alloc_buf(&(page->buf), page_size, page_size))
#   67|   		goto err;
#   68|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def597]
rdma-core-59.0/providers/hns/hns_roce_u_db.c:66:13: warning[-Wanalyzer-malloc-leak]: leak of ‘page’
rdma-core-59.0/providers/hns/hns_roce_u_db.c:47:33: enter_function: entry to ‘hns_roce_add_db_page’
rdma-core-59.0/providers/hns/hns_roce_u_db.c:55:16: acquire_memory: allocated here
rdma-core-59.0/providers/hns/hns_roce_u_db.c:56:12: branch_false: following ‘false’ branch (when ‘page’ is non-NULL)...
rdma-core-59.0/providers/hns/hns_roce_u_db.c:60:24: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_db.c:62:24: call_function: calling ‘bitmap_alloc1’ from ‘hns_roce_add_db_page’
rdma-core-59.0/providers/hns/hns_roce_u_db.c:62:24: return_function: returning to ‘hns_roce_add_db_page’ from ‘bitmap_alloc1’
rdma-core-59.0/providers/hns/hns_roce_u_db.c:63:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/hns/hns_roce_u_db.c:66:13: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_db.c:66:13: danger: ‘page’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#   64|   		goto err_map;
#   65|   
#   66|-> 	if (hns_roce_alloc_buf(&(page->buf), page_size, page_size))
#   67|   		goto err;
#   68|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def598]
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:683:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:852:17: enter_function: entry to ‘hns_roce_u_create_srq’
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:862:15: call_function: calling ‘create_srq’ from ‘hns_roce_u_create_srq’
#  681|   
#  682|   	buf_size = to_hr_hem_entries_size(srq->wqe_cnt, idx_que->entry_shift);
#  683|-> 	if (hns_roce_alloc_buf(&idx_que->buf, buf_size, HNS_HW_PAGE_SIZE)) {
#  684|   		free(idx_que->bitmap);
#  685|   		idx_que->bitmap = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def599]
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:683:13: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:852:17: enter_function: entry to ‘hns_roce_u_create_srq’
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:862:15: call_function: calling ‘create_srq’ from ‘hns_roce_u_create_srq’
#  681|   
#  682|   	buf_size = to_hr_hem_entries_size(srq->wqe_cnt, idx_que->entry_shift);
#  683|-> 	if (hns_roce_alloc_buf(&idx_que->buf, buf_size, HNS_HW_PAGE_SIZE)) {
#  684|   		free(idx_que->bitmap);
#  685|   		idx_que->bitmap = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def600]
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1678:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1674:14: acquire_memory: allocated here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1675:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1678:15: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1678:15: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1676|   		return NULL;
# 1677|   
# 1678|-> 	ret = ibv_cmd_open_qp(context, &qp->verbs_qp, sizeof(qp->verbs_qp),
# 1679|   			      attr, &cmd, sizeof(cmd), &resp, sizeof(resp));
# 1680|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def601]
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1741:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1753:16: enter_function: entry to ‘hns_roce_u_create_ah’
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1760:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1763:14: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1763:14: acquire_memory: allocated here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1764:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1767:9: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1772:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1773:36: branch_true: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1776:21: call_function: calling ‘get_tclass’ from ‘hns_roce_u_create_ah’
# 1739|   	int ret;
# 1740|   
# 1741|-> 	ret = ibv_query_gid_type(context, attr->port_num, attr->grh.sgid_index,
# 1742|   				 &gid_type);
# 1743|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def602]
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1784:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1760:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1763:14: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1763:14: acquire_memory: allocated here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1764:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1767:9: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1772:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1784:13: branch_false: ...to here
rdma-core-59.0/providers/hns/hns_roce_u_verbs.c:1784:13: danger: ‘ah’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1782|   	}
# 1783|   
# 1784|-> 	if (ibv_cmd_create_ah(pd, &ah->ibv_ah, attr, &resp.ibv_resp,
# 1785|   			      sizeof(resp)))
# 1786|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def603]
rdma-core-59.0/providers/ipathverbs/ipathverbs.c:198:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/ipathverbs/ipathverbs.c:192:15: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/ipathverbs.c:193:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/ipathverbs.c:196:28: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/ipathverbs.c:198:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  196|   	dev->abi_version = sysfs_dev->abi_ver;
#  197|   
#  198|-> 	return &dev->ibv_dev;
#  199|   }
#  200|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def604]
rdma-core-59.0/providers/ipathverbs/verbs.c:94:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/ipathverbs/verbs.c:90:14: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/verbs.c:91:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/verbs.c:94:13: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/verbs.c:94:13: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   92|   		return NULL;
#   93|   
#   94|-> 	if (ibv_cmd_alloc_pd(context, pd, &cmd, sizeof cmd,
#   95|   			     &resp, sizeof resp)) {
#   96|   		free(pd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def605]
rdma-core-59.0/providers/ipathverbs/verbs.c:127:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vmr’
rdma-core-59.0/providers/ipathverbs/verbs.c:123:15: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/verbs.c:124:12: branch_false: following ‘false’ branch (when ‘vmr’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/verbs.c:127:15: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/verbs.c:127:15: danger: ‘vmr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  125|   		return NULL;
#  126|   
#  127|-> 	ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, vmr, &cmd,
#  128|   			     sizeof(cmd), &resp, sizeof(resp));
#  129|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def606]
rdma-core-59.0/providers/ipathverbs/verbs.c:162:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cq’
rdma-core-59.0/providers/ipathverbs/verbs.c:158:14: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/verbs.c:159:12: branch_false: following ‘false’ branch (when ‘cq’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/verbs.c:162:15: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/verbs.c:162:15: danger: ‘cq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  160|   		return NULL;
#  161|   
#  162|-> 	ret = ibv_cmd_create_cq(context, cqe, channel, comp_vector,
#  163|   				&cq->ibv_cq, NULL, 0,
#  164|   				&resp.ibv_resp, sizeof resp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def607]
rdma-core-59.0/providers/ipathverbs/verbs.c:194:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cq’
rdma-core-59.0/providers/ipathverbs/verbs.c:190:14: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/verbs.c:191:12: branch_false: following ‘false’ branch (when ‘cq’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/verbs.c:194:15: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/verbs.c:194:15: danger: ‘cq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  192|   		return NULL;
#  193|   
#  194|-> 	ret = ibv_cmd_create_cq(context, cqe, channel, comp_vector,
#  195|   				cq, NULL, 0, NULL, 0);
#  196|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def608]
rdma-core-59.0/providers/ipathverbs/verbs.c:308:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/ipathverbs/verbs.c:304:14: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/verbs.c:305:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/verbs.c:308:15: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/verbs.c:308:15: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  306|   		return NULL;
#  307|   
#  308|-> 	ret = ibv_cmd_create_qp(pd, &qp->ibv_qp, attr, &cmd, sizeof cmd,
#  309|   				&resp.ibv_resp, sizeof resp);
#  310|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def609]
rdma-core-59.0/providers/ipathverbs/verbs.c:352:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/ipathverbs/verbs.c:348:14: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/verbs.c:349:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/verbs.c:352:15: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/verbs.c:352:15: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  350|   		return NULL;
#  351|   
#  352|-> 	ret = ibv_cmd_create_qp(pd, qp, attr, &cmd, sizeof cmd,
#  353|   				&resp, sizeof resp);
#  354|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def610]
rdma-core-59.0/providers/ipathverbs/verbs.c:511:15: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/ipathverbs/verbs.c:507:15: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/verbs.c:508:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/verbs.c:511:15: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/verbs.c:511:15: danger: ‘srq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  509|   		return NULL;
#  510|   
#  511|-> 	ret = ibv_cmd_create_srq(pd, &srq->ibv_srq, attr, &cmd, sizeof cmd,
#  512|   				 &resp.ibv_resp, sizeof resp);
#  513|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def611]
rdma-core-59.0/providers/ipathverbs/verbs.c:547:15: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/ipathverbs/verbs.c:543:15: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/verbs.c:544:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/verbs.c:547:15: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/verbs.c:547:15: danger: ‘srq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  545|   		return NULL;
#  546|   
#  547|-> 	ret = ibv_cmd_create_srq(pd, srq, attr, &cmd, sizeof cmd,
#  548|   				 &resp, sizeof resp);
#  549|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def612]
rdma-core-59.0/providers/ipathverbs/verbs.c:664:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/ipathverbs/verbs.c:659:14: acquire_memory: allocated here
rdma-core-59.0/providers/ipathverbs/verbs.c:660:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/ipathverbs/verbs.c:663:9: branch_false: ...to here
rdma-core-59.0/providers/ipathverbs/verbs.c:664:13: danger: ‘ah’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  662|   
#  663|   	memset(&resp, 0, sizeof(resp));
#  664|-> 	if (ibv_cmd_create_ah(pd, ah, attr, &resp, sizeof(resp))) {
#  665|   		free(ah);
#  666|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def613]
rdma-core-59.0/providers/irdma/umain.c:236:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/irdma/umain.c:232:15: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/umain.c:233:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/irdma/umain.c:236:16: branch_false: ...to here
rdma-core-59.0/providers/irdma/umain.c:236:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  234|   		return NULL;
#  235|   
#  236|-> 	return &dev->ibv_dev;
#  237|   }
#  238|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def614]
rdma-core-59.0/providers/irdma/uverbs.c:305:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
rdma-core-59.0/providers/irdma/uverbs.c:1260:12: enter_function: entry to ‘irdma_vmapped_qp’
rdma-core-59.0/providers/irdma/uverbs.c:1287:20: call_function: calling ‘irdma_calloc_hw_buf_sz’ from ‘irdma_vmapped_qp’
#  303|   	if (!buf)
#  304|   		return NULL;
#  305|-> 	if (ibv_dontfork_range(buf, size)) {
#  306|   		free(buf);
#  307|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def615]
rdma-core-59.0/providers/irdma/uverbs.c:305:13: warning[-Wanalyzer-malloc-leak]: leak of ‘iwuqp’
rdma-core-59.0/providers/irdma/uverbs.c:1343:16: enter_function: entry to ‘irdma_ucreate_qp’
rdma-core-59.0/providers/irdma/uverbs.c:1352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1357:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1362:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1363:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1364:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1365:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1370:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1379:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1384:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1391:12: branch_false: following ‘false’ branch (when ‘iwuqp’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1394:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1396:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1399:24: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1413:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1416:30: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1417:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1420:29: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1422:18: call_function: calling ‘irdma_vmapped_qp’ from ‘irdma_ucreate_qp’
#  303|   	if (!buf)
#  304|   		return NULL;
#  305|-> 	if (ibv_dontfork_range(buf, size)) {
#  306|   		free(buf);
#  307|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def616]
rdma-core-59.0/providers/irdma/uverbs.c:321:9: warning[-Wanalyzer-malloc-leak]: leak of ‘iwuqp’
rdma-core-59.0/providers/irdma/uverbs.c:1343:16: enter_function: entry to ‘irdma_ucreate_qp’
rdma-core-59.0/providers/irdma/uverbs.c:1352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1357:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1362:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1363:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1364:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1365:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1370:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1379:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1384:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1391:12: branch_false: following ‘false’ branch (when ‘iwuqp’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1394:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1396:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1399:24: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1413:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1416:30: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1417:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1420:29: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1422:18: call_function: calling ‘irdma_vmapped_qp’ from ‘irdma_ucreate_qp’
#  319|   static void irdma_free_hw_buf(void *buf, size_t size)
#  320|   {
#  321|-> 	ibv_dofork_range(buf, size);
#  322|   	free(buf);
#  323|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def617]
rdma-core-59.0/providers/irdma/uverbs.c:1299:15: warning[-Wanalyzer-malloc-leak]: leak of ‘iwuqp’
rdma-core-59.0/providers/irdma/uverbs.c:1343:16: enter_function: entry to ‘irdma_ucreate_qp’
rdma-core-59.0/providers/irdma/uverbs.c:1352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1357:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1362:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1363:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1364:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1365:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1370:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1379:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1384:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1391:12: branch_false: following ‘false’ branch (when ‘iwuqp’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1394:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1396:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1399:24: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1413:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1416:30: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1417:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1420:29: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1422:18: call_function: calling ‘irdma_vmapped_qp’ from ‘irdma_ucreate_qp’
# 1297|   	reg_mr_cmd.rq_pages = rqsize >> IRDMA_HW_PAGE_SHIFT;
# 1298|   
# 1299|-> 	ret = ibv_cmd_reg_mr(pd, info->sq, totalqpsize,
# 1300|   			     (uintptr_t)info->sq, IBV_ACCESS_LOCAL_WRITE,
# 1301|   			     &iwuqp->vmr, &reg_mr_cmd.ibv_cmd,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def618]
rdma-core-59.0/providers/irdma/uverbs.c:1309:15: warning[-Wanalyzer-malloc-leak]: leak of ‘iwuqp’
rdma-core-59.0/providers/irdma/uverbs.c:1343:16: enter_function: entry to ‘irdma_ucreate_qp’
rdma-core-59.0/providers/irdma/uverbs.c:1352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1357:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1362:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1363:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1364:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1365:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1370:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1379:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1384:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1391:12: branch_false: following ‘false’ branch (when ‘iwuqp’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1394:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1396:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1399:24: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1413:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1416:30: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1417:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1420:29: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1422:18: call_function: calling ‘irdma_vmapped_qp’ from ‘irdma_ucreate_qp’
# 1307|   	cmd.user_wqe_bufs = (__u64)((uintptr_t)info->sq);
# 1308|   	cmd.user_compl_ctx = (__u64)(uintptr_t)&iwuqp->qp;
# 1309|-> 	ret = ibv_cmd_create_qp(pd, &iwuqp->ibv_qp, attr, &cmd.ibv_cmd,
# 1310|   				sizeof(cmd), &resp.ibv_resp,
# 1311|   				sizeof(struct irdma_ucreate_qp_resp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def619]
rdma-core-59.0/providers/irdma/uverbs.c:1332:9: warning[-Wanalyzer-malloc-leak]: leak of ‘iwuqp’
rdma-core-59.0/providers/irdma/uverbs.c:1343:16: enter_function: entry to ‘irdma_ucreate_qp’
rdma-core-59.0/providers/irdma/uverbs.c:1352:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1357:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1362:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1363:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1364:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1365:13: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1361:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1370:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1379:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1384:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1385:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1390:17: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1391:12: branch_false: following ‘false’ branch (when ‘iwuqp’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1394:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1396:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1399:24: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1413:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1416:30: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1417:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1420:29: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1422:18: call_function: calling ‘irdma_vmapped_qp’ from ‘irdma_ucreate_qp’
# 1330|   	return 0;
# 1331|   err_qp:
# 1332|-> 	ibv_cmd_dereg_mr(&iwuqp->vmr);
# 1333|   err_dereg_mr:
# 1334|   	irdma_free_hw_buf(info->sq, iwuqp->buf_size);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def620]
rdma-core-59.0/providers/irdma/uverbs.c:1843:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/irdma/uverbs.c:1834:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1839:14: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1839:14: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1840:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1843:15: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1843:15: danger: ‘ah’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 1841|   		return NULL;
# 1842|   
# 1843|-> 	err = ibv_cmd_create_ah(ibpd, &ah->ibv_ah, attr, &resp.ibv_resp,
# 1844|   				sizeof(resp));
# 1845|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def621]
rdma-core-59.0/providers/irdma/uverbs.c:1959:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cq_buf’
rdma-core-59.0/providers/irdma/uverbs.c:1905:5: enter_function: entry to ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1927:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1930:12: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1930:12: branch_false: following ‘false’ branch (when ‘cqe <= 1048575’)...
rdma-core-59.0/providers/irdma/uverbs.c:1933:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1940:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1943:19: call_function: inlined call to ‘get_cq_total_bytes’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1945:19: call_function: inlined call to ‘irdma_calloc_hw_buf’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1945:19: call_function: inlined call to ‘irdma_calloc_hw_buf’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1946:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1949:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1949:18: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1950:12: branch_false: following ‘false’ branch (when ‘cq_buf’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1955:28: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1959:15: danger: ‘cq_buf’ leaks here; was allocated at [(20)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/19)
# 1957|   	reg_mr_cmd.cq_pages = cq_pages;
# 1958|   
# 1959|-> 	ret = ibv_cmd_reg_mr(new_mr.ibv_mr.pd, cq_base, cq_size,
# 1960|   			     (uintptr_t)cq_base, IBV_ACCESS_LOCAL_WRITE,
# 1961|   			     &new_mr, &reg_mr_cmd.ibv_cmd, sizeof(reg_mr_cmd),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def622]
rdma-core-59.0/providers/irdma/uverbs.c:1971:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cq_buf’
rdma-core-59.0/providers/irdma/uverbs.c:1905:5: enter_function: entry to ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1927:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1930:12: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1930:12: branch_false: following ‘false’ branch (when ‘cqe <= 1048575’)...
rdma-core-59.0/providers/irdma/uverbs.c:1933:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1940:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1943:19: call_function: inlined call to ‘get_cq_total_bytes’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1945:19: call_function: inlined call to ‘irdma_calloc_hw_buf’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1945:19: call_function: inlined call to ‘irdma_calloc_hw_buf’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1946:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1949:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1949:18: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1950:12: branch_false: following ‘false’ branch (when ‘cq_buf’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1955:28: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1963:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1966:15: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1967:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
rdma-core-59.0/providers/irdma/uverbs.c:1970:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1971:15: danger: ‘cq_buf’ leaks here; was allocated at [(20)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/19)
# 1969|   
# 1970|   	cmd.user_cq_buffer = (__u64)((uintptr_t)cq_base);
# 1971|-> 	ret = ibv_cmd_resize_cq(&iwucq->verbs_cq.cq, cqe_needed, &cmd.ibv_cmd,
# 1972|   				sizeof(cmd), &resp, sizeof(resp));
# 1973|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def623]
rdma-core-59.0/providers/irdma/uverbs.c:1979:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cq_buf’
rdma-core-59.0/providers/irdma/uverbs.c:1905:5: enter_function: entry to ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1927:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1930:12: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1930:12: branch_false: following ‘false’ branch (when ‘cqe <= 1048575’)...
rdma-core-59.0/providers/irdma/uverbs.c:1933:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1940:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1943:19: call_function: inlined call to ‘get_cq_total_bytes’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1945:19: call_function: inlined call to ‘irdma_calloc_hw_buf’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1945:19: call_function: inlined call to ‘irdma_calloc_hw_buf’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1946:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1949:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1949:18: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1950:12: branch_false: following ‘false’ branch (when ‘cq_buf’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1955:28: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1963:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1966:15: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1967:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
rdma-core-59.0/providers/irdma/uverbs.c:1970:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1973:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1976:29: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1979:9: danger: ‘cq_buf’ leaks here; was allocated at [(20)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/19)
# 1977|   	cq_buf->vmr = iwucq->vmr;
# 1978|   	iwucq->vmr = new_mr;
# 1979|-> 	irdma_uk_cq_resize(&iwucq->cq, cq_base, cqe_needed);
# 1980|   	iwucq->verbs_cq.cq.cqe = cqe;
# 1981|   	list_add_tail(&iwucq->resize_list, &cq_buf->list);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def624]
rdma-core-59.0/providers/irdma/uverbs.c:1990:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cq_buf’
rdma-core-59.0/providers/irdma/uverbs.c:1905:5: enter_function: entry to ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1927:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1930:12: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1930:12: branch_false: following ‘false’ branch (when ‘cqe <= 1048575’)...
rdma-core-59.0/providers/irdma/uverbs.c:1933:9: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1940:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1943:19: call_function: inlined call to ‘get_cq_total_bytes’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1945:19: call_function: inlined call to ‘irdma_calloc_hw_buf’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1945:19: call_function: inlined call to ‘irdma_calloc_hw_buf’ from ‘irdma_uresize_cq’
rdma-core-59.0/providers/irdma/uverbs.c:1946:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1949:18: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1949:18: acquire_memory: allocated here
rdma-core-59.0/providers/irdma/uverbs.c:1950:12: branch_false: following ‘false’ branch (when ‘cq_buf’ is non-NULL)...
rdma-core-59.0/providers/irdma/uverbs.c:1955:28: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1963:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/irdma/uverbs.c:1966:15: branch_false: ...to here
rdma-core-59.0/providers/irdma/uverbs.c:1990:9: danger: ‘cq_buf’ leaks here; was allocated at [(20)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/19)
# 1988|   	pthread_spin_unlock(&iwucq->lock);
# 1989|   err_lock:
# 1990|-> 	ibv_cmd_dereg_mr(&new_mr);
# 1991|   err_dereg_mr:
# 1992|   	free(cq_buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def625]
rdma-core-59.0/providers/mana/mana.c:88:15: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/mana/mana.c:84:14: acquire_memory: allocated here
rdma-core-59.0/providers/mana/mana.c:85:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/mana/mana.c:88:15: branch_false: ...to here
rdma-core-59.0/providers/mana/mana.c:88:15: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   86|   		return NULL;
#   87|   
#   88|-> 	ret = ibv_cmd_alloc_pd(context, &pd->ibv_pd, &cmd, sizeof(cmd),
#   89|   			       &resp.ibv_resp, sizeof(resp));
#   90|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def626]
rdma-core-59.0/providers/mana/mana.c:133:16: warning[-Wanalyzer-malloc-leak]: leak of ‘mparent_domain’
rdma-core-59.0/providers/mana/mana.c:101:1: enter_function: entry to ‘mana_alloc_parent_domain’
rdma-core-59.0/providers/mana/mana.c:106:13: call_function: inlined call to ‘ibv_check_alloc_parent_domain’ from ‘mana_alloc_parent_domain’
rdma-core-59.0/providers/mana/mana.c:111:30: branch_false: ...to here
rdma-core-59.0/providers/mana/mana.c:111:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mana/mana.c:120:26: branch_false: ...to here
rdma-core-59.0/providers/mana/mana.c:120:26: acquire_memory: allocated here
rdma-core-59.0/providers/mana/mana.c:121:12: branch_false: following ‘false’ branch (when ‘mparent_domain’ is non-NULL)...
rdma-core-59.0/providers/mana/mana.c:126:9: branch_false: ...to here
rdma-core-59.0/providers/mana/mana.c:130:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mana/mana.c:133:16: branch_false: ...to here
rdma-core-59.0/providers/mana/mana.c:133:16: danger: ‘mparent_domain’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  131|   		mparent_domain->pd_context = attr->pd_context;
#  132|   
#  133|-> 	return &mparent_domain->mpd.ibv_pd;
#  134|   }
#  135|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def627]
rdma-core-59.0/providers/mana/mana.c:172:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vmr’
rdma-core-59.0/providers/mana/mana.c:168:15: acquire_memory: allocated here
rdma-core-59.0/providers/mana/mana.c:169:12: branch_false: following ‘false’ branch (when ‘vmr’ is non-NULL)...
rdma-core-59.0/providers/mana/mana.c:172:15: branch_false: ...to here
rdma-core-59.0/providers/mana/mana.c:172:15: danger: ‘vmr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  170|   		return NULL;
#  171|   
#  172|-> 	ret = ibv_cmd_reg_dmabuf_mr(pd, offset, length, iova, fd, access, vmr, NULL);
#  173|   	if (ret) {
#  174|   		verbs_err(verbs_get_ctx(pd->context),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def628]
rdma-core-59.0/providers/mana/mana.c:196:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vmr’
rdma-core-59.0/providers/mana/mana.c:192:15: acquire_memory: allocated here
rdma-core-59.0/providers/mana/mana.c:193:12: branch_false: following ‘false’ branch (when ‘vmr’ is non-NULL)...
rdma-core-59.0/providers/mana/mana.c:196:15: branch_false: ...to here
rdma-core-59.0/providers/mana/mana.c:196:15: danger: ‘vmr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  194|   		return NULL;
#  195|   
#  196|-> 	ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, vmr, &cmd,
#  197|   			     sizeof(cmd), &resp, sizeof(resp));
#  198|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def629]
rdma-core-59.0/providers/mana/mana.c:296:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/mana/mana.c:292:15: acquire_memory: allocated here
rdma-core-59.0/providers/mana/mana.c:293:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/mana/mana.c:296:16: branch_false: ...to here
rdma-core-59.0/providers/mana/mana.c:296:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  294|   		return NULL;
#  295|   
#  296|-> 	return &dev->verbs_dev;
#  297|   }
#  298|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def630]
rdma-core-59.0/providers/mana/qp.c:79:31: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mana/qp.c:364:16: enter_function: entry to ‘mana_create_qp’
rdma-core-59.0/providers/mana/qp.c:369:24: call_function: calling ‘mana_create_qp_raw’ from ‘mana_create_qp’
#   77|   	qp->raw_qp.send_buf_size = align_hw_size(qp->raw_qp.send_buf_size);
#   78|   
#   79|-> 	qp->raw_qp.send_buf = ctx->extern_alloc.alloc(qp->raw_qp.send_buf_size,
#   80|   						      ctx->extern_alloc.data);
#   81|   	if (!qp->raw_qp.send_buf) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def631]
rdma-core-59.0/providers/mana/qp.c:93:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mana/qp.c:364:16: enter_function: entry to ‘mana_create_qp’
rdma-core-59.0/providers/mana/qp.c:369:24: call_function: calling ‘mana_create_qp_raw’ from ‘mana_create_qp’
#   91|   	qp_cmd_drv->port = port;
#   92|   
#   93|-> 	ret = ibv_cmd_create_qp(ibpd, &qp->ibqp.qp, attr, &qp_cmd.ibv_cmd,
#   94|   				sizeof(qp_cmd), &qp_resp.ibv_resp,
#   95|   				sizeof(qp_resp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def632]
rdma-core-59.0/providers/mana/qp.c:545:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mana/qp.c:514:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mana/qp.c:521:13: branch_false: ...to here
rdma-core-59.0/providers/mana/qp.c:521:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mana/qp.c:530:37: branch_false: ...to here
rdma-core-59.0/providers/mana/qp.c:532:14: acquire_memory: allocated here
rdma-core-59.0/providers/mana/qp.c:533:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mana/qp.c:536:40: branch_false: ...to here
rdma-core-59.0/providers/mana/qp.c:545:15: danger: ‘qp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  543|   	cmd_drv->port = port;
#  544|   
#  545|-> 	ret = ibv_cmd_create_qp_ex2(context, &qp->ibqp, attr, &cmd.ibv_cmd,
#  546|   				    sizeof(cmd), &resp.ibv_resp, sizeof(resp));
#  547|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def633]
rdma-core-59.0/providers/mana/wq.c:58:19: warning[-Wanalyzer-malloc-leak]: leak of ‘wq’
rdma-core-59.0/providers/mana/wq.c:44:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mana/wq.c:51:14: acquire_memory: allocated here
rdma-core-59.0/providers/mana/wq.c:52:12: branch_false: following ‘false’ branch (when ‘wq’ is non-NULL)...
rdma-core-59.0/providers/mana/wq.c:55:19: branch_false: ...to here
rdma-core-59.0/providers/mana/wq.c:58:19: danger: ‘wq’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   56|   	wq->buf_size = attr->max_wr * get_wqe_size(attr->max_sge);
#   57|   	wq->buf_size = align_hw_size(wq->buf_size);
#   58|-> 	wq->buf = ctx->extern_alloc.alloc(wq->buf_size, ctx->extern_alloc.data);
#   59|   
#   60|   	if (!wq->buf) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def634]
rdma-core-59.0/providers/mana/wq.c:71:15: warning[-Wanalyzer-malloc-leak]: leak of ‘wq’
rdma-core-59.0/providers/mana/wq.c:44:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mana/wq.c:51:14: acquire_memory: allocated here
rdma-core-59.0/providers/mana/wq.c:52:12: branch_false: following ‘false’ branch (when ‘wq’ is non-NULL)...
rdma-core-59.0/providers/mana/wq.c:55:19: branch_false: ...to here
rdma-core-59.0/providers/mana/wq.c:60:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mana/wq.c:65:19: branch_false: ...to here
rdma-core-59.0/providers/mana/wq.c:71:15: danger: ‘wq’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   69|   	wq_cmd_drv->wq_buf_size = wq->buf_size;
#   70|   
#   71|-> 	ret = ibv_cmd_create_wq(context, attr, &wq->ibwq, &wq_cmd.ibv_cmd,
#   72|   				sizeof(wq_cmd), &wq_resp.ibv_resp,
#   73|   				sizeof(wq_resp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def635]
rdma-core-59.0/providers/mana/wq.c:127:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ind_table’
rdma-core-59.0/providers/mana/wq.c:123:21: acquire_memory: allocated here
rdma-core-59.0/providers/mana/wq.c:124:12: branch_false: following ‘false’ branch (when ‘ind_table’ is non-NULL)...
rdma-core-59.0/providers/mana/wq.c:127:15: branch_false: ...to here
rdma-core-59.0/providers/mana/wq.c:127:15: danger: ‘ind_table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  125|   		return NULL;
#  126|   
#  127|-> 	ret = ibv_cmd_create_rwq_ind_table(context, init_attr,
#  128|   					   &ind_table->ib_ind_table,
#  129|   					   &resp.ibv_resp, sizeof(resp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def636]
rdma-core-59.0/providers/mlx4/dbrec.c:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘page’
rdma-core-59.0/providers/mlx4/dbrec.c:64:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/dbrec.c:65:12: branch_false: following ‘false’ branch (when ‘page’ is non-NULL)...
rdma-core-59.0/providers/mlx4/dbrec.c:68:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/dbrec.c:68:13: danger: ‘page’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   66|   		return NULL;
#   67|   
#   68|-> 	if (mlx4_alloc_buf(context, &page->buf, ps, ps)) {
#   69|   		free(page);
#   70|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def637]
rdma-core-59.0/providers/mlx4/mlx4.c:266:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/mlx4/mlx4.c:259:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/mlx4.c:260:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/mlx4/mlx4.c:263:28: branch_false: ...to here
rdma-core-59.0/providers/mlx4/mlx4.c:266:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  264|   	dev->abi_version = sysfs_dev->abi_ver;
#  265|   
#  266|-> 	return &dev->verbs_dev;
#  267|   }
#  268|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def638]
rdma-core-59.0/providers/mlx4/verbs.c:231:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/mlx4/verbs.c:227:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:228:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:231:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:231:13: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  229|   		return NULL;
#  230|   
#  231|-> 	if (ibv_cmd_alloc_pd(context, &pd->ibv_pd, &cmd, sizeof cmd,
#  232|   			     &resp.ibv_resp, sizeof resp)) {
#  233|   		free(pd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def639]
rdma-core-59.0/providers/mlx4/verbs.c:266:15: warning[-Wanalyzer-malloc-leak]: leak of ‘xrcd’
rdma-core-59.0/providers/mlx4/verbs.c:262:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:263:12: branch_false: following ‘false’ branch (when ‘xrcd’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:266:15: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:266:15: danger: ‘xrcd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  264|   		return NULL;
#  265|   
#  266|-> 	ret = ibv_cmd_open_xrcd(context, xrcd, sizeof(*xrcd), attr,
#  267|   				&cmd, sizeof cmd, &resp, sizeof resp);
#  268|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def640]
rdma-core-59.0/providers/mlx4/verbs.c:314:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vmr’
rdma-core-59.0/providers/mlx4/verbs.c:310:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:311:12: branch_false: following ‘false’ branch (when ‘vmr’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:314:15: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:314:15: danger: ‘vmr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  312|   		return NULL;
#  313|   
#  314|-> 	ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, vmr, &cmd,
#  315|   			     sizeof(cmd), &resp, sizeof(resp));
#  316|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def641]
rdma-core-59.0/providers/mlx4/verbs.c:362:15: warning[-Wanalyzer-malloc-leak]: leak of ‘mw’
rdma-core-59.0/providers/mlx4/verbs.c:358:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:359:12: branch_false: following ‘false’ branch (when ‘mw’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:362:15: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:362:15: danger: ‘mw’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  360|   		return NULL;
#  361|   
#  362|-> 	ret = ibv_cmd_alloc_mw(pd, type, mw, &cmd, sizeof(cmd),
#  363|   			     &resp, sizeof(resp));
#  364|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def642]
rdma-core-59.0/providers/mlx4/verbs.c:932:17: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mlx4/verbs.c:892:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:898:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:899:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:900:21: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:899:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:901:21: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:899:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:902:21: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:899:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:915:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:915:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:920:12: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:920:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:925:14: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:925:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:926:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:929:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:929:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:932:17: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:932:17: danger: ‘qp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/14)
#  930|   		attr->cap.max_send_wr = qp->sq.wqe_cnt = 0;
#  931|   	} else {
#  932|-> 		mlx4_calc_sq_wqe_size(&attr->cap, attr->qp_type, qp, attr);
#  933|   		/*
#  934|   		 * We need to leave 2 KB + 1 WQE of headroom in the SQ to

Error: GCC_ANALYZER_WARNING (CWE-401): [#def643]
rdma-core-59.0/providers/mlx4/verbs.c:952:13: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mlx4/verbs.c:892:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:898:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:899:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:900:21: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:899:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:901:21: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:899:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:902:21: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:899:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:915:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:915:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:920:12: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:920:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:925:14: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:925:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:926:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:929:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:929:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:930:17: branch_true: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:952:13: danger: ‘qp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/14)
#  950|   	}
#  951|   
#  952|-> 	if (mlx4_alloc_qp_buf(context, attr->cap.max_recv_sge, attr->qp_type, qp,
#  953|   			      mlx4qp_attr))
#  954|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def644]
rdma-core-59.0/providers/mlx4/verbs.c:1083:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mlx4/verbs.c:1079:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:1080:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:1083:15: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1083:15: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 1081|   		return NULL;
# 1082|   
# 1083|-> 	ret = ibv_cmd_open_qp(context, &qp->verbs_qp, sizeof(qp->verbs_qp), attr,
# 1084|   			      &cmd, sizeof cmd, &resp, sizeof resp);
# 1085|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def645]
rdma-core-59.0/providers/mlx4/verbs.c:1335:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/mlx4/verbs.c:1355:16: enter_function: entry to ‘mlx4_create_ah’
rdma-core-59.0/providers/mlx4/verbs.c:1360:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1363:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1369:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:1370:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:1373:16: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1377:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1382:46: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1384:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1388:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1388:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1398:12: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1398:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1399:21: branch_true: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1399:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1415:29: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1415:29: call_function: calling ‘mlx4_resolve_grh_to_l2’ from ‘mlx4_create_ah’
# 1333|   			ah->mac[i] = attr->grh.dgid.raw[i + 10];
# 1334|   
# 1335|-> 		err = ibv_query_gid(pd->context, attr->port_num,
# 1336|   				    attr->grh.sgid_index, &sgid);
# 1337|   		if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def646]
rdma-core-59.0/providers/mlx4/verbs.c:1402:29: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/mlx4/verbs.c:1360:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1363:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1369:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:1370:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:1373:16: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1377:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1382:46: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1384:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1388:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1388:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1398:12: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1398:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1399:21: branch_true: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1399:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1403:57: branch_true: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1402:29: danger: ‘ah’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 1400|   			uint16_t vid;
# 1401|   
# 1402|-> 			if (ibv_resolve_eth_l2_from_gid(pd->context, attr,
# 1403|   							ah->mac, &vid)) {
# 1404|   				free(ah);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def647]
rdma-core-59.0/providers/mlx4/verbs.c:1488:13: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mlx4/verbs.c:1441:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1447:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1448:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1449:21: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1448:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1461:30: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1461:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx4/verbs.c:1466:12: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1472:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:1473:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:1476:13: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1488:13: danger: ‘qp’ leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
# 1486|   	qp->rq.wqe_cnt = roundup_pow_of_two(attr->max_wr);
# 1487|   
# 1488|-> 	if (mlx4_alloc_qp_buf(context, attr->max_sge, IBV_QPT_RAW_PACKET, qp, NULL))
# 1489|   		goto err;
# 1490|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def648]
rdma-core-59.0/providers/mlx4/verbs.c:1580:15: warning[-Wanalyzer-malloc-leak]: leak of ‘flow_id’
rdma-core-59.0/providers/mlx4/verbs.c:1576:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:1577:12: branch_false: following ‘false’ branch (when ‘flow_id’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:1580:15: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1580:15: danger: ‘flow_id’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 1578|   		return NULL;
# 1579|   
# 1580|-> 	ret = ibv_cmd_create_flow(qp, flow_id, flow_attr,
# 1581|   				  NULL, 0);
# 1582|   	if (!ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def649]
rdma-core-59.0/providers/mlx4/verbs.c:1649:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ind_table’
rdma-core-59.0/providers/mlx4/verbs.c:1645:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx4/verbs.c:1646:12: branch_false: following ‘false’ branch (when ‘ind_table’ is non-NULL)...
rdma-core-59.0/providers/mlx4/verbs.c:1649:15: branch_false: ...to here
rdma-core-59.0/providers/mlx4/verbs.c:1649:15: danger: ‘ind_table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 1647|   		return NULL;
# 1648|   
# 1649|-> 	err = ibv_cmd_create_rwq_ind_table(context, init_attr, ind_table, &resp,
# 1650|   					   sizeof(resp));
# 1651|   	if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def650]
rdma-core-59.0/providers/mlx5/buf.c:160:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/buf.c:122:12: enter_function: entry to ‘alloc_huge_buf’
rdma-core-59.0/providers/mlx5/buf.c:133:12: branch_false: following ‘false’ branch (when ‘nchunk != 0’)...
rdma-core-59.0/providers/mlx5/buf.c:136:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/buf.c:151:9: call_function: calling ‘mlx5_spin_unlock’ from ‘alloc_huge_buf’
rdma-core-59.0/providers/mlx5/buf.c:151:9: return_function: returning to ‘alloc_huge_buf’ from ‘mlx5_spin_unlock’
rdma-core-59.0/providers/mlx5/buf.c:153:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
rdma-core-59.0/providers/mlx5/buf.c:154:24: branch_true: ...to here
rdma-core-59.0/providers/mlx5/buf.c:154:24: call_function: calling ‘alloc_huge_mem’ from ‘alloc_huge_buf’
rdma-core-59.0/providers/mlx5/buf.c:154:24: return_function: returning to ‘alloc_huge_buf’ from ‘alloc_huge_mem’
rdma-core-59.0/providers/mlx5/buf.c:155:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/buf.c:158:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/buf.c:160:17: danger: ‘<unknown>’ leaks here; was allocated at [(21)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/20)
#  158|   		buf->base = 0;
#  159|   		assert(nchunk <= hmem->bmp_size);
#  160|-> 		bitmap_fill_region(hmem->bitmap, 0, nchunk);
#  161|   
#  162|   		buf->hmem = hmem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def651]
rdma-core-59.0/providers/mlx5/buf.c:160:17: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_huge_mem(*buf.length)’
rdma-core-59.0/providers/mlx5/buf.c:122:12: enter_function: entry to ‘alloc_huge_buf’
rdma-core-59.0/providers/mlx5/buf.c:133:12: branch_false: following ‘false’ branch (when ‘nchunk != 0’)...
rdma-core-59.0/providers/mlx5/buf.c:136:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/buf.c:151:9: call_function: calling ‘mlx5_spin_unlock’ from ‘alloc_huge_buf’
rdma-core-59.0/providers/mlx5/buf.c:151:9: return_function: returning to ‘alloc_huge_buf’ from ‘mlx5_spin_unlock’
rdma-core-59.0/providers/mlx5/buf.c:153:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
rdma-core-59.0/providers/mlx5/buf.c:154:24: branch_true: ...to here
rdma-core-59.0/providers/mlx5/buf.c:154:24: call_function: calling ‘alloc_huge_mem’ from ‘alloc_huge_buf’
rdma-core-59.0/providers/mlx5/buf.c:154:24: return_function: returning to ‘alloc_huge_buf’ from ‘alloc_huge_mem’
rdma-core-59.0/providers/mlx5/buf.c:155:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/buf.c:158:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/buf.c:160:17: danger: ‘alloc_huge_mem(*buf.length)’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  158|   		buf->base = 0;
#  159|   		assert(nchunk <= hmem->bmp_size);
#  160|-> 		bitmap_fill_region(hmem->bitmap, 0, nchunk);
#  161|   
#  162|   		buf->hmem = hmem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def652]
rdma-core-59.0/providers/mlx5/dbrec.c:66:13: warning[-Wanalyzer-malloc-leak]: leak of ‘page’
rdma-core-59.0/providers/mlx5/dbrec.c:62:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dbrec.c:63:12: branch_false: following ‘false’ branch (when ‘page’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dbrec.c:66:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dbrec.c:66:13: danger: ‘page’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   64|   		return NULL;
#   65|   
#   66|-> 	if (mlx5_is_extern_alloc(context))
#   67|   		ret = mlx5_alloc_buf_extern(context, &page->buf, ps);
#   68|   	else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def653]
rdma-core-59.0/providers/mlx5/dbrec.c:67:23: warning[-Wanalyzer-malloc-leak]: leak of ‘page’
rdma-core-59.0/providers/mlx5/dbrec.c:62:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dbrec.c:63:12: branch_false: following ‘false’ branch (when ‘page’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dbrec.c:66:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dbrec.c:66:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dbrec.c:67:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dbrec.c:67:23: danger: ‘page’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   65|   
#   66|   	if (mlx5_is_extern_alloc(context))
#   67|-> 		ret = mlx5_alloc_buf_extern(context, &page->buf, ps);
#   68|   	else
#   69|   		ret = mlx5_alloc_buf(&page->buf, ps, ps);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def654]
rdma-core-59.0/providers/mlx5/dbrec.c:69:23: warning[-Wanalyzer-malloc-leak]: leak of ‘page’
rdma-core-59.0/providers/mlx5/dbrec.c:62:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dbrec.c:63:12: branch_false: following ‘false’ branch (when ‘page’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dbrec.c:66:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dbrec.c:66:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dbrec.c:69:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dbrec.c:69:23: danger: ‘page’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   67|   		ret = mlx5_alloc_buf_extern(context, &page->buf, ps);
#   68|   	else
#   69|-> 		ret = mlx5_alloc_buf(&page->buf, ps, ps);
#   70|   	if (ret) {
#   71|   		free(page);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def655]
rdma-core-59.0/providers/mlx5/dbrec.c:97:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/providers/mlx5/dbrec.c:87:9: enter_function: entry to ‘mlx5_alloc_dbrec’
rdma-core-59.0/providers/mlx5/dbrec.c:94:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dbrec.c:95:61: call_function: inlined call to ‘to_mparent_domain’ from ‘mlx5_alloc_dbrec’
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dbrec.c:97:22: danger: dereference of NULL ‘<unknown>’
#   95|   		struct mlx5_parent_domain *mparent_domain = to_mparent_domain(pd);
#   96|   
#   97|-> 		db = mparent_domain->alloc(&mparent_domain->mpd.ibv_pd,
#   98|   				   mparent_domain->pd_context, 8, 8,
#   99|   				   MLX5DV_RES_TYPE_DBR);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def656]
rdma-core-59.0/providers/mlx5/dbrec.c:153:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/providers/mlx5/dbrec.c:142:6: enter_function: entry to ‘mlx5_free_db’
rdma-core-59.0/providers/mlx5/dbrec.c:150:12: branch_true: following ‘true’ branch (when ‘custom_alloc != 0’)...
rdma-core-59.0/providers/mlx5/dbrec.c:151:61: call_function: inlined call to ‘to_mparent_domain’ from ‘mlx5_free_db’
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dbrec.c:153:17: danger: dereference of NULL ‘<unknown>’
#  151|   		struct mlx5_parent_domain *mparent_domain = to_mparent_domain(pd);
#  152|   
#  153|-> 		mparent_domain->free(&mparent_domain->mpd.ibv_pd,
#  154|   				     mparent_domain->pd_context,
#  155|   				     db,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def657]
rdma-core-59.0/providers/mlx5/dr_action.c:1589:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_action.c:1703:1: enter_function: entry to ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1715:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1720:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1729:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: return_function: returning to ‘mlx5dv_dr_action_create_packet_reformat’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:1734:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:1737:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1740:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1747:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1748:23: call_function: calling ‘dr_action_create_reformat_action’ from ‘mlx5dv_dr_action_create_packet_reformat’
# 1587|   	action->reformat.data = reformat_data;
# 1588|   	action->reformat.reformat_size = data_sz;
# 1589|-> 	ret = dr_ste_alloc_encap(action);
# 1590|   	if (ret)
# 1591|   		goto free_reformat_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def658]
rdma-core-59.0/providers/mlx5/dr_action.c:1589:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(<unknown>)’
rdma-core-59.0/providers/mlx5/dr_action.c:1703:1: enter_function: entry to ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1715:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1720:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1729:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: return_function: returning to ‘mlx5dv_dr_action_create_packet_reformat’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:1734:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:1737:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1740:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1747:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1748:23: call_function: calling ‘dr_action_create_reformat_action’ from ‘mlx5dv_dr_action_create_packet_reformat’
# 1587|   	action->reformat.data = reformat_data;
# 1588|   	action->reformat.reformat_size = data_sz;
# 1589|-> 	ret = dr_ste_alloc_encap(action);
# 1590|   	if (ret)
# 1591|   		goto free_reformat_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def659]
rdma-core-59.0/providers/mlx5/dr_action.c:1620:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(<unknown>)’
rdma-core-59.0/providers/mlx5/dr_action.c:1703:1: enter_function: entry to ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1715:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1720:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1729:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: return_function: returning to ‘mlx5dv_dr_action_create_packet_reformat’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:1734:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:1737:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1740:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1747:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1748:23: call_function: calling ‘dr_action_create_reformat_action’ from ‘mlx5dv_dr_action_create_packet_reformat’
# 1618|   		rt = MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL;
# 1619|   
# 1620|-> 	obj = dr_devx_create_reformat_ctx(dmn->ctx, rt, data_sz, data);
# 1621|   	if (!obj)
# 1622|   		return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def660]
rdma-core-59.0/providers/mlx5/dr_action.c:1646:21: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(<unknown>)’
rdma-core-59.0/providers/mlx5/dr_action.c:1703:1: enter_function: entry to ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1715:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1720:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1729:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: return_function: returning to ‘mlx5dv_dr_action_create_packet_reformat’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:1734:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:1737:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1740:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1747:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1748:23: call_function: calling ‘dr_action_create_reformat_action’ from ‘mlx5dv_dr_action_create_packet_reformat’
# 1644|   	case DR_ACTION_TYP_L2_TO_TNL_L3:
# 1645|   	{
# 1646|-> 		if (dr_domain_is_support_sw_encap(dmn) &&
# 1647|   		    !dr_action_create_sw_reformat(dmn, action, data_sz, data))
# 1648|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def661]
rdma-core-59.0/providers/mlx5/dr_action.c:1672:23: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(<unknown>)’
rdma-core-59.0/providers/mlx5/dr_action.c:1703:1: enter_function: entry to ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1715:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1720:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1729:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_packet_reformat’
rdma-core-59.0/providers/mlx5/dr_action.c:1733:18: return_function: returning to ‘mlx5dv_dr_action_create_packet_reformat’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:1734:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:1737:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1740:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:1747:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1748:23: call_function: calling ‘dr_action_create_reformat_action’ from ‘mlx5dv_dr_action_create_packet_reformat’
# 1670|   		}
# 1671|   
# 1672|-> 		ret = dr_ste_set_action_decap_l3_list(dmn->ste_ctx,
# 1673|   						      data, data_sz,
# 1674|   						      hw_actions,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def662]
rdma-core-59.0/providers/mlx5/dr_action.c:1672:23: warning[-Wanalyzer-malloc-leak]: leak of ‘hw_actions’
rdma-core-59.0/providers/mlx5/dr_action.c:1666:30: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:1667:20: branch_false: following ‘false’ branch (when ‘hw_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:1672:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:1672:23: danger: ‘hw_actions’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 1670|   		}
# 1671|   
# 1672|-> 		ret = dr_ste_set_action_decap_l3_list(dmn->ste_ctx,
# 1673|   						      data, data_sz,
# 1674|   						      hw_actions,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def663]
rdma-core-59.0/providers/mlx5/dr_action.c:1818:26: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 1816|   
# 1817|   	/* Convert SW data to HW modify action format */
# 1818|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1819|   							 &dmn->info.caps,
# 1820|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def664]
rdma-core-59.0/providers/mlx5/dr_action.c:1818:26: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(2, 8)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2782:28: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1816|   
# 1817|   	/* Convert SW data to HW modify action format */
# 1818|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1819|   							 &dmn->info.caps,
# 1820|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def665]
rdma-core-59.0/providers/mlx5/dr_action.c:1818:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 1816|   
# 1817|   	/* Convert SW data to HW modify action format */
# 1818|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1819|   							 &dmn->info.caps,
# 1820|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def666]
rdma-core-59.0/providers/mlx5/dr_action.c:1818:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(9)’
rdma-core-59.0/providers/mlx5/dr_action.c:2280:1: enter_function: entry to ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2290:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2295:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2295:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2301:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: return_function: returning to ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2309:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2312:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2315:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2322:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2323:23: call_function: calling ‘dr_action_create_modify_action’ from ‘mlx5dv_dr_action_create_modify_header’
# 1816|   
# 1817|   	/* Convert SW data to HW modify action format */
# 1818|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1819|   							 &dmn->info.caps,
# 1820|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def667]
rdma-core-59.0/providers/mlx5/dr_action.c:1818:26: warning[-Wanalyzer-malloc-leak]: leak of ‘hw_actions’
rdma-core-59.0/providers/mlx5/dr_action.c:2226:12: enter_function: entry to ‘dr_action_create_modify_action’
rdma-core-59.0/providers/mlx5/dr_action.c:2237:12: branch_false: following ‘false’ branch (when ‘num_sw_actions != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2243:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2243:22: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2244:12: branch_false: following ‘false’ branch (when ‘hw_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: call_function: calling ‘dr_actions_convert_modify_header’ from ‘dr_action_create_modify_action’
# 1816|   
# 1817|   	/* Convert SW data to HW modify action format */
# 1818|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1819|   							 &dmn->info.caps,
# 1820|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def668]
rdma-core-59.0/providers/mlx5/dr_action.c:1818:26: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1816|   
# 1817|   	/* Convert SW data to HW modify action format */
# 1818|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1819|   							 &dmn->info.caps,
# 1820|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def669]
rdma-core-59.0/providers/mlx5/dr_action.c:1829:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 1827|   	max_length = hw_action_info->end - hw_action_info->start + 1;
# 1828|   
# 1829|-> 	dr_ste_set_action_add(dmn->ste_ctx,
# 1830|   			      hw_action,
# 1831|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def670]
rdma-core-59.0/providers/mlx5/dr_action.c:1829:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(2, 8)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2782:28: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1827|   	max_length = hw_action_info->end - hw_action_info->start + 1;
# 1828|   
# 1829|-> 	dr_ste_set_action_add(dmn->ste_ctx,
# 1830|   			      hw_action,
# 1831|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def671]
rdma-core-59.0/providers/mlx5/dr_action.c:1829:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 1827|   	max_length = hw_action_info->end - hw_action_info->start + 1;
# 1828|   
# 1829|-> 	dr_ste_set_action_add(dmn->ste_ctx,
# 1830|   			      hw_action,
# 1831|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def672]
rdma-core-59.0/providers/mlx5/dr_action.c:1829:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(9)’
rdma-core-59.0/providers/mlx5/dr_action.c:2280:1: enter_function: entry to ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2290:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2295:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2295:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2301:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: return_function: returning to ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2309:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2312:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2315:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2322:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2323:23: call_function: calling ‘dr_action_create_modify_action’ from ‘mlx5dv_dr_action_create_modify_header’
# 1827|   	max_length = hw_action_info->end - hw_action_info->start + 1;
# 1828|   
# 1829|-> 	dr_ste_set_action_add(dmn->ste_ctx,
# 1830|   			      hw_action,
# 1831|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def673]
rdma-core-59.0/providers/mlx5/dr_action.c:1829:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hw_actions’
rdma-core-59.0/providers/mlx5/dr_action.c:2226:12: enter_function: entry to ‘dr_action_create_modify_action’
rdma-core-59.0/providers/mlx5/dr_action.c:2237:12: branch_false: following ‘false’ branch (when ‘num_sw_actions != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2243:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2243:22: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2244:12: branch_false: following ‘false’ branch (when ‘hw_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: call_function: calling ‘dr_actions_convert_modify_header’ from ‘dr_action_create_modify_action’
# 1827|   	max_length = hw_action_info->end - hw_action_info->start + 1;
# 1828|   
# 1829|-> 	dr_ste_set_action_add(dmn->ste_ctx,
# 1830|   			      hw_action,
# 1831|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def674]
rdma-core-59.0/providers/mlx5/dr_action.c:1829:9: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1827|   	max_length = hw_action_info->end - hw_action_info->start + 1;
# 1828|   
# 1829|-> 	dr_ste_set_action_add(dmn->ste_ctx,
# 1830|   			      hw_action,
# 1831|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def675]
rdma-core-59.0/providers/mlx5/dr_action.c:1858:26: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 1856|   
# 1857|   	/* Convert SW data to HW modify action format */
# 1858|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1859|   							 &dmn->info.caps,
# 1860|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def676]
rdma-core-59.0/providers/mlx5/dr_action.c:1858:26: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(2, 8)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2782:28: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1856|   
# 1857|   	/* Convert SW data to HW modify action format */
# 1858|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1859|   							 &dmn->info.caps,
# 1860|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def677]
rdma-core-59.0/providers/mlx5/dr_action.c:1858:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 1856|   
# 1857|   	/* Convert SW data to HW modify action format */
# 1858|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1859|   							 &dmn->info.caps,
# 1860|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def678]
rdma-core-59.0/providers/mlx5/dr_action.c:1858:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(9)’
rdma-core-59.0/providers/mlx5/dr_action.c:2280:1: enter_function: entry to ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2290:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2295:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2295:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2301:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: return_function: returning to ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2309:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2312:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2315:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2322:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2323:23: call_function: calling ‘dr_action_create_modify_action’ from ‘mlx5dv_dr_action_create_modify_header’
# 1856|   
# 1857|   	/* Convert SW data to HW modify action format */
# 1858|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1859|   							 &dmn->info.caps,
# 1860|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def679]
rdma-core-59.0/providers/mlx5/dr_action.c:1858:26: warning[-Wanalyzer-malloc-leak]: leak of ‘hw_actions’
rdma-core-59.0/providers/mlx5/dr_action.c:2226:12: enter_function: entry to ‘dr_action_create_modify_action’
rdma-core-59.0/providers/mlx5/dr_action.c:2237:12: branch_false: following ‘false’ branch (when ‘num_sw_actions != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2243:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2243:22: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2244:12: branch_false: following ‘false’ branch (when ‘hw_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: call_function: calling ‘dr_actions_convert_modify_header’ from ‘dr_action_create_modify_action’
# 1856|   
# 1857|   	/* Convert SW data to HW modify action format */
# 1858|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1859|   							 &dmn->info.caps,
# 1860|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def680]
rdma-core-59.0/providers/mlx5/dr_action.c:1858:26: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1856|   
# 1857|   	/* Convert SW data to HW modify action format */
# 1858|-> 	hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1859|   							 &dmn->info.caps,
# 1860|   							 sw_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def681]
rdma-core-59.0/providers/mlx5/dr_action.c:1877:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 1875|   	}
# 1876|   
# 1877|-> 	dr_ste_set_action_set(dmn->ste_ctx,
# 1878|   			      hw_action,
# 1879|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def682]
rdma-core-59.0/providers/mlx5/dr_action.c:1877:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(2, 8)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2782:28: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1875|   	}
# 1876|   
# 1877|-> 	dr_ste_set_action_set(dmn->ste_ctx,
# 1878|   			      hw_action,
# 1879|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def683]
rdma-core-59.0/providers/mlx5/dr_action.c:1877:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 1875|   	}
# 1876|   
# 1877|-> 	dr_ste_set_action_set(dmn->ste_ctx,
# 1878|   			      hw_action,
# 1879|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def684]
rdma-core-59.0/providers/mlx5/dr_action.c:1877:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(9)’
rdma-core-59.0/providers/mlx5/dr_action.c:2280:1: enter_function: entry to ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2290:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2295:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2295:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2301:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: return_function: returning to ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2309:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2312:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2315:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2322:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2323:23: call_function: calling ‘dr_action_create_modify_action’ from ‘mlx5dv_dr_action_create_modify_header’
# 1875|   	}
# 1876|   
# 1877|-> 	dr_ste_set_action_set(dmn->ste_ctx,
# 1878|   			      hw_action,
# 1879|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def685]
rdma-core-59.0/providers/mlx5/dr_action.c:1877:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hw_actions’
rdma-core-59.0/providers/mlx5/dr_action.c:2226:12: enter_function: entry to ‘dr_action_create_modify_action’
rdma-core-59.0/providers/mlx5/dr_action.c:2237:12: branch_false: following ‘false’ branch (when ‘num_sw_actions != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2243:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2243:22: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2244:12: branch_false: following ‘false’ branch (when ‘hw_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: call_function: calling ‘dr_actions_convert_modify_header’ from ‘dr_action_create_modify_action’
# 1875|   	}
# 1876|   
# 1877|-> 	dr_ste_set_action_set(dmn->ste_ctx,
# 1878|   			      hw_action,
# 1879|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def686]
rdma-core-59.0/providers/mlx5/dr_action.c:1877:9: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1875|   	}
# 1876|   
# 1877|-> 	dr_ste_set_action_set(dmn->ste_ctx,
# 1878|   			      hw_action,
# 1879|   			      hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def687]
rdma-core-59.0/providers/mlx5/dr_action.c:1908:30: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(2, 8)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2782:28: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1906|   
# 1907|   	/* Convert SW data to HW modify action format */
# 1908|-> 	src_hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1909|   							     &dmn->info.caps,
# 1910|   							     src_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def688]
rdma-core-59.0/providers/mlx5/dr_action.c:1908:30: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(9)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1906|   
# 1907|   	/* Convert SW data to HW modify action format */
# 1908|-> 	src_hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1909|   							     &dmn->info.caps,
# 1910|   							     src_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def689]
rdma-core-59.0/providers/mlx5/dr_action.c:1908:30: warning[-Wanalyzer-malloc-leak]: leak of ‘hw_actions’
rdma-core-59.0/providers/mlx5/dr_action.c:2226:12: enter_function: entry to ‘dr_action_create_modify_action’
rdma-core-59.0/providers/mlx5/dr_action.c:2237:12: branch_false: following ‘false’ branch (when ‘num_sw_actions != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2243:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2243:22: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2244:12: branch_false: following ‘false’ branch (when ‘hw_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: call_function: calling ‘dr_actions_convert_modify_header’ from ‘dr_action_create_modify_action’
# 1906|   
# 1907|   	/* Convert SW data to HW modify action format */
# 1908|-> 	src_hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1909|   							     &dmn->info.caps,
# 1910|   							     src_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def690]
rdma-core-59.0/providers/mlx5/dr_action.c:1908:30: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1906|   
# 1907|   	/* Convert SW data to HW modify action format */
# 1908|-> 	src_hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1909|   							     &dmn->info.caps,
# 1910|   							     src_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def691]
rdma-core-59.0/providers/mlx5/dr_action.c:1911:30: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(2, 8)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2782:28: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1909|   							     &dmn->info.caps,
# 1910|   							     src_field);
# 1911|-> 	dst_hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1912|   							     &dmn->info.caps,
# 1913|   							     dst_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def692]
rdma-core-59.0/providers/mlx5/dr_action.c:1911:30: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(9)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1909|   							     &dmn->info.caps,
# 1910|   							     src_field);
# 1911|-> 	dst_hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1912|   							     &dmn->info.caps,
# 1913|   							     dst_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def693]
rdma-core-59.0/providers/mlx5/dr_action.c:1911:30: warning[-Wanalyzer-malloc-leak]: leak of ‘hw_actions’
rdma-core-59.0/providers/mlx5/dr_action.c:2226:12: enter_function: entry to ‘dr_action_create_modify_action’
rdma-core-59.0/providers/mlx5/dr_action.c:2237:12: branch_false: following ‘false’ branch (when ‘num_sw_actions != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2243:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2243:22: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2244:12: branch_false: following ‘false’ branch (when ‘hw_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: call_function: calling ‘dr_actions_convert_modify_header’ from ‘dr_action_create_modify_action’
# 1909|   							     &dmn->info.caps,
# 1910|   							     src_field);
# 1911|-> 	dst_hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1912|   							     &dmn->info.caps,
# 1913|   							     dst_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def694]
rdma-core-59.0/providers/mlx5/dr_action.c:1911:30: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1909|   							     &dmn->info.caps,
# 1910|   							     src_field);
# 1911|-> 	dst_hw_action_info = dr_ste_conv_modify_hdr_sw_field(dmn->ste_ctx,
# 1912|   							     &dmn->info.caps,
# 1913|   							     dst_field);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def695]
rdma-core-59.0/providers/mlx5/dr_action.c:1932:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(2, 8)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2782:28: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1930|   	}
# 1931|   
# 1932|-> 	dr_ste_set_action_copy(dmn->ste_ctx,
# 1933|   			       hw_action,
# 1934|   			       dst_hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def696]
rdma-core-59.0/providers/mlx5/dr_action.c:1932:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(9)’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1930|   	}
# 1931|   
# 1932|-> 	dr_ste_set_action_copy(dmn->ste_ctx,
# 1933|   			       hw_action,
# 1934|   			       dst_hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def697]
rdma-core-59.0/providers/mlx5/dr_action.c:1932:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hw_actions’
rdma-core-59.0/providers/mlx5/dr_action.c:2226:12: enter_function: entry to ‘dr_action_create_modify_action’
rdma-core-59.0/providers/mlx5/dr_action.c:2237:12: branch_false: following ‘false’ branch (when ‘num_sw_actions != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2243:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2243:22: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2244:12: branch_false: following ‘false’ branch (when ‘hw_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2249:15: call_function: calling ‘dr_actions_convert_modify_header’ from ‘dr_action_create_modify_action’
# 1930|   	}
# 1931|   
# 1932|-> 	dr_ste_set_action_copy(dmn->ste_ctx,
# 1933|   			       hw_action,
# 1934|   			       dst_hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def698]
rdma-core-59.0/providers/mlx5/dr_action.c:1932:9: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2739:1: enter_function: entry to ‘dr_action_create_sampler_restore_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2790:17: call_function: calling ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_sampler_restore_tbl’
# 1930|   	}
# 1931|   
# 1932|-> 	dr_ste_set_action_copy(dmn->ste_ctx,
# 1933|   			       hw_action,
# 1934|   			       dst_hw_action_info->hw_field,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def699]
rdma-core-59.0/providers/mlx5/dr_action.c:2215:23: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(9)’
rdma-core-59.0/providers/mlx5/dr_action.c:2280:1: enter_function: entry to ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2290:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2295:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2295:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2301:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: return_function: returning to ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2309:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2312:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2315:12: branch_true: following ‘true’ branch (when ‘flags != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2316:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2317:23: call_function: calling ‘dr_action_create_modify_action_root’ from ‘mlx5dv_dr_action_create_modify_header’
# 2213|   		type = MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB;
# 2214|   
# 2215|-> 	flow_action = mlx5dv_create_flow_action_modify_header(dmn->ctx,
# 2216|   							      actions_sz,
# 2217|   							      (__force uint64_t *)actions,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def700]
rdma-core-59.0/providers/mlx5/dr_action.c:2268:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_action.c:2280:1: enter_function: entry to ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2290:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2295:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2295:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2301:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: return_function: returning to ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2309:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2312:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2315:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2322:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2323:23: call_function: calling ‘dr_action_create_modify_action’ from ‘mlx5dv_dr_action_create_modify_header’
# 2266|   	}
# 2267|   
# 2268|-> 	ret = dr_ste_alloc_modify_hdr(action);
# 2269|   	if (ret)
# 2270|   		goto free_hw_actions;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def701]
rdma-core-59.0/providers/mlx5/dr_action.c:2268:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(9)’
rdma-core-59.0/providers/mlx5/dr_action.c:2280:1: enter_function: entry to ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2290:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2295:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2295:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2301:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_modify_header’
rdma-core-59.0/providers/mlx5/dr_action.c:2308:18: return_function: returning to ‘mlx5dv_dr_action_create_modify_header’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2309:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2312:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2315:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2322:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2323:23: call_function: calling ‘dr_action_create_modify_action’ from ‘mlx5dv_dr_action_create_modify_header’
# 2266|   	}
# 2267|   
# 2268|-> 	ret = dr_ste_alloc_modify_hdr(action);
# 2269|   	if (ret)
# 2270|   		goto free_hw_actions;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def702]
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: warning[-Wanalyzer-malloc-leak]: leak of ‘dest_info’
rdma-core-59.0/providers/mlx5/dr_action.c:2578:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2580:12: branch_false: following ‘false’ branch (when ‘dest_info’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2585:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2586:12: branch_false: following ‘false’ branch (when ‘term_tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2591:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2593:12: branch_false: following ‘false’ branch (when ‘ref_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2598:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2603:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: danger: ‘dest_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/0)
# 2642|   	}
# 2643|   
# 2644|-> 	term_tbl->devx_tbl = dr_devx_create_always_hit_ft(dmn->ctx, &ft_attr,
# 2645|   							  &fg_attr, &fte_attr);
# 2646|   	if (!term_tbl->devx_tbl)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def703]
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2642|   	}
# 2643|   
# 2644|-> 	term_tbl->devx_tbl = dr_devx_create_always_hit_ft(dmn->ctx, &ft_attr,
# 2645|   							  &fg_attr, &fte_attr);
# 2646|   	if (!term_tbl->devx_tbl)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def704]
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: warning[-Wanalyzer-malloc-leak]: leak of ‘ref_actions’
rdma-core-59.0/providers/mlx5/dr_action.c:2580:12: branch_false: following ‘false’ branch (when ‘dest_info’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2585:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2586:12: branch_false: following ‘false’ branch (when ‘term_tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2591:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2591:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2593:12: branch_false: following ‘false’ branch (when ‘ref_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2598:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2603:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: danger: ‘ref_actions’ leaks here; was allocated at [(5)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/4)
# 2642|   	}
# 2643|   
# 2644|-> 	term_tbl->devx_tbl = dr_devx_create_always_hit_ft(dmn->ctx, &ft_attr,
# 2645|   							  &fg_attr, &fte_attr);
# 2646|   	if (!term_tbl->devx_tbl)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def705]
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: warning[-Wanalyzer-malloc-leak]: leak of ‘term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2580:12: branch_false: following ‘false’ branch (when ‘dest_info’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2585:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2585:20: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2586:12: branch_false: following ‘false’ branch (when ‘term_tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2591:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2593:12: branch_false: following ‘false’ branch (when ‘ref_actions’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2598:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2603:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2644:30: danger: ‘term_tbl’ leaks here; was allocated at [(3)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/2)
# 2642|   	}
# 2643|   
# 2644|-> 	term_tbl->devx_tbl = dr_devx_create_always_hit_ft(dmn->ctx, &ft_attr,
# 2645|   							  &fg_attr, &fte_attr);
# 2646|   	if (!term_tbl->devx_tbl)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def706]
rdma-core-59.0/providers/mlx5/dr_action.c:2672:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2883:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2909:9: call_function: calling ‘dr_action_destroy_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2670|   	uint32_t i;
# 2671|   
# 2672|-> 	dr_devx_destroy_always_hit_ft(term_tbl->devx_tbl);
# 2673|   
# 2674|   	for (i = 0; i < term_tbl->ref_actions_num; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def707]
rdma-core-59.0/providers/mlx5/dr_action.c:2672:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2883:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2909:9: call_function: calling ‘dr_action_destroy_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2670|   	uint32_t i;
# 2671|   
# 2672|-> 	dr_devx_destroy_always_hit_ft(term_tbl->devx_tbl);
# 2673|   
# 2674|   	for (i = 0; i < term_tbl->ref_actions_num; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def708]
rdma-core-59.0/providers/mlx5/dr_action.c:2708:29: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2706|   	sampler_attr.default_next_table_id = sampler->next_ft->devx_obj->object_id;
# 2707|   
# 2708|-> 	sampler->devx_obj = dr_devx_create_flow_sampler(dmn->ctx, &sampler_attr);
# 2709|   	if (!sampler->devx_obj)
# 2710|   		goto dec_next_ft_ref;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def709]
rdma-core-59.0/providers/mlx5/dr_action.c:2708:29: warning[-Wanalyzer-malloc-leak]: leak of ‘sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2691:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2692:12: branch_false: following ‘false’ branch (when ‘sampler’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2697:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2708:29: danger: ‘sampler’ leaks here; was allocated at [(1)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/0)
# 2706|   	sampler_attr.default_next_table_id = sampler->next_ft->devx_obj->object_id;
# 2707|   
# 2708|-> 	sampler->devx_obj = dr_devx_create_flow_sampler(dmn->ctx, &sampler_attr);
# 2709|   	if (!sampler->devx_obj)
# 2710|   		goto dec_next_ft_ref;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def710]
rdma-core-59.0/providers/mlx5/dr_action.c:2712:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2710|   		goto dec_next_ft_ref;
# 2711|   
# 2712|-> 	ret = dr_devx_query_flow_sampler(sampler->devx_obj, &icm_rx, &icm_tx);
# 2713|   	if (ret)
# 2714|   		goto destroy_sampler_dvo;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def711]
rdma-core-59.0/providers/mlx5/dr_action.c:2712:15: warning[-Wanalyzer-malloc-leak]: leak of ‘sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2691:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2692:12: branch_false: following ‘false’ branch (when ‘sampler’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2697:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2709:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2712:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2712:15: danger: ‘sampler’ leaks here; was allocated at [(1)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/0)
# 2710|   		goto dec_next_ft_ref;
# 2711|   
# 2712|-> 	ret = dr_devx_query_flow_sampler(sampler->devx_obj, &icm_rx, &icm_tx);
# 2713|   	if (ret)
# 2714|   		goto destroy_sampler_dvo;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def712]
rdma-core-59.0/providers/mlx5/dr_action.c:2722:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2720|   
# 2721|   destroy_sampler_dvo:
# 2722|-> 	mlx5dv_devx_obj_destroy(sampler->devx_obj);
# 2723|   dec_next_ft_ref:
# 2724|   	atomic_fetch_sub(&sampler->next_ft->refcount, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def713]
rdma-core-59.0/providers/mlx5/dr_action.c:2722:9: warning[-Wanalyzer-malloc-leak]: leak of ‘sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2691:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2692:12: branch_false: following ‘false’ branch (when ‘sampler’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2697:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2709:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2712:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2713:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2714:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2722:9: danger: ‘sampler’ leaks here; was allocated at [(1)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/0)
# 2720|   
# 2721|   destroy_sampler_dvo:
# 2722|-> 	mlx5dv_devx_obj_destroy(sampler->devx_obj);
# 2723|   dec_next_ft_ref:
# 2724|   	atomic_fetch_sub(&sampler->next_ft->refcount, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def714]
rdma-core-59.0/providers/mlx5/dr_action.c:2773:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2771|   	}
# 2772|   
# 2773|-> 	restore->tbl = mlx5dv_dr_table_create(dmn, attr->default_next_table->level - 1);
# 2774|   	if (!restore->tbl)
# 2775|   		goto free_restore;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def715]
rdma-core-59.0/providers/mlx5/dr_action.c:2773:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2771|   	}
# 2772|   
# 2773|-> 	restore->tbl = mlx5dv_dr_table_create(dmn, attr->default_next_table->level - 1);
# 2774|   	if (!restore->tbl)
# 2775|   		goto free_restore;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def716]
rdma-core-59.0/providers/mlx5/dr_action.c:2773:24: warning[-Wanalyzer-malloc-leak]: leak of ‘mask’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2773:24: danger: ‘mask’ leaks here; was allocated at [(3)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/2)
# 2771|   	}
# 2772|   
# 2773|-> 	restore->tbl = mlx5dv_dr_table_create(dmn, attr->default_next_table->level - 1);
# 2774|   	if (!restore->tbl)
# 2775|   		goto free_restore;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def717]
rdma-core-59.0/providers/mlx5/dr_action.c:2773:24: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2773:24: danger: ‘restore’ leaks here; was allocated at [(5)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/4)
# 2771|   	}
# 2772|   
# 2773|-> 	restore->tbl = mlx5dv_dr_table_create(dmn, attr->default_next_table->level - 1);
# 2774|   	if (!restore->tbl)
# 2775|   		goto free_restore;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def718]
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2775|   		goto free_restore;
# 2776|   
# 2777|-> 	restore->matcher = mlx5dv_dr_matcher_create(restore->tbl, 0, 0, mask);
# 2778|   	if (!restore->matcher)
# 2779|   		goto destroy_restore_tbl;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def719]
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: warning[-Wanalyzer-malloc-leak]: leak of ‘dr_action_create_generic(13)’
rdma-core-59.0/providers/mlx5/dr_action.c:2843:1: enter_function: entry to ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2850:12: branch_false: following ‘false’ branch (when ‘dmn’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2851:42: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2852:38: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2850:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2857:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2857:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2863:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2869:18: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:2870:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2873:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: call_function: calling ‘dr_action_create_sampler_term_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2875:36: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler_term_tbl’
rdma-core-59.0/providers/mlx5/dr_action.c:2876:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: call_function: calling ‘dr_action_create_sampler’ from ‘mlx5dv_dr_action_create_flow_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2879:43: return_function: returning to ‘mlx5dv_dr_action_create_flow_sampler’ from ‘dr_action_create_sampler’
rdma-core-59.0/providers/mlx5/dr_action.c:2882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2885:12: branch_true: following ‘true’ branch (when ‘restore != 0’)...
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2888:47: call_function: calling ‘dr_action_create_sampler_restore_tbl’ from ‘mlx5dv_dr_action_create_flow_sampler’
# 2775|   		goto free_restore;
# 2776|   
# 2777|-> 	restore->matcher = mlx5dv_dr_matcher_create(restore->tbl, 0, 0, mask);
# 2778|   	if (!restore->matcher)
# 2779|   		goto destroy_restore_tbl;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def720]
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: warning[-Wanalyzer-malloc-leak]: leak of ‘mask’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: danger: ‘mask’ leaks here; was allocated at [(3)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/2)
# 2775|   		goto free_restore;
# 2776|   
# 2777|-> 	restore->matcher = mlx5dv_dr_matcher_create(restore->tbl, 0, 0, mask);
# 2778|   	if (!restore->matcher)
# 2779|   		goto destroy_restore_tbl;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def721]
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: danger: ‘restore’ leaks here; was allocated at [(5)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/4)
# 2775|   		goto free_restore;
# 2776|   
# 2777|-> 	restore->matcher = mlx5dv_dr_matcher_create(restore->tbl, 0, 0, mask);
# 2778|   	if (!restore->matcher)
# 2779|   		goto destroy_restore_tbl;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def722]
rdma-core-59.0/providers/mlx5/dr_action.c:2817:9: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2781:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2784:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2785:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2817:9: danger: ‘restore’ leaks here; was allocated at [(5)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/4)
# 2815|   	free(restore->actions);
# 2816|   destroy_restore_matcher:
# 2817|-> 	mlx5dv_dr_matcher_destroy(restore->matcher);
# 2818|   destroy_restore_tbl:
# 2819|   	mlx5dv_dr_table_destroy(restore->tbl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def723]
rdma-core-59.0/providers/mlx5/dr_action.c:2819:9: warning[-Wanalyzer-malloc-leak]: leak of ‘restore’
rdma-core-59.0/providers/mlx5/dr_action.c:2752:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2760:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2761:12: branch_false: following ‘false’ branch (when ‘mask’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2765:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2767:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2768:12: branch_false: following ‘false’ branch (when ‘restore’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_action.c:2773:52: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2774:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2777:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2778:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:2779:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2819:9: danger: ‘restore’ leaks here; was allocated at [(5)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/4)
# 2817|   	mlx5dv_dr_matcher_destroy(restore->matcher);
# 2818|   destroy_restore_tbl:
# 2819|-> 	mlx5dv_dr_table_destroy(restore->tbl);
# 2820|   free_restore:
# 2821|   	free(restore);

Error: GCC_ANALYZER_WARNING (CWE-416): [#def724]
rdma-core-59.0/providers/mlx5/dr_action.c:2942:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘tmp’
rdma-core-59.0/providers/mlx5/dr_action.c:3053:1: enter_function: entry to ‘mlx5dv_dr_action_create_dest_array’
rdma-core-59.0/providers/mlx5/dr_action.c:3059:12: branch_false: following ‘false’ branch (when ‘num_dest > 1’)...
rdma-core-59.0/providers/mlx5/dr_action.c:3064:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:3066:18: call_function: calling ‘dr_action_create_generic’ from ‘mlx5dv_dr_action_create_dest_array’
rdma-core-59.0/providers/mlx5/dr_action.c:3066:18: return_function: returning to ‘mlx5dv_dr_action_create_dest_array’ from ‘dr_action_create_generic’
rdma-core-59.0/providers/mlx5/dr_action.c:3067:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:3070:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:3073:13: call_function: calling ‘dr_action_create_dest_array_tbl’ from ‘mlx5dv_dr_action_create_dest_array’
# 2940|   	struct dr_rule_action_member *tmp;
# 2941|   
# 2942|-> 	list_for_each_safe(ref_list, action_mem, tmp, list) {
# 2943|   		list_del(&action_mem->list);
# 2944|   		atomic_fetch_sub(&action_mem->action->refcount, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def725]
rdma-core-59.0/providers/mlx5/dr_action.c:3026:39: warning[-Wanalyzer-malloc-leak]: leak of ‘fte_attr.dest_arr’
rdma-core-59.0/providers/mlx5/dr_action.c:2975:29: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_action.c:2976:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:2981:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_action.c:3026:39: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_action.c:3026:39: danger: ‘fte_attr.dest_arr’ leaks here; was allocated at [(3)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/2)
# 3024|   	}
# 3025|   
# 3026|-> 	action->dest_array.devx_tbl = dr_devx_create_always_hit_ft(dmn->ctx,
# 3027|   								   &ft_attr,
# 3028|   								   &fg_attr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def726]
rdma-core-59.0/providers/mlx5/dr_arg.c:61:20: warning[-Wanalyzer-malloc-leak]: leak of ‘pool_mngr’
rdma-core-59.0/providers/mlx5/dr_arg.c:233:1: enter_function: entry to ‘dr_arg_mngr_create’
rdma-core-59.0/providers/mlx5/dr_arg.c:238:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_arg.c:241:21: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_arg.c:241:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_arg.c:242:12: branch_false: following ‘false’ branch (when ‘pool_mngr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_arg.c:247:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_arg.c:249:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
rdma-core-59.0/providers/mlx5/dr_arg.c:250:39: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_arg.c:250:39: call_function: calling ‘dr_arg_pool_create’ from ‘dr_arg_mngr_create’
#   59|   	num_of_objects = (1 << (object_range - pool->log_chunk_size));
#   60|   	/* Only one devx object per range */
#   61|-> 	devx_obj = dr_devx_create_modify_header_arg(pool->dmn->ctx,
#   62|   						    object_range,
#   63|   						    pool->dmn->pd_num);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def727]
rdma-core-59.0/providers/mlx5/dr_arg.c:71:27: warning[-Wanalyzer-malloc-leak]: leak of ‘arg_obj’
rdma-core-59.0/providers/mlx5/dr_arg.c:97:27: enter_function: entry to ‘dr_arg_pool_get_arg_obj’
rdma-core-59.0/providers/mlx5/dr_arg.c:103:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_arg.c:104:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_arg.c:104:23: call_function: calling ‘dr_arg_pool_alloc_objs’ from ‘dr_arg_pool_get_arg_obj’
#   69|   
#   70|   	for (i = 0; i < num_of_objects; i++) {
#   71|-> 		arg_obj = calloc(1, sizeof(struct dr_arg_obj));
#   72|   		if (!arg_obj) {
#   73|   			errno = ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def728]
rdma-core-59.0/providers/mlx5/dr_arg.c:89:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pool_mngr’
rdma-core-59.0/providers/mlx5/dr_arg.c:233:1: enter_function: entry to ‘dr_arg_mngr_create’
rdma-core-59.0/providers/mlx5/dr_arg.c:238:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_arg.c:241:21: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_arg.c:241:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_arg.c:242:12: branch_false: following ‘false’ branch (when ‘pool_mngr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_arg.c:247:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_arg.c:249:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
rdma-core-59.0/providers/mlx5/dr_arg.c:250:39: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_arg.c:250:39: call_function: calling ‘dr_arg_pool_create’ from ‘dr_arg_mngr_create’
#   87|   
#   88|   clean_arg_obj:
#   89|-> 	mlx5dv_devx_obj_destroy(devx_obj);
#   90|   	list_for_each_safe(&cur_list, arg_obj, tmp_arg, list_node) {
#   91|   		list_del(&arg_obj->list_node);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def729]
rdma-core-59.0/providers/mlx5/dr_devx.c:138:15: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
rdma-core-59.0/providers/mlx5/dr_devx.c:117:12: enter_function: entry to ‘dr_devx_query_esw_func’
rdma-core-59.0/providers/mlx5/dr_devx.c:129:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:130:12: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:135:9: call_function: inlined call to ‘_devx_set’ from ‘dr_devx_query_esw_func’
rdma-core-59.0/providers/mlx5/dr_devx.c:138:15: danger: ‘out’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#  136|   		 MLX5_CMD_OP_QUERY_ESW_FUNCTIONS);
#  137|   
#  138|-> 	err = mlx5dv_devx_general_cmd(ctx, in, sizeof(in), out, outsz);
#  139|   	if (err) {
#  140|   		err = mlx5_get_cmd_status_err(err, out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def730]
rdma-core-59.0/providers/mlx5/dr_devx.c:537:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_devx.c:727:1: enter_function: entry to ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:737:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:738:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: call_function: calling ‘dr_devx_create_flow_table’ from ‘dr_devx_create_always_hit_ft’
#  535|   	}
#  536|   
#  537|-> 	obj = mlx5dv_devx_obj_create(ctx, in, sizeof(in), out, sizeof(out));
#  538|   	if (!obj)
#  539|   		errno = mlx5_get_cmd_status_err(errno, out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def731]
rdma-core-59.0/providers/mlx5/dr_devx.c:539:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_devx.c:727:1: enter_function: entry to ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:737:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:738:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: call_function: calling ‘dr_devx_create_flow_table’ from ‘dr_devx_create_always_hit_ft’
#  537|   	obj = mlx5dv_devx_obj_create(ctx, in, sizeof(in), out, sizeof(out));
#  538|   	if (!obj)
#  539|-> 		errno = mlx5_get_cmd_status_err(errno, out);
#  540|   	return obj;
#  541|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def732]
rdma-core-59.0/providers/mlx5/dr_devx.c:606:15: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/dr_devx.c:588:1: enter_function: entry to ‘dr_devx_create_flow_group’
rdma-core-59.0/providers/mlx5/dr_devx.c:596:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:597:12: branch_false: following ‘false’ branch (when ‘in’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:602:9: call_function: inlined call to ‘_devx_set’ from ‘dr_devx_create_flow_group’
rdma-core-59.0/providers/mlx5/dr_devx.c:606:15: danger: ‘in’ leaks here; was allocated at [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1)
#  604|   	DEVX_SET(create_flow_group_in, in, table_id, fg_attr->table_id);
#  605|   
#  606|-> 	obj = mlx5dv_devx_obj_create(ctx, in, inlen, out, sizeof(out));
#  607|   	if (!obj)
#  608|   		errno = mlx5_get_cmd_status_err(errno, out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def733]
rdma-core-59.0/providers/mlx5/dr_devx.c:606:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_devx.c:727:1: enter_function: entry to ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:737:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:738:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:744:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:747:29: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: call_function: calling ‘dr_devx_create_flow_group’ from ‘dr_devx_create_always_hit_ft’
#  604|   	DEVX_SET(create_flow_group_in, in, table_id, fg_attr->table_id);
#  605|   
#  606|-> 	obj = mlx5dv_devx_obj_create(ctx, in, inlen, out, sizeof(out));
#  607|   	if (!obj)
#  608|   		errno = mlx5_get_cmd_status_err(errno, out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def734]
rdma-core-59.0/providers/mlx5/dr_devx.c:608:25: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/dr_devx.c:588:1: enter_function: entry to ‘dr_devx_create_flow_group’
rdma-core-59.0/providers/mlx5/dr_devx.c:596:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:597:12: branch_false: following ‘false’ branch (when ‘in’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:602:9: call_function: inlined call to ‘_devx_set’ from ‘dr_devx_create_flow_group’
rdma-core-59.0/providers/mlx5/dr_devx.c:607:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:608:49: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:608:25: danger: ‘in’ leaks here; was allocated at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  606|   	obj = mlx5dv_devx_obj_create(ctx, in, inlen, out, sizeof(out));
#  607|   	if (!obj)
#  608|-> 		errno = mlx5_get_cmd_status_err(errno, out);
#  609|   
#  610|   	free(in);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def735]
rdma-core-59.0/providers/mlx5/dr_devx.c:608:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_devx.c:727:1: enter_function: entry to ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:737:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:738:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:744:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:747:29: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: call_function: calling ‘dr_devx_create_flow_group’ from ‘dr_devx_create_always_hit_ft’
#  606|   	obj = mlx5dv_devx_obj_create(ctx, in, inlen, out, sizeof(out));
#  607|   	if (!obj)
#  608|-> 		errno = mlx5_get_cmd_status_err(errno, out);
#  609|   
#  610|   	free(in);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def736]
rdma-core-59.0/providers/mlx5/dr_devx.c:714:15: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/dr_devx.c:616:1: enter_function: entry to ‘dr_devx_set_fte’
rdma-core-59.0/providers/mlx5/dr_devx.c:634:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:635:12: branch_false: following ‘false’ branch (when ‘in’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:640:9: call_function: inlined call to ‘_devx_set’ from ‘dr_devx_set_fte’
rdma-core-59.0/providers/mlx5/dr_devx.c:714:15: danger: ‘in’ leaks here; was allocated at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
#  712|   	}
#  713|   
#  714|-> 	obj = mlx5dv_devx_obj_create(ctx, in, inlen, out, sizeof(out));
#  715|   	if (!obj)
#  716|   		errno = mlx5_get_cmd_status_err(errno, out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def737]
rdma-core-59.0/providers/mlx5/dr_devx.c:714:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_devx.c:727:1: enter_function: entry to ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:737:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:738:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:744:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:747:29: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: call_function: calling ‘dr_devx_create_flow_group’ from ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: return_function: returning to ‘dr_devx_create_always_hit_ft’ from ‘dr_devx_create_flow_group’
rdma-core-59.0/providers/mlx5/dr_devx.c:750:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:753:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:756:19: call_function: calling ‘dr_devx_set_fte’ from ‘dr_devx_create_always_hit_ft’
#  712|   	}
#  713|   
#  714|-> 	obj = mlx5dv_devx_obj_create(ctx, in, inlen, out, sizeof(out));
#  715|   	if (!obj)
#  716|   		errno = mlx5_get_cmd_status_err(errno, out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def738]
rdma-core-59.0/providers/mlx5/dr_devx.c:716:25: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/dr_devx.c:616:1: enter_function: entry to ‘dr_devx_set_fte’
rdma-core-59.0/providers/mlx5/dr_devx.c:634:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:635:12: branch_false: following ‘false’ branch (when ‘in’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:640:9: call_function: inlined call to ‘_devx_set’ from ‘dr_devx_set_fte’
rdma-core-59.0/providers/mlx5/dr_devx.c:715:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:716:49: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:716:25: danger: ‘in’ leaks here; was allocated at [(2)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/1)
#  714|   	obj = mlx5dv_devx_obj_create(ctx, in, inlen, out, sizeof(out));
#  715|   	if (!obj)
#  716|-> 		errno = mlx5_get_cmd_status_err(errno, out);
#  717|   
#  718|   	free(in);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def739]
rdma-core-59.0/providers/mlx5/dr_devx.c:716:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_devx.c:727:1: enter_function: entry to ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:737:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:738:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:744:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:747:29: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: call_function: calling ‘dr_devx_create_flow_group’ from ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: return_function: returning to ‘dr_devx_create_always_hit_ft’ from ‘dr_devx_create_flow_group’
rdma-core-59.0/providers/mlx5/dr_devx.c:750:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:753:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:756:19: call_function: calling ‘dr_devx_set_fte’ from ‘dr_devx_create_always_hit_ft’
#  714|   	obj = mlx5dv_devx_obj_create(ctx, in, inlen, out, sizeof(out));
#  715|   	if (!obj)
#  716|-> 		errno = mlx5_get_cmd_status_err(errno, out);
#  717|   
#  718|   	free(in);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def740]
rdma-core-59.0/providers/mlx5/dr_devx.c:769:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_devx.c:727:1: enter_function: entry to ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:737:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:738:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:744:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:747:29: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: call_function: calling ‘dr_devx_create_flow_group’ from ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: return_function: returning to ‘dr_devx_create_always_hit_ft’ from ‘dr_devx_create_flow_group’
rdma-core-59.0/providers/mlx5/dr_devx.c:750:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:753:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:756:19: call_function: calling ‘dr_devx_set_fte’ from ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:756:19: return_function: returning to ‘dr_devx_create_always_hit_ft’ from ‘dr_devx_set_fte’
rdma-core-59.0/providers/mlx5/dr_devx.c:757:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:758:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:769:9: danger: ‘tbl’ leaks here; was allocated at [(2)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/1)
#  767|   
#  768|   free_fg_dvo:
#  769|-> 	mlx5dv_devx_obj_destroy(fg_dvo);
#  770|   free_ft_dvo:
#  771|   	mlx5dv_devx_obj_destroy(ft_dvo);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def741]
rdma-core-59.0/providers/mlx5/dr_devx.c:771:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_devx.c:727:1: enter_function: entry to ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:737:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:738:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:743:18: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:744:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:747:29: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: call_function: calling ‘dr_devx_create_flow_group’ from ‘dr_devx_create_always_hit_ft’
rdma-core-59.0/providers/mlx5/dr_devx.c:749:18: return_function: returning to ‘dr_devx_create_always_hit_ft’ from ‘dr_devx_create_flow_group’
rdma-core-59.0/providers/mlx5/dr_devx.c:750:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:751:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:771:9: danger: ‘tbl’ leaks here; was allocated at [(2)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/1)
#  769|   	mlx5dv_devx_obj_destroy(fg_dvo);
#  770|   free_ft_dvo:
#  771|-> 	mlx5dv_devx_obj_destroy(ft_dvo);
#  772|   free_tbl:
#  773|   	free(tbl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def742]
rdma-core-59.0/providers/mlx5/dr_devx.c:906:15: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/dr_devx.c:874:25: enter_function: entry to ‘dr_devx_create_reformat_ctx’
rdma-core-59.0/providers/mlx5/dr_devx.c:890:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:891:12: branch_false: following ‘false’ branch (when ‘in’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:896:9: call_function: inlined call to ‘_devx_set’ from ‘dr_devx_create_reformat_ctx’
rdma-core-59.0/providers/mlx5/dr_devx.c:906:15: danger: ‘in’ leaks here; was allocated at [(2)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/1)
#  904|   	memcpy(pdata, reformat_data, reformat_size);
#  905|   
#  906|-> 	obj = mlx5dv_devx_obj_create(ctx, in, insz, out, sizeof(out));
#  907|   	if (!obj)
#  908|   		errno = mlx5_get_cmd_status_err(errno, out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def743]
rdma-core-59.0/providers/mlx5/dr_devx.c:908:25: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/dr_devx.c:874:25: enter_function: entry to ‘dr_devx_create_reformat_ctx’
rdma-core-59.0/providers/mlx5/dr_devx.c:890:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_devx.c:891:12: branch_false: following ‘false’ branch (when ‘in’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_devx.c:896:9: call_function: inlined call to ‘_devx_set’ from ‘dr_devx_create_reformat_ctx’
rdma-core-59.0/providers/mlx5/dr_devx.c:907:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_devx.c:908:49: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_devx.c:908:25: danger: ‘in’ leaks here; was allocated at [(2)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/1)
#  906|   	obj = mlx5dv_devx_obj_create(ctx, in, insz, out, sizeof(out));
#  907|   	if (!obj)
#  908|-> 		errno = mlx5_get_cmd_status_err(errno, out);
#  909|   	free(in);
#  910|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def744]
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:101:22: warning[-Wanalyzer-malloc-leak]: leak of ‘icm_mr’
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:427:12: enter_function: entry to ‘dr_icm_handle_buddies_get_mem’
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:439:16: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:440:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:456:23: call_function: calling ‘dr_icm_buddy_create’ from ‘dr_icm_handle_buddies_get_mem’
#   99|   
#  100|   alloc_dm:
#  101|-> 	icm_mr->dm = mlx5dv_alloc_dm(pool->dmn->ctx, dm_attr, &mlx5_dm_attr);
#  102|   	if (!icm_mr->dm) {
#  103|   		dr_dbg(pool->dmn, "Failed allocating DM\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def745]
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘icm_mr’
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:427:12: enter_function: entry to ‘dr_icm_handle_buddies_get_mem’
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:439:16: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:440:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:456:23: call_function: calling ‘dr_icm_buddy_create’ from ‘dr_icm_handle_buddies_get_mem’
#  127|   		}
#  128|   
#  129|-> 		mlx5_free_dm(icm_mr->dm);
#  130|   		/* retry to allocate, now double the size */
#  131|   		dm_attr->length = size * 2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def746]
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:170:9: warning[-Wanalyzer-malloc-leak]: leak of ‘icm_mr’
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:427:12: enter_function: entry to ‘dr_icm_handle_buddies_get_mem’
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:439:16: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:440:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:456:23: call_function: calling ‘dr_icm_buddy_create’ from ‘dr_icm_handle_buddies_get_mem’
#  168|   
#  169|   free_dm:
#  170|-> 	mlx5_free_dm(icm_mr->dm);
#  171|   free_icm_mr:
#  172|   	free(icm_mr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def747]
rdma-core-59.0/providers/mlx5/dr_matcher.c:773:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1466:1: enter_function: entry to ‘mlx5dv_dr_matcher_create’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1476:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_matcher.c:1477:12: branch_false: following ‘false’ branch (when ‘matcher’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_matcher.c:1482:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_matcher.c:1489:9: call_function: calling ‘dr_domain_lock’ from ‘mlx5dv_dr_matcher_create’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1489:9: return_function: returning to ‘mlx5dv_dr_matcher_create’ from ‘dr_domain_lock’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1491:15: call_function: calling ‘dr_matcher_init’ from ‘mlx5dv_dr_matcher_create’
#  771|   	int ret;
#  772|   
#  773|-> 	ret = dr_ste_build_pre_check(dmn, matcher->match_criteria,
#  774|   				     &matcher->mask, NULL);
#  775|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def748]
rdma-core-59.0/providers/mlx5/dr_matcher.c:1271:31: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1466:1: enter_function: entry to ‘mlx5dv_dr_matcher_create’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1476:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_matcher.c:1477:12: branch_false: following ‘false’ branch (when ‘matcher’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_matcher.c:1482:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_matcher.c:1489:9: call_function: calling ‘dr_domain_lock’ from ‘mlx5dv_dr_matcher_create’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1489:9: return_function: returning to ‘mlx5dv_dr_matcher_create’ from ‘dr_domain_lock’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1491:15: call_function: calling ‘dr_matcher_init’ from ‘mlx5dv_dr_matcher_create’
# 1269|   	attr.comp_mask = MLX5DV_FLOW_MATCHER_MASK_FT_TYPE;
# 1270|   
# 1271|-> 	matcher->dv_matcher = mlx5dv_create_flow_matcher(dmn->ctx, &attr);
# 1272|   	if (!matcher->dv_matcher)
# 1273|   		return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def749]
rdma-core-59.0/providers/mlx5/dr_matcher.c:1313:17: warning[-Wanalyzer-malloc-leak]: leak of ‘consumed_mask_buf’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1466:1: enter_function: entry to ‘mlx5dv_dr_matcher_create’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1477:12: branch_false: following ‘false’ branch (when ‘matcher’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_matcher.c:1482:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_matcher.c:1489:9: call_function: calling ‘dr_domain_lock’ from ‘mlx5dv_dr_matcher_create’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1489:9: return_function: returning to ‘mlx5dv_dr_matcher_create’ from ‘dr_domain_lock’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1491:15: call_function: calling ‘dr_matcher_init’ from ‘mlx5dv_dr_matcher_create’
# 1311|   
# 1312|   		memcpy(consumed_mask_buf, mask->match_buf, mask->match_sz);
# 1313|-> 		dr_ste_copy_param(match_criteria, &matcher->mask,
# 1314|   				  consumed_mask_buf, max_mask_sz, true);
# 1315|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def750]
rdma-core-59.0/providers/mlx5/dr_matcher.c:1313:17: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1466:1: enter_function: entry to ‘mlx5dv_dr_matcher_create’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1476:19: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_matcher.c:1477:12: branch_false: following ‘false’ branch (when ‘matcher’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_matcher.c:1482:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_matcher.c:1489:9: call_function: calling ‘dr_domain_lock’ from ‘mlx5dv_dr_matcher_create’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1489:9: return_function: returning to ‘mlx5dv_dr_matcher_create’ from ‘dr_domain_lock’
rdma-core-59.0/providers/mlx5/dr_matcher.c:1491:15: call_function: calling ‘dr_matcher_init’ from ‘mlx5dv_dr_matcher_create’
# 1311|   
# 1312|   		memcpy(consumed_mask_buf, mask->match_buf, mask->match_sz);
# 1313|-> 		dr_ste_copy_param(match_criteria, &matcher->mask,
# 1314|   				  consumed_mask_buf, max_mask_sz, true);
# 1315|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def751]
rdma-core-59.0/providers/mlx5/dr_ptrn.c:249:31: warning[-Wanalyzer-malloc-leak]: leak of ‘mngr’
rdma-core-59.0/providers/mlx5/dr_ptrn.c:239:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ptrn.c:242:16: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ptrn.c:242:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ptrn.c:243:12: branch_false: following ‘false’ branch (when ‘mngr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ptrn.c:248:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ptrn.c:249:31: danger: ‘mngr’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  247|   
#  248|   	mngr->dmn = dmn;
#  249|-> 	mngr->ptrn_icm_pool = dr_icm_pool_create(dmn, DR_ICM_TYPE_MODIFY_HDR_PTRN);
#  250|   	if (!mngr->ptrn_icm_pool) {
#  251|   		dr_dbg(dmn, "Couldn't get modify-header-pattern memory for %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def752]
rdma-core-59.0/providers/mlx5/dr_ptrn.c:251:17: warning[-Wanalyzer-malloc-leak]: leak of ‘mngr’
rdma-core-59.0/providers/mlx5/dr_ptrn.c:239:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ptrn.c:242:16: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ptrn.c:242:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ptrn.c:243:12: branch_false: following ‘false’ branch (when ‘mngr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ptrn.c:248:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ptrn.c:250:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ptrn.c:251:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ptrn.c:251:17: danger: ‘mngr’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  249|   	mngr->ptrn_icm_pool = dr_icm_pool_create(dmn, DR_ICM_TYPE_MODIFY_HDR_PTRN);
#  250|   	if (!mngr->ptrn_icm_pool) {
#  251|-> 		dr_dbg(dmn, "Couldn't get modify-header-pattern memory for %s\n",
#  252|   		       ibv_get_device_name(dmn->ctx->device));
#  253|   		goto free_mngr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def753]
rdma-core-59.0/providers/mlx5/dr_rule.c:58:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_last’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#   56|   	}
#   57|   
#   58|-> 	dr_ste_set_miss_addr(ste_ctx,
#   59|   			     last_ste->hw_ste,
#   60|   			     dr_ste_get_icm_addr(new_last_ste));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def754]
rdma-core-59.0/providers/mlx5/dr_rule.c:58:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#   56|   	}
#   57|   
#   58|-> 	dr_ste_set_miss_addr(ste_ctx,
#   59|   			     last_ste->hw_ste,
#   60|   			     dr_ste_get_icm_addr(new_last_ste));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def755]
rdma-core-59.0/providers/mlx5/dr_rule.c:64:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_last’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#   62|   	list_add_tail(miss_list, &new_last_ste->miss_list_node);
#   63|   
#   64|-> 	dr_send_fill_and_append_ste_send_info(last_ste, DR_STE_SIZE_CTRL,
#   65|   					      0, last_ste->hw_ste,
#   66|   					      ste_info_last, send_list, true);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def756]
rdma-core-59.0/providers/mlx5/dr_rule.c:82:20: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#   80|   
#   81|   	/* Create new table for miss entry */
#   82|-> 	new_htbl = dr_ste_htbl_alloc(dmn->ste_icm_pool,
#   83|   				     DR_CHUNK_SIZE_1,
#   84|   				     nic_matcher->ste_builder->htbl_type,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def757]
rdma-core-59.0/providers/mlx5/dr_rule.c:94:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#   92|   	/* One and only entry, never grows */
#   93|   	ste = new_htbl->ste_arr;
#   94|-> 	dr_ste_set_miss_addr(ste_ctx, hw_ste,
#   95|   			     dr_icm_pool_get_chunk_icm_addr(nic_matcher->e_anchor->chunk));
#   96|   	dr_htbl_get(new_htbl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def758]
rdma-core-59.0/providers/mlx5/dr_rule.c:119:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  117|   
#  118|   	/* In collision entry, all members share the same miss_list_head */
#  119|-> 	ste->htbl->miss_list = dr_ste_get_miss_list(orig_ste);
#  120|   
#  121|   	/* Next table */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def759]
rdma-core-59.0/providers/mlx5/dr_rule.c:122:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  120|   
#  121|   	/* Next table */
#  122|-> 	if (dr_ste_create_next_htbl(matcher, nic_matcher, ste, hw_ste,
#  123|   				    DR_CHUNK_SIZE_1, send_ring_idx)) {
#  124|   		dr_dbg(matcher->tbl->dmn, "Failed allocating table\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def760]
rdma-core-59.0/providers/mlx5/dr_rule.c:286:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  284|   	/* Copy STE control, tag and mask on legacy STE */
#  285|   	memcpy(hw_ste, cur_ste->hw_ste, cur_ste->size);
#  286|-> 	dr_ste_set_bit_mask(hw_ste, sb);
#  287|   	dr_ste_set_miss_addr(ste_ctx, hw_ste,
#  288|   			     dr_icm_pool_get_chunk_icm_addr(nic_matcher->e_anchor->chunk));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def761]
rdma-core-59.0/providers/mlx5/dr_rule.c:287:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  285|   	memcpy(hw_ste, cur_ste->hw_ste, cur_ste->size);
#  286|   	dr_ste_set_bit_mask(hw_ste, sb);
#  287|-> 	dr_ste_set_miss_addr(ste_ctx, hw_ste,
#  288|   			     dr_icm_pool_get_chunk_icm_addr(nic_matcher->e_anchor->chunk));
#  289|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def762]
rdma-core-59.0/providers/mlx5/dr_rule.c:290:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  288|   			     dr_icm_pool_get_chunk_icm_addr(nic_matcher->e_anchor->chunk));
#  289|   
#  290|-> 	new_idx = dr_ste_calc_hash_index(hw_ste, new_htbl);
#  291|   	new_ste = &new_htbl->ste_arr[new_idx];
#  292|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def763]
rdma-core-59.0/providers/mlx5/dr_rule.c:295:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  293|   	if (dr_ste_is_not_used(new_ste)) {
#  294|   		dr_htbl_get(new_htbl);
#  295|-> 		list_add_tail(dr_ste_get_miss_list(new_ste), &new_ste->miss_list_node);
#  296|   	} else {
#  297|   		new_ste = dr_rule_rehash_handle_collision(matcher,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def764]
rdma-core-59.0/providers/mlx5/dr_rule.c:380:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  378|   			continue;
#  379|   
#  380|-> 		err = dr_rule_rehash_copy_miss_list(matcher,
#  381|   						    nic_matcher,
#  382|   						    dr_ste_get_miss_list(cur_ste),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def765]
rdma-core-59.0/providers/mlx5/dr_rule.c:427:20: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  425|   	}
#  426|   
#  427|-> 	new_htbl = dr_ste_htbl_alloc(dmn->ste_icm_pool,
#  428|   				     new_size,
#  429|   				     cur_htbl->type,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def766]
rdma-core-59.0/providers/mlx5/dr_rule.c:440:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  438|   	info.type = CONNECT_MISS;
#  439|   	info.miss_icm_addr =
#  440|-> 		dr_icm_pool_get_chunk_icm_addr(nic_matcher->e_anchor->chunk);
#  441|   	dr_ste_set_formated_ste(dmn->ste_ctx,
#  442|   				dmn->info.caps.gvmi,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def767]
rdma-core-59.0/providers/mlx5/dr_rule.c:441:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  439|   	info.miss_icm_addr =
#  440|   		dr_icm_pool_get_chunk_icm_addr(nic_matcher->e_anchor->chunk);
#  441|-> 	dr_ste_set_formated_ste(dmn->ste_ctx,
#  442|   				dmn->info.caps.gvmi,
#  443|   				nic_dmn->type,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def768]
rdma-core-59.0/providers/mlx5/dr_rule.c:791:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘last_ste’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  789|   
#  790|   			action_ste->htbl->pointing_ste = last_ste;
#  791|-> 			last_ste->next_htbl = action_ste->htbl;
#  792|   			last_ste = action_ste;
#  793|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def769]
rdma-core-59.0/providers/mlx5/dr_rule.c:811:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘last_ste’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  809|   			/* Connect last ste to cross_dmn_action_ste */
#  810|   			cross_dmn_action_ste->htbl->pointing_ste = last_ste;
#  811|-> 			last_ste->next_htbl = cross_dmn_action_ste->htbl;
#  812|   			dr_ste_set_hit_addr_by_next_htbl(dmn->ste_ctx,
#  813|   							 prev_hw_ste,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def770]
rdma-core-59.0/providers/mlx5/dr_rule.c:848:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘last_ste’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  846|   	}
#  847|   
#  848|-> 	last_ste->next_htbl = NULL;
#  849|   
#  850|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def771]
rdma-core-59.0/providers/mlx5/dr_rule.c:900:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘last_ste’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  898|   	 */
#  899|   	if (num_of_builders == new_hw_ste_arr_sz) {
#  900|-> 		last_ste->next_htbl = NULL;
#  901|   		return 0;
#  902|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def772]
rdma-core-59.0/providers/mlx5/dr_rule.c:916:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘last_ste’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  914|   
#  915|   		action_ste->htbl->pointing_ste = last_ste;
#  916|-> 		last_ste->next_htbl = action_ste->htbl;
#  917|   		last_ste = action_ste;
#  918|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def773]
rdma-core-59.0/providers/mlx5/dr_rule.c:1009:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
# 1007|   	}
# 1008|   
# 1009|-> 	if (dr_ste_create_next_htbl(matcher,
# 1010|   				    nic_matcher,
# 1011|   				    ste,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def774]
rdma-core-59.0/providers/mlx5/dr_rule.c:1021:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
# 1019|   	cur_htbl->ctrl.num_of_valid_entries++;
# 1020|   
# 1021|-> 	dr_send_fill_and_append_ste_send_info(ste, DR_STE_SIZE, 0, hw_ste,
# 1022|   					      ste_info, send_list, false);
# 1023|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def775]
rdma-core-59.0/providers/mlx5/dr_rule.c:1579:15: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_aux’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: call_function: calling ‘dr_rule_create_rule_root’ from ‘mlx5dv_dr_rule_create’
# 1577|   	}
# 1578|   
# 1579|-> 	ret = dr_actions_build_attr(matcher, actions, num_actions, attr, attr_aux);
# 1580|   	if (ret)
# 1581|   		goto free_attr_aux;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def776]
rdma-core-59.0/providers/mlx5/dr_rule.c:1579:15: warning[-Wanalyzer-malloc-leak]: leak of ‘attr’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: call_function: calling ‘dr_rule_create_rule_root’ from ‘mlx5dv_dr_rule_create’
# 1577|   	}
# 1578|   
# 1579|-> 	ret = dr_actions_build_attr(matcher, actions, num_actions, attr, attr_aux);
# 1580|   	if (ret)
# 1581|   		goto free_attr_aux;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def777]
rdma-core-59.0/providers/mlx5/dr_rule.c:1579:15: warning[-Wanalyzer-malloc-leak]: leak of ‘rule’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: call_function: calling ‘dr_rule_create_rule_root’ from ‘mlx5dv_dr_rule_create’
# 1577|   	}
# 1578|   
# 1579|-> 	ret = dr_actions_build_attr(matcher, actions, num_actions, attr, attr_aux);
# 1580|   	if (ret)
# 1581|   		goto free_attr_aux;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def778]
rdma-core-59.0/providers/mlx5/dr_rule.c:1587:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: call_function: calling ‘dr_rule_create_rule_root’ from ‘mlx5dv_dr_rule_create’
# 1585|   		goto free_attr_aux;
# 1586|   
# 1587|-> 	rule->flow = _mlx5dv_create_flow(matcher->dv_matcher,
# 1588|   					 value,
# 1589|   					 num_actions,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def779]
rdma-core-59.0/providers/mlx5/dr_rule.c:1587:22: warning[-Wanalyzer-malloc-leak]: leak of ‘rule’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1621:24: call_function: calling ‘dr_rule_create_rule_root’ from ‘mlx5dv_dr_rule_create’
# 1585|   		goto free_attr_aux;
# 1586|   
# 1587|-> 	rule->flow = _mlx5dv_create_flow(matcher->dv_matcher,
# 1588|   					 value,
# 1589|   					 num_actions,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def780]
rdma-core-59.0/providers/mlx5/dr_ste.c:345:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/providers/mlx5/dr_ste.c:332:13: enter_function: entry to ‘dr_ste_remove_middle_ste’
rdma-core-59.0/providers/mlx5/dr_ste.c:341:20: call_function: inlined call to ‘list_entry_or_null’ from ‘dr_ste_remove_middle_ste’
rdma-core-59.0/providers/mlx5/dr_ste.c:344:21: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste.c:345:9: danger: dereference of NULL ‘<unknown>’
#  343|   
#  344|   	miss_addr = ste_ctx->get_miss_addr(ste->hw_ste);
#  345|-> 	ste_ctx->set_miss_addr(prev_ste->hw_ste, miss_addr);
#  346|   
#  347|   	dr_send_fill_and_append_ste_send_info(prev_ste, DR_STE_SIZE_CTRL, 0,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def781]
rdma-core-59.0/providers/mlx5/dr_ste.c:373:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/providers/mlx5/dr_ste.c:357:6: enter_function: entry to ‘dr_ste_free’
rdma-core-59.0/providers/mlx5/dr_ste.c:372:21: call_function: calling ‘dr_ste_get_miss_list_top’ from ‘dr_ste_free’
rdma-core-59.0/providers/mlx5/dr_ste.c:372:21: return_function: returning to ‘dr_ste_free’ from ‘dr_ste_get_miss_list_top’
rdma-core-59.0/providers/mlx5/dr_ste.c:373:9: danger: dereference of NULL ‘dr_ste_get_miss_list_top(ste)’
#  371|   
#  372|   	first_ste = dr_ste_get_miss_list_top(ste);
#  373|-> 	stats_tbl = first_ste->htbl;
#  374|   	/*
#  375|   	 * Two options:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def782]
rdma-core-59.0/providers/mlx5/dr_ste.c:550:17: warning[-Wanalyzer-malloc-leak]: leak of ‘htbl’
rdma-core-59.0/providers/mlx5/dr_ste.c:544:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste.c:545:12: branch_false: following ‘false’ branch (when ‘htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste.c:550:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste.c:550:17: danger: ‘htbl’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  548|   	}
#  549|   
#  550|-> 	chunk = dr_icm_alloc_chunk(pool, chunk_size);
#  551|   	if (!chunk)
#  552|   		goto out_free_htbl;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def783]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: danger: ‘action_htbl’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
# 3213|   
# 3214|   	for (i = 0; i < (1 << chunk_size); i++) {
# 3215|-> 		action_htbl[i] = dr_ste_htbl_alloc(peer_dmn->ste_icm_pool,
# 3216|   						   DR_CHUNK_SIZE_1,
# 3217|   						   DR_STE_HTBL_TYPE_LEGACY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def784]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: danger: ‘action_hw_ste’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 3213|   
# 3214|   	for (i = 0; i < (1 << chunk_size); i++) {
# 3215|-> 		action_htbl[i] = dr_ste_htbl_alloc(peer_dmn->ste_icm_pool,
# 3216|   						   DR_CHUNK_SIZE_1,
# 3217|   						   DR_STE_HTBL_TYPE_LEGACY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def785]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: danger: ‘rule_htbl’ leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
# 3213|   
# 3214|   	for (i = 0; i < (1 << chunk_size); i++) {
# 3215|-> 		action_htbl[i] = dr_ste_htbl_alloc(peer_dmn->ste_icm_pool,
# 3216|   						   DR_CHUNK_SIZE_1,
# 3217|   						   DR_STE_HTBL_TYPE_LEGACY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def786]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: danger: ‘ste_info_arr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 3213|   
# 3214|   	for (i = 0; i < (1 << chunk_size); i++) {
# 3215|-> 		action_htbl[i] = dr_ste_htbl_alloc(peer_dmn->ste_icm_pool,
# 3216|   						   DR_CHUNK_SIZE_1,
# 3217|   						   DR_STE_HTBL_TYPE_LEGACY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def787]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3229:32: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3229:32: danger: ‘action_htbl’ leaks here; was allocated at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
# 3227|   		dr_htbl_get(action_htbl[i]);
# 3228|   
# 3229|-> 		rule_htbl[i] = dr_ste_htbl_alloc(dmn->ste_icm_pool,
# 3230|   						 DR_CHUNK_SIZE_1,
# 3231|   						 DR_STE_HTBL_TYPE_MATCH,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def788]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3229:32: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3229:32: danger: ‘action_hw_ste’ leaks here; was allocated at [(4)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/3)
# 3227|   		dr_htbl_get(action_htbl[i]);
# 3228|   
# 3229|-> 		rule_htbl[i] = dr_ste_htbl_alloc(dmn->ste_icm_pool,
# 3230|   						 DR_CHUNK_SIZE_1,
# 3231|   						 DR_STE_HTBL_TYPE_MATCH,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def789]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3229:32: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3229:32: danger: ‘rule_htbl’ leaks here; was allocated at [(10)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/9)
# 3227|   		dr_htbl_get(action_htbl[i]);
# 3228|   
# 3229|-> 		rule_htbl[i] = dr_ste_htbl_alloc(dmn->ste_icm_pool,
# 3230|   						 DR_CHUNK_SIZE_1,
# 3231|   						 DR_STE_HTBL_TYPE_MATCH,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def790]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3229:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3229:32: danger: ‘ste_info_arr’ leaks here; was allocated at [(6)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/5)
# 3227|   		dr_htbl_get(action_htbl[i]);
# 3228|   
# 3229|-> 		rule_htbl[i] = dr_ste_htbl_alloc(dmn->ste_icm_pool,
# 3230|   						 DR_CHUNK_SIZE_1,
# 3231|   						 DR_STE_HTBL_TYPE_MATCH,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def791]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3246:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3246:17: danger: ‘action_htbl’ leaks here; was allocated at [(8)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/7)
# 3244|   		dr_ste_get(action_ste);
# 3245|   
# 3246|-> 		peer_dmn->ste_ctx->ste_init(action_ste->hw_ste,
# 3247|   					     DR_STE_LU_TYPE_DONT_CARE,
# 3248|   					     0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def792]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3246:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3246:17: danger: ‘action_hw_ste’ leaks here; was allocated at [(4)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/3)
# 3244|   		dr_ste_get(action_ste);
# 3245|   
# 3246|-> 		peer_dmn->ste_ctx->ste_init(action_ste->hw_ste,
# 3247|   					     DR_STE_LU_TYPE_DONT_CARE,
# 3248|   					     0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def793]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3246:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3246:17: danger: ‘rule_htbl’ leaks here; was allocated at [(10)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/9)
# 3244|   		dr_ste_get(action_ste);
# 3245|   
# 3246|-> 		peer_dmn->ste_ctx->ste_init(action_ste->hw_ste,
# 3247|   					     DR_STE_LU_TYPE_DONT_CARE,
# 3248|   					     0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def794]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3246:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3246:17: danger: ‘ste_info_arr’ leaks here; was allocated at [(6)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/5)
# 3244|   		dr_ste_get(action_ste);
# 3245|   
# 3246|-> 		peer_dmn->ste_ctx->ste_init(action_ste->hw_ste,
# 3247|   					     DR_STE_LU_TYPE_DONT_CARE,
# 3248|   					     0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def795]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3251:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3251:17: danger: ‘action_htbl’ leaks here; was allocated at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
# 3249|   					     peer_dmn->info.caps.gvmi);
# 3250|   
# 3251|-> 		peer_dmn->ste_ctx->set_hit_gvmi(action_ste->hw_ste,
# 3252|   						 dmn->info.caps.gvmi);
# 3253|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def796]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3251:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3251:17: danger: ‘action_hw_ste’ leaks here; was allocated at [(4)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/3)
# 3249|   					     peer_dmn->info.caps.gvmi);
# 3250|   
# 3251|-> 		peer_dmn->ste_ctx->set_hit_gvmi(action_ste->hw_ste,
# 3252|   						 dmn->info.caps.gvmi);
# 3253|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def797]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3251:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3251:17: danger: ‘rule_htbl’ leaks here; was allocated at [(10)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/9)
# 3249|   					     peer_dmn->info.caps.gvmi);
# 3250|   
# 3251|-> 		peer_dmn->ste_ctx->set_hit_gvmi(action_ste->hw_ste,
# 3252|   						 dmn->info.caps.gvmi);
# 3253|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def798]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3251:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3251:17: danger: ‘ste_info_arr’ leaks here; was allocated at [(6)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/5)
# 3249|   					     peer_dmn->info.caps.gvmi);
# 3250|   
# 3251|-> 		peer_dmn->ste_ctx->set_hit_gvmi(action_ste->hw_ste,
# 3252|   						 dmn->info.caps.gvmi);
# 3253|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def799]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3254:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3254:17: danger: ‘action_htbl’ leaks here; was allocated at [(8)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/7)
# 3252|   						 dmn->info.caps.gvmi);
# 3253|   
# 3254|-> 		peer_dmn->ste_ctx->set_aso_ct_cross_dmn(action_ste->hw_ste,
# 3255|   							devx_obj->object_id,
# 3256|   							i,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def800]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3254:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3254:17: danger: ‘action_hw_ste’ leaks here; was allocated at [(4)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/3)
# 3252|   						 dmn->info.caps.gvmi);
# 3253|   
# 3254|-> 		peer_dmn->ste_ctx->set_aso_ct_cross_dmn(action_ste->hw_ste,
# 3255|   							devx_obj->object_id,
# 3256|   							i,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def801]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3254:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3254:17: danger: ‘rule_htbl’ leaks here; was allocated at [(10)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/9)
# 3252|   						 dmn->info.caps.gvmi);
# 3253|   
# 3254|-> 		peer_dmn->ste_ctx->set_aso_ct_cross_dmn(action_ste->hw_ste,
# 3255|   							devx_obj->object_id,
# 3256|   							i,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def802]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3254:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3254:17: danger: ‘ste_info_arr’ leaks here; was allocated at [(6)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/5)
# 3252|   						 dmn->info.caps.gvmi);
# 3253|   
# 3254|-> 		peer_dmn->ste_ctx->set_aso_ct_cross_dmn(action_ste->hw_ste,
# 3255|   							devx_obj->object_id,
# 3256|   							i,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def803]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3260:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3260:17: danger: ‘action_htbl’ leaks here; was allocated at [(8)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/7)
# 3258|   							direction);
# 3259|   
# 3260|-> 		list_add_tail(dr_ste_get_miss_list(action_ste),
# 3261|   			      &action_ste->miss_list_node);
# 3262|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def804]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3260:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3260:17: danger: ‘action_hw_ste’ leaks here; was allocated at [(4)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/3)
# 3258|   							direction);
# 3259|   
# 3260|-> 		list_add_tail(dr_ste_get_miss_list(action_ste),
# 3261|   			      &action_ste->miss_list_node);
# 3262|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def805]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3260:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3260:17: danger: ‘rule_htbl’ leaks here; was allocated at [(10)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/9)
# 3258|   							direction);
# 3259|   
# 3260|-> 		list_add_tail(dr_ste_get_miss_list(action_ste),
# 3261|   			      &action_ste->miss_list_node);
# 3262|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def806]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3260:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3260:17: danger: ‘ste_info_arr’ leaks here; was allocated at [(6)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/5)
# 3258|   							direction);
# 3259|   
# 3260|-> 		list_add_tail(dr_ste_get_miss_list(action_ste),
# 3261|   			      &action_ste->miss_list_node);
# 3262|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def807]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3265:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3265:17: danger: ‘action_htbl’ leaks here; was allocated at [(8)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/7)
# 3263|   		rule_ste = rule_htbl[i]->ste_arr;
# 3264|   		dr_ste_get(rule_ste);
# 3265|-> 		dmn->ste_ctx->ste_init(rule_ste->hw_ste,
# 3266|   				       DR_STE_LU_TYPE_DONT_CARE,
# 3267|   				       0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def808]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3265:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3265:17: danger: ‘action_hw_ste’ leaks here; was allocated at [(4)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/3)
# 3263|   		rule_ste = rule_htbl[i]->ste_arr;
# 3264|   		dr_ste_get(rule_ste);
# 3265|-> 		dmn->ste_ctx->ste_init(rule_ste->hw_ste,
# 3266|   				       DR_STE_LU_TYPE_DONT_CARE,
# 3267|   				       0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def809]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3265:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3265:17: danger: ‘rule_htbl’ leaks here; was allocated at [(10)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/9)
# 3263|   		rule_ste = rule_htbl[i]->ste_arr;
# 3264|   		dr_ste_get(rule_ste);
# 3265|-> 		dmn->ste_ctx->ste_init(rule_ste->hw_ste,
# 3266|   				       DR_STE_LU_TYPE_DONT_CARE,
# 3267|   				       0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def810]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3265:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3265:17: danger: ‘ste_info_arr’ leaks here; was allocated at [(6)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/5)
# 3263|   		rule_ste = rule_htbl[i]->ste_arr;
# 3264|   		dr_ste_get(rule_ste);
# 3265|-> 		dmn->ste_ctx->ste_init(rule_ste->hw_ste,
# 3266|   				       DR_STE_LU_TYPE_DONT_CARE,
# 3267|   				       0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def811]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3269:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3269:17: danger: ‘action_htbl’ leaks here; was allocated at [(8)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/7)
# 3267|   				       0,
# 3268|   				       dmn->info.caps.gvmi);
# 3269|-> 		list_add_tail(dr_ste_get_miss_list(rule_ste),
# 3270|   			      &rule_ste->miss_list_node);
# 3271|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def812]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3269:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3269:17: danger: ‘action_hw_ste’ leaks here; was allocated at [(4)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/3)
# 3267|   				       0,
# 3268|   				       dmn->info.caps.gvmi);
# 3269|-> 		list_add_tail(dr_ste_get_miss_list(rule_ste),
# 3270|   			      &rule_ste->miss_list_node);
# 3271|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def813]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3269:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3269:17: danger: ‘rule_htbl’ leaks here; was allocated at [(10)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/9)
# 3267|   				       0,
# 3268|   				       dmn->info.caps.gvmi);
# 3269|-> 		list_add_tail(dr_ste_get_miss_list(rule_ste),
# 3270|   			      &rule_ste->miss_list_node);
# 3271|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def814]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3269:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3269:17: danger: ‘ste_info_arr’ leaks here; was allocated at [(6)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/5)
# 3267|   				       0,
# 3268|   				       dmn->info.caps.gvmi);
# 3269|-> 		list_add_tail(dr_ste_get_miss_list(rule_ste),
# 3270|   			      &rule_ste->miss_list_node);
# 3271|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def815]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3272:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3272:17: danger: ‘action_htbl’ leaks here; was allocated at [(8)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/7)
# 3270|   			      &rule_ste->miss_list_node);
# 3271|   
# 3272|-> 		dr_ste_set_hit_addr_by_next_htbl(peer_dmn->ste_ctx,
# 3273|   						 action_ste->hw_ste,
# 3274|   						 rule_ste->htbl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def816]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3272:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3272:17: danger: ‘action_hw_ste’ leaks here; was allocated at [(4)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/3)
# 3270|   			      &rule_ste->miss_list_node);
# 3271|   
# 3272|-> 		dr_ste_set_hit_addr_by_next_htbl(peer_dmn->ste_ctx,
# 3273|   						 action_ste->hw_ste,
# 3274|   						 rule_ste->htbl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def817]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3272:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3272:17: danger: ‘rule_htbl’ leaks here; was allocated at [(10)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/9)
# 3270|   			      &rule_ste->miss_list_node);
# 3271|   
# 3272|-> 		dr_ste_set_hit_addr_by_next_htbl(peer_dmn->ste_ctx,
# 3273|   						 action_ste->hw_ste,
# 3274|   						 rule_ste->htbl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def818]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3272:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3272:17: danger: ‘ste_info_arr’ leaks here; was allocated at [(6)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/5)
# 3270|   			      &rule_ste->miss_list_node);
# 3271|   
# 3272|-> 		dr_ste_set_hit_addr_by_next_htbl(peer_dmn->ste_ctx,
# 3273|   						 action_ste->hw_ste,
# 3274|   						 rule_ste->htbl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def819]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3278:35: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3279:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3286:57: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: danger: ‘<unknown>’ leaks here; was allocated at [(20)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/19)
# 3287|   		       DR_STE_SIZE_REDUCED);
# 3288|   
# 3289|-> 		dr_send_fill_and_append_ste_send_info(action_ste,
# 3290|   						      DR_STE_SIZE, 0,
# 3291|   						      &action_hw_ste[i * DR_STE_SIZE],

Error: GCC_ANALYZER_WARNING (CWE-401): [#def820]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3279:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3286:57: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: danger: ‘action_htbl’ leaks here; was allocated at [(8)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/7)
# 3287|   		       DR_STE_SIZE_REDUCED);
# 3288|   
# 3289|-> 		dr_send_fill_and_append_ste_send_info(action_ste,
# 3290|   						      DR_STE_SIZE, 0,
# 3291|   						      &action_hw_ste[i * DR_STE_SIZE],

Error: GCC_ANALYZER_WARNING (CWE-401): [#def821]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3279:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3286:57: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: danger: ‘action_hw_ste’ leaks here; was allocated at [(4)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/3)
# 3287|   		       DR_STE_SIZE_REDUCED);
# 3288|   
# 3289|-> 		dr_send_fill_and_append_ste_send_info(action_ste,
# 3290|   						      DR_STE_SIZE, 0,
# 3291|   						      &action_hw_ste[i * DR_STE_SIZE],

Error: GCC_ANALYZER_WARNING (CWE-401): [#def822]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3279:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3286:57: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: danger: ‘rule_htbl’ leaks here; was allocated at [(10)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/9)
# 3287|   		       DR_STE_SIZE_REDUCED);
# 3288|   
# 3289|-> 		dr_send_fill_and_append_ste_send_info(action_ste,
# 3290|   						      DR_STE_SIZE, 0,
# 3291|   						      &action_hw_ste[i * DR_STE_SIZE],

Error: GCC_ANALYZER_WARNING (CWE-401): [#def823]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3241:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3279:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3286:57: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3289:17: danger: ‘ste_info_arr’ leaks here; was allocated at [(6)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/5)
# 3287|   		       DR_STE_SIZE_REDUCED);
# 3288|   
# 3289|-> 		dr_send_fill_and_append_ste_send_info(action_ste,
# 3290|   						      DR_STE_SIZE, 0,
# 3291|   						      &action_hw_ste[i * DR_STE_SIZE],

Error: GCC_ANALYZER_WARNING (CWE-401): [#def824]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: danger: ‘action_htbl’ leaks here; was allocated at [(7)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/6)
# 3294|   	}
# 3295|   
# 3296|-> 	ret = dr_rule_send_update_list(&send_ste_list, peer_dmn, false, 0);
# 3297|   	if (ret) {
# 3298|   		dr_dbg(peer_dmn, "Failed sending ste!\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def825]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: danger: ‘action_hw_ste’ leaks here; was allocated at [(3)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/2)
# 3294|   	}
# 3295|   
# 3296|-> 	ret = dr_rule_send_update_list(&send_ste_list, peer_dmn, false, 0);
# 3297|   	if (ret) {
# 3298|   		dr_dbg(peer_dmn, "Failed sending ste!\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def826]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: danger: ‘rule_htbl’ leaks here; was allocated at [(9)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/8)
# 3294|   	}
# 3295|   
# 3296|-> 	ret = dr_rule_send_update_list(&send_ste_list, peer_dmn, false, 0);
# 3297|   	if (ret) {
# 3298|   		dr_dbg(peer_dmn, "Failed sending ste!\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def827]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: danger: ‘ste_info_arr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/4)
# 3294|   	}
# 3295|   
# 3296|-> 	ret = dr_rule_send_update_list(&send_ste_list, peer_dmn, false, 0);
# 3297|   	if (ret) {
# 3298|   		dr_dbg(peer_dmn, "Failed sending ste!\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def828]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3297:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: danger: ‘action_htbl’ leaks here; was allocated at [(7)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/6)
# 3300|   	}
# 3301|   
# 3302|-> 	ret = mlx5dv_dr_domain_sync(peer_dmn, MLX5DV_DR_DOMAIN_SYNC_FLAGS_SW);
# 3303|   	if (ret) {
# 3304|   		dr_dbg(peer_dmn, "Failed syncing domain\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def829]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3297:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: danger: ‘action_hw_ste’ leaks here; was allocated at [(3)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/2)
# 3300|   	}
# 3301|   
# 3302|-> 	ret = mlx5dv_dr_domain_sync(peer_dmn, MLX5DV_DR_DOMAIN_SYNC_FLAGS_SW);
# 3303|   	if (ret) {
# 3304|   		dr_dbg(peer_dmn, "Failed syncing domain\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def830]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3297:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: danger: ‘rule_htbl’ leaks here; was allocated at [(9)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/8)
# 3300|   	}
# 3301|   
# 3302|-> 	ret = mlx5dv_dr_domain_sync(peer_dmn, MLX5DV_DR_DOMAIN_SYNC_FLAGS_SW);
# 3303|   	if (ret) {
# 3304|   		dr_dbg(peer_dmn, "Failed syncing domain\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def831]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3297:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: danger: ‘ste_info_arr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/4)
# 3300|   	}
# 3301|   
# 3302|-> 	ret = mlx5dv_dr_domain_sync(peer_dmn, MLX5DV_DR_DOMAIN_SYNC_FLAGS_SW);
# 3303|   	if (ret) {
# 3304|   		dr_dbg(peer_dmn, "Failed syncing domain\n");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def832]
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3310:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘cross_dmn_arrays’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3296:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3297:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3302:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3303:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3308:63: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3308:63: acquire_memory: this call could return NULL
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3310:9: danger: ‘cross_dmn_arrays’ could be NULL: unchecked value from [(17)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/16)
# 3308|   	cross_dmn_arrays = (struct dr_aso_cross_dmn_arrays *) malloc(sizeof(struct dr_aso_cross_dmn_arrays));
# 3309|   
# 3310|-> 	cross_dmn_arrays->action_htbl = action_htbl;
# 3311|   	cross_dmn_arrays->rule_htbl = rule_htbl;
# 3312|   	devx_obj->priv = cross_dmn_arrays;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def833]
rdma-core-59.0/providers/mlx5/dr_table.c:71:29: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_table.c:168:25: enter_function: entry to ‘mlx5dv_dr_table_create’
rdma-core-59.0/providers/mlx5/dr_table.c:176:13: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_table.c:181:15: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_table.c:181:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_table.c:182:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_table.c:187:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_table.c:191:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_table.c:192:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_table.c:192:23: call_function: calling ‘dr_table_init’ from ‘mlx5dv_dr_table_create’
#   69|   	int ret;
#   70|   
#   71|-> 	nic_tbl->s_anchor = dr_ste_htbl_alloc(dmn->ste_icm_pool,
#   72|   					      DR_CHUNK_SIZE_1,
#   73|   					      DR_STE_HTBL_TYPE_LEGACY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def834]
rdma-core-59.0/providers/mlx5/dr_table.c:81:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_table.c:168:25: enter_function: entry to ‘mlx5dv_dr_table_create’
rdma-core-59.0/providers/mlx5/dr_table.c:176:13: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_table.c:181:15: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_table.c:181:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_table.c:182:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_table.c:187:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_table.c:191:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_table.c:192:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_table.c:192:23: call_function: calling ‘dr_table_init’ from ‘mlx5dv_dr_table_create’
#   79|   	info.type = CONNECT_MISS;
#   80|   	info.miss_icm_addr = nic_dmn->default_icm_addr;
#   81|-> 	ret = dr_ste_htbl_init_and_postsend(dmn, nic_dmn, nic_tbl->s_anchor,
#   82|   					    &info, true, 0);
#   83|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def835]
rdma-core-59.0/providers/mlx5/dr_table.c:91:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tbl’
rdma-core-59.0/providers/mlx5/dr_table.c:168:25: enter_function: entry to ‘mlx5dv_dr_table_create’
rdma-core-59.0/providers/mlx5/dr_table.c:176:13: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_table.c:181:15: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_table.c:181:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_table.c:182:12: branch_false: following ‘false’ branch (when ‘tbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_table.c:187:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_table.c:191:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_table.c:192:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_table.c:192:23: call_function: calling ‘dr_table_init’ from ‘mlx5dv_dr_table_create’
#   89|   
#   90|   free_s_anchor:
#   91|-> 	dr_ste_htbl_free(nic_tbl->s_anchor);
#   92|   	return ret;
#   93|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def836]
rdma-core-59.0/providers/mlx5/dr_vports.c:75:15: warning[-Wanalyzer-malloc-leak]: leak of ‘new_vport’
rdma-core-59.0/providers/mlx5/dr_vports.c:54:1: enter_function: entry to ‘dr_vports_table_query_and_add_vport’
rdma-core-59.0/providers/mlx5/dr_vports.c:63:21: call_function: calling ‘dr_vports_table_find_vport_num’ from ‘dr_vports_table_query_and_add_vport’
rdma-core-59.0/providers/mlx5/dr_vports.c:63:21: return_function: returning to ‘dr_vports_table_query_and_add_vport’ from ‘dr_vports_table_find_vport_num’
rdma-core-59.0/providers/mlx5/dr_vports.c:66:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_vports.c:69:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_vports.c:69:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_vports.c:70:12: branch_false: following ‘false’ branch (when ‘new_vport’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_vports.c:75:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_vports.c:75:15: danger: ‘new_vport’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   73|   	}
#   74|   
#   75|-> 	ret = dr_devx_query_esw_vport_context(ctx, other_vport,
#   76|   					      vport_number,
#   77|   					      &new_vport->icm_address_rx,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def837]
rdma-core-59.0/providers/mlx5/mlx5.c:369:25: warning[-Wanalyzer-malloc-leak]: leak of ‘psv’
rdma-core-59.0/providers/mlx5/mlx5.c:353:18: enter_function: entry to ‘mlx5_create_psv’
rdma-core-59.0/providers/mlx5/mlx5.c:359:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5.c:360:12: branch_false: following ‘false’ branch (when ‘psv’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5.c:365:9: call_function: inlined call to ‘_devx_set’ from ‘mlx5_create_psv’
rdma-core-59.0/providers/mlx5/mlx5.c:369:25: danger: ‘psv’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#  367|   	DEVX_SET(create_psv_in, in, num_psv, 1);
#  368|   
#  369|-> 	psv->devx_obj = mlx5dv_devx_obj_create(pd->context, in, sizeof(in),
#  370|   					       out, sizeof(out));
#  371|   	if (!psv->devx_obj) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def838]
rdma-core-59.0/providers/mlx5/mlx5.c:1484:15: warning[-Wanalyzer-malloc-leak]: leak of ‘leaf’
rdma-core-59.0/providers/mlx5/mlx5.c:1612:1: enter_function: entry to ‘_mlx5dv_sched_leaf_create’
rdma-core-59.0/providers/mlx5/mlx5.c:1623:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5.c:1623:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/mlx5.c:1628:16: branch_true: ...to here
rdma-core-59.0/providers/mlx5/mlx5.c:1628:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5.c:1629:12: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5.c:1634:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5.c:1634:15: call_function: calling ‘mlx5dv_sched_nic_create’ from ‘_mlx5dv_sched_leaf_create’
# 1482|   		 MLX5_SCHED_TSAR_TYPE_DWRR);
# 1483|   
# 1484|-> 	obj = mlx5dv_devx_obj_create(ctx, in, sizeof(in), out, sizeof(out));
# 1485|   	if (!obj)
# 1486|   		errno = mlx5_get_cmd_status_err(errno, out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def839]
rdma-core-59.0/providers/mlx5/mlx5.c:1936:20: warning[-Wanalyzer-malloc-leak]: leak of ‘blk’
rdma-core-59.0/providers/mlx5/mlx5.c:1909:33: enter_function: entry to ‘reserved_qpn_blk_alloc’
rdma-core-59.0/providers/mlx5/mlx5.c:1916:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5.c:1917:12: branch_false: following ‘false’ branch (when ‘blk’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5.c:1922:39: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5.c:1923:12: branch_false: following ‘false’ branch (when ‘bmp’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5.c:1929:9: call_function: inlined call to ‘_devx_set’ from ‘reserved_qpn_blk_alloc’
rdma-core-59.0/providers/mlx5/mlx5.c:1936:20: danger: ‘blk’ leaks here; was allocated at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
# 1934|   		 attr, log_obj_range, mctx->hca_cap_2_caps.log_reserved_qpns_per_obj);
# 1935|   
# 1936|-> 	blk->obj = mlx5dv_devx_obj_create(&mctx->ibv_ctx.context,
# 1937|   					  in, sizeof(in), out, sizeof(out));
# 1938|   	if (!blk->obj) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def840]
rdma-core-59.0/providers/mlx5/mlx5.c:1936:20: warning[-Wanalyzer-malloc-leak]: leak of ‘bmp’
rdma-core-59.0/providers/mlx5/mlx5.c:1909:33: enter_function: entry to ‘reserved_qpn_blk_alloc’
rdma-core-59.0/providers/mlx5/mlx5.c:1917:12: branch_false: following ‘false’ branch (when ‘blk’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5.c:1922:39: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5.c:1922:20: call_function: inlined call to ‘bitmap_alloc0’ from ‘reserved_qpn_blk_alloc’
rdma-core-59.0/providers/mlx5/mlx5.c:1923:12: branch_false: following ‘false’ branch (when ‘bmp’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5.c:1929:9: call_function: inlined call to ‘_devx_set’ from ‘reserved_qpn_blk_alloc’
rdma-core-59.0/providers/mlx5/mlx5.c:1936:20: danger: ‘bmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1934|   		 attr, log_obj_range, mctx->hca_cap_2_caps.log_reserved_qpns_per_obj);
# 1935|   
# 1936|-> 	blk->obj = mlx5dv_devx_obj_create(&mctx->ibv_ctx.context,
# 1937|   					  in, sizeof(in), out, sizeof(out));
# 1938|   	if (!blk->obj) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def841]
rdma-core-59.0/providers/mlx5/mlx5.c:2757:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/mlx5/mlx5.c:2750:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5.c:2751:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5.c:2754:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5.c:2757:9: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 2755|   	dev->driver_abi_ver = sysfs_dev->abi_ver;
# 2756|   
# 2757|-> 	mlx5_set_dv_ctx_ops(&mlx5_dv_ctx_ops);
# 2758|   	return &dev->verbs_dev;
# 2759|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def842]
rdma-core-59.0/providers/mlx5/mlx5.c:2758:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/mlx5/mlx5.c:2750:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5.c:2751:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5.c:2754:28: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5.c:2758:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 2756|   
# 2757|   	mlx5_set_dv_ctx_ops(&mlx5_dv_ctx_ops);
# 2758|-> 	return &dev->verbs_dev;
# 2759|   }
# 2760|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def843]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:103:15: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3549:5: enter_function: entry to ‘mlx5dv_vfio_process_events’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3565:16: call_function: calling ‘mlx5_vfio_process_async_events’ from ‘mlx5dv_vfio_process_events’
#  101|   	}
#  102|   
#  103|-> 	err = iset_alloc_range(ctx->iova_alloc, MLX5_VFIO_BLOCK_SIZE,
#  104|   			       &page_block->iova, MLX5_VFIO_BLOCK_SIZE);
#  105|   	if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def844]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:103:15: warning[-Wanalyzer-malloc-leak]: leak of ‘outp’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3549:5: enter_function: entry to ‘mlx5dv_vfio_process_events’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3565:16: call_function: calling ‘mlx5_vfio_process_async_events’ from ‘mlx5dv_vfio_process_events’
#  101|   	}
#  102|   
#  103|-> 	err = iset_alloc_range(ctx->iova_alloc, MLX5_VFIO_BLOCK_SIZE,
#  104|   			       &page_block->iova, MLX5_VFIO_BLOCK_SIZE);
#  105|   	if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def845]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:118:9: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3549:5: enter_function: entry to ‘mlx5dv_vfio_process_events’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3565:16: call_function: calling ‘mlx5_vfio_process_async_events’ from ‘mlx5dv_vfio_process_events’
#  116|   
#  117|   err_reg:
#  118|-> 	iset_insert_range(ctx->iova_alloc, page_block->iova,
#  119|   			  MLX5_VFIO_BLOCK_SIZE);
#  120|   err_range:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def846]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:118:9: warning[-Wanalyzer-malloc-leak]: leak of ‘outp’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3549:5: enter_function: entry to ‘mlx5dv_vfio_process_events’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3565:16: call_function: calling ‘mlx5_vfio_process_async_events’ from ‘mlx5dv_vfio_process_events’
#  116|   
#  117|   err_reg:
#  118|-> 	iset_insert_range(ctx->iova_alloc, page_block->iova,
#  119|   			  MLX5_VFIO_BLOCK_SIZE);
#  120|   err_range:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def847]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:146:30: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3549:5: enter_function: entry to ‘mlx5dv_vfio_process_events’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3565:16: call_function: calling ‘mlx5_vfio_process_async_events’ from ‘mlx5dv_vfio_process_events’
#  144|   	while (true) {
#  145|   		list_for_each(&ctx->mem_alloc.block_list, page_block, next_block) {
#  146|-> 			pg = bitmap_find_first_bit(page_block->free_pages, 0,
#  147|   						   MLX5_VFIO_BLOCK_NUM_PAGES);
#  148|   			if (pg != MLX5_VFIO_BLOCK_NUM_PAGES) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def848]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:146:30: warning[-Wanalyzer-malloc-leak]: leak of ‘outp’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3549:5: enter_function: entry to ‘mlx5dv_vfio_process_events’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3565:16: call_function: calling ‘mlx5_vfio_process_async_events’ from ‘mlx5dv_vfio_process_events’
#  144|   	while (true) {
#  145|   		list_for_each(&ctx->mem_alloc.block_list, page_block, next_block) {
#  146|-> 			pg = bitmap_find_first_bit(page_block->free_pages, 0,
#  147|   						   MLX5_VFIO_BLOCK_NUM_PAGES);
#  148|   			if (pg != MLX5_VFIO_BLOCK_NUM_PAGES) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def849]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:506:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3350:13: enter_function: entry to ‘mlx5_vfio_free_context’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3354:9: call_function: calling ‘destroy_async_eqs’ from ‘mlx5_vfio_free_context’
#  504|   
#  505|   	if (is_in)
#  506|-> 		cmd_lay->iptr = htobe64(cmd_msg->next->iova);
#  507|   	else
#  508|   		cmd_lay->optr = htobe64(cmd_msg->next->iova);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def850]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:508:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3350:13: enter_function: entry to ‘mlx5_vfio_free_context’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3354:9: call_function: calling ‘destroy_async_eqs’ from ‘mlx5_vfio_free_context’
#  506|   		cmd_lay->iptr = htobe64(cmd_msg->next->iova);
#  507|   	else
#  508|-> 		cmd_lay->optr = htobe64(cmd_msg->next->iova);
#  509|   
#  510|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def851]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:757:9: warning[-Wanalyzer-malloc-leak]: leak of ‘in_pas’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3211:1: enter_function: entry to ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3223:12: branch_false: following ‘false’ branch (when ‘inlen > 271’)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3224:14: call_function: inlined call to ‘_devx_get’ from ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3223:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3225:14: call_function: inlined call to ‘_devx_get’ from ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3223:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3230:16: call_function: inlined call to ‘_devx_get’ from ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3239:12: branch_false: following ‘false’ branch (when ‘eq’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3244:9: branch_false: ...to here
 branch_true: following ‘true’ branch (when ‘err == 0’)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3252:15: branch_true: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3254:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3257:70: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3258:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3261:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3262:18: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3263:12: branch_false: following ‘false’ branch (when ‘in_pas’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3268:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3276:15: call_function: calling ‘mlx5_vfio_cmd_do’ from ‘vfio_devx_create_eq’
#  755|   {
#  756|   	mlx5_vfio_unregister_mem(ctx, mailbox->iova, MLX5_ADAPTER_PAGE_SIZE);
#  757|-> 	iset_insert_range(ctx->iova_alloc, mailbox->iova, MLX5_ADAPTER_PAGE_SIZE);
#  758|   	free(mailbox->buf);
#  759|   	free(mailbox);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def852]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:757:9: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3549:5: enter_function: entry to ‘mlx5dv_vfio_process_events’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3565:16: call_function: calling ‘mlx5_vfio_process_async_events’ from ‘mlx5dv_vfio_process_events’
#  755|   {
#  756|   	mlx5_vfio_unregister_mem(ctx, mailbox->iova, MLX5_ADAPTER_PAGE_SIZE);
#  757|-> 	iset_insert_range(ctx->iova_alloc, mailbox->iova, MLX5_ADAPTER_PAGE_SIZE);
#  758|   	free(mailbox->buf);
#  759|   	free(mailbox);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def853]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:757:9: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:1793:12: enter_function: entry to ‘mlx5_vfio_get_caps’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:1801:16: call_function: calling ‘mlx5_vfio_get_caps_mode’ from ‘mlx5_vfio_get_caps’
#  755|   {
#  756|   	mlx5_vfio_unregister_mem(ctx, mailbox->iova, MLX5_ADAPTER_PAGE_SIZE);
#  757|-> 	iset_insert_range(ctx->iova_alloc, mailbox->iova, MLX5_ADAPTER_PAGE_SIZE);
#  758|   	free(mailbox->buf);
#  759|   	free(mailbox);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def854]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:782:15: warning[-Wanalyzer-malloc-leak]: leak of ‘in_pas’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3211:1: enter_function: entry to ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3223:12: branch_false: following ‘false’ branch (when ‘inlen > 271’)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3224:14: call_function: inlined call to ‘_devx_get’ from ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3223:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3225:14: call_function: inlined call to ‘_devx_get’ from ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3223:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3230:16: call_function: inlined call to ‘_devx_get’ from ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3239:12: branch_false: following ‘false’ branch (when ‘eq’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3244:9: branch_false: ...to here
 branch_true: following ‘true’ branch (when ‘err == 0’)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3252:15: branch_true: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3254:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3257:70: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3258:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3261:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3262:18: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3263:12: branch_false: following ‘false’ branch (when ‘in_pas’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3268:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3276:15: call_function: calling ‘mlx5_vfio_cmd_do’ from ‘vfio_devx_create_eq’
#  780|   	memset(mailbox->buf, 0, MLX5_ADAPTER_PAGE_SIZE);
#  781|   
#  782|-> 	ret = iset_alloc_range(ctx->iova_alloc, MLX5_ADAPTER_PAGE_SIZE,
#  783|   			       &mailbox->iova, MLX5_ADAPTER_PAGE_SIZE);
#  784|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def855]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:782:15: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3549:5: enter_function: entry to ‘mlx5dv_vfio_process_events’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3565:16: call_function: calling ‘mlx5_vfio_process_async_events’ from ‘mlx5dv_vfio_process_events’
#  780|   	memset(mailbox->buf, 0, MLX5_ADAPTER_PAGE_SIZE);
#  781|   
#  782|-> 	ret = iset_alloc_range(ctx->iova_alloc, MLX5_ADAPTER_PAGE_SIZE,
#  783|   			       &mailbox->iova, MLX5_ADAPTER_PAGE_SIZE);
#  784|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def856]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:782:15: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:1793:12: enter_function: entry to ‘mlx5_vfio_get_caps’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:1801:16: call_function: calling ‘mlx5_vfio_get_caps_mode’ from ‘mlx5_vfio_get_caps’
#  780|   	memset(mailbox->buf, 0, MLX5_ADAPTER_PAGE_SIZE);
#  781|   
#  782|-> 	ret = iset_alloc_range(ctx->iova_alloc, MLX5_ADAPTER_PAGE_SIZE,
#  783|   			       &mailbox->iova, MLX5_ADAPTER_PAGE_SIZE);
#  784|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def857]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:795:9: warning[-Wanalyzer-malloc-leak]: leak of ‘in_pas’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3211:1: enter_function: entry to ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3223:12: branch_false: following ‘false’ branch (when ‘inlen > 271’)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3224:14: call_function: inlined call to ‘_devx_get’ from ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3223:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3225:14: call_function: inlined call to ‘_devx_get’ from ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3223:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3230:16: call_function: inlined call to ‘_devx_get’ from ‘vfio_devx_create_eq’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3239:12: branch_false: following ‘false’ branch (when ‘eq’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3244:9: branch_false: ...to here
 branch_true: following ‘true’ branch (when ‘err == 0’)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3252:15: branch_true: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3254:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3257:70: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3258:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3261:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3262:18: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3263:12: branch_false: following ‘false’ branch (when ‘in_pas’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3268:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3276:15: call_function: calling ‘mlx5_vfio_cmd_do’ from ‘vfio_devx_create_eq’
#  793|   
#  794|   err_reg:
#  795|-> 	iset_insert_range(ctx->iova_alloc, mailbox->iova,
#  796|   			  MLX5_ADAPTER_PAGE_SIZE);
#  797|   err_tree:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def858]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:795:9: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3549:5: enter_function: entry to ‘mlx5dv_vfio_process_events’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3565:16: call_function: calling ‘mlx5_vfio_process_async_events’ from ‘mlx5dv_vfio_process_events’
#  793|   
#  794|   err_reg:
#  795|-> 	iset_insert_range(ctx->iova_alloc, mailbox->iova,
#  796|   			  MLX5_ADAPTER_PAGE_SIZE);
#  797|   err_tree:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def859]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:795:9: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:1793:12: enter_function: entry to ‘mlx5_vfio_get_caps’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:1801:16: call_function: calling ‘mlx5_vfio_get_caps_mode’ from ‘mlx5_vfio_get_caps’
#  793|   
#  794|   err_reg:
#  795|-> 	iset_insert_range(ctx->iova_alloc, mailbox->iova,
#  796|   			  MLX5_ADAPTER_PAGE_SIZE);
#  797|   err_tree:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def860]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3172:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msi’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3131:1: enter_function: entry to ‘vfio_devx_alloc_msi_vector’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3138:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3139:12: branch_false: following ‘false’ branch (when ‘msi’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3144:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3149:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3155:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3156:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3159:15: call_function: inlined call to ‘mlx5_vfio_msix_set_irqs’ from ‘vfio_devx_alloc_msi_vector’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3160:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3161:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3172:9: danger: ‘msi’ leaks here; was allocated at [(2)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/1)
# 3170|   
# 3171|   fail_set_irqs:
# 3172|-> 	close(*fd);
# 3173|   fail:
# 3174|   	pthread_mutex_unlock(&ctx->msix_fds_lock);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def861]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3449:14: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3447|   
# 3448|   	snprintf(pci_info_path, sizeof(pci_info_path), "%s/vendor", pci_path);
# 3449|-> 	fd = open(pci_info_path, O_RDONLY);
# 3450|   	if (fd < 0)
# 3451|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def862]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3449:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vfio_dev’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3447|   
# 3448|   	snprintf(pci_info_path, sizeof(pci_info_path), "%s/vendor", pci_path);
# 3449|-> 	fd = open(pci_info_path, O_RDONLY);
# 3450|   	if (fd < 0)
# 3451|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def863]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3457:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3455|   
# 3456|   	vendor_id = strtoul(buff, NULL, 0);
# 3457|-> 	close(fd);
# 3458|   
# 3459|   	snprintf(pci_info_path, sizeof(pci_info_path), "%s/device", pci_path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def864]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3457:9: warning[-Wanalyzer-malloc-leak]: leak of ‘vfio_dev’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3455|   
# 3456|   	vendor_id = strtoul(buff, NULL, 0);
# 3457|-> 	close(fd);
# 3458|   
# 3459|   	snprintf(pci_info_path, sizeof(pci_info_path), "%s/device", pci_path);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def865]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3459:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pci_info_path, 0)’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3449:14: acquire_resource: opened here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3450:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3453:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3453:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3456:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3459:9: danger: ‘open(&pci_info_path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
# 3457|   	close(fd);
# 3458|   
# 3459|-> 	snprintf(pci_info_path, sizeof(pci_info_path), "%s/device", pci_path);
# 3460|   	fd = open(pci_info_path, O_RDONLY);
# 3461|   	if (fd < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def866]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3460:14: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3458|   
# 3459|   	snprintf(pci_info_path, sizeof(pci_info_path), "%s/device", pci_path);
# 3460|-> 	fd = open(pci_info_path, O_RDONLY);
# 3461|   	if (fd < 0)
# 3462|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def867]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3460:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vfio_dev’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3458|   
# 3459|   	snprintf(pci_info_path, sizeof(pci_info_path), "%s/device", pci_path);
# 3460|-> 	fd = open(pci_info_path, O_RDONLY);
# 3461|   	if (fd < 0)
# 3462|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def868]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3468:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pci_info_path, 0)’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3450:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3453:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3453:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3456:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3460:14: acquire_resource: opened here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3461:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3464:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3464:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3467:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3468:9: danger: ‘open(&pci_info_path, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
# 3466|   
# 3467|   	device_id = strtoul(buff, NULL, 0);
# 3468|-> 	close(fd);
# 3469|   
# 3470|   	for (ent = mlx5_hca_table; ent->kind != VERBS_MATCH_SENTINEL; ent++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def869]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3468:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3466|   
# 3467|   	device_id = strtoul(buff, NULL, 0);
# 3468|-> 	close(fd);
# 3469|   
# 3470|   	for (ent = mlx5_hca_table; ent->kind != VERBS_MATCH_SENTINEL; ent++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def870]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3468:9: warning[-Wanalyzer-malloc-leak]: leak of ‘vfio_dev’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3466|   
# 3467|   	device_id = strtoul(buff, NULL, 0);
# 3468|-> 	close(fd);
# 3469|   
# 3470|   	for (ent = mlx5_hca_table; ent->kind != VERBS_MATCH_SENTINEL; ent++) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def871]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3480:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3449:14: acquire_resource: opened here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3450:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3453:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3453:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3454:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3480:9: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0)
# 3478|   
# 3479|   err:
# 3480|-> 	close(fd);
# 3481|   	return false;
# 3482|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def872]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3480:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3478|   
# 3479|   err:
# 3480|-> 	close(fd);
# 3481|   	return false;
# 3482|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def873]
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3480:9: warning[-Wanalyzer-malloc-leak]: leak of ‘vfio_dev’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3569:1: enter_function: entry to ‘mlx5dv_get_vfio_device_list’
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3576:30: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3575:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3581:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3582:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3587:20: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3588:12: branch_false: following ‘false’ branch (when ‘vfio_dev’ is non-NULL)...
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3593:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/mlx5_vfio.c:3597:15: call_function: calling ‘mlx5_vfio_get_handle’ from ‘mlx5dv_get_vfio_device_list’
# 3478|   
# 3479|   err:
# 3480|-> 	close(fd);
# 3481|   	return false;
# 3482|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def874]
rdma-core-59.0/providers/mlx5/mlx5dv_dr.h:331:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3236:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3319:10: call_function: calling ‘dr_htbl_put’ from ‘dr_ste_v1_aso_other_domain_link’
#  329|   {
#  330|   	if (atomic_fetch_sub(&htbl->refcount, 1) == 1)
#  331|-> 		dr_ste_htbl_free(htbl);
#  332|   }
#  333|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def875]
rdma-core-59.0/providers/mlx5/mlx5dv_dr.h:331:17: warning[-Wanalyzer-malloc-leak]: leak of ‘action_hw_ste’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3186:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3236:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3319:10: call_function: calling ‘dr_htbl_put’ from ‘dr_ste_v1_aso_other_domain_link’
#  329|   {
#  330|   	if (atomic_fetch_sub(&htbl->refcount, 1) == 1)
#  331|-> 		dr_ste_htbl_free(htbl);
#  332|   }
#  333|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def876]
rdma-core-59.0/providers/mlx5/mlx5dv_dr.h:331:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rule_htbl’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3236:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3319:10: call_function: calling ‘dr_htbl_put’ from ‘dr_ste_v1_aso_other_domain_link’
#  329|   {
#  330|   	if (atomic_fetch_sub(&htbl->refcount, 1) == 1)
#  331|-> 		dr_ste_htbl_free(htbl);
#  332|   }
#  333|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def877]
rdma-core-59.0/providers/mlx5/mlx5dv_dr.h:331:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info_arr’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3157:12: enter_function: entry to ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3174:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3181:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3187:12: branch_false: following ‘false’ branch (when ‘action_hw_ste’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3193:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3194:12: branch_false: following ‘false’ branch (when ‘ste_info_arr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3200:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3201:12: branch_false: following ‘false’ branch (when ‘action_htbl’ is non-NULL)...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3207:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3208:12: branch_false: following ‘false’ branch (when ‘rule_htbl’ is non-NULL)...
 branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3214:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3215:34: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3220:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3227:17: call_function: inlined call to ‘dr_htbl_get’ from ‘dr_ste_v1_aso_other_domain_link’
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3234:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3236:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_ste_v1.c:3319:10: call_function: calling ‘dr_htbl_put’ from ‘dr_ste_v1_aso_other_domain_link’
#  329|   {
#  330|   	if (atomic_fetch_sub(&htbl->refcount, 1) == 1)
#  331|-> 		dr_ste_htbl_free(htbl);
#  332|   }
#  333|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def878]
rdma-core-59.0/providers/mlx5/mlx5dv_dr.h:331:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ste_info’
rdma-core-59.0/providers/mlx5/dr_rule.c:1611:24: enter_function: entry to ‘mlx5dv_dr_rule_create’
rdma-core-59.0/providers/mlx5/dr_rule.c:1620:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/dr_rule.c:1623:24: call_function: calling ‘dr_rule_create_rule’ from ‘mlx5dv_dr_rule_create’
#  329|   {
#  330|   	if (atomic_fetch_sub(&htbl->refcount, 1) == 1)
#  331|-> 		dr_ste_htbl_free(htbl);
#  332|   }
#  333|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def879]
rdma-core-59.0/providers/mlx5/verbs.c:227:26: warning[-Wanalyzer-malloc-leak]: leak of ‘bf’
rdma-core-59.0/providers/mlx5/verbs.c:6288:1: enter_function: entry to ‘_mlx5dv_devx_alloc_uar’
rdma-core-59.0/providers/mlx5/verbs.c:6298:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:6305:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:6305:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:6308:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:6308:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:6311:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:6311:14: call_function: calling ‘mlx5_attach_dedicated_uar’ from ‘_mlx5dv_devx_alloc_uar’
#  225|   		struct mlx5_device *dev = to_mdev(context->device);
#  226|   
#  227|-> 		offset = get_uar_mmap_offset(ctx->curr_legacy_dyn_sys_uar_page, dev->page_size,
#  228|   				   MLX5_IB_MMAP_ALLOC_WC);
#  229|   		bf->length = dev->page_size;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def880]
rdma-core-59.0/providers/mlx5/verbs.c:242:15: warning[-Wanalyzer-malloc-leak]: leak of ‘bf’
rdma-core-59.0/providers/mlx5/verbs.c:6288:1: enter_function: entry to ‘_mlx5dv_devx_alloc_uar’
rdma-core-59.0/providers/mlx5/verbs.c:6298:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:6305:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:6305:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:6308:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:6308:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:6311:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:6311:14: call_function: calling ‘mlx5_attach_dedicated_uar’ from ‘_mlx5dv_devx_alloc_uar’
#  240|   	fill_attr_out_ptr(cmd, MLX5_IB_ATTR_UAR_OBJ_ALLOC_PAGE_ID, &bf->page_id);
#  241|   
#  242|-> 	ret = execute_ioctl(context, cmd);
#  243|   	if (ret) {
#  244|   		free(bf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def881]
rdma-core-59.0/providers/mlx5/verbs.c:2147:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mlx5/verbs.c:2394:23: enter_function: entry to ‘create_qp’
rdma-core-59.0/providers/mlx5/verbs.c:2412:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2415:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2429:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:2430:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:2435:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2571:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2575:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2575:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2577:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2579:23: call_function: calling ‘mlx5_cmd_create_rss_qp’ from ‘create_qp’
# 2145|   			attr->rx_hash_conf.rx_hash_key_len);
# 2146|   
# 2147|-> 	ret = ibv_cmd_create_qp_ex2(context, &qp->verbs_qp,
# 2148|   				    attr,
# 2149|   				    &cmd_ex_rss.ibv_cmd, sizeof(cmd_ex_rss),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def882]
rdma-core-59.0/providers/mlx5/verbs.c:2266:27: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mlx5/verbs.c:2394:23: enter_function: entry to ‘create_qp’
rdma-core-59.0/providers/mlx5/verbs.c:2412:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2415:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2429:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:2430:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:2435:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2456:12: branch_true: following ‘true’ branch (when ‘mlx5_qp_attr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:2457:22: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2457:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2465:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2465:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2471:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2534:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2535:28: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2535:28: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2536:37: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2536:36: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2537:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2537:47: call_function: calling ‘create_dct’ from ‘create_qp’
# 2264|   
# 2265|   	if (ctx->cqe_version) {
# 2266|-> 		usr_idx = mlx5_store_uidx(ctx, qp);
# 2267|   		if (usr_idx < 0) {
# 2268|   			mlx5_dbg(fp, MLX5_DBG_QP, "Couldn't find free user index\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def883]
rdma-core-59.0/providers/mlx5/verbs.c:2278:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mlx5/verbs.c:2394:23: enter_function: entry to ‘create_qp’
rdma-core-59.0/providers/mlx5/verbs.c:2412:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2415:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2429:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:2430:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:2435:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2456:12: branch_true: following ‘true’ branch (when ‘mlx5_qp_attr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:2457:22: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2457:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2465:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2465:21: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2471:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2534:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2535:28: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2535:28: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2536:37: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2536:36: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2537:47: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2537:47: call_function: calling ‘create_dct’ from ‘create_qp’
# 2276|   		cmd.ece_options = 0x10000000;
# 2277|   
# 2278|-> 	ret = ibv_cmd_create_qp_ex(context, &qp->verbs_qp,
# 2279|   				   attr, &cmd.ibv_cmd, sizeof(cmd),
# 2280|   				   &resp.ibv_resp, sizeof(resp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def884]
rdma-core-59.0/providers/mlx5/verbs.c:2602:23: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mlx5/verbs.c:2412:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2415:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2429:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:2430:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:2435:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2571:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2575:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2575:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2587:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2587:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:2590:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:2602:23: danger: ‘qp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 2600|   		}
# 2601|   
# 2602|-> 		ret = mlx5_qp_fill_wr_pfns(qp, attr, mlx5_qp_attr);
# 2603|   		if (ret) {
# 2604|   			errno = ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def885]
rdma-core-59.0/providers/mlx5/verbs.c:3048:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dmah’
rdma-core-59.0/providers/mlx5/verbs.c:3022:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3028:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3028:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3035:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3042:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:3043:12: branch_false: following ‘false’ branch (when ‘dmah’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:3048:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3048:15: danger: ‘dmah’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
# 3046|   	}
# 3047|   
# 3048|-> 	ret = ibv_cmd_alloc_dmah(context, dmah, attr);
# 3049|   	if (ret)
# 3050|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def886]
rdma-core-59.0/providers/mlx5/verbs.c:3354:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/mlx5/verbs.c:3361:16: enter_function: entry to ‘mlx5_create_ah’
rdma-core-59.0/providers/mlx5/verbs.c:3373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3394:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:3395:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:3398:44: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3399:12: branch_true: following ‘true’ branch (when ‘is_eth != 0’)...
rdma-core-59.0/providers/mlx5/verbs.c:3401:40: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3400:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3404:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3404:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3405:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3405:25: call_function: calling ‘mlx5_ah_set_udp_sport’ from ‘mlx5_create_ah’
# 3352|   		sport = ibv_flow_label_to_udp_sport(fl);
# 3353|   	else
# 3354|-> 		sport = get_random() % (IB_ROCE_UDP_ENCAP_VALID_PORT_MAX + 1
# 3355|   					- IB_ROCE_UDP_ENCAP_VALID_PORT_MIN)
# 3356|   			+ IB_ROCE_UDP_ENCAP_VALID_PORT_MIN;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def887]
rdma-core-59.0/providers/mlx5/verbs.c:3400:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/mlx5/verbs.c:3373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3394:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:3395:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:3398:44: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3399:12: branch_true: following ‘true’ branch (when ‘is_eth != 0’)...
rdma-core-59.0/providers/mlx5/verbs.c:3401:40: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3400:21: danger: ‘ah’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 3398|   	static_rate = ah_attr_to_mlx5_rate(attr->static_rate);
# 3399|   	if (is_eth) {
# 3400|-> 		if (ibv_query_gid_type(pd->context, attr->port_num,
# 3401|   				       attr->grh.sgid_index, &gid_type))
# 3402|   			goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def888]
rdma-core-59.0/providers/mlx5/verbs.c:3432:29: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/mlx5/verbs.c:3373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3394:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:3395:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:3398:44: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3399:12: branch_true: following ‘true’ branch (when ‘is_eth != 0’)...
rdma-core-59.0/providers/mlx5/verbs.c:3401:40: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3400:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3404:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3404:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3411:39: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3418:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3428:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3428:12: branch_true: following ‘true’ branch (when ‘is_eth != 0’)...
rdma-core-59.0/providers/mlx5/verbs.c:3429:21: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3429:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3430:52: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3432:29: danger: ‘ah’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 3430|   			struct mlx5_create_ah_resp resp = {};
# 3431|   
# 3432|-> 			if (ibv_cmd_create_ah(pd, &ah->ibv_ah, attr, &resp.ibv_resp, sizeof(resp)))
# 3433|   				goto err;
# 3434|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def889]
rdma-core-59.0/providers/mlx5/verbs.c:3438:29: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/mlx5/verbs.c:3373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3394:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:3395:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:3398:44: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3399:12: branch_true: following ‘true’ branch (when ‘is_eth != 0’)...
rdma-core-59.0/providers/mlx5/verbs.c:3401:40: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3400:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3404:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3404:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3411:39: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3418:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3428:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3428:12: branch_true: following ‘true’ branch (when ‘is_eth != 0’)...
rdma-core-59.0/providers/mlx5/verbs.c:3429:21: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3429:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:3439:57: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3438:29: danger: ‘ah’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 3436|   			memcpy(ah->av.rmac, resp.dmac, ETHERNET_LL_SIZE);
# 3437|   		} else {
# 3438|-> 			if (ibv_resolve_eth_l2_from_gid(pd->context, attr,
# 3439|   							ah->av.rmac, NULL))
# 3440|   				goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def890]
rdma-core-59.0/providers/mlx5/verbs.c:3592:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mlx5/verbs.c:3588:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:3589:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:3592:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3592:15: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 3590|   		return NULL;
# 3591|   
# 3592|-> 	ret = ibv_cmd_open_qp(context, &qp->verbs_qp, sizeof(qp->verbs_qp),
# 3593|   			      attr, &cmd, sizeof(cmd), &resp, sizeof(resp));
# 3594|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def891]
rdma-core-59.0/providers/mlx5/verbs.c:3617:15: warning[-Wanalyzer-malloc-leak]: leak of ‘xrcd’
rdma-core-59.0/providers/mlx5/verbs.c:3613:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:3614:12: branch_false: following ‘false’ branch (when ‘xrcd’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:3617:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:3617:15: danger: ‘xrcd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 3615|   		return NULL;
# 3616|   
# 3617|-> 	err = ibv_cmd_open_xrcd(context, xrcd, sizeof(*xrcd), xrcd_init_attr,
# 3618|   				&cmd, sizeof(cmd), &resp, sizeof(resp));
# 3619|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def892]
rdma-core-59.0/providers/mlx5/verbs.c:4354:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rwq’
rdma-core-59.0/providers/mlx5/verbs.c:4385:23: enter_function: entry to ‘create_wq’
rdma-core-59.0/providers/mlx5/verbs.c:4398:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4401:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4404:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:4405:12: branch_false: following ‘false’ branch (when ‘rwq’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4408:23: call_function: inlined call to ‘rwq_sig_enabled’ from ‘create_wq’
rdma-core-59.0/providers/mlx5/verbs.c:4412:15: call_function: calling ‘mlx5_calc_rwq_size’ from ‘create_wq’
rdma-core-59.0/providers/mlx5/verbs.c:4412:15: return_function: returning to ‘create_wq’ from ‘mlx5_calc_rwq_size’
rdma-core-59.0/providers/mlx5/verbs.c:4413:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4418:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4419:13: call_function: calling ‘mlx5_alloc_rwq_buf’ from ‘create_wq’
# 4352|   	enum mlx5_alloc_type alloc_type;
# 4353|   
# 4354|-> 	mlx5_get_alloc_type(to_mctx(context), pd, MLX5_RWQ_PREFIX,
# 4355|   			    &alloc_type, MLX5_ALLOC_TYPE_ANON);
# 4356|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def893]
rdma-core-59.0/providers/mlx5/verbs.c:4369:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/verbs.c:4385:23: enter_function: entry to ‘create_wq’
rdma-core-59.0/providers/mlx5/verbs.c:4398:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4401:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4405:12: branch_false: following ‘false’ branch (when ‘rwq’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4408:23: call_function: inlined call to ‘rwq_sig_enabled’ from ‘create_wq’
rdma-core-59.0/providers/mlx5/verbs.c:4412:15: call_function: calling ‘mlx5_calc_rwq_size’ from ‘create_wq’
rdma-core-59.0/providers/mlx5/verbs.c:4412:15: return_function: returning to ‘create_wq’ from ‘mlx5_calc_rwq_size’
rdma-core-59.0/providers/mlx5/verbs.c:4413:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4418:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4419:13: call_function: calling ‘mlx5_alloc_rwq_buf’ from ‘create_wq’
# 4367|   	}
# 4368|   
# 4369|-> 	err = mlx5_alloc_prefered_buf(to_mctx(context), &rwq->buf,
# 4370|   				      align(rwq->buf_size, to_mdev
# 4371|   				      (context->device)->page_size),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def894]
rdma-core-59.0/providers/mlx5/verbs.c:4369:15: warning[-Wanalyzer-malloc-leak]: leak of ‘rwq’
rdma-core-59.0/providers/mlx5/verbs.c:4385:23: enter_function: entry to ‘create_wq’
rdma-core-59.0/providers/mlx5/verbs.c:4398:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4401:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4404:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:4405:12: branch_false: following ‘false’ branch (when ‘rwq’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4408:23: call_function: inlined call to ‘rwq_sig_enabled’ from ‘create_wq’
rdma-core-59.0/providers/mlx5/verbs.c:4412:15: call_function: calling ‘mlx5_calc_rwq_size’ from ‘create_wq’
rdma-core-59.0/providers/mlx5/verbs.c:4412:15: return_function: returning to ‘create_wq’ from ‘mlx5_calc_rwq_size’
rdma-core-59.0/providers/mlx5/verbs.c:4413:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4418:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4419:13: call_function: calling ‘mlx5_alloc_rwq_buf’ from ‘create_wq’
# 4367|   	}
# 4368|   
# 4369|-> 	err = mlx5_alloc_prefered_buf(to_mctx(context), &rwq->buf,
# 4370|   				      align(rwq->buf_size, to_mdev
# 4371|   				      (context->device)->page_size),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def895]
rdma-core-59.0/providers/mlx5/verbs.c:4681:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cmd’
rdma-core-59.0/providers/mlx5/verbs.c:4650:12: branch_false: following ‘false’ branch (when ‘mflow’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4655:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4656:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4661:27: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4662:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:4663:12: branch_false: following ‘false’ branch (when ‘cmd’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4668:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4668:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4680:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4681:15: danger: ‘cmd’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
# 4679|   
# 4680|   	flow_id = &mflow->flow_id;
# 4681|-> 	ret = ibv_cmd_create_flow(qp, flow_id, flow_attr,
# 4682|   				  cmd, required_cmd_size);
# 4683|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def896]
rdma-core-59.0/providers/mlx5/verbs.c:4681:15: warning[-Wanalyzer-malloc-leak]: leak of ‘mflow’
rdma-core-59.0/providers/mlx5/verbs.c:4649:17: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:4650:12: branch_false: following ‘false’ branch (when ‘mflow’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4655:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4656:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4661:27: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4663:12: branch_false: following ‘false’ branch (when ‘cmd’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4668:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4668:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4680:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4681:15: danger: ‘mflow’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 4679|   
# 4680|   	flow_id = &mflow->flow_id;
# 4681|-> 	ret = ibv_cmd_create_flow(qp, flow_id, flow_attr,
# 4682|   				  cmd, required_cmd_size);
# 4683|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def897]
rdma-core-59.0/providers/mlx5/verbs.c:4739:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ind_table’
rdma-core-59.0/providers/mlx5/verbs.c:4735:21: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:4736:12: branch_false: following ‘false’ branch (when ‘ind_table’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4739:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4739:15: danger: ‘ind_table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 4737|   		return NULL;
# 4738|   
# 4739|-> 	err = ibv_cmd_create_rwq_ind_table(context, init_attr, ind_table,
# 4740|   					   &resp.ibv_resp, sizeof(resp));
# 4741|   	if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def898]
rdma-core-59.0/providers/mlx5/verbs.c:4789:15: warning[-Wanalyzer-malloc-leak]: leak of ‘action’
rdma-core-59.0/providers/mlx5/verbs.c:4778:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4783:18: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4783:18: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:4784:12: branch_false: following ‘false’ branch (when ‘action’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4789:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4789:15: danger: ‘action’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
# 4787|   	}
# 4788|   
# 4789|-> 	ret = ibv_cmd_create_flow_action_esp(ctx, attr, action, driver_attr);
# 4790|   	if (ret) {
# 4791|   		free(action);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def899]
rdma-core-59.0/providers/mlx5/verbs.c:4884:15: warning[-Wanalyzer-malloc-leak]: leak of ‘action’
rdma-core-59.0/providers/mlx5/verbs.c:4860:1: enter_function: entry to ‘_mlx5dv_create_flow_action_modify_header’
rdma-core-59.0/providers/mlx5/verbs.c:4873:9: call_function: calling ‘fill_attr_in’ from ‘_mlx5dv_create_flow_action_modify_header’
rdma-core-59.0/providers/mlx5/verbs.c:4873:9: return_function: returning to ‘_mlx5dv_create_flow_action_modify_header’ from ‘fill_attr_in’
rdma-core-59.0/providers/mlx5/verbs.c:4878:18: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:4879:12: branch_false: following ‘false’ branch (when ‘action’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4884:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4884:15: danger: ‘action’ leaks here; was allocated at [(7)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/6)
# 4882|   	}
# 4883|   
# 4884|-> 	ret = execute_ioctl(ctx, cmd);
# 4885|   	if (ret) {
# 4886|   		free(action);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def900]
rdma-core-59.0/providers/mlx5/verbs.c:4951:15: warning[-Wanalyzer-malloc-leak]: leak of ‘action’
rdma-core-59.0/providers/mlx5/verbs.c:4929:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:4934:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4945:18: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:4946:12: branch_false: following ‘false’ branch (when ‘action’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:4951:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:4951:15: danger: ‘action’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
# 4949|   	}
# 4950|   
# 4951|-> 	ret = execute_ioctl(ctx, cmd);
# 4952|   	if (ret) {
# 4953|   		free(action);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def901]
rdma-core-59.0/providers/mlx5/verbs.c:5119:15: warning[-Wanalyzer-malloc-leak]: leak of ‘mr’
rdma-core-59.0/providers/mlx5/verbs.c:5114:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:5115:12: branch_false: following ‘false’ branch (when ‘mr’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:5118:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5119:15: danger: ‘mr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
# 5117|   
# 5118|   	fill_attr_in_uint32(driver_attr, MLX5_IB_ATTR_REG_DMABUF_MR_ACCESS_FLAGS, mlx5_access);
# 5119|-> 	ret = ibv_cmd_reg_dmabuf_mr(pd, offset, length, iova, fd, access,
# 5120|   				    &mr->vmr, driver_attr);
# 5121|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def902]
rdma-core-59.0/providers/mlx5/verbs.c:5205:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dm’
rdma-core-59.0/providers/mlx5/verbs.c:5179:16: enter_function: entry to ‘mlx5_import_dm’
rdma-core-59.0/providers/mlx5/verbs.c:5191:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:5192:12: branch_false: following ‘false’ branch (when ‘dm’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:5197:9: call_function: inlined call to ‘fill_attr_in_obj’ from ‘mlx5_import_dm’
rdma-core-59.0/providers/mlx5/verbs.c:5205:15: danger: ‘dm’ leaks here; was allocated at [(2)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/1)
# 5203|   		      sizeof(length));
# 5204|   
# 5205|-> 	ret = execute_ioctl(context, cmd);
# 5206|   	if (ret)
# 5207|   		goto free_dm;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def903]
rdma-core-59.0/providers/mlx5/verbs.c:5248:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dm’
rdma-core-59.0/providers/mlx5/verbs.c:5285:1: enter_function: entry to ‘_mlx5dv_alloc_dm’
rdma-core-59.0/providers/mlx5/verbs.c:5304:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5305:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5304:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5310:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5310:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:5311:12: branch_false: following ‘false’ branch (when ‘dm’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:5316:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5319:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5320:17: call_function: inlined call to ‘attr_optional’ from ‘_mlx5dv_alloc_dm’
rdma-core-59.0/providers/mlx5/verbs.c:5321:23: call_function: calling ‘alloc_dm_memic’ from ‘_mlx5dv_alloc_dm’
# 5246|   		      &page_idx, sizeof(page_idx));
# 5247|   
# 5248|-> 	if (ibv_cmd_alloc_dm(ctx, dm_attr, &dm->verbs_dm, cmdb))
# 5249|   		return EINVAL;
# 5250|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def904]
rdma-core-59.0/providers/mlx5/verbs.c:5275:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dm’
rdma-core-59.0/providers/mlx5/verbs.c:5285:1: enter_function: entry to ‘_mlx5dv_alloc_dm’
rdma-core-59.0/providers/mlx5/verbs.c:5304:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5305:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5304:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5310:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5310:14: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:5311:12: branch_false: following ‘false’ branch (when ‘dm’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:5316:21: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5323:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5323:23: call_function: calling ‘alloc_dm_steering_sw_icm’ from ‘_mlx5dv_alloc_dm’
# 5273|   		      &start_offset, sizeof(start_offset));
# 5274|   
# 5275|-> 	if (ibv_cmd_alloc_dm(ctx, dm_attr, &dm->verbs_dm, cmdb))
# 5276|   		return EINVAL;
# 5277|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def905]
rdma-core-59.0/providers/mlx5/verbs.c:5557:15: warning[-Wanalyzer-malloc-leak]: leak of ‘flow_matcher’
rdma-core-59.0/providers/mlx5/verbs.c:5494:1: enter_function: entry to ‘_mlx5dv_create_flow_matcher’
rdma-core-59.0/providers/mlx5/verbs.c:5504:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5511:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5511:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:5512:12: branch_false: following ‘false’ branch (when ‘flow_matcher’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:5517:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5517:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5522:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5540:9: call_function: calling ‘fill_attr_in’ from ‘_mlx5dv_create_flow_matcher’
rdma-core-59.0/providers/mlx5/verbs.c:5540:9: return_function: returning to ‘_mlx5dv_create_flow_matcher’ from ‘fill_attr_in’
rdma-core-59.0/providers/mlx5/verbs.c:5542:9: call_function: inlined call to ‘fill_attr_in_enum’ from ‘_mlx5dv_create_flow_matcher’
rdma-core-59.0/providers/mlx5/verbs.c:5542:9: call_function: inlined call to ‘fill_attr_in_enum’ from ‘_mlx5dv_create_flow_matcher’
rdma-core-59.0/providers/mlx5/verbs.c:5557:15: danger: ‘flow_matcher’ leaks here; was allocated at [(4)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/3)
# 5555|   				   attr->flags);
# 5556|   
# 5557|-> 	ret = execute_ioctl(context, cmd);
# 5558|   	if (ret)
# 5559|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def906]
rdma-core-59.0/providers/mlx5/verbs.c:5747:15: warning[-Wanalyzer-malloc-leak]: leak of ‘mflow’
rdma-core-59.0/providers/mlx5/verbs.c:5615:1: enter_function: entry to ‘_mlx5dv_create_flow’
rdma-core-59.0/providers/mlx5/verbs.c:5639:17: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:5640:12: branch_false: following ‘false’ branch (when ‘mflow’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:5645:18: call_function: inlined call to ‘fill_attr_out_obj’ from ‘_mlx5dv_create_flow’
rdma-core-59.0/providers/mlx5/verbs.c:5747:15: danger: ‘mflow’ leaks here; was allocated at [(2)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/1)
# 5745|   				      flow_actions,
# 5746|   				      num_flow_actions);
# 5747|-> 	ret = execute_ioctl(flow_matcher->context, cmd);
# 5748|   	if (ret)
# 5749|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def907]
rdma-core-59.0/providers/mlx5/verbs.c:5810:15: warning[-Wanalyzer-malloc-leak]: leak of ‘steering_anchor’
rdma-core-59.0/providers/mlx5/verbs.c:5780:1: enter_function: entry to ‘_mlx5dv_create_steering_anchor’
rdma-core-59.0/providers/mlx5/verbs.c:5790:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5795:27: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5795:27: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:5796:12: branch_false: following ‘false’ branch (when ‘steering_anchor’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:5801:18: call_function: inlined call to ‘fill_attr_out_obj’ from ‘_mlx5dv_create_steering_anchor’
rdma-core-59.0/providers/mlx5/verbs.c:5805:9: call_function: calling ‘fill_attr_in’ from ‘_mlx5dv_create_steering_anchor’
rdma-core-59.0/providers/mlx5/verbs.c:5805:9: return_function: returning to ‘_mlx5dv_create_steering_anchor’ from ‘fill_attr_in’
rdma-core-59.0/providers/mlx5/verbs.c:5810:15: danger: ‘steering_anchor’ leaks here; was allocated at [(4)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/3)
# 5808|   		      &steering_anchor->sa.id, sizeof(steering_anchor->sa.id));
# 5809|   
# 5810|-> 	err = execute_ioctl(context, cmd);
# 5811|   	if (err) {
# 5812|   		free(steering_anchor);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def908]
rdma-core-59.0/providers/mlx5/verbs.c:5893:13: warning[-Wanalyzer-malloc-leak]: leak of ‘umem’
rdma-core-59.0/providers/mlx5/verbs.c:5882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5887:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5887:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:5888:12: branch_false: following ‘false’ branch (when ‘umem’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:5893:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5893:13: danger: ‘umem’ leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
# 5891|   	}
# 5892|   
# 5893|-> 	if (ibv_dontfork_range(in->addr, in->size))
# 5894|   		goto err;
# 5895|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def909]
rdma-core-59.0/providers/mlx5/verbs.c:5916:15: warning[-Wanalyzer-malloc-leak]: leak of ‘umem’
rdma-core-59.0/providers/mlx5/verbs.c:5935:1: enter_function: entry to ‘_mlx5dv_devx_umem_reg’
rdma-core-59.0/providers/mlx5/verbs.c:5945:16: call_function: calling ‘__mlx5dv_devx_umem_reg_ex’ from ‘_mlx5dv_devx_umem_reg’
# 5914|   	handle = fill_attr_out_obj(cmd, MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE);
# 5915|   
# 5916|-> 	ret = execute_ioctl(context, cmd);
# 5917|   	if (ret)
# 5918|   		goto err_umem_reg_cmd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def910]
rdma-core-59.0/providers/mlx5/verbs.c:5928:9: warning[-Wanalyzer-malloc-leak]: leak of ‘umem’
rdma-core-59.0/providers/mlx5/verbs.c:5882:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5887:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5887:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:5888:12: branch_false: following ‘false’ branch (when ‘umem’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:5893:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5893:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5896:77: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5899:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5900:21: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5900:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:5901:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:5928:9: danger: ‘umem’ leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
# 5926|   
# 5927|   err_umem_reg_cmd:
# 5928|-> 	ibv_dofork_range(in->addr, in->size);
# 5929|   err:
# 5930|   	free(umem);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def911]
rdma-core-59.0/providers/mlx5/verbs.c:6098:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
rdma-core-59.0/providers/mlx5/verbs.c:6077:1: enter_function: entry to ‘_mlx5dv_devx_obj_create’
rdma-core-59.0/providers/mlx5/verbs.c:6088:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:6089:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:6094:18: call_function: inlined call to ‘fill_attr_out_obj’ from ‘_mlx5dv_devx_obj_create’
rdma-core-59.0/providers/mlx5/verbs.c:6095:9: call_function: calling ‘fill_attr_in’ from ‘_mlx5dv_devx_obj_create’
rdma-core-59.0/providers/mlx5/verbs.c:6095:9: return_function: returning to ‘_mlx5dv_devx_obj_create’ from ‘fill_attr_in’
rdma-core-59.0/providers/mlx5/verbs.c:6096:9: call_function: inlined call to ‘fill_attr_out’ from ‘_mlx5dv_devx_obj_create’
rdma-core-59.0/providers/mlx5/verbs.c:6098:15: danger: ‘obj’ leaks here; was allocated at [(2)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/1)
# 6096|   	fill_attr_out(cmd, MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_OUT, out, outlen);
# 6097|   
# 6098|-> 	ret = execute_ioctl(context, cmd);
# 6099|   	if (ret)
# 6100|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def912]
rdma-core-59.0/providers/mlx5/verbs.c:6116:45: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7129:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7132:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7133:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7133:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7140:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7140:32: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7141:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7146:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7171:26: call_function: calling ‘mlx5dv_devx_obj_create’ from ‘_mlx5dv_create_mkey’
# 6114|   			 size_t inlen, void *out, size_t outlen)
# 6115|   {
# 6116|-> 	struct mlx5_dv_context_ops *dvops = mlx5_get_dv_ops(context);
# 6117|   
# 6118|   	if (!dvops || !dvops->devx_obj_create) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def913]
rdma-core-59.0/providers/mlx5/verbs.c:6116:45: warning[-Wanalyzer-malloc-leak]: leak of ‘crypto_login’
rdma-core-59.0/providers/mlx5/verbs.c:7568:1: enter_function: entry to ‘_mlx5dv_crypto_login_create’
rdma-core-59.0/providers/mlx5/verbs.c:7574:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7579:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7579:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7580:12: branch_false: following ‘false’ branch (when ‘crypto_login’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7585:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7585:15: call_function: calling ‘crypto_login_create’ from ‘_mlx5dv_crypto_login_create’
# 6114|   			 size_t inlen, void *out, size_t outlen)
# 6115|   {
# 6116|-> 	struct mlx5_dv_context_ops *dvops = mlx5_get_dv_ops(context);
# 6117|   
# 6118|   	if (!dvops || !dvops->devx_obj_create) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def914]
rdma-core-59.0/providers/mlx5/verbs.c:6116:45: warning[-Wanalyzer-malloc-leak]: leak of ‘dek’
rdma-core-59.0/providers/mlx5/verbs.c:7692:1: enter_function: entry to ‘_mlx5dv_dek_create’
rdma-core-59.0/providers/mlx5/verbs.c:7703:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7710:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7710:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7715:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7715:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7720:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7732:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7738:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7739:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7744:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7744:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7745:12: branch_false: following ‘false’ branch (when ‘dek’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7751:9: call_function: inlined call to ‘_devx_set’ from ‘_mlx5dv_dek_create’
rdma-core-59.0/providers/mlx5/verbs.c:7766:15: call_function: calling ‘mlx5dv_devx_obj_create’ from ‘_mlx5dv_dek_create’
# 6114|   			 size_t inlen, void *out, size_t outlen)
# 6115|   {
# 6116|-> 	struct mlx5_dv_context_ops *dvops = mlx5_get_dv_ops(context);
# 6117|   
# 6118|   	if (!dvops || !dvops->devx_obj_create) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def915]
rdma-core-59.0/providers/mlx5/verbs.c:6116:45: warning[-Wanalyzer-malloc-leak]: leak of ‘mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7129:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7132:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7149:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7160:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7162:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7171:26: call_function: calling ‘mlx5dv_devx_obj_create’ from ‘_mlx5dv_create_mkey’
# 6114|   			 size_t inlen, void *out, size_t outlen)
# 6115|   {
# 6116|-> 	struct mlx5_dv_context_ops *dvops = mlx5_get_dv_ops(context);
# 6117|   
# 6118|   	if (!dvops || !dvops->devx_obj_create) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def916]
rdma-core-59.0/providers/mlx5/verbs.c:6123:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7129:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7132:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7133:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7133:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7140:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7140:32: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7141:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7146:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7171:26: call_function: calling ‘mlx5dv_devx_obj_create’ from ‘_mlx5dv_create_mkey’
# 6121|   	}
# 6122|   
# 6123|-> 	return dvops->devx_obj_create(context, in, inlen, out, outlen);
# 6124|   }
# 6125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def917]
rdma-core-59.0/providers/mlx5/verbs.c:6123:16: warning[-Wanalyzer-malloc-leak]: leak of ‘crypto_login’
rdma-core-59.0/providers/mlx5/verbs.c:7568:1: enter_function: entry to ‘_mlx5dv_crypto_login_create’
rdma-core-59.0/providers/mlx5/verbs.c:7574:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7579:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7579:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7580:12: branch_false: following ‘false’ branch (when ‘crypto_login’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7585:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7585:15: call_function: calling ‘crypto_login_create’ from ‘_mlx5dv_crypto_login_create’
# 6121|   	}
# 6122|   
# 6123|-> 	return dvops->devx_obj_create(context, in, inlen, out, outlen);
# 6124|   }
# 6125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def918]
rdma-core-59.0/providers/mlx5/verbs.c:6123:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dek’
rdma-core-59.0/providers/mlx5/verbs.c:7692:1: enter_function: entry to ‘_mlx5dv_dek_create’
rdma-core-59.0/providers/mlx5/verbs.c:7703:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7710:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7710:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7715:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7715:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7720:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7732:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7738:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7739:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7744:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7744:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7745:12: branch_false: following ‘false’ branch (when ‘dek’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7751:9: call_function: inlined call to ‘_devx_set’ from ‘_mlx5dv_dek_create’
rdma-core-59.0/providers/mlx5/verbs.c:7766:15: call_function: calling ‘mlx5dv_devx_obj_create’ from ‘_mlx5dv_dek_create’
# 6121|   	}
# 6122|   
# 6123|-> 	return dvops->devx_obj_create(context, in, inlen, out, outlen);
# 6124|   }
# 6125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def919]
rdma-core-59.0/providers/mlx5/verbs.c:6123:16: warning[-Wanalyzer-malloc-leak]: leak of ‘mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7129:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7132:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7149:32: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7160:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7162:12: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7171:26: call_function: calling ‘mlx5dv_devx_obj_create’ from ‘_mlx5dv_create_mkey’
# 6121|   	}
# 6122|   
# 6123|-> 	return dvops->devx_obj_create(context, in, inlen, out, outlen);
# 6124|   }
# 6125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def920]
rdma-core-59.0/providers/mlx5/verbs.c:6715:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cmd_comp’
rdma-core-59.0/providers/mlx5/verbs.c:6695:1: enter_function: entry to ‘_mlx5dv_devx_create_cmd_comp’
rdma-core-59.0/providers/mlx5/verbs.c:6705:20: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:6706:12: branch_false: following ‘false’ branch (when ‘cmd_comp’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:6711:18: call_function: inlined call to ‘fill_attr_out_fd’ from ‘_mlx5dv_devx_create_cmd_comp’
rdma-core-59.0/providers/mlx5/verbs.c:6715:15: danger: ‘cmd_comp’ leaks here; was allocated at [(2)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/1)
# 6713|   				  0);
# 6714|   
# 6715|-> 	ret = execute_ioctl(context, cmd);
# 6716|   	if (ret)
# 6717|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def921]
rdma-core-59.0/providers/mlx5/verbs.c:6777:15: warning[-Wanalyzer-malloc-leak]: leak of ‘event_channel’
rdma-core-59.0/providers/mlx5/verbs.c:6754:1: enter_function: entry to ‘_mlx5dv_devx_create_event_channel’
rdma-core-59.0/providers/mlx5/verbs.c:6765:25: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:6766:12: branch_false: following ‘false’ branch (when ‘event_channel’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:6771:18: call_function: inlined call to ‘fill_attr_out_fd’ from ‘_mlx5dv_devx_create_event_channel’
rdma-core-59.0/providers/mlx5/verbs.c:6777:15: danger: ‘event_channel’ leaks here; was allocated at [(2)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/1)
# 6775|   			    flags);
# 6776|   
# 6777|-> 	ret = execute_ioctl(context, cmd);
# 6778|   	if (ret)
# 6779|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def922]
rdma-core-59.0/providers/mlx5/verbs.c:6975:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: call_function: calling ‘mlx5_create_sig_ctx’ from ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: return_function: returning to ‘_mlx5dv_create_mkey’ from ‘mlx5_create_sig_ctx’
rdma-core-59.0/providers/mlx5/verbs.c:7123:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7129:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7132:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7133:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7133:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7136:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7194:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7195:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7195:17: call_function: calling ‘mlx5_destroy_sig_ctx’ from ‘_mlx5dv_create_mkey’
# 6973|   
# 6974|   	if (sig->block.mem_psv) {
# 6975|-> 		ret = mlx5_destroy_psv(sig->block.mem_psv);
# 6976|   		if (!ret)
# 6977|   			sig->block.mem_psv = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def923]
rdma-core-59.0/providers/mlx5/verbs.c:6975:23: warning[-Wanalyzer-malloc-leak]: leak of ‘mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: call_function: calling ‘mlx5_create_sig_ctx’ from ‘_mlx5dv_create_mkey’
# 6973|   
# 6974|   	if (sig->block.mem_psv) {
# 6975|-> 		ret = mlx5_destroy_psv(sig->block.mem_psv);
# 6976|   		if (!ret)
# 6977|   			sig->block.mem_psv = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def924]
rdma-core-59.0/providers/mlx5/verbs.c:6975:23: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
rdma-core-59.0/providers/mlx5/verbs.c:7012:29: enter_function: entry to ‘mlx5_create_sig_ctx’
rdma-core-59.0/providers/mlx5/verbs.c:7018:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7023:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7023:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7024:12: branch_false: following ‘false’ branch (when ‘sig’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7029:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7029:15: call_function: calling ‘mlx5_create_sig_psvs’ from ‘mlx5_create_sig_ctx’
# 6973|   
# 6974|   	if (sig->block.mem_psv) {
# 6975|-> 		ret = mlx5_destroy_psv(sig->block.mem_psv);
# 6976|   		if (!ret)
# 6977|   			sig->block.mem_psv = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def925]
rdma-core-59.0/providers/mlx5/verbs.c:6980:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: call_function: calling ‘mlx5_create_sig_ctx’ from ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: return_function: returning to ‘_mlx5dv_create_mkey’ from ‘mlx5_create_sig_ctx’
rdma-core-59.0/providers/mlx5/verbs.c:7123:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7129:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7132:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7133:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7133:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7136:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7194:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7195:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7195:17: call_function: calling ‘mlx5_destroy_sig_ctx’ from ‘_mlx5dv_create_mkey’
# 6978|   	}
# 6979|   	if (!ret && sig->block.wire_psv) {
# 6980|-> 		ret = mlx5_destroy_psv(sig->block.wire_psv);
# 6981|   		if (!ret)
# 6982|   			sig->block.wire_psv = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def926]
rdma-core-59.0/providers/mlx5/verbs.c:6980:23: warning[-Wanalyzer-malloc-leak]: leak of ‘mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: call_function: calling ‘mlx5_create_sig_ctx’ from ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: return_function: returning to ‘_mlx5dv_create_mkey’ from ‘mlx5_create_sig_ctx’
rdma-core-59.0/providers/mlx5/verbs.c:7123:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7129:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7132:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7133:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7133:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7136:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7194:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7195:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7195:17: call_function: calling ‘mlx5_destroy_sig_ctx’ from ‘_mlx5dv_create_mkey’
# 6978|   	}
# 6979|   	if (!ret && sig->block.wire_psv) {
# 6980|-> 		ret = mlx5_destroy_psv(sig->block.wire_psv);
# 6981|   		if (!ret)
# 6982|   			sig->block.wire_psv = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def927]
rdma-core-59.0/providers/mlx5/verbs.c:6995:38: warning[-Wanalyzer-malloc-leak]: leak of ‘mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: call_function: calling ‘mlx5_create_sig_ctx’ from ‘_mlx5dv_create_mkey’
# 6993|   
# 6994|   	if (attr->create_flags & MLX5DV_MKEY_INIT_ATTR_FLAGS_BLOCK_SIGNATURE) {
# 6995|-> 		sig->block.mem_psv = mlx5_create_psv(pd);
# 6996|   		if (!sig->block.mem_psv)
# 6997|   			return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def928]
rdma-core-59.0/providers/mlx5/verbs.c:6995:38: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
rdma-core-59.0/providers/mlx5/verbs.c:7012:29: enter_function: entry to ‘mlx5_create_sig_ctx’
rdma-core-59.0/providers/mlx5/verbs.c:7018:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7023:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7023:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7024:12: branch_false: following ‘false’ branch (when ‘sig’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7029:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7029:15: call_function: calling ‘mlx5_create_sig_psvs’ from ‘mlx5_create_sig_ctx’
# 6993|   
# 6994|   	if (attr->create_flags & MLX5DV_MKEY_INIT_ATTR_FLAGS_BLOCK_SIGNATURE) {
# 6995|-> 		sig->block.mem_psv = mlx5_create_psv(pd);
# 6996|   		if (!sig->block.mem_psv)
# 6997|   			return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def929]
rdma-core-59.0/providers/mlx5/verbs.c:6999:39: warning[-Wanalyzer-malloc-leak]: leak of ‘mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: call_function: calling ‘mlx5_create_sig_ctx’ from ‘_mlx5dv_create_mkey’
# 6997|   			return errno;
# 6998|   
# 6999|-> 		sig->block.wire_psv = mlx5_create_psv(pd);
# 7000|   		if (!sig->block.wire_psv) {
# 7001|   			err = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def930]
rdma-core-59.0/providers/mlx5/verbs.c:6999:39: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
rdma-core-59.0/providers/mlx5/verbs.c:7012:29: enter_function: entry to ‘mlx5_create_sig_ctx’
rdma-core-59.0/providers/mlx5/verbs.c:7018:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7023:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7023:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7024:12: branch_false: following ‘false’ branch (when ‘sig’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7029:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7029:15: call_function: calling ‘mlx5_create_sig_psvs’ from ‘mlx5_create_sig_ctx’
# 6997|   			return errno;
# 6998|   
# 6999|-> 		sig->block.wire_psv = mlx5_create_psv(pd);
# 7000|   		if (!sig->block.wire_psv) {
# 7001|   			err = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def931]
rdma-core-59.0/providers/mlx5/verbs.c:7197:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/mlx5/verbs.c:7086:1: enter_function: entry to ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7100:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7101:14: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7100:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7112:16: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7113:12: branch_false: following ‘false’ branch (when ‘mkey’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7118:20: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7121:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: call_function: calling ‘mlx5_create_sig_ctx’ from ‘_mlx5dv_create_mkey’
rdma-core-59.0/providers/mlx5/verbs.c:7122:29: return_function: returning to ‘_mlx5dv_create_mkey’ from ‘mlx5_create_sig_ctx’
rdma-core-59.0/providers/mlx5/verbs.c:7123:20: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7129:23: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7132:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7133:23: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7133:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7136:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7194:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7196:1: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7197:9: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/13)
# 7195|   		mlx5_destroy_sig_ctx(mkey->sig);
# 7196|   err_free_mkey:
# 7197|-> 	free(mkey);
# 7198|   	return NULL;
# 7199|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def932]
rdma-core-59.0/providers/mlx5/verbs.c:7408:25: warning[-Wanalyzer-malloc-leak]: leak of ‘crypto_login’
rdma-core-59.0/providers/mlx5/verbs.c:7568:1: enter_function: entry to ‘_mlx5dv_crypto_login_create’
rdma-core-59.0/providers/mlx5/verbs.c:7574:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7579:24: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7579:24: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7580:12: branch_false: following ‘false’ branch (when ‘crypto_login’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7585:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7585:15: call_function: calling ‘crypto_login_create’ from ‘_mlx5dv_crypto_login_create’
# 7406|   	obj = mlx5dv_devx_obj_create(context, in, sizeof(in), out, sizeof(out));
# 7407|   	if (!obj)
# 7408|-> 		errno = mlx5_get_cmd_status_err(errno, out);
# 7409|   
# 7410|   	return obj;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def933]
rdma-core-59.0/providers/mlx5/verbs.c:7768:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dek’
rdma-core-59.0/providers/mlx5/verbs.c:7692:1: enter_function: entry to ‘_mlx5dv_dek_create’
rdma-core-59.0/providers/mlx5/verbs.c:7703:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7710:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7710:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7715:13: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7715:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7720:17: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7732:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7738:9: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7739:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7744:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7744:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7745:12: branch_false: following ‘false’ branch (when ‘dek’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7751:9: call_function: inlined call to ‘_devx_set’ from ‘_mlx5dv_dek_create’
rdma-core-59.0/providers/mlx5/verbs.c:7767:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/verbs.c:7768:25: branch_true: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7768:25: danger: ‘dek’ leaks here; was allocated at [(12)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/11)
# 7766|   	obj = mlx5dv_devx_obj_create(context, in, sizeof(in), out, sizeof(out));
# 7767|   	if (!obj) {
# 7768|-> 		errno = mlx5_get_cmd_status_err(errno, out);
# 7769|   		free(dek);
# 7770|   		dek = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def934]
rdma-core-59.0/providers/mlx5/verbs.c:7898:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
rdma-core-59.0/providers/mlx5/verbs.c:7868:1: enter_function: entry to ‘_mlx5dv_alloc_var’
rdma-core-59.0/providers/mlx5/verbs.c:7879:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
rdma-core-59.0/providers/mlx5/verbs.c:7884:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7884:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7885:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7890:18: call_function: inlined call to ‘fill_attr_out_obj’ from ‘_mlx5dv_alloc_var’
rdma-core-59.0/providers/mlx5/verbs.c:7898:15: danger: ‘obj’ leaks here; was allocated at [(4)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/3)
# 7896|   		      &obj->dv_var.page_id);
# 7897|   
# 7898|-> 	ret = execute_ioctl(context, cmd);
# 7899|   	if (ret)
# 7900|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def935]
rdma-core-59.0/providers/mlx5/verbs.c:7987:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
rdma-core-59.0/providers/mlx5/verbs.c:7954:26: enter_function: entry to ‘_mlx5dv_pp_alloc’
rdma-core-59.0/providers/mlx5/verbs.c:7968:12: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
rdma-core-59.0/providers/mlx5/verbs.c:7974:15: branch_false: ...to here
rdma-core-59.0/providers/mlx5/verbs.c:7974:15: acquire_memory: allocated here
rdma-core-59.0/providers/mlx5/verbs.c:7975:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)...
rdma-core-59.0/providers/mlx5/verbs.c:7980:18: call_function: inlined call to ‘fill_attr_out_obj’ from ‘_mlx5dv_pp_alloc’
rdma-core-59.0/providers/mlx5/verbs.c:7981:9: call_function: calling ‘fill_attr_in’ from ‘_mlx5dv_pp_alloc’
rdma-core-59.0/providers/mlx5/verbs.c:7981:9: return_function: returning to ‘_mlx5dv_pp_alloc’ from ‘fill_attr_in’
rdma-core-59.0/providers/mlx5/verbs.c:7987:15: danger: ‘obj’ leaks here; was allocated at [(4)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/3)
# 7985|   		      &obj->dv_pp.index);
# 7986|   
# 7987|-> 	ret = execute_ioctl(context, cmd);
# 7988|   	if (ret)
# 7989|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def936]
rdma-core-59.0/providers/mthca/ah.c:59:13: warning[-Wanalyzer-malloc-leak]: leak of ‘page’
rdma-core-59.0/providers/mthca/ah.c:55:16: acquire_memory: allocated here
rdma-core-59.0/providers/mthca/ah.c:56:12: branch_false: following ‘false’ branch (when ‘page’ is non-NULL)...
rdma-core-59.0/providers/mthca/ah.c:59:13: branch_false: ...to here
rdma-core-59.0/providers/mthca/ah.c:59:13: danger: ‘page’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   57|   		return NULL;
#   58|   
#   59|-> 	if (mthca_alloc_buf(&page->buf, page_size, page_size)) {
#   60|   		free(page);
#   61|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def937]
rdma-core-59.0/providers/mthca/mthca.c:232:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/mthca/mthca.c:225:15: acquire_memory: allocated here
rdma-core-59.0/providers/mthca/mthca.c:226:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/mthca/mthca.c:229:39: branch_false: ...to here
rdma-core-59.0/providers/mthca/mthca.c:232:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  230|   	dev->page_size   = sysconf(_SC_PAGESIZE);
#  231|   
#  232|-> 	return &dev->ibv_dev;
#  233|   }
#  234|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def938]
rdma-core-59.0/providers/mthca/verbs.c:143:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vmr’
rdma-core-59.0/providers/mthca/verbs.c:139:15: acquire_memory: allocated here
rdma-core-59.0/providers/mthca/verbs.c:140:12: branch_false: following ‘false’ branch (when ‘vmr’ is non-NULL)...
rdma-core-59.0/providers/mthca/verbs.c:143:15: branch_false: ...to here
rdma-core-59.0/providers/mthca/verbs.c:143:15: danger: ‘vmr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  141|   		return NULL;
#  142|   
#  143|-> 	ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, vmr,
#  144|   			     &cmd.ibv_cmd, sizeof(cmd), &resp, sizeof(resp));
#  145|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def939]
rdma-core-59.0/providers/mthca/verbs.c:517:13: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/mthca/verbs.c:495:16: enter_function: entry to ‘mthca_create_qp’
rdma-core-59.0/providers/mthca/verbs.c:503:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mthca/verbs.c:504:13: branch_false: ...to here
rdma-core-59.0/providers/mthca/verbs.c:503:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mthca/verbs.c:505:13: branch_false: ...to here
rdma-core-59.0/providers/mthca/verbs.c:503:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mthca/verbs.c:506:13: branch_false: ...to here
rdma-core-59.0/providers/mthca/verbs.c:503:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mthca/verbs.c:507:13: branch_false: ...to here
rdma-core-59.0/providers/mthca/verbs.c:503:13: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/mthca/verbs.c:510:14: branch_false: ...to here
rdma-core-59.0/providers/mthca/verbs.c:510:14: acquire_memory: allocated here
rdma-core-59.0/providers/mthca/verbs.c:511:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/mthca/verbs.c:514:22: branch_false: ...to here
rdma-core-59.0/providers/mthca/verbs.c:514:22: call_function: inlined call to ‘align_queue_size’ from ‘mthca_create_qp’
rdma-core-59.0/providers/mthca/verbs.c:514:9: branch_true: ...to here
rdma-core-59.0/providers/mthca/verbs.c:515:22: call_function: inlined call to ‘align_queue_size’ from ‘mthca_create_qp’
 branch_false: ...to here
rdma-core-59.0/providers/mthca/verbs.c:515:22: call_function: inlined call to ‘align_queue_size’ from ‘mthca_create_qp’
rdma-core-59.0/providers/mthca/verbs.c:515:22: call_function: inlined call to ‘align_queue_size’ from ‘mthca_create_qp’
rdma-core-59.0/providers/mthca/verbs.c:517:13: danger: ‘qp’ leaks here; was allocated at [(12)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/11)
#  515|   	qp->rq.max = align_queue_size(pd->context, attr->cap.max_recv_wr, 0);
#  516|   
#  517|-> 	if (mthca_alloc_qp_buf(pd, &attr->cap, attr->qp_type, qp))
#  518|   		goto err;
#  519|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def940]
rdma-core-59.0/providers/mthca/verbs.c:722:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/mthca/verbs.c:718:14: acquire_memory: allocated here
rdma-core-59.0/providers/mthca/verbs.c:719:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/mthca/verbs.c:722:13: branch_false: ...to here
rdma-core-59.0/providers/mthca/verbs.c:722:13: danger: ‘ah’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  720|   		return NULL;
#  721|   
#  722|-> 	if (mthca_alloc_av(to_mpd(pd), attr, ah)) {
#  723|   		free(ah);
#  724|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def941]
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2115:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2095:16: enter_function: entry to ‘ocrdma_create_ah’
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2104:14: acquire_memory: allocated here
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2105:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2107:9: branch_false: ...to here
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2110:21: call_function: calling ‘ocrdma_alloc_ah_tbl_id’ from ‘ocrdma_create_ah’
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2110:21: return_function: returning to ‘ocrdma_create_ah’ from ‘ocrdma_alloc_ah_tbl_id’
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2111:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2113:9: branch_false: ...to here
rdma-core-59.0/providers/ocrdma/ocrdma_verbs.c:2115:18: danger: ‘ah’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
# 2113|   	attr->dlid = ahtbl_idx;
# 2114|   	memset(&resp, 0, sizeof(resp));
# 2115|-> 	status = ibv_cmd_create_ah(ibpd, &ah->ibv_ah, attr, &resp, sizeof(resp));
# 2116|   	if (status)
# 2117|   		goto cmd_err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def942]
rdma-core-59.0/providers/qedr/qelr_main.c:242:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/qedr/qelr_main.c:238:15: acquire_memory: allocated here
rdma-core-59.0/providers/qedr/qelr_main.c:239:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/qedr/qelr_main.c:242:16: branch_false: ...to here
rdma-core-59.0/providers/qedr/qelr_main.c:242:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  240|   		return NULL;
#  241|   
#  242|-> 	return &dev->ibv_dev;
#  243|   }
#  244|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def943]
rdma-core-59.0/providers/qedr/qelr_verbs.c:370:9: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2635:1: enter_function: entry to ‘qelr_create_xrc_srq’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2645:15: acquire_memory: allocated here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2646:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2648:9: branch_false: ...to here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2650:14: call_function: calling ‘qelr_create_srq_buffers’ from ‘qelr_create_xrc_srq’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2650:14: return_function: returning to ‘qelr_create_xrc_srq’ from ‘qelr_create_srq_buffers’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2651:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2652:17: branch_true: ...to here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2680:9: call_function: calling ‘qelr_destroy_srq_buffers’ from ‘qelr_create_xrc_srq’
#  368|   	uint32_t prod_size;
#  369|   
#  370|-> 	qelr_chain_free(&srq->hw_srq.chain);
#  371|   
#  372|   	virt_prod_pair_addr = srq->hw_srq.virt_prod_pair_addr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def944]
rdma-core-59.0/providers/qedr/qelr_verbs.c:430:14: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2697:17: enter_function: entry to ‘qelr_create_srq_ex’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2702:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2703:24: branch_true: ...to here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2703:24: call_function: calling ‘qelr_create_srq’ from ‘qelr_create_srq_ex’
#  428|   	chain_size = max_sges * QELR_RQE_ELEMENT_SIZE;
#  429|   
#  430|-> 	rc = qelr_chain_alloc(&srq->hw_srq.chain, chain_size,
#  431|   			      cxt->kernel_page_size, QELR_RQE_ELEMENT_SIZE);
#  432|   	if (rc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def945]
rdma-core-59.0/providers/qedr/qelr_verbs.c:544:14: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2715:23: enter_function: entry to ‘create_qp’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2730:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2735:14: branch_false: ...to here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2735:14: acquire_memory: allocated here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2736:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2739:9: branch_false: ...to here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2739:9: call_function: calling ‘qelr_basic_qp_config’ from ‘create_qp’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2739:9: return_function: returning to ‘create_qp’ from ‘qelr_basic_qp_config’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2741:14: call_function: calling ‘qelr_create_qp_buffers’ from ‘create_qp’
#  542|   
#  543|   	chain_size = max_send_buf;
#  544|-> 	rc = qelr_chain_alloc(&qp->sq.chain, chain_size, cxt->kernel_page_size,
#  545|   			      QELR_SQE_ELEMENT_SIZE);
#  546|   	if (rc)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def946]
rdma-core-59.0/providers/qedr/qelr_verbs.c:2481:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2460:5: enter_function: entry to ‘qelr_poll_cq’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2471:16: branch_true: following ‘true’ branch (when ‘num_entries != 0’)...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2471:31: call_function: inlined call to ‘is_valid_cqe’ from ‘qelr_poll_cq’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2471:16: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2476:17: branch_true: ...to here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2479:20: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2480:21: call_function: inlined call to ‘cqe_get_type’ from ‘qelr_poll_cq’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2479:21: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2481:25: branch_true: ...to here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2481:25: danger: dereference of NULL ‘0’
# 2479|   		if (!qp &&
# 2480|   		    cqe_get_type(cqe) != RDMA_CQE_TYPE_RESPONDER_XRC_SRQ) {
# 2481|-> 			verbs_err(verbs_get_ctx(qp->ibv_qp->context),
# 2482|   			       "Error: CQE QP pointer is NULL. CQE=%p\n", cqe);
# 2483|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def947]
rdma-core-59.0/providers/qedr/qelr_verbs.c:2608:14: warning[-Wanalyzer-malloc-leak]: leak of ‘xrcd’
rdma-core-59.0/providers/qedr/qelr_verbs.c:2604:16: acquire_memory: allocated here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2605:12: branch_false: following ‘false’ branch (when ‘xrcd’ is non-NULL)...
rdma-core-59.0/providers/qedr/qelr_verbs.c:2608:14: branch_false: ...to here
rdma-core-59.0/providers/qedr/qelr_verbs.c:2608:14: danger: ‘xrcd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 2606|   		return NULL;
# 2607|   
# 2608|-> 	rc = ibv_cmd_open_xrcd(context, xrcd, sizeof(*xrcd), init_attr, &cmd,
# 2609|   			       sizeof(cmd), &resp, sizeof(resp));
# 2610|   	if (rc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def948]
rdma-core-59.0/providers/rxe/rxe.c:112:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/rxe/rxe.c:108:14: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:109:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:112:13: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:112:13: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  110|   		return NULL;
#  111|   
#  112|-> 	if (ibv_cmd_alloc_pd(context, pd, &cmd, sizeof(cmd),
#  113|   					&resp, sizeof(resp))) {
#  114|   		free(pd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def949]
rdma-core-59.0/providers/rxe/rxe.c:143:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ibmw’
rdma-core-59.0/providers/rxe/rxe.c:139:16: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:140:12: branch_false: following ‘false’ branch (when ‘ibmw’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:143:15: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:143:15: danger: ‘ibmw’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  141|   		return NULL;
#  142|   
#  143|-> 	ret = ibv_cmd_alloc_mw(ibpd, type, ibmw, &cmd, sizeof(cmd), &resp,
#  144|   			       sizeof(resp));
#  145|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def950]
rdma-core-59.0/providers/rxe/rxe.c:216:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vmr’
rdma-core-59.0/providers/rxe/rxe.c:212:15: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:213:12: branch_false: following ‘false’ branch (when ‘vmr’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:216:15: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:216:15: danger: ‘vmr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  214|   		return NULL;
#  215|   
#  216|-> 	ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, vmr, &cmd,
#  217|   			     sizeof(cmd), &resp, sizeof(resp));
#  218|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def951]
rdma-core-59.0/providers/rxe/rxe.c:374:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cq’
rdma-core-59.0/providers/rxe/rxe.c:370:14: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:371:12: branch_false: following ‘false’ branch (when ‘cq’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:374:15: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:374:15: danger: ‘cq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  372|   		return NULL;
#  373|   
#  374|-> 	ret = ibv_cmd_create_cq(context, cqe, channel, comp_vector,
#  375|   				&cq->vcq.cq, NULL, 0,
#  376|   				&resp.ibv_resp, sizeof(resp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def952]
rdma-core-59.0/providers/rxe/rxe.c:432:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cq’
rdma-core-59.0/providers/rxe/rxe.c:423:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/rxe/rxe.c:428:14: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:428:14: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:429:12: branch_false: following ‘false’ branch (when ‘cq’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:432:15: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:432:15: danger: ‘cq’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  430|   		goto err;
#  431|   
#  432|-> 	ret = ibv_cmd_create_cq_ex(context, attr, NULL,
#  433|   				   &cq->vcq, NULL, 0,
#  434|   				   &resp.ibv_resp, sizeof(resp), 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def953]
rdma-core-59.0/providers/rxe/rxe.c:589:15: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/rxe/rxe.c:583:15: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:584:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:587:9: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:589:15: danger: ‘srq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  587|   	ibsrq = &srq->vsrq.srq;
#  588|   
#  589|-> 	ret = ibv_cmd_create_srq(ibpd, ibsrq, attr, &cmd, sizeof(cmd),
#  590|   				 &resp.ibv_resp, sizeof(resp));
#  591|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def954]
rdma-core-59.0/providers/rxe/rxe.c:628:15: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/rxe/rxe.c:622:15: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:623:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:626:9: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:628:15: danger: ‘srq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  626|   	ibsrq = &srq->vsrq.srq;
#  627|   
#  628|-> 	ret = ibv_cmd_create_srq_ex(ibcontext, &srq->vsrq, attr_ex,
#  629|   			  &cmd, sizeof(cmd), &resp.ibv_resp, sizeof(resp));
#  630|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def955]
rdma-core-59.0/providers/rxe/rxe.c:1246:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/rxe/rxe.c:1242:14: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:1243:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:1246:15: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:1246:15: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1244|   		goto err;
# 1245|   
# 1246|-> 	ret = ibv_cmd_create_qp(ibpd, &qp->vqp.qp, attr, &cmd, sizeof(cmd),
# 1247|   				&resp.ibv_resp, sizeof(resp));
# 1248|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def956]
rdma-core-59.0/providers/rxe/rxe.c:1396:15: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/rxe/rxe.c:1386:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/rxe/rxe.c:1389:14: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:1389:14: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:1390:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:1393:13: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:1393:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/rxe/rxe.c:1396:15: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:1396:15: danger: ‘qp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 1394|   		set_qp_send_ops(qp, attr->send_ops_flags);
# 1395|   
# 1396|-> 	ret = ibv_cmd_create_qp_ex2(context, &qp->vqp, attr,
# 1397|   				    &cmd, cmd_size,
# 1398|   				    &resp.ibv_resp, resp_size);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def957]
rdma-core-59.0/providers/rxe/rxe.c:1789:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/rxe/rxe.c:1785:14: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:1786:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:1789:15: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:1789:15: danger: ‘ah’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 1787|   		return NULL;
# 1788|   
# 1789|-> 	ret = ibv_cmd_create_ah(pd, &ah->ibv_ah, attr,
# 1790|   				&resp.ibv_resp, sizeof(resp));
# 1791|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def958]
rdma-core-59.0/providers/rxe/rxe.c:1911:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/rxe/rxe.c:1905:15: acquire_memory: allocated here
rdma-core-59.0/providers/rxe/rxe.c:1906:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/rxe/rxe.c:1909:28: branch_false: ...to here
rdma-core-59.0/providers/rxe/rxe.c:1911:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 1909|   	dev->abi_version = sysfs_dev->abi_ver;
# 1910|   
# 1911|-> 	return &dev->ibv_dev;
# 1912|   }
# 1913|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def959]
rdma-core-59.0/providers/siw/siw.c:81:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/siw/siw.c:77:14: acquire_memory: allocated here
rdma-core-59.0/providers/siw/siw.c:78:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/siw/siw.c:81:13: branch_false: ...to here
rdma-core-59.0/providers/siw/siw.c:81:13: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   79|   		return NULL;
#   80|   
#   81|-> 	if (ibv_cmd_alloc_pd(ctx, pd, &cmd, sizeof(cmd), &resp, sizeof(resp))) {
#   82|   		free(pd);
#   83|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def960]
rdma-core-59.0/providers/siw/siw.c:112:14: warning[-Wanalyzer-malloc-leak]: leak of ‘mr’
rdma-core-59.0/providers/siw/siw.c:108:14: acquire_memory: allocated here
rdma-core-59.0/providers/siw/siw.c:109:12: branch_false: following ‘false’ branch (when ‘mr’ is non-NULL)...
rdma-core-59.0/providers/siw/siw.c:112:14: branch_false: ...to here
rdma-core-59.0/providers/siw/siw.c:112:14: danger: ‘mr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  110|   		return NULL;
#  111|   
#  112|-> 	rv = ibv_cmd_reg_mr(pd, addr, len, hca_va, access,
#  113|   			    &mr->base_mr, &cmd.ibv_cmd, sizeof(cmd),
#  114|   			    &resp.ibv_resp, sizeof(resp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def961]
rdma-core-59.0/providers/siw/siw.c:148:14: warning[-Wanalyzer-malloc-leak]: leak of ‘cq’
rdma-core-59.0/providers/siw/siw.c:144:14: acquire_memory: allocated here
rdma-core-59.0/providers/siw/siw.c:145:12: branch_false: following ‘false’ branch (when ‘cq’ is non-NULL)...
rdma-core-59.0/providers/siw/siw.c:148:14: branch_false: ...to here
rdma-core-59.0/providers/siw/siw.c:148:14: danger: ‘cq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  146|   		return NULL;
#  147|   
#  148|-> 	rv = ibv_cmd_create_cq(ctx, num_cqe, channel, comp_vector, &cq->base_cq,
#  149|   			       &cmd.ibv_cmd, sizeof(cmd), &resp.ibv_resp,
#  150|   			       sizeof(resp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def962]
rdma-core-59.0/providers/siw/siw.c:224:14: warning[-Wanalyzer-malloc-leak]: leak of ‘srq’
rdma-core-59.0/providers/siw/siw.c:220:15: acquire_memory: allocated here
rdma-core-59.0/providers/siw/siw.c:221:12: branch_false: following ‘false’ branch (when ‘srq’ is non-NULL)...
rdma-core-59.0/providers/siw/siw.c:224:14: branch_false: ...to here
rdma-core-59.0/providers/siw/siw.c:224:14: danger: ‘srq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  222|   		return NULL;
#  223|   
#  224|-> 	rv = ibv_cmd_create_srq(pd, &srq->base_srq, attr, &cmd.ibv_cmd,
#  225|   				sizeof(cmd), &resp.ibv_resp, sizeof(resp));
#  226|   	if (rv) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def963]
rdma-core-59.0/providers/siw/siw.c:309:14: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/siw/siw.c:305:14: acquire_memory: allocated here
rdma-core-59.0/providers/siw/siw.c:306:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/siw/siw.c:309:14: branch_false: ...to here
rdma-core-59.0/providers/siw/siw.c:309:14: danger: ‘qp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  307|   		return NULL;
#  308|   
#  309|-> 	rv = ibv_cmd_create_qp(pd, &qp->base_qp, attr, &cmd.ibv_cmd,
#  310|   			       sizeof(cmd), &resp.ibv_resp, sizeof(resp));
#  311|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def964]
rdma-core-59.0/providers/siw/siw.c:887:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/siw/siw.c:883:15: acquire_memory: allocated here
rdma-core-59.0/providers/siw/siw.c:884:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/siw/siw.c:887:16: branch_false: ...to here
rdma-core-59.0/providers/siw/siw.c:887:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  885|   		return NULL;
#  886|   
#  887|-> 	return &dev->base_dev;
#  888|   }
#  889|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def965]
rdma-core-59.0/providers/vmw_pvrdma/pvrdma_main.c:196:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
rdma-core-59.0/providers/vmw_pvrdma/pvrdma_main.c:189:15: acquire_memory: allocated here
rdma-core-59.0/providers/vmw_pvrdma/pvrdma_main.c:190:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
rdma-core-59.0/providers/vmw_pvrdma/pvrdma_main.c:193:28: branch_false: ...to here
rdma-core-59.0/providers/vmw_pvrdma/pvrdma_main.c:196:16: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  194|   	dev->page_size   = sysconf(_SC_PAGESIZE);
#  195|   
#  196|-> 	return &dev->ibv_dev;
#  197|   }
#  198|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def966]
rdma-core-59.0/providers/vmw_pvrdma/qp.c:62:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/providers/vmw_pvrdma/qp.c:209:16: enter_function: entry to ‘pvrdma_create_qp’
rdma-core-59.0/providers/vmw_pvrdma/qp.c:232:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/vmw_pvrdma/qp.c:235:9: branch_false: ...to here
rdma-core-59.0/providers/vmw_pvrdma/qp.c:260:13: call_function: calling ‘pvrdma_alloc_qp_buf’ from ‘pvrdma_create_qp’
#   60|   				dev->page_size);
#   61|   
#   62|-> 	if (pvrdma_alloc_buf(&qp->sbuf, qp->sbuf.length, dev->page_size)) {
#   63|   		free(qp->sq.wrid);
#   64|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def967]
rdma-core-59.0/providers/vmw_pvrdma/qp.c:62:13: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’
rdma-core-59.0/providers/vmw_pvrdma/qp.c:209:16: enter_function: entry to ‘pvrdma_create_qp’
rdma-core-59.0/providers/vmw_pvrdma/qp.c:231:14: acquire_memory: allocated here
rdma-core-59.0/providers/vmw_pvrdma/qp.c:232:12: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)...
rdma-core-59.0/providers/vmw_pvrdma/qp.c:235:9: branch_false: ...to here
rdma-core-59.0/providers/vmw_pvrdma/qp.c:260:13: call_function: calling ‘pvrdma_alloc_qp_buf’ from ‘pvrdma_create_qp’
#   60|   				dev->page_size);
#   61|   
#   62|-> 	if (pvrdma_alloc_buf(&qp->sbuf, qp->sbuf.length, dev->page_size)) {
#   63|   		free(qp->sq.wrid);
#   64|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def968]
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:93:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:89:14: acquire_memory: allocated here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:90:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:93:13: branch_false: ...to here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:93:13: danger: ‘pd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   91|   		return NULL;
#   92|   
#   93|-> 	if (ibv_cmd_alloc_pd(context, &pd->ibv_pd, &cmd, sizeof(cmd),
#   94|   			     &resp.ibv_resp, sizeof(resp))) {
#   95|   		free(pd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def969]
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:129:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vmr’
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:125:15: acquire_memory: allocated here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:126:12: branch_false: following ‘false’ branch (when ‘vmr’ is non-NULL)...
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:129:15: branch_false: ...to here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:129:15: danger: ‘vmr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  127|   		return NULL;
#  128|   
#  129|-> 	ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, vmr, &cmd,
#  130|   			     sizeof(cmd), &resp, sizeof(resp));
#  131|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def970]
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:227:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ah’
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:196:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:199:13: branch_false: ...to here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:199:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:202:13: branch_false: ...to here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:202:12: branch_false: following ‘false’ branch...
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:206:12: branch_false: ...to here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:212:14: acquire_memory: allocated here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:213:12: branch_false: following ‘false’ branch (when ‘ah’ is non-NULL)...
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:217:23: branch_false: ...to here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:226:12: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:228:50: branch_true: ...to here
rdma-core-59.0/providers/vmw_pvrdma/verbs.c:227:22: danger: ‘ah’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  225|   
#  226|   	if (port_attr.port_cap_flags & IBV_PORT_IP_BASED_GIDS) {
#  227|-> 		if (!ibv_resolve_eth_l2_from_gid(pd->context, attr,
#  228|   						 av->dmac, NULL))
#  229|   			return &ah->ibv_ah;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def971]
rdma-core-59.0/pyverbs/dmabuf_alloc.c:111:19: warning[-Wanalyzer-malloc-leak]: leak of ‘dmabuf’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:209:16: enter_function: entry to ‘dmabuf_alloc’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:214:18: acquire_memory: allocated here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:215:12: branch_false: following ‘false’ branch (when ‘dmabuf’ is non-NULL)...
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: branch_false: ...to here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: call_function: calling ‘drm_open’ from ‘dmabuf_alloc’
#  109|   	snprintf(path, sizeof(path), "/dev/dri/renderD%d", gpu + 128);
#  110|   
#  111|-> 	drm->fd = open(path, O_RDWR);
#  112|   	if (drm->fd < 0)
#  113|   		goto out_free;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def972]
rdma-core-59.0/pyverbs/dmabuf_alloc.c:111:19: warning[-Wanalyzer-malloc-leak]: leak of ‘drm’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:105:15: acquire_memory: allocated here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:106:12: branch_false: following ‘false’ branch (when ‘drm’ is non-NULL)...
rdma-core-59.0/pyverbs/dmabuf_alloc.c:109:9: branch_false: ...to here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:111:19: danger: ‘drm’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  109|   	snprintf(path, sizeof(path), "/dev/dri/renderD%d", gpu + 128);
#  110|   
#  111|-> 	drm->fd = open(path, O_RDWR);
#  112|   	if (drm->fd < 0)
#  113|   		goto out_free;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def973]
rdma-core-59.0/pyverbs/dmabuf_alloc.c:134:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dmabuf’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:209:16: enter_function: entry to ‘dmabuf_alloc’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:214:18: acquire_memory: allocated here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:215:12: branch_false: following ‘false’ branch (when ‘dmabuf’ is non-NULL)...
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: branch_false: ...to here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: call_function: calling ‘drm_open’ from ‘dmabuf_alloc’
#  132|   
#  133|   out_close:
#  134|-> 	close(drm->fd);
#  135|   
#  136|   out_free:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def974]
rdma-core-59.0/pyverbs/dmabuf_alloc.c:134:9: warning[-Wanalyzer-malloc-leak]: leak of ‘drm’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:105:15: acquire_memory: allocated here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:106:12: branch_false: following ‘false’ branch (when ‘drm’ is non-NULL)...
rdma-core-59.0/pyverbs/dmabuf_alloc.c:109:9: branch_false: ...to here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:112:12: branch_false: following ‘false’ branch...
rdma-core-59.0/pyverbs/dmabuf_alloc.c:115:9: branch_false: ...to here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:134:9: danger: ‘drm’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  132|   
#  133|   out_close:
#  134|-> 	close(drm->fd);
#  135|   
#  136|   out_free:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def975]
rdma-core-59.0/pyverbs/dmabuf_alloc.c:167:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:209:16: enter_function: entry to ‘dmabuf_alloc’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:215:12: branch_false: following ‘false’ branch (when ‘dmabuf’ is non-NULL)...
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: branch_false: ...to here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: call_function: calling ‘drm_open’ from ‘dmabuf_alloc’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: return_function: returning to ‘dmabuf_alloc’ from ‘drm_open’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:219:12: branch_false: following ‘false’ branch...
rdma-core-59.0/pyverbs/dmabuf_alloc.c:222:15: branch_false: ...to here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:222:15: call_function: calling ‘drm_alloc_buf’ from ‘dmabuf_alloc’
#  165|   		return -EINVAL;
#  166|   
#  167|-> 	err = drm->alloc(drm, size, handle, gtt);
#  168|   	if (err)
#  169|   		return err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def976]
rdma-core-59.0/pyverbs/dmabuf_alloc.c:167:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dmabuf’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:209:16: enter_function: entry to ‘dmabuf_alloc’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:214:18: acquire_memory: allocated here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:215:12: branch_false: following ‘false’ branch (when ‘dmabuf’ is non-NULL)...
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: branch_false: ...to here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: call_function: calling ‘drm_open’ from ‘dmabuf_alloc’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:218:23: return_function: returning to ‘dmabuf_alloc’ from ‘drm_open’
rdma-core-59.0/pyverbs/dmabuf_alloc.c:219:12: branch_false: following ‘false’ branch...
rdma-core-59.0/pyverbs/dmabuf_alloc.c:222:15: branch_false: ...to here
rdma-core-59.0/pyverbs/dmabuf_alloc.c:222:15: call_function: calling ‘drm_alloc_buf’ from ‘dmabuf_alloc’
#  165|   		return -EINVAL;
#  166|   
#  167|-> 	err = drm->alloc(drm, size, handle, gtt);
#  168|   	if (err)
#  169|   		return err;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def977]
rdma-core-59.0/rdma-ndd/rdma-ndd.c:87:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&nd_file, "r+")’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:240:13: enter_function: entry to ‘monitor’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:249:12: branch_false: following ‘false’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:255:9: branch_false: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:270:9: call_function: calling ‘set_rdma_node_desc’ from ‘monitor’
#   85|   
#   86|   	va_start(ap, fmt);
#   87|-> 	vsyslog(LOG_DEBUG, fmt, ap);
#   88|   	va_end(ap);
#   89|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def978]
rdma-core-59.0/rdma-ndd/rdma-ndd.c:87:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&nd_file, "r+")’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:240:13: enter_function: entry to ‘monitor’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:249:12: branch_false: following ‘false’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:255:9: branch_false: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:270:9: call_function: calling ‘set_rdma_node_desc’ from ‘monitor’
#   85|   
#   86|   	va_start(ap, fmt);
#   87|-> 	vsyslog(LOG_DEBUG, fmt, ap);
#   88|   	va_end(ap);
#   89|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def979]
rdma-core-59.0/rdma-ndd/rdma-ndd.c:87:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:217:13: enter_function: entry to ‘process_udev_event’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:222:12: branch_true: following ‘true’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:223:38: branch_true: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:226:17: call_function: calling ‘dbg_log’ from ‘process_udev_event’
#   85|   
#   86|   	va_start(ap, fmt);
#   87|-> 	vsyslog(LOG_DEBUG, fmt, ap);
#   88|   	va_end(ap);
#   89|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def980]
rdma-core-59.0/rdma-ndd/rdma-ndd.c:138:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&nd_file, "r+")’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:217:13: enter_function: entry to ‘process_udev_event’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:222:12: branch_true: following ‘true’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:223:38: branch_true: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:229:20: branch_true: following ‘true’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:230:23: branch_true: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:232:29: call_function: calling ‘update_node_desc’ from ‘process_udev_event’
#  136|   
#  137|   	if (!fgets(nd, sizeof(nd), f)) {
#  138|-> 		syslog(LOG_ERR, "Failed to read %s\n", nd_file);
#  139|   		rc = -EIO;
#  140|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def981]
rdma-core-59.0/rdma-ndd/rdma-ndd.c:138:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&nd_file, "r+")’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:217:13: enter_function: entry to ‘process_udev_event’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:222:12: branch_true: following ‘true’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:223:38: branch_true: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:229:20: branch_true: following ‘true’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:230:23: branch_true: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:232:29: call_function: calling ‘update_node_desc’ from ‘process_udev_event’
#  136|   
#  137|   	if (!fgets(nd, sizeof(nd), f)) {
#  138|-> 		syslog(LOG_ERR, "Failed to read %s\n", nd_file);
#  139|   		rc = -EIO;
#  140|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def982]
rdma-core-59.0/rdma-ndd/rdma-ndd.c:150:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&nd_file, "r+")’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:240:13: enter_function: entry to ‘monitor’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:249:12: branch_false: following ‘false’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:255:9: branch_false: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:270:9: call_function: calling ‘set_rdma_node_desc’ from ‘monitor’
#  148|   	} else {
#  149|   		dbg_log("%s: change (%s) -> (%s)\n", device, nd, new_nd);
#  150|-> 		rewind(f);
#  151|   		fprintf(f, "%s", new_nd);
#  152|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def983]
rdma-core-59.0/rdma-ndd/rdma-ndd.c:150:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&nd_file, "r+")’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:240:13: enter_function: entry to ‘monitor’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:249:12: branch_false: following ‘false’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:255:9: branch_false: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:270:9: call_function: calling ‘set_rdma_node_desc’ from ‘monitor’
#  148|   	} else {
#  149|   		dbg_log("%s: change (%s) -> (%s)\n", device, nd, new_nd);
#  150|-> 		rewind(f);
#  151|   		fprintf(f, "%s", new_nd);
#  152|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def984]
rdma-core-59.0/rdma-ndd/rdma-ndd.c:171:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/sys/class/infiniband")’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:240:13: enter_function: entry to ‘monitor’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:249:12: branch_false: following ‘false’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:255:9: branch_false: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:270:9: call_function: calling ‘set_rdma_node_desc’ from ‘monitor’
#  169|   	}
#  170|   
#  171|-> 	while ((dent = readdir(class_dir))) {
#  172|   		if (dent->d_name[0] == '.')
#  173|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def985]
rdma-core-59.0/rdma-ndd/rdma-ndd.c:190:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/sys/kernel/hostname", 0)’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:240:13: enter_function: entry to ‘monitor’
rdma-core-59.0/rdma-ndd/rdma-ndd.c:248:17: acquire_resource: opened here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:249:12: branch_false: following ‘false’ branch...
rdma-core-59.0/rdma-ndd/rdma-ndd.c:255:9: branch_false: ...to here
rdma-core-59.0/rdma-ndd/rdma-ndd.c:255:9: call_function: calling ‘read_hostname’ from ‘monitor’
#  188|   		strip_domain(name);
#  189|   	} else {
#  190|-> 		syslog(LOG_ERR, "Read %s Failed\n", SYS_HOSTNAME);
#  191|   	}
#  192|   	lseek(fd, 0, SEEK_SET);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def986]
rdma-core-59.0/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-VRLx2h/src.c:4:4: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected

Error: GCC_ANALYZER_WARNING (CWE-775): [#def987]
rdma-core-59.0/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-aiooSJ/src.c:7:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor

Error: GCC_ANALYZER_WARNING (CWE-775): [#def988]
rdma-core-59.0/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-aiooSJ/src.c:8:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor

Error: GCC_ANALYZER_WARNING (CWE-401): [#def989]
rdma-core-59.0/redhat-linux-build/include/ccan/list.h:185:9: warning[-Wanalyzer-malloc-leak]: leak of ‘create_range(astart + length,  rend - astart - length)’
rdma-core-59.0/util/interval_set.c:155:5: enter_function: entry to ‘iset_alloc_range’
rdma-core-59.0/util/interval_set.c:169:9: branch_true: following ‘true’ branch...
rdma-core-59.0/util/interval_set.c:170:32: branch_true: ...to here
rdma-core-59.0/util/interval_set.c:178:12: branch_true: following ‘true’ branch (when ‘found != 0’)...
rdma-core-59.0/util/interval_set.c:184:13: branch_true: ...to here
rdma-core-59.0/util/interval_set.c:184:12: branch_false: following ‘false’ branch...
rdma-core-59.0/util/interval_set.c:192:35: branch_false: ...to here
rdma-core-59.0/util/interval_set.c:193:20: branch_true: following ‘true’ branch...
rdma-core-59.0/util/interval_set.c:195:45: branch_true: ...to here
rdma-core-59.0/util/interval_set.c:194:32: call_function: calling ‘create_range’ from ‘iset_alloc_range’
rdma-core-59.0/util/interval_set.c:194:32: return_function: returning to ‘iset_alloc_range’ from ‘create_range’
rdma-core-59.0/util/interval_set.c:196:28: branch_false: following ‘false’ branch...
rdma-core-59.0/util/interval_set.c:200:25: branch_false: ...to here
rdma-core-59.0/util/interval_set.c:200:25: call_function: inlined call to ‘list_add_after_’ from ‘iset_alloc_range’
#  183|   	n->next = p->next;
#  184|   	n->prev = p;
#  185|-> 	p->next->prev = n;
#  186|   	p->next = n;
#  187|   	(void)list_debug(h, abortstr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def990]
rdma-core-59.0/redhat-linux-build/include/ccan/list.h:234:9: warning[-Wanalyzer-malloc-leak]: leak of ‘create_range(start,  length)’
rdma-core-59.0/util/interval_set.c:103:5: enter_function: entry to ‘iset_insert_range’
rdma-core-59.0/util/interval_set.c:109:12: branch_false: following ‘false’ branch...
rdma-core-59.0/util/interval_set.c:130:20: call_function: calling ‘check_do_combine’ from ‘iset_insert_range’
rdma-core-59.0/util/interval_set.c:130:20: return_function: returning to ‘iset_insert_range’ from ‘check_do_combine’
rdma-core-59.0/util/interval_set.c:132:12: branch_false: following ‘false’ branch...
rdma-core-59.0/util/interval_set.c:133:24: branch_false: ...to here
rdma-core-59.0/util/interval_set.c:133:24: call_function: calling ‘create_range’ from ‘iset_insert_range’
rdma-core-59.0/util/interval_set.c:133:24: return_function: returning to ‘iset_insert_range’ from ‘create_range’
rdma-core-59.0/util/interval_set.c:134:20: branch_false: following ‘false’ branch...
rdma-core-59.0/util/interval_set.c:139:20: branch_false: ...to here
rdma-core-59.0/util/interval_set.c:139:20: branch_false: following ‘false’ branch (when ‘found == 0’)...
rdma-core-59.0/util/interval_set.c:140:25: branch_false: ...to here
rdma-core-59.0/util/interval_set.c:140:25: call_function: inlined call to ‘list_add_tail_’ from ‘iset_insert_range’
#  232|   	n->next = p;
#  233|   	n->prev = p->prev;
#  234|-> 	p->prev->next = n;
#  235|   	p->prev = n;
#  236|   	(void)list_debug(h, abortstr);

Error: GCC_ANALYZER_WARNING (CWE-416): [#def991]
rdma-core-59.0/redhat-linux-build/include/ccan/list.h:327:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘mapped_ports.n.next’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:514:6: enter_function: entry to ‘free_iwpm_mapped_ports’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:518:29: call_function: inlined call to ‘list_pop_’ from ‘free_iwpm_mapped_ports’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:519:17: call_function: calling ‘free_iwpm_port’ from ‘free_iwpm_mapped_ports’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:519:17: return_function: returning to ‘free_iwpm_mapped_ports’ from ‘free_iwpm_port’
rdma-core-59.0/iwpmd/iwarp_pm_helper.c:518:29: call_function: inlined call to ‘list_pop_’ from ‘free_iwpm_mapped_ports’
#  325|   {
#  326|   	(void)list_debug_node(n, abortstr);
#  327|-> 	n->next->prev = n->prev;
#  328|   	n->prev->next = n->next;
#  329|   #ifdef CCAN_LIST_DEBUG

Error: GCC_ANALYZER_WARNING (CWE-416): [#def992]
rdma-core-59.0/redhat-linux-build/include/ccan/list.h:327:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘timeout_list.n.next’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:1499:13: enter_function: entry to ‘acmp_process_timeouts’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:1505:23: call_function: inlined call to ‘list_pop_’ from ‘acmp_process_timeouts’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:1514:17: call_function: calling ‘acmp_free_send’ from ‘acmp_process_timeouts’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:1514:17: return_function: returning to ‘acmp_process_timeouts’ from ‘acmp_free_send’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:1505:23: call_function: inlined call to ‘list_pop_’ from ‘acmp_process_timeouts’
#  325|   {
#  326|   	(void)list_debug_node(n, abortstr);
#  327|-> 	n->next->prev = n->prev;
#  328|   	n->prev->next = n->next;
#  329|   #ifdef CCAN_LIST_DEBUG

Error: GCC_ANALYZER_WARNING (CWE-775): [#def993]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2466:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2464|   		memset(port_attr, 0, sizeof(*port_attr));
# 2465|   
# 2466|-> 		rc = ibv_query_port(context, port_num,
# 2467|   				    (struct _compat_ibv_port_attr *)port_attr);
# 2468|   		return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def994]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2466:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:295:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:309:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:21: call_function: calling ‘___ibv_query_port’ from ‘pp_init_ctx’
# 2464|   		memset(port_attr, 0, sizeof(*port_attr));
# 2465|   
# 2466|-> 		rc = ibv_query_port(context, port_num,
# 2467|   				    (struct _compat_ibv_port_attr *)port_attr);
# 2468|   		return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def995]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2466:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:295:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:21: call_function: calling ‘___ibv_query_port’ from ‘pp_init_ctx’
# 2464|   		memset(port_attr, 0, sizeof(*port_attr));
# 2465|   
# 2466|-> 		rc = ibv_query_port(context, port_num,
# 2467|   				    (struct _compat_ibv_port_attr *)port_attr);
# 2468|   		return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def996]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2466:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2464|   		memset(port_attr, 0, sizeof(*port_attr));
# 2465|   
# 2466|-> 		rc = ibv_query_port(context, port_num,
# 2467|   				    (struct _compat_ibv_port_attr *)port_attr);
# 2468|   		return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def997]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2466:22: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2464|   		memset(port_attr, 0, sizeof(*port_attr));
# 2465|   
# 2466|-> 		rc = ibv_query_port(context, port_num,
# 2467|   				    (struct _compat_ibv_port_attr *)port_attr);
# 2468|   		return rc;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def998]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2471:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_resource: opened here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2469|   	}
# 2470|   
# 2471|-> 	return vctx->query_port(context, port_num, port_attr,
# 2472|   				sizeof(*port_attr));
# 2473|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def999]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2471:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:295:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:309:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:21: call_function: calling ‘___ibv_query_port’ from ‘pp_init_ctx’
# 2469|   	}
# 2470|   
# 2471|-> 	return vctx->query_port(context, port_num, port_attr,
# 2472|   				sizeof(*port_attr));
# 2473|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1000]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2471:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:295:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:301:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:302:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:305:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:310:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:316:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:319:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:326:38: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/ud_pingpong.c:329:21: call_function: calling ‘___ibv_query_port’ from ‘pp_init_ctx’
# 2469|   	}
# 2470|   
# 2471|-> 	return vctx->query_port(context, port_num, port_attr,
# 2472|   				sizeof(*port_attr));
# 2473|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1001]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2471:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&route_data_file, "r")’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:19: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2469|   	}
# 2470|   
# 2471|-> 	return vctx->query_port(context, port_num, port_attr,
# 2472|   				sizeof(*port_attr));
# 2473|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1002]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2471:16: warning[-Wanalyzer-malloc-leak]: leak of ‘lid2guid’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2262:12: enter_function: entry to ‘acmp_parse_osm_fullv1’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2268:12: branch_false: following ‘false’ branch...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2273:20: acquire_memory: allocated here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2274:12: branch_false: following ‘false’ branch (when ‘lid2guid’ is non-NULL)...
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2279:9: branch_false: ...to here
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:2281:15: call_function: calling ‘acmp_parse_osm_fullv1_paths’ from ‘acmp_parse_osm_fullv1’
# 2469|   	}
# 2470|   
# 2471|-> 	return vctx->query_port(context, port_num, port_attr,
# 2472|   				sizeof(*port_attr));
# 2473|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1003]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2642:24: warning[-Wanalyzer-malloc-leak]: leak of ‘*ctx.buf’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:34: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:27: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
# 2640|   {
# 2641|   	if (is_access_const && (access & IBV_ACCESS_OPTIONAL_RANGE) == 0)
# 2642|-> 		return ibv_reg_mr(pd, addr, length, (int)access);
# 2643|   	else
# 2644|   		return ibv_reg_mr_iova2(pd, addr, length, (uintptr_t)addr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1004]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2642:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:435:27: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:435:27: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
# 2640|   {
# 2641|   	if (is_access_const && (access & IBV_ACCESS_OPTIONAL_RANGE) == 0)
# 2642|-> 		return ibv_reg_mr(pd, addr, length, (int)access);
# 2643|   	else
# 2644|   		return ibv_reg_mr_iova2(pd, addr, length, (uintptr_t)addr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1005]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2642:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:435:27: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:435:27: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
# 2640|   {
# 2641|   	if (is_access_const && (access & IBV_ACCESS_OPTIONAL_RANGE) == 0)
# 2642|-> 		return ibv_reg_mr(pd, addr, length, (int)access);
# 2643|   	else
# 2644|   		return ibv_reg_mr_iova2(pd, addr, length, (uintptr_t)addr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1006]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2642:24: warning[-Wanalyzer-malloc-leak]: leak of ‘iomr’
rdma-core-59.0/librdmacm/rsocket.c:4033:7: enter_function: entry to ‘riomap’
rdma-core-59.0/librdmacm/rsocket.c:4040:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4042:14: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4042:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4046:12: branch_false: following ‘false’ branch...
rdma-core-59.0/librdmacm/rsocket.c:4050:24: branch_false: ...to here
rdma-core-59.0/librdmacm/rsocket.c:4050:24: acquire_memory: allocated here
rdma-core-59.0/librdmacm/rsocket.c:4058:20: call_function: inlined call to ‘__ibv_reg_mr’ from ‘riomap’
# 2640|   {
# 2641|   	if (is_access_const && (access & IBV_ACCESS_OPTIONAL_RANGE) == 0)
# 2642|-> 		return ibv_reg_mr(pd, addr, length, (int)access);
# 2643|   	else
# 2644|   		return ibv_reg_mr_iova2(pd, addr, length, (uintptr_t)addr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1007]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2642:24: warning[-Wanalyzer-malloc-leak]: leak of ‘memalign((long unsigned int)page_size, (long unsigned int)size)’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:367:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:399:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:406:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:409:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:414:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘pp_init_ctx’
# 2640|   {
# 2641|   	if (is_access_const && (access & IBV_ACCESS_OPTIONAL_RANGE) == 0)
# 2642|-> 		return ibv_reg_mr(pd, addr, length, (int)access);
# 2643|   	else
# 2644|   		return ibv_reg_mr_iova2(pd, addr, length, (uintptr_t)addr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1008]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2642:24: warning[-Wanalyzer-malloc-leak]: leak of ‘mr’
rdma-core-59.0/libibverbs/compat-1_0.c:658:1: enter_function: entry to ‘__ibv_reg_mr_1_0’
rdma-core-59.0/libibverbs/compat-1_0.c:666:14: acquire_memory: allocated here
rdma-core-59.0/libibverbs/compat-1_0.c:667:12: branch_false: following ‘false’ branch (when ‘mr’ is non-NULL)...
rdma-core-59.0/libibverbs/compat-1_0.c:670:19: branch_false: ...to here
# 2640|   {
# 2641|   	if (is_access_const && (access & IBV_ACCESS_OPTIONAL_RANGE) == 0)
# 2642|-> 		return ibv_reg_mr(pd, addr, length, (int)access);
# 2643|   	else
# 2644|   		return ibv_reg_mr_iova2(pd, addr, length, (uintptr_t)addr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1009]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2642:24: warning[-Wanalyzer-malloc-leak]: leak of ‘msg’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:1683:1: enter_function: entry to ‘acmp_send_resolve’
rdma-core-59.0/ibacm/prov/acmp/src/acmp.c:1692:15: call_function: calling ‘acmp_alloc_send’ from ‘acmp_send_resolve’
# 2640|   {
# 2641|   	if (is_access_const && (access & IBV_ACCESS_OPTIONAL_RANGE) == 0)
# 2642|-> 		return ibv_reg_mr(pd, addr, length, (int)access);
# 2643|   	else
# 2644|   		return ibv_reg_mr_iova2(pd, addr, length, (uintptr_t)addr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1010]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2644:24: warning[-Wanalyzer-malloc-leak]: leak of ‘mr’
rdma-core-59.0/libibverbs/compat-1_0.c:658:1: enter_function: entry to ‘__ibv_reg_mr_1_0’
rdma-core-59.0/libibverbs/compat-1_0.c:666:14: acquire_memory: allocated here
rdma-core-59.0/libibverbs/compat-1_0.c:667:12: branch_false: following ‘false’ branch (when ‘mr’ is non-NULL)...
rdma-core-59.0/libibverbs/compat-1_0.c:670:19: branch_false: ...to here
rdma-core-59.0/libibverbs/compat-1_0.c:670:19: call_function: inlined call to ‘__ibv_reg_mr’ from ‘__ibv_reg_mr_1_0’
# 2642|   		return ibv_reg_mr(pd, addr, length, (int)access);
# 2643|   	else
# 2644|-> 		return ibv_reg_mr_iova2(pd, addr, length, (uintptr_t)addr,
# 2645|   					access);
# 2646|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1011]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2793:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:34: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:27: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:451:32: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:455:23: call_function: calling ‘ibv_advise_mr’ from ‘pp_init_ctx’
# 2791|   		return EOPNOTSUPP;
# 2792|   
# 2793|-> 	return vctx->advise_mr(pd, advice, flags, sg_list, num_sge);
# 2794|   }
# 2795|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1012]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:2889:16: warning[-Wanalyzer-malloc-leak]: leak of ‘icm_mr’
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:427:12: enter_function: entry to ‘dr_icm_handle_buddies_get_mem’
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:439:16: branch_true: following ‘true’ branch...
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:440:17: branch_true: ...to here
rdma-core-59.0/providers/mlx5/dr_icm_pool.c:456:23: call_function: calling ‘dr_icm_buddy_create’ from ‘dr_icm_handle_buddies_get_mem’
# 2887|   	}
# 2888|   
# 2889|-> 	return vctx->reg_dm_mr(pd, dm, dm_offset, length, access);
# 2890|   }
# 2891|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1013]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:3133:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:434:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:34: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:437:27: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:439:25: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:442:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:447:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:463:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:474:32: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:14: call_function: inlined call to ‘pp_cq’ from ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:478:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:485:41: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:497:20: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:498:52: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:513:35: call_function: calling ‘ibv_create_qp_ex’ from ‘pp_init_ctx’
# 3131|   		return NULL;
# 3132|   	}
# 3133|-> 	return vctx->create_qp_ex(context, qp_init_attr_ex);
# 3134|   }
# 3135|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1014]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:3232:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:383:21: call_function: calling ‘ibv_query_device_ex’ from ‘pp_init_ctx’
# 3230|   		goto legacy;
# 3231|   
# 3232|-> 	ret = vctx->query_device_ex(context, input, attr, sizeof(*attr));
# 3233|   	if (ret == EOPNOTSUPP || ret == ENOSYS)
# 3234|   		goto legacy;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1015]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:3232:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:383:21: call_function: calling ‘ibv_query_device_ex’ from ‘pp_init_ctx’
# 3230|   		goto legacy;
# 3231|   
# 3232|-> 	ret = vctx->query_device_ex(context, input, attr, sizeof(*attr));
# 3233|   	if (ret == EOPNOTSUPP || ret == ENOSYS)
# 3234|   		goto legacy;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1016]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:3232:15: warning[-Wanalyzer-malloc-leak]: leak of ‘memalign((long unsigned int)page_size, (long unsigned int)size)’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:367:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:386:21: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:386:21: call_function: calling ‘ibv_query_device_ex’ from ‘pp_init_ctx’
# 3230|   		goto legacy;
# 3231|   
# 3232|-> 	ret = vctx->query_device_ex(context, input, attr, sizeof(*attr));
# 3233|   	if (ret == EOPNOTSUPP || ret == ENOSYS)
# 3234|   		goto legacy;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1017]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:3240:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:347:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:383:21: call_function: calling ‘ibv_query_device_ex’ from ‘pp_init_ctx’
# 3238|   legacy:
# 3239|   	memset(attr, 0, sizeof(*attr));
# 3240|-> 	ret = ibv_query_device(context, &attr->orig_attr);
# 3241|   
# 3242|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1018]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:3240:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:332:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:339:15: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:340:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:343:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:348:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:354:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:357:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:363:12: branch_false: following ‘false’ branch (when ‘use_event == 0’)...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:370:17: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:373:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:378:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/rc_pingpong.c:383:21: call_function: calling ‘ibv_query_device_ex’ from ‘pp_init_ctx’
# 3238|   legacy:
# 3239|   	memset(attr, 0, sizeof(*attr));
# 3240|-> 	ret = ibv_query_device(context, &attr->orig_attr);
# 3241|   
# 3242|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1019]
rdma-core-59.0/redhat-linux-build/include/infiniband/verbs.h:3240:15: warning[-Wanalyzer-malloc-leak]: leak of ‘memalign((long unsigned int)page_size, (long unsigned int)size)’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:350:33: enter_function: entry to ‘pp_init_ctx’
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:359:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:362:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:367:20: acquire_memory: allocated here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:368:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:373:9: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:376:12: branch_false: following ‘false’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:13: branch_false: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:381:12: branch_true: following ‘true’ branch...
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:386:21: branch_true: ...to here
rdma-core-59.0/libibverbs/examples/srq_pingpong.c:386:21: call_function: calling ‘ibv_query_device_ex’ from ‘pp_init_ctx’
# 3238|   legacy:
# 3239|   	memset(attr, 0, sizeof(*attr));
# 3240|-> 	ret = ibv_query_device(context, &attr->orig_attr);
# 3241|   
# 3242|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1020]
rdma-core-59.0/redhat-linux-build/include/util/bitmap.h:59:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bmp’
rdma-core-59.0/util/tests/bitmap_test.c:101:5: enter_function: entry to ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:112:25: branch_true: following ‘true’ branch (when ‘i != 5’)...
rdma-core-59.0/util/tests/bitmap_test.c:113:21: branch_true: ...to here
rdma-core-59.0/util/tests/bitmap_test.c:114:38: call_function: inlined call to ‘bitmap_alloc0’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: call_function: calling ‘test_bitmap_empty’ from ‘main’
#   57|   		mask = (1UL << (nbits % BITS_PER_LONG)) - 1;
#   58|   
#   59|-> 	return (bmp[i] & mask) ? false : true;
#   60|   }
#   61|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1021]
rdma-core-59.0/redhat-linux-build/pyverbs/providers/mlx5/mlx5_vfio.c:4843:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
rdma-core-59.0/redhat-linux-build/pyverbs/providers/mlx5/mlx5_vfio.c:6850:12: enter_function: entry to ‘__pyx_setprop_7pyverbs_9providers_4mlx5_9mlx5_vfio_12Mlx5VfioAttr_pci_name’
rdma-core-59.0/redhat-linux-build/pyverbs/providers/mlx5/mlx5_vfio.c:6851:6: branch_true: following ‘true’ branch (when ‘v’ is non-NULL)...
rdma-core-59.0/redhat-linux-build/pyverbs/providers/mlx5/mlx5_vfio.c:6852:12: call_function: inlined call to ‘__pyx_pw_7pyverbs_9providers_4mlx5_9mlx5_vfio_12Mlx5VfioAttr_8pci_name_3__set__’ from ‘__pyx_setprop_7pyverbs_9providers_4mlx5_9mlx5_vfio_12Mlx5VfioAttr_pci_name’
#argument 2 of ‘__builtin_strcpy’ must be non-null
# 4841|   */
# 4842|     __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_pci_name_bytes); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error)
# 4843|->   (void)(strcpy(((char *)__pyx_v_self->attr.pci_name), __pyx_t_6));
# 4844|   
# 4845|     /* "pyverbs/providers/mlx5/mlx5_vfio.pyx":49

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1022]
rdma-core-59.0/srp_daemon/srp_daemon.c:168:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
rdma-core-59.0/srp_daemon/srp_daemon.c:1903:12: enter_function: entry to ‘check_link_layer’
rdma-core-59.0/srp_daemon/srp_daemon.c:1909:15: call_function: calling ‘srpd_sys_read_string’ from ‘check_link_layer’
#  166|   		int e = errno;
#  167|   		close(fd);
#  168|-> 		return (e > 0) ? -e : e;
#  169|   	}
#  170|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1023]
rdma-core-59.0/srp_daemon/srp_daemon.c:176:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
rdma-core-59.0/srp_daemon/srp_daemon.c:1903:12: enter_function: entry to ‘check_link_layer’
rdma-core-59.0/srp_daemon/srp_daemon.c:1909:15: call_function: calling ‘srpd_sys_read_string’ from ‘check_link_layer’
#  174|   		*s = 0;
#  175|   
#  176|-> 	close(fd);
#  177|   	return 0;
#  178|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1024]
rdma-core-59.0/srp_daemon/srp_daemon.c:302:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*conf.rules_file, "r")’
rdma-core-59.0/srp_daemon/srp_daemon.c:2210:5: enter_function: entry to ‘main’
rdma-core-59.0/srp_daemon/srp_daemon.c:2243:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/srp_daemon/srp_daemon.c:2249:19: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2257:12: branch_false: following ‘false’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: call_function: calling ‘get_config’ from ‘main’
#  300|   	switch (s_log_dest) {
#  301|   	case log_to_syslog:
#  302|-> 		vsyslog(LOG_DAEMON | LOG_ERR, fmt, args);
#  303|   		break;
#  304|   	case log_to_stderr:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1025]
rdma-core-59.0/srp_daemon/srp_daemon.c:302:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*conf.rules_file, "r")’
rdma-core-59.0/srp_daemon/srp_daemon.c:2210:5: enter_function: entry to ‘main’
rdma-core-59.0/srp_daemon/srp_daemon.c:2243:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/srp_daemon/srp_daemon.c:2249:19: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2257:12: branch_false: following ‘false’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: call_function: calling ‘get_config’ from ‘main’
#  300|   	switch (s_log_dest) {
#  301|   	case log_to_syslog:
#  302|-> 		vsyslog(LOG_DAEMON | LOG_ERR, fmt, args);
#  303|   		break;
#  304|   	case log_to_stderr:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def1026]
rdma-core-59.0/srp_daemon/srp_daemon.c:302:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
rdma-core-59.0/srp_daemon/srp_daemon.c:2119:12: enter_function: entry to ‘setup_wakeup_fd’
rdma-core-59.0/srp_daemon/srp_daemon.c:2125:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
rdma-core-59.0/srp_daemon/srp_daemon.c:2126:17: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2126:17: call_function: calling ‘pr_err’ from ‘setup_wakeup_fd’
#  300|   	switch (s_log_dest) {
#  301|   	case log_to_syslog:
#  302|-> 		vsyslog(LOG_DAEMON | LOG_ERR, fmt, args);
#  303|   		break;
#  304|   	case log_to_stderr:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1027]
rdma-core-59.0/srp_daemon/srp_daemon.c:414:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/sys/module/ib_srp/parameters/use_imm_data", 0)’
rdma-core-59.0/srp_daemon/srp_daemon.c:1959:14: enter_function: entry to ‘run_thread_retry_to_connect’
rdma-core-59.0/srp_daemon/srp_daemon.c:1966:16: branch_true: following ‘true’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:1967:21: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:1970:24: branch_true: following ‘true’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:1971:34: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:1970:24: branch_true: following ‘true’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:1972:47: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:1978:25: call_function: calling ‘add_non_exist_target’ from ‘run_thread_retry_to_connect’
#  412|   	cnt = read(fd, &flag, 1);
#  413|   	if (cnt != 1) {
#  414|-> 		close(fd);
#  415|   		return false;
#  416|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1028]
rdma-core-59.0/srp_daemon/srp_daemon.c:420:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/sys/module/ib_srp/parameters/use_imm_data", 0)’
rdma-core-59.0/srp_daemon/srp_daemon.c:1959:14: enter_function: entry to ‘run_thread_retry_to_connect’
rdma-core-59.0/srp_daemon/srp_daemon.c:1966:16: branch_true: following ‘true’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:1967:21: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:1970:24: branch_true: following ‘true’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:1971:34: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:1970:24: branch_true: following ‘true’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:1972:47: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:1978:25: call_function: calling ‘add_non_exist_target’ from ‘run_thread_retry_to_connect’
#  418|   	if (!strncmp(&flag, "Y", 1))
#  419|   		ret = true;
#  420|-> 	close(fd);
#  421|   	return ret;
#  422|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1029]
rdma-core-59.0/srp_daemon/srp_daemon.c:473:26: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&scsi_host_dir)’
rdma-core-59.0/srp_daemon/srp_daemon.c:1959:14: enter_function: entry to ‘run_thread_retry_to_connect’
rdma-core-59.0/srp_daemon/srp_daemon.c:1966:16: branch_true: following ‘true’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:1967:21: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:1970:24: branch_true: following ‘true’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:1971:34: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:1970:24: branch_true: following ‘true’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:1972:47: branch_true: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:1978:25: call_function: calling ‘add_non_exist_target’ from ‘run_thread_retry_to_connect’
#  471|   	subdir = (void *) 1; /* Dummy value to enter the loop */
#  472|   	while (subdir) {
#  473|-> 	        subdir = readdir(dir);
#  474|   
#  475|   		if (!subdir)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1030]
rdma-core-59.0/srp_daemon/srp_daemon.c:727:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘dup’ where non-null expected
rdma-core-59.0/srp_daemon/srp_daemon.c:1716:12: enter_function: entry to ‘get_config’
rdma-core-59.0/srp_daemon/srp_daemon.c:1851:9: call_function: calling ‘initialize_sysfs’ from ‘get_config’
#argument 1 of ‘__builtin_strlen’ must be non-null
#  725|   
#  726|   		sysfs_path = dup = strndup(env, 256);
#  727|-> 		len = strlen(dup);
#  728|   		while (len > 0 && dup[len - 1] == '/') {
#  729|   			--len;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1031]
rdma-core-59.0/srp_daemon/srp_daemon.c:1561:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*conf.rules_file, "r")’
rdma-core-59.0/srp_daemon/srp_daemon.c:2210:5: enter_function: entry to ‘main’
rdma-core-59.0/srp_daemon/srp_daemon.c:2243:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/srp_daemon/srp_daemon.c:2249:19: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2257:12: branch_false: following ‘false’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: call_function: calling ‘get_config’ from ‘main’
# 1559|   	}
# 1560|   
# 1561|-> 	if (fseek(infile, 0L, SEEK_SET) != 0) {
# 1562|   		pr_err("internal error while seeking %s\n", conf->rules_file);
# 1563|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1032]
rdma-core-59.0/srp_daemon/srp_daemon.c:1561:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*conf.rules_file, "r")’
rdma-core-59.0/srp_daemon/srp_daemon.c:2210:5: enter_function: entry to ‘main’
rdma-core-59.0/srp_daemon/srp_daemon.c:2243:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/srp_daemon/srp_daemon.c:2249:19: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2257:12: branch_false: following ‘false’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: call_function: calling ‘get_config’ from ‘main’
# 1559|   	}
# 1560|   
# 1561|-> 	if (fseek(infile, 0L, SEEK_SET) != 0) {
# 1562|   		pr_err("internal error while seeking %s\n", conf->rules_file);
# 1563|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1033]
rdma-core-59.0/srp_daemon/srp_daemon.c:1579:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rule’
rdma-core-59.0/srp_daemon/srp_daemon.c:2210:5: enter_function: entry to ‘main’
rdma-core-59.0/srp_daemon/srp_daemon.c:2243:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/srp_daemon/srp_daemon.c:2249:19: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2257:12: branch_false: following ‘false’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: call_function: calling ‘get_config’ from ‘main’
# 1577|   		case 'a':
# 1578|   		case 'A':
# 1579|-> 			rule->allow = 1;
# 1580|   			break;
# 1581|   		case 'd':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1034]
rdma-core-59.0/srp_daemon/srp_daemon.c:1583:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rule’
rdma-core-59.0/srp_daemon/srp_daemon.c:2210:5: enter_function: entry to ‘main’
rdma-core-59.0/srp_daemon/srp_daemon.c:2243:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
rdma-core-59.0/srp_daemon/srp_daemon.c:2249:19: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2257:12: branch_false: following ‘false’ branch...
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: branch_false: ...to here
rdma-core-59.0/srp_daemon/srp_daemon.c:2263:13: call_function: calling ‘get_config’ from ‘main’
# 1581|   		case 'd':
# 1582|   		case 'D':
# 1583|-> 			rule->allow = 0;
# 1584|   			break;
# 1585|   		default:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1035]
rdma-core-59.0/srp_daemon/srp_daemon.c:2147:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘config’
rdma-core-59.0/srp_daemon/srp_daemon.c:2146:18: acquire_memory: this call could return NULL
rdma-core-59.0/srp_daemon/srp_daemon.c:2147:9: danger: ‘calloc(1, 96)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 2145|   
# 2146|   	config = calloc(1, sizeof(*config));
# 2147|-> 	config->num_of_oust = 10;
# 2148|   	config->timeout = 5000;
# 2149|   	config->mad_retries = 3;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1036]
rdma-core-59.0/util/node_name_map.c:77:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file_name, "r")’
rdma-core-59.0/util/node_name_map.c:191:11: enter_function: entry to ‘open_node_name_map’
rdma-core-59.0/util/node_name_map.c:204:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
rdma-core-59.0/util/node_name_map.c:206:22: branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:209:13: call_function: calling ‘parse_node_map_wrap’ from ‘open_node_name_map’
#   75|   	item->guid = guid;
#   76|   	item->name = strdup(p);
#   77|-> 	cl_qmap_insert(map, item->guid, (cl_map_item_t *) item);
#   78|   	return 0;
#   79|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1037]
rdma-core-59.0/util/node_name_map.c:77:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
rdma-core-59.0/util/node_name_map.c:191:11: enter_function: entry to ‘open_node_name_map’
rdma-core-59.0/util/node_name_map.c:204:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
rdma-core-59.0/util/node_name_map.c:206:22: branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:209:13: call_function: calling ‘parse_node_map_wrap’ from ‘open_node_name_map’
#   75|   	item->guid = guid;
#   76|   	item->name = strdup(p);
#   77|-> 	cl_qmap_insert(map, item->guid, (cl_map_item_t *) item);
#   78|   	return 0;
#   79|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1038]
rdma-core-59.0/util/node_name_map.c:77:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file_name, "r")’
rdma-core-59.0/util/node_name_map.c:191:11: enter_function: entry to ‘open_node_name_map’
rdma-core-59.0/util/node_name_map.c:204:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
rdma-core-59.0/util/node_name_map.c:206:22: branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:209:13: call_function: calling ‘parse_node_map_wrap’ from ‘open_node_name_map’
#   75|   	item->guid = guid;
#   76|   	item->name = strdup(p);
#   77|-> 	cl_qmap_insert(map, item->guid, (cl_map_item_t *) item);
#   78|   	return 0;
#   79|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1039]
rdma-core-59.0/util/node_name_map.c:77:9: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
rdma-core-59.0/util/node_name_map.c:191:11: enter_function: entry to ‘open_node_name_map’
rdma-core-59.0/util/node_name_map.c:204:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
rdma-core-59.0/util/node_name_map.c:206:22: branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:209:13: call_function: calling ‘parse_node_map_wrap’ from ‘open_node_name_map’
#   75|   	item->guid = guid;
#   76|   	item->name = strdup(p);
#   77|-> 	cl_qmap_insert(map, item->guid, (cl_map_item_t *) item);
#   78|   	return 0;
#   79|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1040]
rdma-core-59.0/util/node_name_map.c:181:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file_name, "r")’
rdma-core-59.0/util/node_name_map.c:145:19: acquire_resource: opened here
rdma-core-59.0/util/node_name_map.c:145:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:148:16: branch_true: following ‘true’ branch...
 branch_true: ...to here
rdma-core-59.0/util/node_name_map.c:159:20: branch_false: following ‘false’ branch...
rdma-core-59.0/util/node_name_map.c:159:33: branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:178:20: branch_false: following ‘false’ branch...
rdma-core-59.0/util/node_name_map.c:181:21: branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:181:21: danger: ‘fopen(file_name, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  179|   			*e = '\0';
#  180|   
#  181|-> 		if (create(cxt, guid, p)) {
#  182|   			fclose(f);
#  183|   			return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1041]
rdma-core-59.0/util/node_name_map.c:181:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file_name, "r")’
rdma-core-59.0/util/node_name_map.c:145:19: acquire_memory: allocated here
rdma-core-59.0/util/node_name_map.c:145:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:148:16: branch_true: following ‘true’ branch...
 branch_true: ...to here
rdma-core-59.0/util/node_name_map.c:159:20: branch_false: following ‘false’ branch...
rdma-core-59.0/util/node_name_map.c:159:33: branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:178:20: branch_false: following ‘false’ branch...
rdma-core-59.0/util/node_name_map.c:181:21: branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:181:21: danger: ‘fopen(file_name, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  179|   			*e = '\0';
#  180|   
#  181|-> 		if (create(cxt, guid, p)) {
#  182|   			fclose(f);
#  183|   			return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1042]
rdma-core-59.0/util/node_name_map.c:206:9: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
rdma-core-59.0/util/node_name_map.c:203:15: acquire_memory: allocated here
rdma-core-59.0/util/node_name_map.c:204:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
rdma-core-59.0/util/node_name_map.c:206:22: branch_false: ...to here
rdma-core-59.0/util/node_name_map.c:206:9: danger: ‘map’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  204|   	if (!map)
#  205|   		return NULL;
#  206|-> 	cl_qmap_init(&map->map);
#  207|   
#  208|   	memset(linebuf, '\0', PARSE_NODE_MAP_BUFLEN + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1043]
rdma-core-59.0/util/tests/bitmap_test.c:42:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bmp’
rdma-core-59.0/util/tests/bitmap_test.c:101:5: enter_function: entry to ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:112:25: branch_true: following ‘true’ branch (when ‘i != 5’)...
rdma-core-59.0/util/tests/bitmap_test.c:113:21: branch_true: ...to here
rdma-core-59.0/util/tests/bitmap_test.c:114:38: call_function: inlined call to ‘bitmap_alloc0’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: call_function: calling ‘test_bitmap_empty’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: return_function: returning to ‘main’ from ‘test_bitmap_empty’
rdma-core-59.0/util/tests/bitmap_test.c:126:17: call_function: calling ‘test_bitmap_find_first_bit’ from ‘main’
#   40|   
#   41|   	for (int i = 0; i < nbits; i++) {
#   42|-> 		EXPECT_EQ(nbits, bitmap_find_first_bit(bmp, 0, nbits));
#   43|   		bitmap_set_bit(bmp, i);
#   44|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, nbits));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1044]
rdma-core-59.0/util/tests/bitmap_test.c:44:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bmp’
rdma-core-59.0/util/tests/bitmap_test.c:101:5: enter_function: entry to ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:112:25: branch_true: following ‘true’ branch (when ‘i != 5’)...
rdma-core-59.0/util/tests/bitmap_test.c:113:21: branch_true: ...to here
rdma-core-59.0/util/tests/bitmap_test.c:114:38: call_function: inlined call to ‘bitmap_alloc0’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: call_function: calling ‘test_bitmap_empty’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: return_function: returning to ‘main’ from ‘test_bitmap_empty’
rdma-core-59.0/util/tests/bitmap_test.c:126:17: call_function: calling ‘test_bitmap_find_first_bit’ from ‘main’
#   42|   		EXPECT_EQ(nbits, bitmap_find_first_bit(bmp, 0, nbits));
#   43|   		bitmap_set_bit(bmp, i);
#   44|-> 		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, nbits));
#   45|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, i, nbits));
#   46|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, i + 1));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1045]
rdma-core-59.0/util/tests/bitmap_test.c:45:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bmp’
rdma-core-59.0/util/tests/bitmap_test.c:101:5: enter_function: entry to ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:112:25: branch_true: following ‘true’ branch (when ‘i != 5’)...
rdma-core-59.0/util/tests/bitmap_test.c:113:21: branch_true: ...to here
rdma-core-59.0/util/tests/bitmap_test.c:114:38: call_function: inlined call to ‘bitmap_alloc0’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: call_function: calling ‘test_bitmap_empty’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: return_function: returning to ‘main’ from ‘test_bitmap_empty’
rdma-core-59.0/util/tests/bitmap_test.c:126:17: call_function: calling ‘test_bitmap_find_first_bit’ from ‘main’
#   43|   		bitmap_set_bit(bmp, i);
#   44|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, nbits));
#   45|-> 		EXPECT_EQ(i, bitmap_find_first_bit(bmp, i, nbits));
#   46|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, i + 1));
#   47|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, i));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1046]
rdma-core-59.0/util/tests/bitmap_test.c:46:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bmp’
rdma-core-59.0/util/tests/bitmap_test.c:101:5: enter_function: entry to ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:112:25: branch_true: following ‘true’ branch (when ‘i != 5’)...
rdma-core-59.0/util/tests/bitmap_test.c:113:21: branch_true: ...to here
rdma-core-59.0/util/tests/bitmap_test.c:114:38: call_function: inlined call to ‘bitmap_alloc0’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: call_function: calling ‘test_bitmap_empty’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: return_function: returning to ‘main’ from ‘test_bitmap_empty’
rdma-core-59.0/util/tests/bitmap_test.c:126:17: call_function: calling ‘test_bitmap_find_first_bit’ from ‘main’
#   44|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, nbits));
#   45|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, i, nbits));
#   46|-> 		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, i + 1));
#   47|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, i));
#   48|   		EXPECT_EQ(nbits, bitmap_find_first_bit(bmp, i + 1, nbits));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1047]
rdma-core-59.0/util/tests/bitmap_test.c:47:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bmp’
rdma-core-59.0/util/tests/bitmap_test.c:101:5: enter_function: entry to ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:112:25: branch_true: following ‘true’ branch (when ‘i != 5’)...
rdma-core-59.0/util/tests/bitmap_test.c:113:21: branch_true: ...to here
rdma-core-59.0/util/tests/bitmap_test.c:114:38: call_function: inlined call to ‘bitmap_alloc0’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: call_function: calling ‘test_bitmap_empty’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: return_function: returning to ‘main’ from ‘test_bitmap_empty’
rdma-core-59.0/util/tests/bitmap_test.c:126:17: call_function: calling ‘test_bitmap_find_first_bit’ from ‘main’
#   45|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, i, nbits));
#   46|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, i + 1));
#   47|-> 		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, i));
#   48|   		EXPECT_EQ(nbits, bitmap_find_first_bit(bmp, i + 1, nbits));
#   49|   		bitmap_clear_bit(bmp, i);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1048]
rdma-core-59.0/util/tests/bitmap_test.c:48:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bmp’
rdma-core-59.0/util/tests/bitmap_test.c:101:5: enter_function: entry to ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:112:25: branch_true: following ‘true’ branch (when ‘i != 5’)...
rdma-core-59.0/util/tests/bitmap_test.c:113:21: branch_true: ...to here
rdma-core-59.0/util/tests/bitmap_test.c:114:38: call_function: inlined call to ‘bitmap_alloc0’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: call_function: calling ‘test_bitmap_empty’ from ‘main’
rdma-core-59.0/util/tests/bitmap_test.c:125:17: return_function: returning to ‘main’ from ‘test_bitmap_empty’
rdma-core-59.0/util/tests/bitmap_test.c:126:17: call_function: calling ‘test_bitmap_find_first_bit’ from ‘main’
#   46|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, i + 1));
#   47|   		EXPECT_EQ(i, bitmap_find_first_bit(bmp, 0, i));
#   48|-> 		EXPECT_EQ(nbits, bitmap_find_first_bit(bmp, i + 1, nbits));
#   49|   		bitmap_clear_bit(bmp, i);
#   50|   	}

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
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-138.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-gcc-latest-x86_64
project-namerdma-core-59.0-4.fc44
store-results-to/tmp/tmpxljxt6yi/rdma-core-59.0-4.fc44.tar.xz
time-created2025-10-28 20:34:39
time-finished2025-10-28 20:39:48
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpxljxt6yi/rdma-core-59.0-4.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpxljxt6yi/rdma-core-59.0-4.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9