brltty-6.8-6.fc44

List of Findings

Error: SHELLCHECK_WARNING: [#def1]
/usr/bin/brltty-config.sh:26:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   24|   
#   25|   brlttyConfig_defineVariable() {
#   26|->    local name="${1}"
#   27|      local value="${2}"
#   28|   

Error: SHELLCHECK_WARNING: [#def2]
/usr/bin/brltty-config.sh:27:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   25|   brlttyConfig_defineVariable() {
#   26|      local name="${1}"
#   27|->    local value="${2}"
#   28|   
#   29|      while true

Error: SHELLCHECK_WARNING (CWE-457): [#def3]
/usr/bin/brltty-config.sh:32:10: warning[SC2154]: new is referenced but not assigned.
#   30|      do
#   31|         eval local 'new="'${value}'"'
#   32|->       [ "${new}" != "${value}" ] || break
#   33|         value="${new}"
#   34|      done

Error: SHELLCHECK_WARNING: [#def4]
/usr/bin/brltty-config.sh:40:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   38|   
#   39|   brlttyConfig_defineVariables() {
#   40|->    local prefix='/usr'
#   41|      local sysconfdir='/etc'
#   42|      local datarootdir='${prefix}/share'

Error: SHELLCHECK_WARNING: [#def5]
/usr/bin/brltty-config.sh:41:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   39|   brlttyConfig_defineVariables() {
#   40|      local prefix='/usr'
#   41|->    local sysconfdir='/etc'
#   42|      local datarootdir='${prefix}/share'
#   43|      local datadir='/usr/share'

Error: SHELLCHECK_WARNING: [#def6]
/usr/bin/brltty-config.sh:42:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   40|      local prefix='/usr'
#   41|      local sysconfdir='/etc'
#   42|->    local datarootdir='${prefix}/share'
#   43|      local datadir='/usr/share'
#   44|      local sharedstatedir='/var/lib'

Error: SHELLCHECK_WARNING: [#def7]
/usr/bin/brltty-config.sh:43:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   41|      local sysconfdir='/etc'
#   42|      local datarootdir='${prefix}/share'
#   43|->    local datadir='/usr/share'
#   44|      local sharedstatedir='/var/lib'
#   45|      local localstatedir='/var'

Error: SHELLCHECK_WARNING: [#def8]
/usr/bin/brltty-config.sh:44:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   42|      local datarootdir='${prefix}/share'
#   43|      local datadir='/usr/share'
#   44|->    local sharedstatedir='/var/lib'
#   45|      local localstatedir='/var'
#   46|      local includedir='/usr/include'

Error: SHELLCHECK_WARNING: [#def9]
/usr/bin/brltty-config.sh:45:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   43|      local datadir='/usr/share'
#   44|      local sharedstatedir='/var/lib'
#   45|->    local localstatedir='/var'
#   46|      local includedir='/usr/include'
#   47|      local oldincludedir='/usr/include'

Error: SHELLCHECK_WARNING: [#def10]
/usr/bin/brltty-config.sh:46:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   44|      local sharedstatedir='/var/lib'
#   45|      local localstatedir='/var'
#   46|->    local includedir='/usr/include'
#   47|      local oldincludedir='/usr/include'
#   48|   

Error: SHELLCHECK_WARNING: [#def11]
/usr/bin/brltty-config.sh:47:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   45|      local localstatedir='/var'
#   46|      local includedir='/usr/include'
#   47|->    local oldincludedir='/usr/include'
#   48|   
#   49|      local exec_prefix='/usr'

Error: SHELLCHECK_WARNING: [#def12]
/usr/bin/brltty-config.sh:49:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   47|      local oldincludedir='/usr/include'
#   48|   
#   49|->    local exec_prefix='/usr'
#   50|      local bindir='/usr/bin'
#   51|      local sbindir='/usr/bin'

Error: SHELLCHECK_WARNING: [#def13]
/usr/bin/brltty-config.sh:50:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   48|   
#   49|      local exec_prefix='/usr'
#   50|->    local bindir='/usr/bin'
#   51|      local sbindir='/usr/bin'
#   52|      local libdir='/usr/lib64'

Error: SHELLCHECK_WARNING: [#def14]
/usr/bin/brltty-config.sh:51:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   49|      local exec_prefix='/usr'
#   50|      local bindir='/usr/bin'
#   51|->    local sbindir='/usr/bin'
#   52|      local libdir='/usr/lib64'
#   53|      local libexecdir='/usr/libexec'

Error: SHELLCHECK_WARNING: [#def15]
/usr/bin/brltty-config.sh:52:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   50|      local bindir='/usr/bin'
#   51|      local sbindir='/usr/bin'
#   52|->    local libdir='/usr/lib64'
#   53|      local libexecdir='/usr/libexec'
#   54|   

Error: SHELLCHECK_WARNING: [#def16]
/usr/bin/brltty-config.sh:53:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   51|      local sbindir='/usr/bin'
#   52|      local libdir='/usr/lib64'
#   53|->    local libexecdir='/usr/libexec'
#   54|   
#   55|      local localedir='${datarootdir}/locale'

Error: SHELLCHECK_WARNING: [#def17]
/usr/bin/brltty-config.sh:55:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   53|      local libexecdir='/usr/libexec'
#   54|   
#   55|->    local localedir='${datarootdir}/locale'
#   56|      local mandir='/usr/share/man'
#   57|      local docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'

Error: SHELLCHECK_WARNING: [#def18]
/usr/bin/brltty-config.sh:56:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   54|   
#   55|      local localedir='${datarootdir}/locale'
#   56|->    local mandir='/usr/share/man'
#   57|      local docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
#   58|      local infodir='/usr/share/info'

Error: SHELLCHECK_WARNING: [#def19]
/usr/bin/brltty-config.sh:57:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   55|      local localedir='${datarootdir}/locale'
#   56|      local mandir='/usr/share/man'
#   57|->    local docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
#   58|      local infodir='/usr/share/info'
#   59|      local htmldir='${docdir}'

Error: SHELLCHECK_WARNING: [#def20]
/usr/bin/brltty-config.sh:58:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   56|      local mandir='/usr/share/man'
#   57|      local docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
#   58|->    local infodir='/usr/share/info'
#   59|      local htmldir='${docdir}'
#   60|      local pdfdir='${docdir}'

Error: SHELLCHECK_WARNING: [#def21]
/usr/bin/brltty-config.sh:59:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   57|      local docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
#   58|      local infodir='/usr/share/info'
#   59|->    local htmldir='${docdir}'
#   60|      local pdfdir='${docdir}'
#   61|      local psdir='${docdir}'

Error: SHELLCHECK_WARNING: [#def22]
/usr/bin/brltty-config.sh:60:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   58|      local infodir='/usr/share/info'
#   59|      local htmldir='${docdir}'
#   60|->    local pdfdir='${docdir}'
#   61|      local psdir='${docdir}'
#   62|      local dvidir='${docdir}'

Error: SHELLCHECK_WARNING: [#def23]
/usr/bin/brltty-config.sh:61:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   59|      local htmldir='${docdir}'
#   60|      local pdfdir='${docdir}'
#   61|->    local psdir='${docdir}'
#   62|      local dvidir='${docdir}'
#   63|   

Error: SHELLCHECK_WARNING: [#def24]
/usr/bin/brltty-config.sh:62:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   60|      local pdfdir='${docdir}'
#   61|      local psdir='${docdir}'
#   62|->    local dvidir='${docdir}'
#   63|   
#   64|      local PACKAGE_TARNAME='brltty'

Error: SHELLCHECK_WARNING: [#def25]
/usr/bin/brltty-config.sh:64:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   62|      local dvidir='${docdir}'
#   63|   
#   64|->    local PACKAGE_TARNAME='brltty'
#   65|      local PACKAGE_NAME='BRLTTY'
#   66|      local PACKAGE_VERSION='6.8'

Error: SHELLCHECK_WARNING: [#def26]
/usr/bin/brltty-config.sh:65:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   63|   
#   64|      local PACKAGE_TARNAME='brltty'
#   65|->    local PACKAGE_NAME='BRLTTY'
#   66|      local PACKAGE_VERSION='6.8'
#   67|      local PACKAGE_URL='https://brltty.app/'

Error: SHELLCHECK_WARNING: [#def27]
/usr/bin/brltty-config.sh:66:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   64|      local PACKAGE_TARNAME='brltty'
#   65|      local PACKAGE_NAME='BRLTTY'
#   66|->    local PACKAGE_VERSION='6.8'
#   67|      local PACKAGE_URL='https://brltty.app/'
#   68|      local PACKAGE_BUGREPORT='BRLTTY@brltty.app'

Error: SHELLCHECK_WARNING: [#def28]
/usr/bin/brltty-config.sh:67:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   65|      local PACKAGE_NAME='BRLTTY'
#   66|      local PACKAGE_VERSION='6.8'
#   67|->    local PACKAGE_URL='https://brltty.app/'
#   68|      local PACKAGE_BUGREPORT='BRLTTY@brltty.app'
#   69|   

Error: SHELLCHECK_WARNING: [#def29]
/usr/bin/brltty-config.sh:68:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   66|      local PACKAGE_VERSION='6.8'
#   67|      local PACKAGE_URL='https://brltty.app/'
#   68|->    local PACKAGE_BUGREPORT='BRLTTY@brltty.app'
#   69|   
#   70|      local execute_root=''

Error: SHELLCHECK_WARNING: [#def30]
/usr/bin/brltty-config.sh:70:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   68|      local PACKAGE_BUGREPORT='BRLTTY@brltty.app'
#   69|   
#   70|->    local execute_root=''
#   71|      local program_directory='/usr/bin'
#   72|      local drivers_directory='/usr/lib64/brltty'

Error: SHELLCHECK_WARNING: [#def31]
/usr/bin/brltty-config.sh:71:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   69|   
#   70|      local execute_root=''
#   71|->    local program_directory='/usr/bin'
#   72|      local drivers_directory='/usr/lib64/brltty'
#   73|      local tables_directory='/etc/brltty'

Error: SHELLCHECK_WARNING: [#def32]
/usr/bin/brltty-config.sh:72:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   70|      local execute_root=''
#   71|      local program_directory='/usr/bin'
#   72|->    local drivers_directory='/usr/lib64/brltty'
#   73|      local tables_directory='/etc/brltty'
#   74|      local updatable_directory='/var/lib/brltty'

Error: SHELLCHECK_WARNING: [#def33]
/usr/bin/brltty-config.sh:73:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   71|      local program_directory='/usr/bin'
#   72|      local drivers_directory='/usr/lib64/brltty'
#   73|->    local tables_directory='/etc/brltty'
#   74|      local updatable_directory='/var/lib/brltty'
#   75|      local writable_directory='/run/brltty'

Error: SHELLCHECK_WARNING: [#def34]
/usr/bin/brltty-config.sh:74:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   72|      local drivers_directory='/usr/lib64/brltty'
#   73|      local tables_directory='/etc/brltty'
#   74|->    local updatable_directory='/var/lib/brltty'
#   75|      local writable_directory='/run/brltty'
#   76|      local manpage_directory='/usr/share/man'

Error: SHELLCHECK_WARNING: [#def35]
/usr/bin/brltty-config.sh:75:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   73|      local tables_directory='/etc/brltty'
#   74|      local updatable_directory='/var/lib/brltty'
#   75|->    local writable_directory='/run/brltty'
#   76|      local manpage_directory='/usr/share/man'
#   77|      local include_directory='/usr/include/brltty'

Error: SHELLCHECK_WARNING: [#def36]
/usr/bin/brltty-config.sh:76:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   74|      local updatable_directory='/var/lib/brltty'
#   75|      local writable_directory='/run/brltty'
#   76|->    local manpage_directory='/usr/share/man'
#   77|      local include_directory='/usr/include/brltty'
#   78|   

Error: SHELLCHECK_WARNING: [#def37]
/usr/bin/brltty-config.sh:77:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   75|      local writable_directory='/run/brltty'
#   76|      local manpage_directory='/usr/share/man'
#   77|->    local include_directory='/usr/include/brltty'
#   78|   
#   79|      local privilege_parameters=''

Error: SHELLCHECK_WARNING: [#def38]
/usr/bin/brltty-config.sh:79:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   77|      local include_directory='/usr/include/brltty'
#   78|   
#   79|->    local privilege_parameters=''
#   80|   
#   81|      local api_version='0.8'

Error: SHELLCHECK_WARNING: [#def39]
/usr/bin/brltty-config.sh:81:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   79|      local privilege_parameters=''
#   80|   
#   81|->    local api_version='0.8'
#   82|      local api_release='0.8.7'
#   83|      local api_authkeyfile='brlapi.key'

Error: SHELLCHECK_WARNING: [#def40]
/usr/bin/brltty-config.sh:82:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   80|   
#   81|      local api_version='0.8'
#   82|->    local api_release='0.8.7'
#   83|      local api_authkeyfile='brlapi.key'
#   84|   

Error: SHELLCHECK_WARNING: [#def41]
/usr/bin/brltty-config.sh:83:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   81|      local api_version='0.8'
#   82|      local api_release='0.8.7'
#   83|->    local api_authkeyfile='brlapi.key'
#   84|   
#   85|      brlttyConfig_defineVariable BRLTTY_PREFIX "${prefix}"

Error: SHELLCHECK_WARNING (CWE-457): [#def42]
/usr/bin/brltty-genkey:24:4: warning[SC2154]: programDirectory is referenced but not assigned.
#   22|   
#   23|   . "`dirname "${0}"`/brltty-prologue.sh"
#   24|-> . "${programDirectory}/brltty-config.sh"
#   25|   defaultKeyFile="${BRLTTY_EXECUTE_ROOT}${BRLAPI_KEY_FILE}"
#   26|   

Error: SHELLCHECK_WARNING (CWE-477): [#def43]
/usr/bin/brltty-genkey:50:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   48|   for device in "/dev/urandom" "/dev/random"
#   49|   do
#   50|->    [ -c "${device}" -a -r "${device}" ] && {
#   51|         logNote "trying ${device}"
#   52|         try dd if="${device}" of="${keyFile}" bs=32 count=1

Error: SHELLCHECK_WARNING: [#def44]
/usr/bin/brltty-genkey:57:6: warning[SC3028]: In POSIX sh, RANDOM is undefined.
#   55|   
#   56|   logNote "trying \$RANDOM"
#   57|-> key="${RANDOM}"
#   58|   [ -n "${key}" ] && try echo >"${keyFile}" "${key}"
#   59|   

Error: SHELLCHECK_WARNING (CWE-457): [#def45]
/usr/bin/brltty-mkuser:22:4: warning[SC2154]: programDirectory is referenced but not assigned.
#   20|   set -e
#   21|   . "`dirname "${0}"`/brltty-prologue.sh"
#   22|-> . "${programDirectory}/brltty-config.sh"
#   23|   
#   24|   showProgramUsagePurpose() {

Error: SHELLCHECK_WARNING (CWE-457): [#def46]
/usr/bin/brltty-mkuser:50:5: warning[SC2154]: useSudo is referenced but not assigned.
#   48|   
#   49|   executeCommand() {
#   50|->    "${useSudo}" && set -- sudo -- "${@}"
#   51|   
#   52|      if "${testMode}"

Error: SHELLCHECK_WARNING (CWE-457): [#def47]
/usr/bin/brltty-mkuser:52:8: warning[SC2154]: testMode is referenced but not assigned.
#   50|      "${useSudo}" && set -- sudo -- "${@}"
#   51|   
#   52|->    if "${testMode}"
#   53|      then
#   54|         echo "${*}"

Error: SHELLCHECK_WARNING (CWE-457): [#def48]
/usr/bin/brltty-mkuser:113:5: warning[SC2154]: allowChanges is referenced but not assigned.
#  111|   if id -u "${userName}" >/dev/null 2>&1
#  112|   then
#  113|->    "${allowChanges}" || semanticError "user already exists: ${userName} - use -E (existing) to allow"
#  114|      command=(usermod)
#  115|   else

Error: SHELLCHECK_WARNING (CWE-457): [#def49]
/usr/bin/brltty-mkuser:116:5: warning[SC2154]: allowCreate is referenced but not assigned.
#  114|      command=(usermod)
#  115|   else
#  116|->    "${allowCreate}" || semanticError "user doesn't exist: ${userName} - use -N (new) to allow"
#  117|      command=(useradd --system)
#  118|      [ -n "${primaryGroup}" ] || command+=(--user-group)

Error: SHELLCHECK_WARNING (CWE-457): [#def50]
/usr/bin/brltty-mkuser:148:2: warning[SC2154]: noGroups is referenced but not assigned.
#  146|   [ -n "${loginShell}" ] && command+=(--shell "${loginShell}")
#  147|   
#  148|-> "${noGroups}" || {
#  149|      "${noALSA}" || addGroups audio
#  150|      "${noBrlapi}" || addGroups "${BRLAPI_KEY_FILE}"

Error: SHELLCHECK_WARNING (CWE-457): [#def51]
/usr/bin/brltty-mkuser:149:5: warning[SC2154]: noALSA is referenced but not assigned.
#  147|   
#  148|   "${noGroups}" || {
#  149|->    "${noALSA}" || addGroups audio
#  150|      "${noBrlapi}" || addGroups "${BRLAPI_KEY_FILE}"
#  151|      "${noConsoles}" || addGroups tty /dev/vcs1 /dev/tty1

Error: SHELLCHECK_WARNING (CWE-457): [#def52]
/usr/bin/brltty-mkuser:150:5: warning[SC2154]: noBrlapi is referenced but not assigned.
#  148|   "${noGroups}" || {
#  149|      "${noALSA}" || addGroups audio
#  150|->    "${noBrlapi}" || addGroups "${BRLAPI_KEY_FILE}"
#  151|      "${noConsoles}" || addGroups tty /dev/vcs1 /dev/tty1
#  152|      "${noKeyboards}" || addGroups input

Error: SHELLCHECK_WARNING (CWE-457): [#def53]
/usr/bin/brltty-mkuser:151:5: warning[SC2154]: noConsoles is referenced but not assigned.
#  149|      "${noALSA}" || addGroups audio
#  150|      "${noBrlapi}" || addGroups "${BRLAPI_KEY_FILE}"
#  151|->    "${noConsoles}" || addGroups tty /dev/vcs1 /dev/tty1
#  152|      "${noKeyboards}" || addGroups input
#  153|      "${noPulse}" || addGroups pulse-access

Error: SHELLCHECK_WARNING (CWE-457): [#def54]
/usr/bin/brltty-mkuser:152:5: warning[SC2154]: noKeyboards is referenced but not assigned.
#  150|      "${noBrlapi}" || addGroups "${BRLAPI_KEY_FILE}"
#  151|      "${noConsoles}" || addGroups tty /dev/vcs1 /dev/tty1
#  152|->    "${noKeyboards}" || addGroups input
#  153|      "${noPulse}" || addGroups pulse-access
#  154|      "${noSerial}" || addGroups /dev/ttyS0

Error: SHELLCHECK_WARNING (CWE-457): [#def55]
/usr/bin/brltty-mkuser:153:5: warning[SC2154]: noPulse is referenced but not assigned.
#  151|      "${noConsoles}" || addGroups tty /dev/vcs1 /dev/tty1
#  152|      "${noKeyboards}" || addGroups input
#  153|->    "${noPulse}" || addGroups pulse-access
#  154|      "${noSerial}" || addGroups /dev/ttyS0
#  155|      "${noUSB}" || addGroups /dev/bus/usb

Error: SHELLCHECK_WARNING (CWE-457): [#def56]
/usr/bin/brltty-mkuser:154:5: warning[SC2154]: noSerial is referenced but not assigned.
#  152|      "${noKeyboards}" || addGroups input
#  153|      "${noPulse}" || addGroups pulse-access
#  154|->    "${noSerial}" || addGroups /dev/ttyS0
#  155|      "${noUSB}" || addGroups /dev/bus/usb
#  156|   

Error: SHELLCHECK_WARNING (CWE-457): [#def57]
/usr/bin/brltty-mkuser:155:5: warning[SC2154]: noUSB is referenced but not assigned.
#  153|      "${noPulse}" || addGroups pulse-access
#  154|      "${noSerial}" || addGroups /dev/ttyS0
#  155|->    "${noUSB}" || addGroups /dev/bus/usb
#  156|   
#  157|      groupsOperand="${groupList[*]}"

Error: SHELLCHECK_WARNING (CWE-571): [#def58]
/usr/bin/brltty-prologue.bash:126:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  124|      [ -n "${toPath}" ] || toPath="."
#  125|      resolveDirectory "${toPath}" toPath
#  126|->    local fromPath="$(pwd)"
#  127|   
#  128|      [ "${fromPath%/}" = "${fromPath}" ] && fromPath+="/"

Error: SHELLCHECK_WARNING (CWE-457): [#def59]
/usr/bin/brltty-prologue.bash:170:46: warning[SC2154]: programDirectory is referenced but not assigned.
#  168|   makeProgramConfigurationFilePrefixArray() {
#  169|      [ "${#programConfigurationFilePrefixArray[*]}" -gt 0 ] || {
#  170|->       programConfigurationFilePrefixArray+=("${programDirectory}/.")
#  171|   
#  172|         [ -n "${HOME}" ] && {

Error: SHELLCHECK_WARNING (CWE-457): [#def60]
/usr/bin/brltty-prologue.bash:173:65: warning[SC2154]: programName is referenced but not assigned.
#  171|   
#  172|         [ -n "${HOME}" ] && {
#  173|->          programConfigurationFilePrefixArray+=("${HOME}/.config/${programName}/")
#  174|            programConfigurationFilePrefixArray+=("${HOME}/.")
#  175|         }

Error: SHELLCHECK_WARNING (CWE-477): [#def61]
/usr/bin/brltty-prologue.bash:316:118: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  314|      "${persistentProgramSettingsChanged}" && {
#  315|         [ -n "${settingsFile}" ] || {
#  316|->          findProgramConfigurationFile settingsFile "${persistentProgramSettingsExtension}" && [ -f "${settingsFile}" -a -w "${settingsFile}" ] || {
#  317|               settingsFile=""
#  318|               local prefix

Error: SHELLCHECK_WARNING (CWE-563): [#def62]
/usr/bin/brltty-prologue.sh:22:10: warning[SC2034]: initialDirectory appears unused. Verify use (or export if used externally).
#   20|   testMode=false
#   21|   
#   22|-> readonly initialDirectory="$(pwd)"
#   23|   readonly programName="$(basename "${0}")"
#   24|   

Error: SHELLCHECK_WARNING (CWE-571): [#def63]
/usr/bin/brltty-prologue.sh:22:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   20|   testMode=false
#   21|   
#   22|-> readonly initialDirectory="$(pwd)"
#   23|   readonly programName="$(basename "${0}")"
#   24|   

Error: SHELLCHECK_WARNING (CWE-571): [#def64]
/usr/bin/brltty-prologue.sh:23:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   21|   
#   22|   readonly initialDirectory="$(pwd)"
#   23|-> readonly programName="$(basename "${0}")"
#   24|   
#   25|   programMessage() {

Error: SHELLCHECK_WARNING: [#def65]
/usr/bin/brltty-prologue.sh:26:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   24|   
#   25|   programMessage() {
#   26|->    local message="${1}"
#   27|   
#   28|      [ -z "${message}" ] || echo >&2 "${programName}: ${message}"

Error: SHELLCHECK_WARNING: [#def66]
/usr/bin/brltty-prologue.sh:45:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   43|   
#   44|   defineEnumeration() {
#   45|->    local prefix="${1}"
#   46|      shift 1
#   47|   

Error: SHELLCHECK_WARNING: [#def67]
/usr/bin/brltty-prologue.sh:48:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   46|      shift 1
#   47|   
#   48|->    local name
#   49|      local value=1
#   50|   

Error: SHELLCHECK_WARNING: [#def68]
/usr/bin/brltty-prologue.sh:49:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   47|   
#   48|      local name
#   49|->    local value=1
#   50|   
#   51|      for name

Error: SHELLCHECK_WARNING: [#def69]
/usr/bin/brltty-prologue.sh:53:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   51|      for name
#   52|      do
#   53|->       local variable="${prefix}${name}"
#   54|         readonly "${variable}"="${value}"
#   55|         value=$((value + 1))

Error: SHELLCHECK_WARNING (CWE-457): [#def70]
/usr/bin/brltty-prologue.sh:60:20: warning[SC2154]: programLogLevel_task is referenced but not assigned.
#   58|   
#   59|   defineEnumeration programLogLevel_ error warning notice task note detail
#   60|-> programLogLevel=$((${programLogLevel_task}))
#   61|   
#   62|   logMessage() {

Error: SHELLCHECK_WARNING: [#def71]
/usr/bin/brltty-prologue.sh:63:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   61|   
#   62|   logMessage() {
#   63|->    local level="${1}"
#   64|      local message="${2}"
#   65|   

Error: SHELLCHECK_WARNING: [#def72]
/usr/bin/brltty-prologue.sh:64:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   62|   logMessage() {
#   63|      local level="${1}"
#   64|->    local message="${2}"
#   65|   
#   66|      local variable="programLogLevel_${level}"

Error: SHELLCHECK_WARNING: [#def73]
/usr/bin/brltty-prologue.sh:66:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   64|      local message="${2}"
#   65|   
#   66|->    local variable="programLogLevel_${level}"
#   67|      local value=$((${variable}))
#   68|   

Error: SHELLCHECK_WARNING: [#def74]
/usr/bin/brltty-prologue.sh:67:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#   65|   
#   66|      local variable="programLogLevel_${level}"
#   67|->    local value=$((${variable}))
#   68|   
#   69|      [ "${value}" -gt 0 ] || programMessage "unknown log level: ${level}"

Error: SHELLCHECK_WARNING (CWE-156): [#def75]
/usr/bin/brltty-prologue.sh:104:14: warning[SC2046]: Quote this to prevent word splitting.
#  102|      while [ "${programTerminationCommandCount}" -gt 0 ]
#  103|      do
#  104|->       set -- $(getVariable "programTerminationCommand${programTerminationCommandCount}")
#  105|         programTerminationCommandCount=$((programTerminationCommandCount - 1))
#  106|   

Error: SHELLCHECK_WARNING: [#def76]
/usr/bin/brltty-prologue.sh:107:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  105|         programTerminationCommandCount=$((programTerminationCommandCount - 1))
#  106|   
#  107|->       local process="${1}"
#  108|         local directory="${2}"
#  109|         shift 2

Error: SHELLCHECK_WARNING: [#def77]
/usr/bin/brltty-prologue.sh:108:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  106|   
#  107|         local process="${1}"
#  108|->       local directory="${2}"
#  109|         shift 2
#  110|   

Error: SHELLCHECK_WARNING (CWE-252): [#def78]
/usr/bin/brltty-prologue.sh:112:10: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  110|   
#  111|         [ "${process}" = "${$}" ] && {
#  112|->          cd "${directory}"
#  113|            "${@}"
#  114|         }

Error: SHELLCHECK_WARNING: [#def79]
/usr/bin/brltty-prologue.sh:119:88: warning[SC3049]: In POSIX sh, using lower/mixed case for signal names is undefined.
#  117|   
#  118|   pushProgramTerminationCommand() {
#  119|->    [ "${programTerminationCommandCount}" -gt 0 ] || trap runProgramTerminationCommands exit
#  120|      setVariable "programTerminationCommand$((programTerminationCommandCount += 1))" "${$} $(pwd) ${*}"
#  121|   }

Error: SHELLCHECK_WARNING: [#def80]
/usr/bin/brltty-prologue.sh:124:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  122|   
#  123|   needTemporaryDirectory() {
#  124|->    local variable="${1:-temporaryDirectory}"
#  125|   
#  126|      local _directory

Error: SHELLCHECK_WARNING: [#def81]
/usr/bin/brltty-prologue.sh:126:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  124|      local variable="${1:-temporaryDirectory}"
#  125|   
#  126|->    local _directory
#  127|      getVariable "${variable}" _directory
#  128|   

Error: SHELLCHECK_WARNING (CWE-477): [#def82]
/usr/bin/brltty-prologue.sh:130:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  128|   
#  129|      [ -n "${_directory}" ] || {
#  130|->       [ -n "${TMPDIR}" -a -d "${TMPDIR}" -a -r "${TMPDIR}" -a -w "${TMPDIR}" -a -x "${TMPDIR}" ] || export TMPDIR="/tmp"
#  131|         _directory="$(mktemp -d "${TMPDIR}/${programName}.$(date +"%Y%m%d-%H%M%S").XXXXXX")"
#  132|         pushProgramTerminationCommand rm -f -r -- "${_directory}"

Error: SHELLCHECK_WARNING (CWE-477): [#def83]
/usr/bin/brltty-prologue.sh:130:42: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  128|   
#  129|      [ -n "${_directory}" ] || {
#  130|->       [ -n "${TMPDIR}" -a -d "${TMPDIR}" -a -r "${TMPDIR}" -a -w "${TMPDIR}" -a -x "${TMPDIR}" ] || export TMPDIR="/tmp"
#  131|         _directory="$(mktemp -d "${TMPDIR}/${programName}.$(date +"%Y%m%d-%H%M%S").XXXXXX")"
#  132|         pushProgramTerminationCommand rm -f -r -- "${_directory}"

Error: SHELLCHECK_WARNING (CWE-477): [#def84]
/usr/bin/brltty-prologue.sh:130:60: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  128|   
#  129|      [ -n "${_directory}" ] || {
#  130|->       [ -n "${TMPDIR}" -a -d "${TMPDIR}" -a -r "${TMPDIR}" -a -w "${TMPDIR}" -a -x "${TMPDIR}" ] || export TMPDIR="/tmp"
#  131|         _directory="$(mktemp -d "${TMPDIR}/${programName}.$(date +"%Y%m%d-%H%M%S").XXXXXX")"
#  132|         pushProgramTerminationCommand rm -f -r -- "${_directory}"

Error: SHELLCHECK_WARNING (CWE-477): [#def85]
/usr/bin/brltty-prologue.sh:130:78: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  128|   
#  129|      [ -n "${_directory}" ] || {
#  130|->       [ -n "${TMPDIR}" -a -d "${TMPDIR}" -a -r "${TMPDIR}" -a -w "${TMPDIR}" -a -x "${TMPDIR}" ] || export TMPDIR="/tmp"
#  131|         _directory="$(mktemp -d "${TMPDIR}/${programName}.$(date +"%Y%m%d-%H%M%S").XXXXXX")"
#  132|         pushProgramTerminationCommand rm -f -r -- "${_directory}"

Error: SHELLCHECK_WARNING (CWE-252): [#def86]
/usr/bin/brltty-prologue.sh:133:7: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  131|         _directory="$(mktemp -d "${TMPDIR}/${programName}.$(date +"%Y%m%d-%H%M%S").XXXXXX")"
#  132|         pushProgramTerminationCommand rm -f -r -- "${_directory}"
#  133|->       cd "${_directory}"
#  134|         setVariable "${variable}" "${_directory}"
#  135|      }

Error: SHELLCHECK_WARNING: [#def87]
/usr/bin/brltty-prologue.sh:139:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  137|   
#  138|   resolveDirectory() {
#  139|->    local path="${1}"
#  140|      local variable="${2}"
#  141|      local absolute="$(cd "${path}" && pwd)"

Error: SHELLCHECK_WARNING: [#def88]
/usr/bin/brltty-prologue.sh:140:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  138|   resolveDirectory() {
#  139|      local path="${1}"
#  140|->    local variable="${2}"
#  141|      local absolute="$(cd "${path}" && pwd)"
#  142|   

Error: SHELLCHECK_WARNING: [#def89]
/usr/bin/brltty-prologue.sh:141:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  139|      local path="${1}"
#  140|      local variable="${2}"
#  141|->    local absolute="$(cd "${path}" && pwd)"
#  142|   
#  143|      if [ -n "${variable}" ]

Error: SHELLCHECK_WARNING (CWE-571): [#def90]
/usr/bin/brltty-prologue.sh:141:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  139|      local path="${1}"
#  140|      local variable="${2}"
#  141|->    local absolute="$(cd "${path}" && pwd)"
#  142|   
#  143|      if [ -n "${variable}" ]

Error: SHELLCHECK_WARNING (CWE-571): [#def91]
/usr/bin/brltty-prologue.sh:152:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  150|   
#  151|   programDirectory="$(dirname "${0}")"
#  152|-> readonly programDirectory="$(resolveDirectory "${programDirectory}")"
#  153|   
#  154|   parseParameterString() {

Error: SHELLCHECK_WARNING: [#def92]
/usr/bin/brltty-prologue.sh:155:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  153|   
#  154|   parseParameterString() {
#  155|->    local valuesArray="${1}"
#  156|      local parameters="${2}"
#  157|      local code="${3}"

Error: SHELLCHECK_WARNING: [#def93]
/usr/bin/brltty-prologue.sh:156:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  154|   parseParameterString() {
#  155|      local valuesArray="${1}"
#  156|->    local parameters="${2}"
#  157|      local code="${3}"
#  158|   

Error: SHELLCHECK_WARNING: [#def94]
/usr/bin/brltty-prologue.sh:157:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  155|      local valuesArray="${1}"
#  156|      local parameters="${2}"
#  157|->    local code="${3}"
#  158|   
#  159|      set -- ${parameters//,/ }

Error: SHELLCHECK_WARNING: [#def95]
/usr/bin/brltty-prologue.sh:159:11: warning[SC3060]: In POSIX sh, string replacement is undefined.
#  157|      local code="${3}"
#  158|   
#  159|->    set -- ${parameters//,/ }
#  160|      local parameter
#  161|   

Error: SHELLCHECK_WARNING: [#def96]
/usr/bin/brltty-prologue.sh:160:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  158|   
#  159|      set -- ${parameters//,/ }
#  160|->    local parameter
#  161|   
#  162|      for parameter

Error: SHELLCHECK_WARNING: [#def97]
/usr/bin/brltty-prologue.sh:164:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  162|      for parameter
#  163|      do
#  164|->       local name="${parameter%%=*}"
#  165|         [ "${name}" = "${parameter}" ] && continue
#  166|         [ -n "${name}" ] || continue

Error: SHELLCHECK_WARNING: [#def98]
/usr/bin/brltty-prologue.sh:167:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  165|         [ "${name}" = "${parameter}" ] && continue
#  166|         [ -n "${name}" ] || continue
#  167|->       local value="${parameter#*=}"
#  168|   
#  169|         local qualifier="${name%%:*}"

Error: SHELLCHECK_WARNING: [#def99]
/usr/bin/brltty-prologue.sh:169:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  167|         local value="${parameter#*=}"
#  168|   
#  169|->       local qualifier="${name%%:*}"
#  170|         [ "${qualifier}" = "${name}" ] || {
#  171|            [ -n "${qualifier}" ] || continue

Error: SHELLCHECK_WARNING: [#def100]
/usr/bin/brltty-prologue.sh:176:35: warning[SC3059]: In POSIX sh, case modification is undefined.
#  174|         }
#  175|   
#  176|->       setVariable "${valuesArray}[${name^^*}]" "${value}"
#  177|      done
#  178|   }

Error: SHELLCHECK_WARNING: [#def101]
/usr/bin/brltty-prologue.sh:181:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  179|   
#  180|   stringHead() {
#  181|->    local string="${1}"
#  182|      local length="${2}"
#  183|   

Error: SHELLCHECK_WARNING: [#def102]
/usr/bin/brltty-prologue.sh:182:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  180|   stringHead() {
#  181|      local string="${1}"
#  182|->    local length="${2}"
#  183|   
#  184|      [ "${length}" -eq 0 ] || expr substr "${string}" 1 "${length}"

Error: SHELLCHECK_WARNING: [#def103]
/usr/bin/brltty-prologue.sh:188:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  186|   
#  187|   stringTail() {
#  188|->    local string="${1}"
#  189|      local start="${2}"
#  190|   

Error: SHELLCHECK_WARNING: [#def104]
/usr/bin/brltty-prologue.sh:189:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  187|   stringTail() {
#  188|      local string="${1}"
#  189|->    local start="${2}"
#  190|   
#  191|      local length=$((${#string} - start))

Error: SHELLCHECK_WARNING: [#def105]
/usr/bin/brltty-prologue.sh:191:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  189|      local start="${2}"
#  190|   
#  191|->    local length=$((${#string} - start))
#  192|      [ "${length}" -eq 0 ] || expr substr "${string}" $((start + 1)) "${length}"
#  193|   }

Error: SHELLCHECK_WARNING: [#def106]
/usr/bin/brltty-prologue.sh:196:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  194|   
#  195|   stringReplace() {
#  196|->    local string="${1}"
#  197|      local pattern="${2}"
#  198|      local replacement="${3}"

Error: SHELLCHECK_WARNING: [#def107]
/usr/bin/brltty-prologue.sh:197:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  195|   stringReplace() {
#  196|      local string="${1}"
#  197|->    local pattern="${2}"
#  198|      local replacement="${3}"
#  199|      local flags="${4}"

Error: SHELLCHECK_WARNING: [#def108]
/usr/bin/brltty-prologue.sh:198:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  196|      local string="${1}"
#  197|      local pattern="${2}"
#  198|->    local replacement="${3}"
#  199|      local flags="${4}"
#  200|   

Error: SHELLCHECK_WARNING: [#def109]
/usr/bin/brltty-prologue.sh:199:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  197|      local pattern="${2}"
#  198|      local replacement="${3}"
#  199|->    local flags="${4}"
#  200|   
#  201|      echo "${string}" | sed -e "s/${pattern}/${replacement}/${flags}"

Error: SHELLCHECK_WARNING: [#def110]
/usr/bin/brltty-prologue.sh:205:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  203|   
#  204|   stringReplaceAll() {
#  205|->    local string="${1}"
#  206|      local pattern="${2}"
#  207|      local replacement="${3}"

Error: SHELLCHECK_WARNING: [#def111]
/usr/bin/brltty-prologue.sh:206:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  204|   stringReplaceAll() {
#  205|      local string="${1}"
#  206|->    local pattern="${2}"
#  207|      local replacement="${3}"
#  208|   

Error: SHELLCHECK_WARNING: [#def112]
/usr/bin/brltty-prologue.sh:207:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  205|      local string="${1}"
#  206|      local pattern="${2}"
#  207|->    local replacement="${3}"
#  208|   
#  209|      stringReplace "${string}" "${pattern}" "${replacement}" "g"

Error: SHELLCHECK_WARNING: [#def113]
/usr/bin/brltty-prologue.sh:213:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  211|   
#  212|   stringQuoted() {
#  213|->    local string="${1}"
#  214|   
#  215|      local pattern="'"

Error: SHELLCHECK_WARNING: [#def114]
/usr/bin/brltty-prologue.sh:215:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  213|      local string="${1}"
#  214|   
#  215|->    local pattern="'"
#  216|      local replacement="'"'"'"'"'"'"'"
#  217|      string="$(stringReplaceAll "${string}" "${pattern}" "${replacement}")"

Error: SHELLCHECK_WARNING: [#def115]
/usr/bin/brltty-prologue.sh:216:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  214|   
#  215|      local pattern="'"
#  216|->    local replacement="'"'"'"'"'"'"'"
#  217|      string="$(stringReplaceAll "${string}" "${pattern}" "${replacement}")"
#  218|      echo "'${string}'"

Error: SHELLCHECK_WARNING: [#def116]
/usr/bin/brltty-prologue.sh:222:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  220|   
#  221|   stringWrapped() {
#  222|->    local string="${1}"
#  223|      local width="${2}"
#  224|   

Error: SHELLCHECK_WARNING: [#def117]
/usr/bin/brltty-prologue.sh:223:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  221|   stringWrapped() {
#  222|      local string="${1}"
#  223|->    local width="${2}"
#  224|   
#  225|      local result=""

Error: SHELLCHECK_WARNING: [#def118]
/usr/bin/brltty-prologue.sh:225:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  223|      local width="${2}"
#  224|   
#  225|->    local result=""
#  226|      local paragraph=""
#  227|   

Error: SHELLCHECK_WARNING: [#def119]
/usr/bin/brltty-prologue.sh:226:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  224|   
#  225|      local result=""
#  226|->    local paragraph=""
#  227|   
#  228|      while true

Error: SHELLCHECK_WARNING: [#def120]
/usr/bin/brltty-prologue.sh:230:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  228|      while true
#  229|      do
#  230|->       local length="$(expr "${string}" : $'[^\n]*\n')"
#  231|         local line
#  232|   

Error: SHELLCHECK_WARNING (CWE-571): [#def121]
/usr/bin/brltty-prologue.sh:230:13: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  228|      while true
#  229|      do
#  230|->       local length="$(expr "${string}" : $'[^\n]*\n')"
#  231|         local line
#  232|   

Error: SHELLCHECK_WARNING: [#def122]
/usr/bin/brltty-prologue.sh:230:42: warning[SC3003]: In POSIX sh, $'..' is undefined.
#  228|      while true
#  229|      do
#  230|->       local length="$(expr "${string}" : $'[^\n]*\n')"
#  231|         local line
#  232|   

Error: SHELLCHECK_WARNING: [#def123]
/usr/bin/brltty-prologue.sh:231:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  229|      do
#  230|         local length="$(expr "${string}" : $'[^\n]*\n')"
#  231|->       local line
#  232|   
#  233|         if [ "${length}" -eq 0 ]

Error: SHELLCHECK_WARNING: [#def124]
/usr/bin/brltty-prologue.sh:250:10: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  248|         while [ "${#paragraph}" -gt "${width}" ]
#  249|         do
#  250|->          local head="$(stringHead "${paragraph}" $((width + 1)))"
#  251|            head="${head% *}"
#  252|   

Error: SHELLCHECK_WARNING (CWE-571): [#def125]
/usr/bin/brltty-prologue.sh:250:16: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  248|         while [ "${#paragraph}" -gt "${width}" ]
#  249|         do
#  250|->          local head="$(stringHead "${paragraph}" $((width + 1)))"
#  251|            head="${head% *}"
#  252|   

Error: SHELLCHECK_WARNING: [#def126]
/usr/bin/brltty-prologue.sh:279:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  277|   
#  278|   syntaxError() {
#  279|->    local message="${1}"
#  280|   
#  281|      logError "${message}"

Error: SHELLCHECK_WARNING: [#def127]
/usr/bin/brltty-prologue.sh:286:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  284|   
#  285|   semanticError() {
#  286|->    local message="${1}"
#  287|   
#  288|      logError "${message}"

Error: SHELLCHECK_WARNING: [#def128]
/usr/bin/brltty-prologue.sh:293:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  291|   
#  292|   internalError() {
#  293|->    local message="${1}"
#  294|   
#  295|      logError "${message}"

Error: SHELLCHECK_WARNING: [#def129]
/usr/bin/brltty-prologue.sh:300:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  298|   
#  299|   findSiblingCommand() {
#  300|->    local resultVariable="${1}"
#  301|      shift 1
#  302|   

Error: SHELLCHECK_WARNING: [#def130]
/usr/bin/brltty-prologue.sh:303:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  301|      shift 1
#  302|   
#  303|->    local command
#  304|      for command in "${@}"
#  305|      do

Error: SHELLCHECK_WARNING: [#def131]
/usr/bin/brltty-prologue.sh:306:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  304|      for command in "${@}"
#  305|      do
#  306|->       local path="${programDirectory}/${command}"
#  307|         [ -f "${path}" ] || continue
#  308|         [ -x "${path}" ] || continue

Error: SHELLCHECK_WARNING: [#def132]
/usr/bin/brltty-prologue.sh:318:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  316|   
#  317|   findHostCommand() {
#  318|->    local pathVariable="${1}"
#  319|      local command="${2}"
#  320|   

Error: SHELLCHECK_WARNING: [#def133]
/usr/bin/brltty-prologue.sh:319:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  317|   findHostCommand() {
#  318|      local pathVariable="${1}"
#  319|->    local command="${2}"
#  320|   
#  321|      local path="$(which "${command}")"

Error: SHELLCHECK_WARNING: [#def134]
/usr/bin/brltty-prologue.sh:321:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  319|      local command="${2}"
#  320|   
#  321|->    local path="$(which "${command}")"
#  322|      [ -n "${path}" ] || return 1
#  323|   

Error: SHELLCHECK_WARNING (CWE-571): [#def135]
/usr/bin/brltty-prologue.sh:321:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  319|      local command="${2}"
#  320|   
#  321|->    local path="$(which "${command}")"
#  322|      [ -n "${path}" ] || return 1
#  323|   

Error: SHELLCHECK_WARNING: [#def136]
/usr/bin/brltty-prologue.sh:329:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  327|   
#  328|   verifyHostCommand() {
#  329|->    local pathVariable="${1}"
#  330|      local command="${2}"
#  331|   

Error: SHELLCHECK_WARNING: [#def137]
/usr/bin/brltty-prologue.sh:330:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  328|   verifyHostCommand() {
#  329|      local pathVariable="${1}"
#  330|->    local command="${2}"
#  331|   
#  332|      findHostCommand "${pathVariable}" "${command}" || {

Error: SHELLCHECK_WARNING: [#def138]
/usr/bin/brltty-prologue.sh:341:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  339|   
#  340|      "${testMode}" || "${@}" || {
#  341|->       local status="${?}"
#  342|         logWarning "host command failed with exit status ${status}: ${*}"
#  343|         return "${status}"

Error: SHELLCHECK_WARNING: [#def139]
/usr/bin/brltty-prologue.sh:348:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  346|   
#  347|   verifyActionFlags() {
#  348|->    local allFlag="${1}"
#  349|      shift 1
#  350|   

Error: SHELLCHECK_WARNING: [#def140]
/usr/bin/brltty-prologue.sh:351:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  349|      shift 1
#  350|   
#  351|->    local allRequested
#  352|      getVariable "${allFlag}" allRequested
#  353|      local actionFlag

Error: SHELLCHECK_WARNING: [#def141]
/usr/bin/brltty-prologue.sh:353:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  351|      local allRequested
#  352|      getVariable "${allFlag}" allRequested
#  353|->    local actionFlag
#  354|   
#  355|      for actionFlag in "${@}"

Error: SHELLCHECK_WARNING: [#def142]
/usr/bin/brltty-prologue.sh:357:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  355|      for actionFlag in "${@}"
#  356|      do
#  357|->       local actionRequested
#  358|         getVariable "${actionFlag}" actionRequested
#  359|   

Error: SHELLCHECK_WARNING: [#def143]
/usr/bin/brltty-prologue.sh:375:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  373|   
#  374|   testInteger() {
#  375|->    local value="${1}"
#  376|   
#  377|      [ "${value}" = "0" ] || {

Error: SHELLCHECK_WARNING: [#def144]
/usr/bin/brltty-prologue.sh:387:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  385|   
#  386|   verifyInteger() {
#  387|->    local label="${1}"
#  388|      local value="${2}"
#  389|      local minimum="${3}"

Error: SHELLCHECK_WARNING: [#def145]
/usr/bin/brltty-prologue.sh:388:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  386|   verifyInteger() {
#  387|      local label="${1}"
#  388|->    local value="${2}"
#  389|      local minimum="${3}"
#  390|      local maximum="${4}"

Error: SHELLCHECK_WARNING: [#def146]
/usr/bin/brltty-prologue.sh:389:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  387|      local label="${1}"
#  388|      local value="${2}"
#  389|->    local minimum="${3}"
#  390|      local maximum="${4}"
#  391|   

Error: SHELLCHECK_WARNING: [#def147]
/usr/bin/brltty-prologue.sh:390:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  388|      local value="${2}"
#  389|      local minimum="${3}"
#  390|->    local maximum="${4}"
#  391|   
#  392|      testInteger "${value}" || {

Error: SHELLCHECK_WARNING: [#def148]
/usr/bin/brltty-prologue.sh:410:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  408|   
#  409|   testContainingDirectory() {
#  410|->    local directory="${1}"
#  411|      shift 1
#  412|   

Error: SHELLCHECK_WARNING: [#def149]
/usr/bin/brltty-prologue.sh:413:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  411|      shift 1
#  412|   
#  413|->    local path
#  414|      for path
#  415|      do

Error: SHELLCHECK_WARNING: [#def150]
/usr/bin/brltty-prologue.sh:423:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  421|   
#  422|   findContainingDirectory() {
#  423|->    local variable="${1}"
#  424|      local directory="${2}"
#  425|      shift 2

Error: SHELLCHECK_WARNING: [#def151]
/usr/bin/brltty-prologue.sh:424:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  422|   findContainingDirectory() {
#  423|      local variable="${1}"
#  424|->    local directory="${2}"
#  425|      shift 2
#  426|   

Error: SHELLCHECK_WARNING: [#def152]
/usr/bin/brltty-prologue.sh:427:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  425|      shift 2
#  426|   
#  427|->    local value
#  428|      getVariable "${variable}" value
#  429|      [ -n "${value}" ] && return 0

Error: SHELLCHECK_WARNING: [#def153]
/usr/bin/brltty-prologue.sh:434:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  432|      do
#  433|         testContainingDirectory "${directory}" "${@}" && break
#  434|->       local parent="$(dirname "${directory}")"
#  435|         [ "${parent}" = "${directory}" ] && return 1
#  436|         directory="${parent}"

Error: SHELLCHECK_WARNING (CWE-571): [#def154]
/usr/bin/brltty-prologue.sh:434:13: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  432|      do
#  433|         testContainingDirectory "${directory}" "${@}" && break
#  434|->       local parent="$(dirname "${directory}")"
#  435|         [ "${parent}" = "${directory}" ] && return 1
#  436|         directory="${parent}"

Error: SHELLCHECK_WARNING: [#def155]
/usr/bin/brltty-prologue.sh:443:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  441|   
#  442|   testDirectory() {
#  443|->    local path="${1}"
#  444|   
#  445|      [ -e "${path}" ] || return 1

Error: SHELLCHECK_WARNING: [#def156]
/usr/bin/brltty-prologue.sh:451:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  449|   
#  450|   verifyWritableDirectory() {
#  451|->    local path="${1}"
#  452|   
#  453|      testDirectory "${path}" || semanticError "directory not found: ${path}"

Error: SHELLCHECK_WARNING: [#def157]
/usr/bin/brltty-prologue.sh:458:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  456|   
#  457|   testFile() {
#  458|->    local path="${1}"
#  459|   
#  460|      [ -e "${path}" ] || return 1

Error: SHELLCHECK_WARNING: [#def158]
/usr/bin/brltty-prologue.sh:466:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  464|   
#  465|   verifyInputFile() {
#  466|->    local path="${1}"
#  467|   
#  468|      testFile "${path}" || semanticError "file not found: ${path}"

Error: SHELLCHECK_WARNING: [#def159]
/usr/bin/brltty-prologue.sh:473:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  471|   
#  472|   verifyOutputFile() {
#  473|->    local path="${1}"
#  474|   
#  475|      if testFile "${path}"

Error: SHELLCHECK_WARNING: [#def160]
/usr/bin/brltty-prologue.sh:484:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  482|   
#  483|   verifyExecutableFile() {
#  484|->    local path="${1}"
#  485|   
#  486|      testFile "${path}" || semanticError "file not found: ${path}"

Error: SHELLCHECK_WARNING: [#def161]
/usr/bin/brltty-prologue.sh:491:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  489|   
#  490|   verifyInputDirectory() {
#  491|->    local path="${1}"
#  492|   
#  493|      testDirectory "${path}" || semanticError "directory not found: ${path}"

Error: SHELLCHECK_WARNING: [#def162]
/usr/bin/brltty-prologue.sh:497:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  495|   
#  496|   verifyOutputDirectory() {
#  497|->    local path="${1}"
#  498|   
#  499|      if testDirectory "${path}"

Error: SHELLCHECK_WARNING (CWE-398): [#def163]
/usr/bin/brltty-prologue.sh:502:19: warning[SC2115]: Use "${var:?}" to ensure this never expands to /* .
#  500|      then
#  501|         [ -w "${path}" ] || semanticError "directory not writable: ${path}"
#  502|->       rm -f -r -- "${path}/"*
#  503|      else
#  504|         mkdir -p "${path}"

Error: SHELLCHECK_WARNING: [#def164]
/usr/bin/brltty-prologue.sh:513:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  511|   
#  512|   addProgramParameter() {
#  513|->    local label="${1}"
#  514|      local variable="${2}"
#  515|      local usage="${3}"

Error: SHELLCHECK_WARNING: [#def165]
/usr/bin/brltty-prologue.sh:514:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  512|   addProgramParameter() {
#  513|      local label="${1}"
#  514|->    local variable="${2}"
#  515|      local usage="${3}"
#  516|      local default="${4}"

Error: SHELLCHECK_WARNING: [#def166]
/usr/bin/brltty-prologue.sh:515:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  513|      local label="${1}"
#  514|      local variable="${2}"
#  515|->    local usage="${3}"
#  516|      local default="${4}"
#  517|   

Error: SHELLCHECK_WARNING: [#def167]
/usr/bin/brltty-prologue.sh:516:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  514|      local variable="${2}"
#  515|      local usage="${3}"
#  516|->    local default="${4}"
#  517|   
#  518|      setVariable "programParameterLabel_${programParameterCount}" "${label}"

Error: SHELLCHECK_WARNING: [#def168]
/usr/bin/brltty-prologue.sh:523:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  521|      setVariable "programParameterDefault_${programParameterCount}" "${default}"
#  522|   
#  523|->    local length="${#label}"
#  524|      [ "${length}" -le "${programParameterLabelWidth}" ] || programParameterLabelWidth="${length}"
#  525|   

Error: SHELLCHECK_WARNING (CWE-563): [#def169]
/usr/bin/brltty-prologue.sh:549:1: warning[SC2034]: programOptionValue_counter appears unused. Verify use (or export if used externally).
#  547|   programOptionOperandWidth=0
#  548|   
#  549|-> programOptionValue_counter=0
#  550|   programOptionValue_flag=false
#  551|   programOptionValue_list=""

Error: SHELLCHECK_WARNING (CWE-563): [#def170]
/usr/bin/brltty-prologue.sh:550:1: warning[SC2034]: programOptionValue_flag appears unused. Verify use (or export if used externally).
#  548|   
#  549|   programOptionValue_counter=0
#  550|-> programOptionValue_flag=false
#  551|   programOptionValue_list=""
#  552|   programOptionValue_string=""

Error: SHELLCHECK_WARNING (CWE-563): [#def171]
/usr/bin/brltty-prologue.sh:551:1: warning[SC2034]: programOptionValue_list appears unused. Verify use (or export if used externally).
#  549|   programOptionValue_counter=0
#  550|   programOptionValue_flag=false
#  551|-> programOptionValue_list=""
#  552|   programOptionValue_string=""
#  553|   

Error: SHELLCHECK_WARNING (CWE-563): [#def172]
/usr/bin/brltty-prologue.sh:552:1: warning[SC2034]: programOptionValue_string appears unused. Verify use (or export if used externally).
#  550|   programOptionValue_flag=false
#  551|   programOptionValue_list=""
#  552|-> programOptionValue_string=""
#  553|   
#  554|   addProgramOption() {

Error: SHELLCHECK_WARNING: [#def173]
/usr/bin/brltty-prologue.sh:555:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  553|   
#  554|   addProgramOption() {
#  555|->    local letter="${1}"
#  556|      local type="${2}"
#  557|      local variable="${3}"

Error: SHELLCHECK_WARNING: [#def174]
/usr/bin/brltty-prologue.sh:556:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  554|   addProgramOption() {
#  555|      local letter="${1}"
#  556|->    local type="${2}"
#  557|      local variable="${3}"
#  558|      local usage="${4}"

Error: SHELLCHECK_WARNING: [#def175]
/usr/bin/brltty-prologue.sh:557:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  555|      local letter="${1}"
#  556|      local type="${2}"
#  557|->    local variable="${3}"
#  558|      local usage="${4}"
#  559|      local default="${5}"

Error: SHELLCHECK_WARNING: [#def176]
/usr/bin/brltty-prologue.sh:558:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  556|      local type="${2}"
#  557|      local variable="${3}"
#  558|->    local usage="${4}"
#  559|      local default="${5}"
#  560|   

Error: SHELLCHECK_WARNING: [#def177]
/usr/bin/brltty-prologue.sh:559:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  557|      local variable="${3}"
#  558|      local usage="${4}"
#  559|->    local default="${5}"
#  560|   
#  561|      [ "$(expr "${letter}" : '[[:alnum:]]*$')" -eq 1 ] || internalError "invalid program option: -${letter}"

Error: SHELLCHECK_WARNING: [#def178]
/usr/bin/brltty-prologue.sh:564:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  562|      [ -z "$(getVariable "programOptionType_${letter}")" ] || internalError "duplicate program option definition: -${letter}"
#  563|   
#  564|->    local operand
#  565|      case "${type}"
#  566|      in

Error: SHELLCHECK_WARNING: [#def179]
/usr/bin/brltty-prologue.sh:586:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  584|      setVariable "programOptionDefault_${letter}" "${default}"
#  585|   
#  586|->    local value="$(getVariable "programOptionValue_${type}")"
#  587|      setVariable "${variable}" "${value}"
#  588|   

Error: SHELLCHECK_WARNING (CWE-571): [#def180]
/usr/bin/brltty-prologue.sh:586:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  584|      setVariable "programOptionDefault_${letter}" "${default}"
#  585|   
#  586|->    local value="$(getVariable "programOptionValue_${type}")"
#  587|      setVariable "${variable}" "${value}"
#  588|   

Error: SHELLCHECK_WARNING: [#def181]
/usr/bin/brltty-prologue.sh:589:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  587|      setVariable "${variable}" "${value}"
#  588|   
#  589|->    local length="${#operand}"
#  590|      [ "${length}" -le "${programOptionOperandWidth}" ] || programOptionOperandWidth="${length}"
#  591|   

Error: SHELLCHECK_WARNING: [#def182]
/usr/bin/brltty-prologue.sh:605:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  603|   
#  604|   addProgramUsageLine() {
#  605|->    local line="${1}"
#  606|   
#  607|      setVariable "programUsageLine_${programUsageLineCount}" "${line}"

Error: SHELLCHECK_WARNING: [#def183]
/usr/bin/brltty-prologue.sh:612:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  610|   
#  611|   addProgramUsageText() {
#  612|->    local text="${1}"
#  613|      local prefix="${2}"
#  614|   

Error: SHELLCHECK_WARNING: [#def184]
/usr/bin/brltty-prologue.sh:613:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  611|   addProgramUsageText() {
#  612|      local text="${1}"
#  613|->    local prefix="${2}"
#  614|   
#  615|      local width=$((programUsageLineWidth - ${#prefix}))

Error: SHELLCHECK_WARNING: [#def185]
/usr/bin/brltty-prologue.sh:615:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  613|      local prefix="${2}"
#  614|   
#  615|->    local width=$((programUsageLineWidth - ${#prefix}))
#  616|   
#  617|      while [ "${width}" -lt 1 ]

Error: SHELLCHECK_WARNING: [#def186]
/usr/bin/brltty-prologue.sh:624:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  622|      done
#  623|   
#  624|->    local indent="$(stringReplaceAll "${prefix}" '.' ' ')"
#  625|   
#  626|      [ "${width}" -gt 0 ] || {

Error: SHELLCHECK_WARNING (CWE-571): [#def187]
/usr/bin/brltty-prologue.sh:624:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  622|      done
#  623|   
#  624|->    local indent="$(stringReplaceAll "${prefix}" '.' ' ')"
#  625|   
#  626|      [ "${width}" -gt 0 ] || {

Error: SHELLCHECK_WARNING: [#def188]
/usr/bin/brltty-prologue.sh:642:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  640|   
#  641|   writeProgramUsageLines() {
#  642|->    local index=0
#  643|   
#  644|      while [ "${index}" -lt "${programUsageLineCount}" ]

Error: SHELLCHECK_WARNING: [#def189]
/usr/bin/brltty-prologue.sh:654:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  652|      set -- ${programOptionLetters}
#  653|   
#  654|->    local purpose="$(showProgramUsagePurpose)"
#  655|      [ -z "${purpose}" ] || {
#  656|         addProgramUsageText "${purpose}"

Error: SHELLCHECK_WARNING (CWE-571): [#def190]
/usr/bin/brltty-prologue.sh:654:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  652|      set -- ${programOptionLetters}
#  653|   
#  654|->    local purpose="$(showProgramUsagePurpose)"
#  655|      [ -z "${purpose}" ] || {
#  656|         addProgramUsageText "${purpose}"

Error: SHELLCHECK_WARNING: [#def191]
/usr/bin/brltty-prologue.sh:660:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  658|      }
#  659|   
#  660|->    local line="Syntax: ${programName}"
#  661|      [ "${#}" -eq 0 ] || line="${line} [-option ...]"
#  662|   

Error: SHELLCHECK_WARNING: [#def192]
/usr/bin/brltty-prologue.sh:663:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  661|      [ "${#}" -eq 0 ] || line="${line} [-option ...]"
#  662|   
#  663|->    local index=0
#  664|      local suffix=""
#  665|   

Error: SHELLCHECK_WARNING: [#def193]
/usr/bin/brltty-prologue.sh:664:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  662|   
#  663|      local index=0
#  664|->    local suffix=""
#  665|   
#  666|      while [ "${index}" -lt "${programParameterCount}" ]

Error: SHELLCHECK_WARNING: [#def194]
/usr/bin/brltty-prologue.sh:694:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  692|         addProgramUsageLine "Parameters:"
#  693|   
#  694|->       local indent=$((programParameterLabelWidth + 2))
#  695|         local index=0
#  696|   

Error: SHELLCHECK_WARNING: [#def195]
/usr/bin/brltty-prologue.sh:695:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  693|   
#  694|         local indent=$((programParameterLabelWidth + 2))
#  695|->       local index=0
#  696|   
#  697|         while [ "${index}" -lt "${programParameterCount}" ]

Error: SHELLCHECK_WARNING: [#def196]
/usr/bin/brltty-prologue.sh:699:10: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  697|         while [ "${index}" -lt "${programParameterCount}" ]
#  698|         do
#  699|->          local line="$(getVariable "programParameterLabel_${index}")"
#  700|   
#  701|            while [ "${#line}" -lt "${indent}" ]

Error: SHELLCHECK_WARNING (CWE-571): [#def197]
/usr/bin/brltty-prologue.sh:699:16: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  697|         while [ "${index}" -lt "${programParameterCount}" ]
#  698|         do
#  699|->          local line="$(getVariable "programParameterLabel_${index}")"
#  700|   
#  701|            while [ "${#line}" -lt "${indent}" ]

Error: SHELLCHECK_WARNING: [#def198]
/usr/bin/brltty-prologue.sh:706:10: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  704|            done
#  705|   
#  706|->          local usage="$(getVariable "programParameterUsage_${index}")"
#  707|            local default="$(getVariable "programParameterDefault_${index}")"
#  708|            [ -z "${default}" ] || usage="${usage} - the default is ${default}"

Error: SHELLCHECK_WARNING (CWE-571): [#def199]
/usr/bin/brltty-prologue.sh:706:16: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  704|            done
#  705|   
#  706|->          local usage="$(getVariable "programParameterUsage_${index}")"
#  707|            local default="$(getVariable "programParameterDefault_${index}")"
#  708|            [ -z "${default}" ] || usage="${usage} - the default is ${default}"

Error: SHELLCHECK_WARNING: [#def200]
/usr/bin/brltty-prologue.sh:707:10: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  705|   
#  706|            local usage="$(getVariable "programParameterUsage_${index}")"
#  707|->          local default="$(getVariable "programParameterDefault_${index}")"
#  708|            [ -z "${default}" ] || usage="${usage} - the default is ${default}"
#  709|            addProgramUsageText "${usage}" "  ${line}"

Error: SHELLCHECK_WARNING (CWE-571): [#def201]
/usr/bin/brltty-prologue.sh:707:16: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  705|   
#  706|            local usage="$(getVariable "programParameterUsage_${index}")"
#  707|->          local default="$(getVariable "programParameterDefault_${index}")"
#  708|            [ -z "${default}" ] || usage="${usage} - the default is ${default}"
#  709|            addProgramUsageText "${usage}" "  ${line}"

Error: SHELLCHECK_WARNING: [#def202]
/usr/bin/brltty-prologue.sh:719:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  717|         addProgramUsageLine "Options:"
#  718|   
#  719|->       local indent=$((3 + programOptionOperandWidth + 2))
#  720|         local letter
#  721|   

Error: SHELLCHECK_WARNING: [#def203]
/usr/bin/brltty-prologue.sh:720:7: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  718|   
#  719|         local indent=$((3 + programOptionOperandWidth + 2))
#  720|->       local letter
#  721|   
#  722|         for letter

Error: SHELLCHECK_WARNING: [#def204]
/usr/bin/brltty-prologue.sh:724:10: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  722|         for letter
#  723|         do
#  724|->          local line="-${letter} $(getVariable "programOptionOperand_${letter}")"
#  725|   
#  726|            while [ "${#line}" -lt "${indent}" ]

Error: SHELLCHECK_WARNING (CWE-571): [#def205]
/usr/bin/brltty-prologue.sh:724:16: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  722|         for letter
#  723|         do
#  724|->          local line="-${letter} $(getVariable "programOptionOperand_${letter}")"
#  725|   
#  726|            while [ "${#line}" -lt "${indent}" ]

Error: SHELLCHECK_WARNING: [#def206]
/usr/bin/brltty-prologue.sh:732:10: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  730|   
#  731|            usage="$(getVariable "programOptionUsage_${letter}")"
#  732|->          local default="$(getVariable "programOptionDefault_${letter}")"
#  733|            [ -z "${default}" ] || usage="${usage} - the default is ${default}"
#  734|            addProgramUsageText "${usage}" "  ${line}"

Error: SHELLCHECK_WARNING (CWE-571): [#def207]
/usr/bin/brltty-prologue.sh:732:16: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  730|   
#  731|            usage="$(getVariable "programOptionUsage_${letter}")"
#  732|->          local default="$(getVariable "programOptionDefault_${letter}")"
#  733|            [ -z "${default}" ] || usage="${usage} - the default is ${default}"
#  734|            addProgramUsageText "${usage}" "  ${line}"

Error: SHELLCHECK_WARNING: [#def208]
/usr/bin/brltty-prologue.sh:738:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  736|      }
#  737|   
#  738|->    local notes="$(showProgramUsageNotes)"
#  739|      [ -z "${notes}" ] || {
#  740|         addProgramUsageLine

Error: SHELLCHECK_WARNING (CWE-571): [#def209]
/usr/bin/brltty-prologue.sh:738:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  736|      }
#  737|   
#  738|->    local notes="$(showProgramUsageNotes)"
#  739|      [ -z "${notes}" ] || {
#  740|         addProgramUsageLine

Error: SHELLCHECK_WARNING: [#def210]
/usr/bin/brltty-prologue.sh:752:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  750|   
#  751|   parseProgramOptions() {
#  752|->    local letter
#  753|   
#  754|      while getopts ":${programOptionString}" letter

Error: SHELLCHECK_WARNING: [#def211]
/usr/bin/brltty-prologue.sh:761:13: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  759|            :) syntaxError "missing operand: -${OPTARG}";;
#  760|   
#  761|->          *) local variable type
#  762|               setVariable variable "$(getVariable "programOptionVariable_${letter}")"
#  763|               setVariable type "$(getVariable "programOptionType_${letter}")"

Error: SHELLCHECK_WARNING (CWE-457): [#def212]
/usr/bin/brltty-prologue.sh:784:8: warning[SC2154]: programOption_showUsageSummary is referenced but not assigned.
#  782|      shift $((OPTIND - 1))
#  783|   
#  784|->    if "${programOption_showUsageSummary}"
#  785|      then
#  786|         showProgramUsageSummary

Error: SHELLCHECK_WARNING: [#def213]
/usr/bin/brltty-prologue.sh:790:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  788|      fi
#  789|   
#  790|->    local programParameterIndex=0
#  791|      while [ "${#}" -gt 0 ]
#  792|      do

Error: SHELLCHECK_WARNING (CWE-457): [#def214]
/usr/bin/brltty-prologue.sh:803:50: warning[SC2154]: programOption_verboseCount is referenced but not assigned.
#  801|      }
#  802|   
#  803|->    readonly programLogLevel=$((programLogLevel + programOption_verboseCount - programOption_quietCount))
#  804|      processExtraProgramParameters "${@}"
#  805|   }

Error: SHELLCHECK_WARNING (CWE-457): [#def215]
/usr/bin/brltty-prologue.sh:803:79: warning[SC2154]: programOption_quietCount is referenced but not assigned.
#  801|      }
#  802|   
#  803|->    readonly programLogLevel=$((programLogLevel + programOption_verboseCount - programOption_quietCount))
#  804|      processExtraProgramParameters "${@}"
#  805|   }

Error: SHELLCHECK_WARNING (CWE-457): [#def216]
/usr/bin/brltty-setcaps:30:5: warning[SC2154]: useSudo is referenced but not assigned.
#   28|   
#   29|   executeCommand() {
#   30|->    "${useSudo}" && set -- sudo -- "${@}"
#   31|   
#   32|      if "${testMode}"

Error: SHELLCHECK_WARNING (CWE-457): [#def217]
/usr/bin/brltty-setcaps:32:8: warning[SC2154]: testMode is referenced but not assigned.
#   30|      "${useSudo}" && set -- sudo -- "${@}"
#   31|   
#   32|->    if "${testMode}"
#   33|      then
#   34|         echo "${*}"

Error: SHELLCHECK_WARNING (CWE-571): [#def218]
/usr/bin/brltty-setcaps:49:13: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   47|         local owner=0
#   48|      else
#   49|->       local owner="$(id -"${type}")"
#   50|      fi
#   51|   

Error: SHELLCHECK_WARNING (CWE-457): [#def219]
/usr/bin/brltty-setcaps:52:47: warning[SC2154]: executablePath is referenced but not assigned.
#   50|      fi
#   51|   
#   52|->    executeCommand "${command}" "${owner}" -- "${executablePath}"
#   53|   }
#   54|   

Error: SHELLCHECK_WARNING (CWE-457): [#def220]
/usr/bin/brltty-setcaps:102:13: warning[SC2154]: rootUser is referenced but not assigned.
#  100|   }
#  101|   
#  102|-> setOwner u "${rootUser}" chown
#  103|   setOwner g "${rootGroup}" chgrp
#  104|   

Error: SHELLCHECK_WARNING (CWE-457): [#def221]
/usr/bin/brltty-setcaps:103:13: warning[SC2154]: rootGroup is referenced but not assigned.
#  101|   
#  102|   setOwner u "${rootUser}" chown
#  103|-> setOwner g "${rootGroup}" chgrp
#  104|   
#  105|   setMode u "${rootUser}"

Error: SHELLCHECK_WARNING (CWE-457): [#def222]
/usr/bin/brltty-setcaps:108:2: warning[SC2154]: noCapabilities is referenced but not assigned.
#  106|   setMode g "${rootGroup}"
#  107|   
#  108|-> "${noCapabilities}" || {
#  109|      "${noCreation}" || addCapability "cap_dac_override"
#  110|      "${noDevices}" || addCapability "cap_mknod"

Error: SHELLCHECK_WARNING (CWE-457): [#def223]
/usr/bin/brltty-setcaps:109:5: warning[SC2154]: noCreation is referenced but not assigned.
#  107|   
#  108|   "${noCapabilities}" || {
#  109|->    "${noCreation}" || addCapability "cap_dac_override"
#  110|      "${noDevices}" || addCapability "cap_mknod"
#  111|      "${noGroups}" || addCapability "cap_setgid"

Error: SHELLCHECK_WARNING (CWE-457): [#def224]
/usr/bin/brltty-setcaps:110:5: warning[SC2154]: noDevices is referenced but not assigned.
#  108|   "${noCapabilities}" || {
#  109|      "${noCreation}" || addCapability "cap_dac_override"
#  110|->    "${noDevices}" || addCapability "cap_mknod"
#  111|      "${noGroups}" || addCapability "cap_setgid"
#  112|      "${noInput}" || addCapability "cap_sys_admin"

Error: SHELLCHECK_WARNING (CWE-457): [#def225]
/usr/bin/brltty-setcaps:111:5: warning[SC2154]: noGroups is referenced but not assigned.
#  109|      "${noCreation}" || addCapability "cap_dac_override"
#  110|      "${noDevices}" || addCapability "cap_mknod"
#  111|->    "${noGroups}" || addCapability "cap_setgid"
#  112|      "${noInput}" || addCapability "cap_sys_admin"
#  113|      "${noModules}" || addCapability "cap_sys_module"

Error: SHELLCHECK_WARNING (CWE-457): [#def226]
/usr/bin/brltty-setcaps:112:5: warning[SC2154]: noInput is referenced but not assigned.
#  110|      "${noDevices}" || addCapability "cap_mknod"
#  111|      "${noGroups}" || addCapability "cap_setgid"
#  112|->    "${noInput}" || addCapability "cap_sys_admin"
#  113|      "${noModules}" || addCapability "cap_sys_module"
#  114|      "${noOwnership}" || addCapability "cap_chown"

Error: SHELLCHECK_WARNING (CWE-457): [#def227]
/usr/bin/brltty-setcaps:113:5: warning[SC2154]: noModules is referenced but not assigned.
#  111|      "${noGroups}" || addCapability "cap_setgid"
#  112|      "${noInput}" || addCapability "cap_sys_admin"
#  113|->    "${noModules}" || addCapability "cap_sys_module"
#  114|      "${noOwnership}" || addCapability "cap_chown"
#  115|      "${noPermissions}" || addCapability "cap_fowner"

Error: SHELLCHECK_WARNING (CWE-457): [#def228]
/usr/bin/brltty-setcaps:114:5: warning[SC2154]: noOwnership is referenced but not assigned.
#  112|      "${noInput}" || addCapability "cap_sys_admin"
#  113|      "${noModules}" || addCapability "cap_sys_module"
#  114|->    "${noOwnership}" || addCapability "cap_chown"
#  115|      "${noPermissions}" || addCapability "cap_fowner"
#  116|      "${noSpeaker}" || addCapability "cap_sys_tty_config"

Error: SHELLCHECK_WARNING (CWE-457): [#def229]
/usr/bin/brltty-setcaps:115:5: warning[SC2154]: noPermissions is referenced but not assigned.
#  113|      "${noModules}" || addCapability "cap_sys_module"
#  114|      "${noOwnership}" || addCapability "cap_chown"
#  115|->    "${noPermissions}" || addCapability "cap_fowner"
#  116|      "${noSpeaker}" || addCapability "cap_sys_tty_config"
#  117|   

Error: SHELLCHECK_WARNING (CWE-457): [#def230]
/usr/bin/brltty-setcaps:116:5: warning[SC2154]: noSpeaker is referenced but not assigned.
#  114|      "${noOwnership}" || addCapability "cap_chown"
#  115|      "${noPermissions}" || addCapability "cap_fowner"
#  116|->    "${noSpeaker}" || addCapability "cap_sys_tty_config"
#  117|   
#  118|      [ "${#capabilitiesList[*]}" -eq 0 ] || {

Error: SHELLCHECK_WARNING (CWE-457): [#def231]
/usr/bin/brltty-term:26:9: warning[SC2154]: programName is referenced but not assigned.
#   24|   and brltty using its Terminal Emulator screen driver.
#   25|   
#   26|-> Syntax: ${programName} [shell] [-option ...]
#   27|   
#   28|   This script is especially useful on platforms that don't support a native screen driver.

Error: SHELLCHECK_WARNING (CWE-457): [#def232]
/usr/bin/brltty-term:109:27: warning[SC2154]: shellPath is referenced but not assigned.
#  107|   currentGroup="$(id -g)"
#  108|   
#  109|-> addScreenParameter shell "${shellPath}"
#  110|   addScreenParameter user "${currentUser}"
#  111|   addScreenParameter group "${currentGroup}"

Error: SHELLCHECK_WARNING (CWE-457): [#def233]
/usr/bin/brltty-term:116:7: warning[SC2154]: brlttyPath is referenced but not assigned.
#  114|   
#  115|   SUDO="sudo --bell --preserve-env --preserve-env=USER,LOGNAME --"
#  116|-> [ -u "${brlttyPath}" ] && SUDO=""
#  117|   [ "${currentUser}" -eq 0 ] && SUDO=""
#  118|   

Error: SHELLCHECK_WARNING (CWE-156): [#def234]
/usr/lib/dracut/modules.d/99brltty/brltty-start.sh:68:26: warning[SC2046]: Quote this to prevent word splitting.
#   66|   
#   67|   brlttySetConfiguredOptions
#   68|-> brlttySetExplicitOptions $(getcmdline)
#   69|   getargbool 1 rd.brltty.sound || export BRLTTY_SPEECH_DRIVER="no"
#   70|   

Error: SHELLCHECK_WARNING (CWE-457): [#def235]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:17:10: warning[SC2154]: initdir is referenced but not assigned.
#   15|   installkernel() {
#   16|      instmods pcspkr uinput
#   17|->    [ -d "${initdir}/etc/bluetooth" ] && instmods =drivers/bluetooth =net/bluetooth
#   18|      [ -d "${initdir}/etc/alsa" ] && instmods =sound
#   19|      return 0

Error: SHELLCHECK_WARNING: [#def236]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:17:50: error[SC2283]: Remove spaces around = to assign (or use [ ] to compare, or quote '=' if literal).
#   15|   installkernel() {
#   16|      instmods pcspkr uinput
#   17|->    [ -d "${initdir}/etc/bluetooth" ] && instmods =drivers/bluetooth =net/bluetooth
#   18|      [ -d "${initdir}/etc/alsa" ] && instmods =sound
#   19|      return 0

Error: SHELLCHECK_WARNING: [#def237]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:18:45: error[SC2283]: Remove spaces around = to assign (or use [ ] to compare, or quote '=' if literal).
#   16|      instmods pcspkr uinput
#   17|      [ -d "${initdir}/etc/bluetooth" ] && instmods =drivers/bluetooth =net/bluetooth
#   18|->    [ -d "${initdir}/etc/alsa" ] && instmods =sound
#   19|      return 0
#   20|   }

Error: SHELLCHECK_WARNING (CWE-571): [#def238]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:36:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   34|      local BRLTTY_EXECUTABLE_PATH="/usr/bin/brltty"
#   35|      inst_binary "${BRLTTY_EXECUTABLE_PATH}"
#   36|->    local brlttyLog="$(LC_ALL="${BRLTTY_DRACUT_LOCALE:-${LANG}}" "${BRLTTY_EXECUTABLE_PATH}" -E -v -e -ldebug 2>&1)"
#   37|      
#   38|      export BRLTTY_CONFIGURATION_FILE="/etc/brltty.conf"

Error: SHELLCHECK_WARNING (CWE-156): [#def239]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:41:27: warning[SC2046]: Quote this to prevent word splitting.
#   39|      brlttyIncludeDataFiles "${BRLTTY_CONFIGURATION_FILE}"
#   40|   
#   41|->    brlttyIncludeDataFiles $(brlttyGetProperty "including data file")
#   42|      brlttyIncludeScreenDrivers lx
#   43|   

Error: SHELLCHECK_WARNING (CWE-156): [#def240]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:44:32: warning[SC2046]: Quote this to prevent word splitting.
#   42|      brlttyIncludeScreenDrivers lx
#   43|   
#   44|->    brlttyIncludeBrailleDrivers $(brlttyGetConfiguredDrivers braille)
#   45|      brlttyIncludeBrailleDrivers ${BRLTTY_DRACUT_BRAILLE_DRIVERS}
#   46|   

Error: SHELLCHECK_WARNING (CWE-156): [#def241]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:47:31: warning[SC2046]: Quote this to prevent word splitting.
#   45|      brlttyIncludeBrailleDrivers ${BRLTTY_DRACUT_BRAILLE_DRIVERS}
#   46|   
#   47|->    brlttyIncludeSpeechDrivers $(brlttyGetConfiguredDrivers speech)
#   48|      brlttyIncludeSpeechDrivers ${BRLTTY_DRACUT_SPEECH_DRIVERS}
#   49|         

Error: SHELLCHECK_WARNING (CWE-457): [#def242]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:64:26: warning[SC2154]: moddir is referenced but not assigned.
#   62|      fi
#   63|   
#   64|->    inst_hook cmdline 05 "${moddir}/brltty-start.sh"
#   65|      inst_hook cleanup 95 "${moddir}/brltty-stop.sh"
#   66|   

Error: SHELLCHECK_WARNING (CWE-571): [#def243]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:72:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   70|   brlttyInstallPreferencesFile() {
#   71|      local path="${1}"
#   72|->    local file=$(brlttyGetProperty "Preferences File")
#   73|   
#   74|      if [ -n "${file}" ]

Error: SHELLCHECK_WARNING (CWE-571): [#def244]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:78:16: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   76|         if [ "${file}" = "${file#/}" ]
#   77|         then
#   78|->          local directory=$(brlttyGetProperty "Updatable Directory")
#   79|   
#   80|            if [ -n "${directory}" ]

Error: SHELLCHECK_WARNING (CWE-156): [#def245]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:283:16: warning[SC2046]: Quote this to prevent word splitting.
#  281|   
#  282|   brlttyAddMessageBusUsers() {
#  283|->    set -- dbus $(sed -n -r -e 's/^.* user="([^"]*)".*$/\1/p' "${@}" | sort -u)
#  284|      brlttyAddUserEntries "${@}"
#  285|      brlttyAddGroupEntries "${@}"

Error: SHELLCHECK_WARNING (CWE-571): [#def246]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:307:16: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  305|      do
#  306|         grep -q -e "^${name}:" "${target}" || {
#  307|->          local line="$(grep "^${name}:" "${source}")"
#  308|            [ -n "${line}" ] && echo >>"${target}" "${line}"
#  309|         }

Error: SHELLCHECK_WARNING (CWE-156): [#def247]
/usr/lib/dracut/modules.d/99brltty/module-setup.sh:328:22: warning[SC2046]: Quote this to prevent word splitting.
#  326|      do
#  327|         [ -d "${directory}" ] && {
#  328|->          eval set -- $(find "${directory}" -printf "'%p'\n")
#  329|            inst_multiple "${@}"
#  330|         }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def248]
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:731:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*new[<unknown>]’
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1935:1: enter_function: entry to ‘brl_construct’
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1936:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1937:5: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1940:9: call_function: calling ‘connectResource’ from ‘brl_construct’
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1940:9: return_function: returning to ‘brl_construct’ from ‘connectResource’
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1940:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1941:15: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1951:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1952:13: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1952:13: call_function: calling ‘updateSettings’ from ‘brl_construct’
#  729|             unsigned char *byte = &new[settings->offset];
#  730|   
#  731|->           *byte &= ~settings->disable;
#  732|             *byte |= settings->enable;
#  733|           }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def249]
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1211:5: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1722:1: enter_function: entry to ‘detectModel2u’
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1727:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1727:21: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1727:21: call_function: calling ‘setVersions2’ from ‘detectModel2u’
# 1209|   
# 1210|     while (1) {
# 1211|->     STR_PRINTF("%u", *byte);
# 1212|       if (byte == overlay.bytes) break;
# 1213|   

Error: GCC_ANALYZER_WARNING (CWE-124): [#def250]
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1214:5: warning[-Wanalyzer-out-of-bounds]: stack-based buffer underwrite
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1722:1: enter_function: entry to ‘detectModel2u’
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1727:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1727:21: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Alva/braille.c:1727:21: call_function: calling ‘setVersions2’ from ‘detectModel2u’
# 1212|       if (byte == overlay.bytes) break;
# 1213|   
# 1214|->     *byte = 0;
# 1215|       if (!overlay.u32) break;
# 1216|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:195:21: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&directoryPath)’
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:192:20: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:192:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:192:6: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:195:21: throw: if ‘readdir’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:195:21: danger: ‘opendir(&directoryPath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  193|       struct dirent *entry;
#  194|   
#  195|->     while ((entry = readdir(directory))) {
#  196|         unsigned int eventNumber;
#  197|         char extra;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:208:5: warning[-Wanalyzer-malloc-leak]: leak of ‘devicePath’
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:192:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:192:6: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:195:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:199:18: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:203:28: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:203:12: branch_false: following ‘false’ branch (when ‘devicePath’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:204:9: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:208:5: throw: if ‘closedir’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:208:5: danger: ‘devicePath’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  206|       }
#  207|   
#  208|->     closedir(directory);
#  209|     } else {
#  210|       logMessage(LOG_ERR, "event device input directory open error: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def253]
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:284:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/braille0", 1)’
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:323:1: enter_function: entry to ‘brl_construct’
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:324:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:324:6: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:330:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:331:11: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/B2G/braille.c:331:11: call_function: calling ‘openBrailleDevice’ from ‘brl_construct’
#  282|   static int
#  283|   openBrailleDevice (BrailleDisplay *brl) {
#  284|->   if ((brl->data->braille.fileDescriptor = open(BRAILLE_DEVICE_PATH, O_WRONLY)) != -1) {
#  285|       return 1;
#  286|     } else {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def254]
brltty-6.8/minimal/Drivers/Braille/Baum/braille.c:2736:36: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘packet[1]’
brltty-6.8/minimal/Drivers/Braille/Baum/braille.c:2803:1: enter_function: entry to ‘processPowerBraillePackets’
brltty-6.8/minimal/Drivers/Braille/Baum/braille.c:2807:18: call_function: inlined call to ‘getPowerBraillePacket’ from ‘processPowerBraillePackets’
# 2734|               continue;
# 2735|           }
# 2736|->       } else if ((offset == 2) && (packet[1] == PB_RSP_SENSORS)) {
# 2737|           length += byte;
# 2738|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:311:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*brl.textRows * 8)’
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:523:1: enter_function: entry to ‘brl_construct’
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:524:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:525:5: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:557:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:558:11: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:558:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:561:13: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:561:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:566:15: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Canute/braille.c:566:15: call_function: calling ‘allocateRowEntries’ from ‘brl_construct’
#  309|     RowEntry ***rowEntries = &brl->data->window.rowEntries;
#  310|   
#  311|->   if (!(*rowEntries = malloc(ARRAY_SIZE(*rowEntries, brl->textRows)))) {
#  312|       logMallocError();
#  313|       return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:247:6: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*brl_47(D)->data.display.externalRows, (long unsigned int)*brl_47(D)->data.display.externalColumns)’
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:529:1: enter_function: entry to ‘reconfigureDisplay’
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:531:22: call_function: calling ‘configureDisplay’ from ‘reconfigureDisplay’
#  245|   static int
#  246|   makeArrays (BrailleDisplay *brl) {
#  247|->   if ((brl->data->arrays.externalCells = calloc(brl->data->display.externalRows, brl->data->display.externalColumns))) {
#  248|       if ((brl->data->arrays.internalCells = calloc(brl->data->display.internalRows, brl->data->display.internalColumns))) {
#  249|         if ((brl->data->arrays.externalRows = malloc(ARRAY_SIZE(brl->data->arrays.externalRows, brl->data->display.externalRows)))) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def257]
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:707:23: warning[-Wanalyzer-null-argument]: use of NULL ‘data’ where non-null expected
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1301:1: enter_function: entry to ‘writeIdentifyRequest’
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1302:10: call_function: calling ‘writeRequest’ from ‘writeIdentifyRequest’
#  705|     packet.fields.seq = 0;
#  706|   
#  707|->   uint8_t *checksum = mempcpy(packet.fields.data, data, size);
#  708|     uint16_t length = (checksum - &packet.fields.destination) + 1;
#  709|     putUint16(packet.fields.length, length);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def258]
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1082:7: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1073:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1073:21: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1075:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1075:31: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1077:19: branch_false: following ‘false’ branch (when ‘dataSize <= i’)...
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1077:19: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1081:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1082:12: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/DotPad/braille.c:1082:7: danger: write of 1 byte at offset ‘(int)arraySize’ exceeds the buffer
# 1080|   
# 1081|       while (dataSize < arraySize) {
# 1082|->       data[dataSize++] = 0;
# 1083|       }
# 1084|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:33:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:191:17: enter_function: entry to ‘brl_message’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:211:3: call_function: calling ‘brl_write’ from ‘brl_message’
#   31|   void		eutp_abort(int exitstatus)
#   32|   {
#   33|->   brlapi_leaveRawMode();
#   34|     brlapi_closeConnection();
#   35|     exit(exitstatus);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:33:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   31|   void		eutp_abort(int exitstatus)
#   32|   {
#   33|->   brlapi_leaveRawMode();
#   34|     brlapi_closeConnection();
#   35|     exit(exitstatus);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:33:3: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   31|   void		eutp_abort(int exitstatus)
#   32|   {
#   33|->   brlapi_leaveRawMode();
#   34|     brlapi_closeConnection();
#   35|     exit(exitstatus);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:34:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:191:17: enter_function: entry to ‘brl_message’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:211:3: call_function: calling ‘brl_write’ from ‘brl_message’
#   32|   {
#   33|     brlapi_leaveRawMode();
#   34|->   brlapi_closeConnection();
#   35|     exit(exitstatus);
#   36|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:34:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   32|   {
#   33|     brlapi_leaveRawMode();
#   34|->   brlapi_closeConnection();
#   35|     exit(exitstatus);
#   36|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:34:3: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   32|   {
#   33|     brlapi_leaveRawMode();
#   34|->   brlapi_closeConnection();
#   35|     exit(exitstatus);
#   36|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:67:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
#   65|       {
#   66|         alarm(20);
#   67|->       res = brlapi_recvRaw(buf, BUFFER_SIZE);
#   68|         alarm(0);
#   69|         if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:67:13: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
#   65|       {
#   66|         alarm(20);
#   67|->       res = brlapi_recvRaw(buf, BUFFER_SIZE);
#   68|         alarm(0);
#   69|         if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:71:11: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:260:17: enter_function: entry to ‘brl_listfiles’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:263:31: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:270:10: branch_true: following ‘true’ branch (when ‘end == 0’)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:272:11: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:272:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:273:9: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:273:9: call_function: calling ‘showbrfile’ from ‘brl_listfiles’
#   69|         if (res < 0)
#   70|   	{
#   71|-> 	  brlapi_perror("reading on terminal");
#   72|   	  eutp_abort(E_READ);
#   73|   	  return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:71:11: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
#   69|         if (res < 0)
#   70|   	{
#   71|-> 	  brlapi_perror("reading on terminal");
#   72|   	  eutp_abort(E_READ);
#   73|   	  return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:86:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:191:17: enter_function: entry to ‘brl_message’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:211:3: call_function: calling ‘brl_write’ from ‘brl_message’
#   84|   
#   85|     alarm(20);
#   86|->   res = brlapi_sendRaw(str, len);
#   87|     alarm(0);
#   88|     if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:86:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   84|   
#   85|     alarm(20);
#   86|->   res = brlapi_sendRaw(str, len);
#   87|     alarm(0);
#   88|     if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:86:9: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   84|   
#   85|     alarm(20);
#   86|->   res = brlapi_sendRaw(str, len);
#   87|     alarm(0);
#   88|     if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:90:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:191:17: enter_function: entry to ‘brl_message’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:211:3: call_function: calling ‘brl_write’ from ‘brl_message’
#   88|     if (res < 0)
#   89|       {
#   90|->       brlapi_perror("Error writing to the terminal");
#   91|         eutp_abort(E_WRITE);
#   92|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:90:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   88|     if (res < 0)
#   89|       {
#   90|->       brlapi_perror("Error writing to the terminal");
#   91|         eutp_abort(E_WRITE);
#   92|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:90:7: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   88|     if (res < 0)
#   89|       {
#   90|->       brlapi_perror("Error writing to the terminal");
#   91|         eutp_abort(E_WRITE);
#   92|         return 0;

Error: CPPCHECK_WARNING (CWE-682): [#def275]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:200: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  198|     unsigned char*	p = buffer;
#  199|   
#  200|->   *p++ = 'D';
#  201|     *p++ = 'M';
#  202|     while (*q)

Error: CPPCHECK_WARNING (CWE-476): [#def276]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:200: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p++
#  198|     unsigned char*	p = buffer;
#  199|   
#  200|->   *p++ = 'D';
#  201|     *p++ = 'M';
#  202|     while (*q)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def277]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:200:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:200:3: danger: ‘buffer’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  198|     unsigned char*	p = buffer;
#  199|   
#  200|->   *p++ = 'D';
#  201|     *p++ = 'M';
#  202|     while (*q)

Error: CPPCHECK_WARNING (CWE-476): [#def278]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:224: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  222|     unsigned char* str = malloc(256); /* the string to display */
#  223|   
#  224|->   buf[0] = '\005';
#  225|     buf[1] = 'F';
#  226|     buf[2] = 'N';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def279]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:224:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:224:3: danger: ‘buf’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  222|     unsigned char* str = malloc(256); /* the string to display */
#  223|   
#  224|->   buf[0] = '\005';
#  225|     buf[1] = 'F';
#  226|     buf[2] = 'N';

Error: CPPCHECK_WARNING (CWE-476): [#def280]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:225: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  223|   
#  224|     buf[0] = '\005';
#  225|->   buf[1] = 'F';
#  226|     buf[2] = 'N';
#  227|     buf[3] = ext;

Error: CPPCHECK_WARNING (CWE-476): [#def281]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:226: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  224|     buf[0] = '\005';
#  225|     buf[1] = 'F';
#  226|->   buf[2] = 'N';
#  227|     buf[3] = ext;
#  228|     buf[4] = (env->brfilenum & 0xff00) >> 2;

Error: CPPCHECK_WARNING (CWE-476): [#def282]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:227: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  225|     buf[1] = 'F';
#  226|     buf[2] = 'N';
#  227|->   buf[3] = ext;
#  228|     buf[4] = (env->brfilenum & 0xff00) >> 2;
#  229|     buf[5] = env->brfilenum & 0x00ff;

Error: CPPCHECK_WARNING (CWE-476): [#def283]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:228: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  226|     buf[2] = 'N';
#  227|     buf[3] = ext;
#  228|->   buf[4] = (env->brfilenum & 0xff00) >> 2;
#  229|     buf[5] = env->brfilenum & 0x00ff;
#  230|     brl_write(buf+1, 5);

Error: CPPCHECK_WARNING (CWE-476): [#def284]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:229: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  227|     buf[3] = ext;
#  228|     buf[4] = (env->brfilenum & 0xff00) >> 2;
#  229|->   buf[5] = env->brfilenum & 0x00ff;
#  230|     brl_write(buf+1, 5);
#  231|     while (1)

Error: CPPCHECK_WARNING (CWE-682): [#def285]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  228|     buf[4] = (env->brfilenum & 0xff00) >> 2;
#  229|     buf[5] = env->brfilenum & 0x00ff;
#  230|->   brl_write(buf+1, 5);
#  231|     while (1)
#  232|       {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def286]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:244:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘str’ where non-null expected
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: return_function: returning to ‘showbrfile’ from ‘brl_read’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:239:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:244:22: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:244:3: danger: argument 1 (‘str’) from [(2)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/1) could be NULL where non-null expected
#argument 1 of ‘__builtin_memcpy’ must be non-null
#  242|         return 0;
#  243|       }
#  244|->   strcpy((char*)str, env->brpc ? "BR>PC " : "PC>BR ");
#  245|     strncat((char*)str, ((char*)&(buf[6])), buf[0] - 5);
#  246|     strcat((char*)str, ".");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:252:1: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: return_function: returning to ‘showbrfile’ from ‘brl_read’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:239:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:241:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_brl.c:252:1: danger: ‘str’ leaks here; was allocated at [(2)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/1)
#  250|     free(str);
#  251|     return 0;
#  252|-> }
#  253|   
#  254|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:44:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   42|     if ((tmpmap = malloc(size)) == NULL)
#   43|       {
#   44|->       perror("malloc");
#   45|         eutp_abort(9);
#   46|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:45:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   43|       {
#   44|         perror("malloc");
#   45|->       eutp_abort(9);
#   46|       }
#   47|     if ((tmpmap2 = malloc(2 * size)) == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   47|     if ((tmpmap2 = malloc(2 * size)) == NULL)
#   48|       {
#   49|->       perror("malloc");
#   50|         eutp_abort(9);
#   51|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:17: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_false: following ‘false’ branch (when ‘tmpmap’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:47:18: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_true: following ‘true’ branch (when ‘tmpmap2’ is NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: throw: if ‘perror’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: danger: ‘tmpmap’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   47|     if ((tmpmap2 = malloc(2 * size)) == NULL)
#   48|       {
#   49|->       perror("malloc");
#   50|         eutp_abort(9);
#   51|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:50:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   48|       {
#   49|         perror("malloc");
#   50|->       eutp_abort(9);
#   51|       }
#   52|     for (i = 0; i < size; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:50:7: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:17: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_false: following ‘false’ branch (when ‘tmpmap’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:47:18: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_true: following ‘true’ branch (when ‘tmpmap2’ is NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:50:7: throw: if ‘eutp_abort’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:50:7: danger: ‘tmpmap’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   48|       {
#   49|         perror("malloc");
#   50|->       eutp_abort(9);
#   51|       }
#   52|     for (i = 0; i < size; i++)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def294]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:53:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tmpmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:17: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: release_memory: assuming ‘tmpmap’ is NULL
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_true: following ‘true’ branch (when ‘tmpmap’ is NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:44:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_false: following ‘false’ branch (when ‘tmpmap2’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:52:8: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:53:17: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:53:5: danger: dereference of NULL ‘tmpmap + i’
#   51|       }
#   52|     for (i = 0; i < size; i++)
#   53|->     tmpmap[i] = (*map)[i];
#   54|     p = tmpmap;
#   55|     p2 = tmpmap2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   54|     p = tmpmap;
#   55|     p2 = tmpmap2;
#   56|->   iconv(env->dos2unix, &p, &i, &p2, &o);
#   57|     newsize = (2 * size) - o;
#   58|     *map = realloc(*map, newsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: warning[-Wanalyzer-malloc-leak]: leak of ‘p2’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_true: following ‘true’ branch (when ‘tmpmap’ is NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:44:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:47:18: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_false: following ‘false’ branch (when ‘tmpmap2’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:52:8: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:54:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: throw: if ‘iconv’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: danger: ‘p2’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#   54|     p = tmpmap;
#   55|     p2 = tmpmap2;
#   56|->   iconv(env->dos2unix, &p, &i, &p2, &o);
#   57|     newsize = (2 * size) - o;
#   58|     *map = realloc(*map, newsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:17: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_false: following ‘false’ branch (when ‘tmpmap’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:47:18: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_false: following ‘false’ branch (when ‘tmpmap2’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:52:8: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:53:17: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:53:17: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:54:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: throw: if ‘iconv’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   54|     p = tmpmap;
#   55|     p2 = tmpmap2;
#   56|->   iconv(env->dos2unix, &p, &i, &p2, &o);
#   57|     newsize = (2 * size) - o;
#   58|     *map = realloc(*map, newsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:81:14: warning[-Wanalyzer-malloc-leak]: leak of ‘newmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:81:14: danger: ‘newmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#   79|       {
#   80|         perror("open");
#   81|->       return 0;
#   82|       }
#   83|     fstat(fd, &st);

Error: COMPILER_WARNING (CWE-252): [#def299]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c: scope_hint: In function ‘k2txt’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:87:3: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   87 |   read(fd, map, size);
#      |   ^~~~~~~~~~~~~~~~~~~
#   85|     map = malloc(size + 1);
#   86|     newmap = malloc(size + 1);
#   87|->   read(fd, map, size);
#   88|     map[size] = 0;
#   89|     close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#   87|     read(fd, map, size);
#   88|     map[size] = 0;
#   89|->   close(fd);
#   90|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: warning[-Wanalyzer-malloc-leak]: leak of ‘newmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: danger: ‘newmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#   87|     read(fd, map, size);
#   88|     map[size] = 0;
#   89|->   close(fd);
#   90|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: throw: if ‘open’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#   88|     map[size] = 0;
#   89|     close(fd);
#   90|->   if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {
#   92|         perror("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: warning[-Wanalyzer-malloc-leak]: leak of ‘newmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: throw: if ‘open’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: danger: ‘newmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#   88|     map[size] = 0;
#   89|     close(fd);
#   90|->   if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {
#   92|         perror("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: throw: if ‘perror’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#   90|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {
#   92|->       perror("open");
#   93|         return 0;
#   94|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: throw: if ‘perror’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: danger: ‘newmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#   90|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {
#   92|->       perror("open");
#   93|         return 0;
#   94|       }

Error: CPPCHECK_WARNING (CWE-401): [#def306]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:93: error[memleak]: Memory leak: newmap
#   91|       {
#   92|         perror("open");
#   93|->       return 0;
#   94|       }
#   95|     while (flg_hdr)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def307]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:97:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:97:11: danger: ‘map + (sizetype)i’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#   95|     while (flg_hdr)
#   96|       {
#   97|->       if (map[i] == 'R' && map[ i - 1] == '\x0b')
#   98|   	flg_hdr = 2;
#   99|         if (flg_hdr == 2 && map[i] == '$' && map[i - 1] == '\x1b')

Error: GCC_ANALYZER_WARNING (CWE-476): [#def308]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:111:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘newmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:111:9: danger: ‘malloc(size + 1) + (sizetype)o’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  109|       {
#  110|         if (map[i] == 'P' && map[i - 1] == '\x1b')
#  111|-> 	newmap[o++] = '\n';
#  112|         if (map[i] == 'L' && map[i - 1] == '\x1b')
#  113|   	newmap[o++] = '\n';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def309]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:113:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘newmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:113:9: danger: ‘malloc(size + 1) + (sizetype)o’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  111|   	newmap[o++] = '\n';
#  112|         if (map[i] == 'L' && map[i - 1] == '\x1b')
#  113|-> 	newmap[o++] = '\n';
#  114|         if (map[i] == '\x1b' && map[i - 1] == '\x1b')
#  115|   	newmap[o++] = '\x1b';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def310]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:115:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘newmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:115:9: danger: ‘malloc(size + 1) + (sizetype)o’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  113|   	newmap[o++] = '\n';
#  114|         if (map[i] == '\x1b' && map[i - 1] == '\x1b')
#  115|-> 	newmap[o++] = '\x1b';
#  116|         if (map[i] != '\x1b' && map[i - 1] != '\x1b')
#  117|   	newmap[o++] = map[i];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def311]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:117:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘newmap’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:117:9: danger: ‘malloc(size + 1) + (sizetype)o’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  115|   	newmap[o++] = '\x1b';
#  116|         if (map[i] != '\x1b' && map[i - 1] != '\x1b')
#  117|-> 	newmap[o++] = map[i];
#  118|         i++;
#  119|       }

Error: COMPILER_WARNING (CWE-252): [#def312]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:122:3: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  122 |   write(fd, newmap, size);
#      |   ^~~~~~~~~~~~~~~~~~~~~~~
#  120|     /* Convert text into the current charset */
#  121|     size = dos2unix(env, &newmap, o);
#  122|->   write(fd, newmap, size);
#  123|     free(map);
#  124|     free(newmap);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:127:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:127:1: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  125|     close(fd);
#  126|     return 1;
#  127|-> }
#  128|   
#  129|   /*

Error: CPPCHECK_WARNING (CWE-686): [#def314]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:146: error[invalidFunctionArgBool]: Invalid toupper() argument nr 1. A non-boolean value is required.
#  144|     /* Reconnaissance de l'extension */
#  145|     i = strlen((char*)name);
#  146|->   if (name[i - 2] == '.' && (toupper(name[i - 1] == 'K')
#  147|   			     || toupper(name[i - 1]) == 'T'
#  148|   			     || toupper(name[i - 1] == 'A')

Error: CPPCHECK_WARNING (CWE-686): [#def315]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:148: error[invalidFunctionArgBool]: Invalid toupper() argument nr 1. A non-boolean value is required.
#  146|     if (name[i - 2] == '.' && (toupper(name[i - 1] == 'K')
#  147|   			     || toupper(name[i - 1]) == 'T'
#  148|-> 			     || toupper(name[i - 1] == 'A')
#  149|   			     || toupper(name[i - 1] == 'L')
#  150|   			     || toupper(name[i - 1]) == 'B'))

Error: CPPCHECK_WARNING (CWE-686): [#def316]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:149: error[invalidFunctionArgBool]: Invalid toupper() argument nr 1. A non-boolean value is required.
#  147|   			     || toupper(name[i - 1]) == 'T'
#  148|   			     || toupper(name[i - 1] == 'A')
#  149|-> 			     || toupper(name[i - 1] == 'L')
#  150|   			     || toupper(name[i - 1]) == 'B'))
#  151|       {

Error: COMPILER_WARNING (CWE-252): [#def317]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c: scope_hint: In function ‘txt2k’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:191:3: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  191 |   read(fd, map, size);
#      |   ^~~~~~~~~~~~~~~~~~~
#  189|     size = st.st_size;
#  190|     map = malloc(size + 1);
#  191|->   read(fd, map, size);
#  192|     map[size] = 0;
#  193|     close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:193:3: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:183:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:188:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:190:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:193:3: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:193:3: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  191|     read(fd, map, size);
#  192|     map[size] = 0;
#  193|->   close(fd);
#  194|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#  195|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:194:13: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:183:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:188:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:190:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:194:13: throw: if ‘open’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:194:13: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  192|     map[size] = 0;
#  193|     close(fd);
#  194|->   if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#  195|       {
#  196|         perror("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def320]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:196:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:183:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:188:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:190:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:194:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:196:7: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:196:7: throw: if ‘perror’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:196:7: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  194|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#  195|       {
#  196|->       perror("open");
#  197|         return 0;
#  198|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:202:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:183:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:188:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:190:9: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_convert.c:202:1: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
#  200|   
#  201|     return 1;
#  202|-> }

Error: COMPILER_WARNING (CWE-252): [#def322]
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_transfer.c: scope_hint: In function ‘brtopc’
brltty-6.8/minimal/Drivers/Braille/EuroBraille/eutp_transfer.c:123:7: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  123 |       write(fd, &(buf[3]), buf[0] - 2);
#      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  121|         sprintf((char*)str, "... %s %d", filename, lines);
#  122|         brl_message((char*)str, 0);
#  123|->       write(fd, &(buf[3]), buf[0] - 2);
#  124|         lines++;
#  125|       }

Error: GCC_ANALYZER_WARNING (CWE-121): [#def323]
brltty-6.8/minimal/Drivers/Braille/HandyTech/braille.c:885:7: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
brltty-6.8/minimal/Drivers/Braille/HandyTech/braille.c:877:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/HandyTech/braille.c:877:6: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/HandyTech/braille.c:878:12: branch_true: following ‘true’ branch (when ‘size != 0’)...
brltty-6.8/minimal/Drivers/Braille/HandyTech/braille.c:878:18: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/HandyTech/braille.c:880:21: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/HandyTech/braille.c:880:29: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/HandyTech/braille.c:885:7: danger: write of ‘(unsigned char)hidInDataSize + 254’ bytes at offset ‘2’ exceeds the buffer
#  883|         report[0] = HT_HID_RPT_InData;
#  884|         report[1] = count;
#  885|->       memcpy(report+2, &buffer[index], count);
#  886|         memset(&report[count+2], 0, sizeof(report)-count-2);
#  887|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def324]
brltty-6.8/minimal/Drivers/Braille/MDV/braille.c:192:10: warning[-Wanalyzer-null-argument]: use of NULL ‘data’ where non-null expected
brltty-6.8/minimal/Drivers/Braille/MDV/braille.c:298:1: enter_function: entry to ‘writeIdentifyRequest’
brltty-6.8/minimal/Drivers/Braille/MDV/braille.c:299:10: call_function: calling ‘writePacket’ from ‘writeIdentifyRequest’
#  190|     packet.fields.code = code;
#  191|     packet.fields.length = length;
#  192|->   byte = mempcpy(byte, data, length);
#  193|   
#  194|     uint16_t checksum = calculateChecksum(&packet.fields.stx, byte);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def325]
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:252:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:273:1: enter_function: entry to ‘brl_writeWindow’
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:285:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:295:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:301:30: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:302:35: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:305:35: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:319:7: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:320:7: call_function: calling ‘writeText’ from ‘brl_writeWindow’
#  250|     int column;
#  251|     for (column=0; column<columns; column++) {
#  252|->     wchar_t c = buffer[column];
#  253|   
#  254|   #ifdef HAVE_ICONV_H

Error: GCC_ANALYZER_WARNING (CWE-688): [#def326]
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:86:10: warning[-Wanalyzer-null-argument]: use of NULL ‘data’ where non-null expected
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:141:1: enter_function: entry to ‘brl_construct’
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:142:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:147:23: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:147:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:149:5: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:151:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:152:11: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:152:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:153:13: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/TechniBraille/braille.c:153:13: call_function: calling ‘writePacket’ from ‘brl_construct’
#   84|     *byte++ = function;
#   85|     *byte++ = count;
#   86|->   byte = mempcpy(byte, data, count);
#   87|   
#   88|     {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
brltty-6.8/minimal/Drivers/Braille/Virtual/braille.c:572:7: warning[-Wanalyzer-malloc-leak]: leak of ‘readCommandLine()’
brltty-6.8/minimal/Drivers/Braille/Virtual/braille.c:1195:1: enter_function: entry to ‘brl_readCommand’
brltty-6.8/minimal/Drivers/Braille/Virtual/braille.c:1197:16: call_function: calling ‘readCommandLine’ from ‘brl_readCommand’
brltty-6.8/minimal/Drivers/Braille/Virtual/braille.c:1197:16: return_function: returning to ‘brl_readCommand’ from ‘readCommandLine’
brltty-6.8/minimal/Drivers/Braille/Virtual/braille.c:1199:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Virtual/braille.c:1201:5: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Virtual/braille.c:1201:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/Virtual/braille.c:572:7: danger: ‘readCommandLine()’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  570|   static int
#  571|   fillInputBuffer (void) {
#  572|->   if ((inputLength < INPUT_SIZE) && !inputEnd) {
#  573|       int count = operations->read(fileDescriptor, &inputBuffer[inputLength], INPUT_SIZE-inputLength);
#  574|       if (!count) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:94:5: warning[-Wanalyzer-malloc-leak]: leak of ‘keyname’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#   92|      *(c-1)='\0';
#   93|      if (!strcmp(s,"keyname")) {
#   94|->     keyname = (char *) malloc(strlen(c)+1);
#   95|       strcpy(keyname,c);
#   96|      } else if (!strcmp(s,"socketport")) {

Error: CPPCHECK_WARNING (CWE-476): [#def329]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:95: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: keyname
#   93|      if (!strcmp(s,"keyname")) {
#   94|       keyname = (char *) malloc(strlen(c)+1);
#   95|->     strcpy(keyname,c);
#   96|      } else if (!strcmp(s,"socketport")) {
#   97|       socketport = (char *) malloc(strlen(c)+1);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def330]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:95:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘keyname’ where non-null expected
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#   93|      if (!strcmp(s,"keyname")) {
#   94|       keyname = (char *) malloc(strlen(c)+1);
#   95|->     strcpy(keyname,c);
#   96|      } else if (!strcmp(s,"socketport")) {
#   97|       socketport = (char *) malloc(strlen(c)+1);

Error: CPPCHECK_WARNING (CWE-476): [#def331]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:98: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: socketport
#   96|      } else if (!strcmp(s,"socketport")) {
#   97|       socketport = (char *) malloc(strlen(c)+1);
#   98|->     strcpy(socketport,c);
#   99|      } else if (!strcmp(s,"vbs_ext")) {
#  100|       visiobases_ext = (char *) malloc(5);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def332]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:98:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘socketport’ where non-null expected
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#   96|      } else if (!strcmp(s,"socketport")) {
#   97|       socketport = (char *) malloc(strlen(c)+1);
#   98|->     strcpy(socketport,c);
#   99|      } else if (!strcmp(s,"vbs_ext")) {
#  100|       visiobases_ext = (char *) malloc(5);

Error: CPPCHECK_WARNING (CWE-476): [#def333]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:101: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: visiobases_ext
#   99|      } else if (!strcmp(s,"vbs_ext")) {
#  100|       visiobases_ext = (char *) malloc(5);
#  101|->     strncpy(visiobases_ext,c,4);
#  102|       visiobases_ext[4]=0;
#  103|      } else if (!strcmp(s,"vbs_dir")) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def334]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:101:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘visiobases_ext’ where non-null expected
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#   99|      } else if (!strcmp(s,"vbs_ext")) {
#  100|       visiobases_ext = (char *) malloc(5);
#  101|->     strncpy(visiobases_ext,c,4);
#  102|       visiobases_ext[4]=0;
#  103|      } else if (!strcmp(s,"vbs_dir")) {

Error: CPPCHECK_WARNING (CWE-476): [#def335]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:102: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: visiobases_ext
#  100|       visiobases_ext = (char *) malloc(5);
#  101|       strncpy(visiobases_ext,c,4);
#  102|->     visiobases_ext[4]=0;
#  103|      } else if (!strcmp(s,"vbs_dir")) {
#  104|       visiobases_dir = (char *) malloc(strlen(c)+1);

Error: CPPCHECK_WARNING (CWE-476): [#def336]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:105: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: visiobases_dir
#  103|      } else if (!strcmp(s,"vbs_dir")) {
#  104|       visiobases_dir = (char *) malloc(strlen(c)+1);
#  105|->     strcpy(visiobases_dir,c);
#  106|      }
#  107|     } else {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def337]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:105:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘visiobases_dir’ where non-null expected
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#  103|      } else if (!strcmp(s,"vbs_dir")) {
#  104|       visiobases_dir = (char *) malloc(strlen(c)+1);
#  105|->     strcpy(visiobases_dir,c);
#  106|      }
#  107|     } else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def338]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:107:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  105|   static void WaitForOk(void) {
#  106|    int res;
#  107|->  do { SEND(obuf,osize); RECV() }
#  108|    while ((res==0 || ibuf[0]!=VB_OK) && (showPacket(res),1));
#  109|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def339]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:107:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  105|   static void WaitForOk(void) {
#  106|    int res;
#  107|->  do { SEND(obuf,osize); RECV() }
#  108|    while ((res==0 || ibuf[0]!=VB_OK) && (showPacket(res),1));
#  109|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:277:11: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  275|   
#  276|   static int tryToFind(char *f, int *fd) {
#  277|->  if ((*fd=open(f,O_RDONLY))<0) {
#  278|     strcpy(ibuf,f);
#  279|     strcat(ibuf,visiobases_ext);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:280:12: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  278|     strcpy(ibuf,f);
#  279|     strcat(ibuf,visiobases_ext);
#  280|->   if ((*fd=open(ibuf,O_RDONLY))<0) {
#  281|      strcpy(ibuf,f);
#  282|      strcat(ibuf,".vis");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:283:13: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  281|      strcpy(ibuf,f);
#  282|      strcat(ibuf,".vis");
#  283|->    if ((*fd=open(ibuf,O_RDONLY))<0) {
#  284|       strcpy(ibuf,f);
#  285|       strcat(ibuf,".Vis");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:286:14: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  284|       strcpy(ibuf,f);
#  285|       strcat(ibuf,".Vis");
#  286|->     if ((*fd=open(ibuf,O_RDONLY))<0) {
#  287|        strcpy(ibuf,f);
#  288|        strcat(ibuf,".VIS");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:289:15: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  287|        strcpy(ibuf,f);
#  288|        strcat(ibuf,".VIS");
#  289|->      if ((*fd=open(ibuf,O_RDONLY))<0) {
#  290|         return 0;
#  291|        }

Error: CPPCHECK_WARNING (CWE-476): [#def345]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:309: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f2
#  307|    if (visiobases_dir && (f[0]!='.' || (f[1]!='.' && f[1]!='/') || (f[1]=='.' && f[2]!='/'))) {
#  308|     char *f2 = malloc(strlen(visiobases_dir)+1+strlen(f));
#  309|->   strcpy(f2,visiobases_dir);
#  310|     strcat(f2,f);
#  311|     if (tryToFind(f2, &fd)) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def346]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:309:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘f2’ where non-null expected
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:309:3: danger: argument 1 (‘f2’) from [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#  307|    if (visiobases_dir && (f[0]!='.' || (f[1]!='.' && f[1]!='/') || (f[1]=='.' && f[2]!='/'))) {
#  308|     char *f2 = malloc(strlen(visiobases_dir)+1+strlen(f));
#  309|->   strcpy(f2,visiobases_dir);
#  310|     strcat(f2,f);
#  311|     if (tryToFind(f2, &fd)) {

Error: CPPCHECK_WARNING (CWE-476): [#def347]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:310: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f2
#  308|     char *f2 = malloc(strlen(visiobases_dir)+1+strlen(f));
#  309|     strcpy(f2,visiobases_dir);
#  310|->   strcat(f2,f);
#  311|     if (tryToFind(f2, &fd)) {
#  312|      free(f2);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def348]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:326:2: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: throw: if ‘brlapi_sendRaw’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: danger: ‘fd’ leaks here; was opened at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
#  342|    sizetransferred=0;
#  343|    while(1) {
#  344|->   SEND(obuf,osize);
#  345|     printf("\r%s: %dKo...",filename,sizetransferred>>10);
#  346|     fflush(stdout);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def349]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:346:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:326:2: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:345:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:346:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:346:3: danger: ‘fd’ leaks here; was opened at [(8)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/7)
#  344|     SEND(obuf,osize);
#  345|     printf("\r%s: %dKo...",filename,sizetransferred>>10);
#  346|->   fflush(stdout);
#  347|     RECV();
#  348|     if (ibuf[0]==VB_NEXT) break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def350]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:347:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:326:2: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:345:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:347:3: throw: if ‘brlapi_recvRaw’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:347:3: danger: ‘fd’ leaks here; was opened at [(8)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/7)
#  345|     printf("\r%s: %dKo...",filename,sizetransferred>>10);
#  346|     fflush(stdout);
#  347|->   RECV();
#  348|     if (ibuf[0]==VB_NEXT) break;
#  349|     if (res<2) { showPacket(res); continue; }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def351]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:371:2: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:326:2: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:345:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:347:3: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:371:2: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:371:2: danger: ‘fd’ leaks here; was opened at [(8)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/7)
#  369|    }
#  370|   /* transfer finished */
#  371|->  close(fd);
#  372|    printf("ok\n");
#  373|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def352]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:402:2: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  400|   /* if something nasty occured, try to clean */
#  401|   void transfer_abort(int exitnum) {
#  402|->  brlapi_sendRaw(VB_RESET,strlen(VB_RESET));
#  403|    brlapi_leaveRaw();
#  404|    brlapi_closeConnection();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def353]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:403:2: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  401|   void transfer_abort(int exitnum) {
#  402|    brlapi_sendRaw(VB_RESET,strlen(VB_RESET));
#  403|->  brlapi_leaveRaw();
#  404|    brlapi_closeConnection();
#  405|    exit(exitnum);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def354]
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:404:2: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  402|    brlapi_sendRaw(VB_RESET,strlen(VB_RESET));
#  403|    brlapi_leaveRaw();
#  404|->  brlapi_closeConnection();
#  405|    exit(exitnum);
#  406|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
brltty-6.8/minimal/Drivers/Braille/Voyager/braille.c:255:20: warning[-Wanalyzer-malloc-leak]: leak of ‘getUsbString(brl,  request)’
brltty-6.8/minimal/Drivers/Braille/Voyager/braille.c:569:1: enter_function: entry to ‘logUsbString’
brltty-6.8/minimal/Drivers/Braille/Voyager/braille.c:570:21: call_function: calling ‘getUsbString’ from ‘logUsbString’
brltty-6.8/minimal/Drivers/Braille/Voyager/braille.c:570:21: return_function: returning to ‘logUsbString’ from ‘getUsbString’
brltty-6.8/minimal/Drivers/Braille/Voyager/braille.c:572:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/Voyager/braille.c:573:5: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/Voyager/braille.c:573:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/Voyager/braille.c:255:20: danger: ‘getUsbString(brl,  request)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  253|     unsigned char *buffer, uint16_t size
#  254|   ) {
#  255|->   ssize_t result = gioAskResource(brl->gioEndpoint, UsbControlRecipient_Endpoint, UsbControlType_Vendor,
#  256|                                     request, value, index, buffer, size);
#  257|     int ok = result != -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:782:16: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:778:15: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:778:6: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:779:5: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:782:16: throw: if ‘XtVaOpenApplication’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:782:16: danger: ‘argv’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  780|   
#  781|       /* toplevel */
#  782|->     toplevel = XtVaOpenApplication(&app_con, "Brltty",
#  783|         NULL, 0,
#  784|         &argc, argv, fallback_resources,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:38: warning[-Wanalyzer-malloc-leak]: leak of ‘args2’
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1121:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1126:22: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1128:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1129:39: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1131:12: branch_true: following ‘true’ branch (when ‘args2’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1132:31: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1136:14: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1137:37: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:16: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:38: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:38: throw: if ‘deallocateStrings’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:38: danger: ‘args2’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 1139|               count += 1;
# 1140|   
# 1141|->             if (xtArgv != xtDefArgv) deallocateStrings(xtArgv);
# 1142|               xtArgv = args2;
# 1143|               xtArgc = count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:38: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1121:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1126:22: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1128:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1129:39: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1131:12: branch_true: following ‘true’ branch (when ‘args2’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1132:31: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1132:24: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1136:14: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1137:37: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:16: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:38: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:38: throw: if ‘deallocateStrings’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1141:38: danger: ‘name’ leaks here; was allocated at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
# 1139|               count += 1;
# 1140|   
# 1141|->             if (xtArgv != xtDefArgv) deallocateStrings(xtArgv);
# 1142|               xtArgv = args2;
# 1143|               xtArgc = count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def359]
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1148:13: warning[-Wanalyzer-malloc-leak]: leak of ‘args2’
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1121:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1126:22: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1128:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1129:39: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1131:12: branch_true: following ‘true’ branch (when ‘args2’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1132:31: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1136:14: branch_false: following ‘false’ branch (when ‘name’ is NULL)...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1148:13: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1148:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1148:13: danger: ‘args2’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1146|               reallocated = 1;
# 1147|             } else {
# 1148|->             logMallocError();
# 1149|             }
# 1150|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1151:22: warning[-Wanalyzer-malloc-leak]: leak of ‘args2’
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1121:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1126:22: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1128:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1129:39: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1131:12: branch_true: following ‘true’ branch (when ‘args2’ is non-NULL)...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1132:31: branch_true: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1136:14: branch_false: following ‘false’ branch (when ‘name’ is NULL)...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1148:13: branch_false: ...to here
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1151:22: throw: if ‘deallocateStrings’ throws an exception...
brltty-6.8/minimal/Drivers/Braille/XWindow/braille.c:1151:22: danger: ‘args2’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 1149|             }
# 1150|   
# 1151|->           if (args2) deallocateStrings(args2);
# 1152|           } else {
# 1153|             logMallocError();

Error: CPPCHECK_WARNING (CWE-401): [#def361]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:248: error[memleakOnRealloc]: Common realloc mistake: 'curRows' nulled but not freed upon failure
#  246|   static void addRows(long pos, long num) {
#  247|     curNumRows += num;
#  248|->   curRows = realloc(curRows,curNumRows*sizeof(*curRows));
#  249|     curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
#  250|     memmove(curRows      +pos+num,curRows      +pos,(curNumRows-(pos+num))*sizeof(*curRows));

Error: CPPCHECK_WARNING (CWE-401): [#def362]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:249: error[memleakOnRealloc]: Common realloc mistake: 'curRowLengths' nulled but not freed upon failure
#  247|     curNumRows += num;
#  248|     curRows = realloc(curRows,curNumRows*sizeof(*curRows));
#  249|->   curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
#  250|     memmove(curRows      +pos+num,curRows      +pos,(curNumRows-(pos+num))*sizeof(*curRows));
#  251|     memmove(curRowLengths+pos+num,curRowLengths+pos,(curNumRows-(pos+num))*sizeof(*curRowLengths));

Error: CPPCHECK_WARNING (CWE-401): [#def363]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:261: error[memleakOnRealloc]: Common realloc mistake: 'curRows' nulled but not freed upon failure
#  259|     memmove(curRowLengths+pos,curRowLengths+pos+num,(curNumRows-(pos+num))*sizeof(*curRowLengths));
#  260|     curNumRows -= num;
#  261|->   curRows = realloc(curRows,curNumRows*sizeof(*curRows));
#  262|     curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
#  263|   }

Error: CPPCHECK_WARNING (CWE-401): [#def364]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:262: error[memleakOnRealloc]: Common realloc mistake: 'curRowLengths' nulled but not freed upon failure
#  260|     curNumRows -= num;
#  261|     curRows = realloc(curRows,curNumRows*sizeof(*curRows));
#  262|->   curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
#  263|   }
#  264|   

Error: CPPCHECK_WARNING (CWE-476): [#def365]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:788: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  786|     }
#  787|     ret = malloc(sizeof(*ret) * count);
#  788|->   memcpy(ret, states, sizeof(*ret) * count);
#  789|   
#  790|   out:

Error: CPPCHECK_WARNING (CWE-476): [#def366]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1336: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a2Watch
# 1334|   {
# 1335|     struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1336|->   a2Watch->watch = watch;
# 1337|     int flags = dbus_watch_get_flags(watch);
# 1338|     if (dbus_watch_get_enabled(watch))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def367]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1336:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘a2Watch’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1336:3: danger: ‘a2Watch’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1334|   {
# 1335|     struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1336|->   a2Watch->watch = watch;
# 1337|     int flags = dbus_watch_get_flags(watch);
# 1338|     if (dbus_watch_get_enabled(watch))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1337:15: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1337:15: throw: if ‘dbus_watch_get_flags’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1337:15: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1335|     struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1336|     a2Watch->watch = watch;
# 1337|->   int flags = dbus_watch_get_flags(watch);
# 1338|     if (dbus_watch_get_enabled(watch))
# 1339|     {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:7: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:7: throw: if ‘dbus_watch_get_enabled’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:7: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1336|     a2Watch->watch = watch;
# 1337|     int flags = dbus_watch_get_flags(watch);
# 1338|->   if (dbus_watch_get_enabled(watch))
# 1339|     {
# 1340|       if (flags & DBUS_WATCH_READABLE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1341:7: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1341:7: throw: if ‘asyncMonitorFileInput’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1341:7: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1339|     {
# 1340|       if (flags & DBUS_WATCH_READABLE)
# 1341|->       asyncMonitorFileInput(&a2Watch->input_monitor, dbus_watch_get_unix_fd(watch), a2ProcessInput, a2Watch);
# 1342|       if (flags & DBUS_WATCH_WRITABLE)
# 1343|         asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: throw: if ‘dbus_watch_get_unix_fd’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1339|     {
# 1340|       if (flags & DBUS_WATCH_READABLE)
# 1341|->       asyncMonitorFileInput(&a2Watch->input_monitor, dbus_watch_get_unix_fd(watch), a2ProcessInput, a2Watch);
# 1342|       if (flags & DBUS_WATCH_WRITABLE)
# 1343|         asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1343:7: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_false: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1342:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1343:7: throw: if ‘asyncMonitorFileOutput’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1343:7: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1341|         asyncMonitorFileInput(&a2Watch->input_monitor, dbus_watch_get_unix_fd(watch), a2ProcessInput, a2Watch);
# 1342|       if (flags & DBUS_WATCH_WRITABLE)
# 1343|->       asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);
# 1344|     }
# 1345|     dbus_watch_set_data(watch, a2Watch, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_false: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1342:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: throw: if ‘dbus_watch_get_unix_fd’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 1341|         asyncMonitorFileInput(&a2Watch->input_monitor, dbus_watch_get_unix_fd(watch), a2ProcessInput, a2Watch);
# 1342|       if (flags & DBUS_WATCH_WRITABLE)
# 1343|->       asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);
# 1344|     }
# 1345|     dbus_watch_set_data(watch, a2Watch, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def374]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1345:3: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1345:3: throw: if ‘dbus_watch_set_data’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1345:3: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1343|         asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);
# 1344|     }
# 1345|->   dbus_watch_set_data(watch, a2Watch, NULL);
# 1346|     return TRUE;
# 1347|   }

Error: CPPCHECK_WARNING (CWE-476): [#def375]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1403: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a2Timeout
# 1401|   {
# 1402|     struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1403|->   a2Timeout->timeout = timeout;
# 1404|     if (dbus_timeout_get_enabled(timeout))
# 1405|       asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def376]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1403:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘a2Timeout’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1402:33: acquire_memory: this call could return NULL
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1403:3: danger: ‘a2Timeout’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 1401|   {
# 1402|     struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1403|->   a2Timeout->timeout = timeout;
# 1404|     if (dbus_timeout_get_enabled(timeout))
# 1405|       asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1404:7: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Timeout’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1402:33: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1404:7: throw: if ‘dbus_timeout_get_enabled’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1404:7: danger: ‘a2Timeout’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 1402|     struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1403|     a2Timeout->timeout = timeout;
# 1404|->   if (dbus_timeout_get_enabled(timeout))
# 1405|       asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
# 1406|     dbus_timeout_set_data(timeout, a2Timeout, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1405:5: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Timeout’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1402:33: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1404:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1405:5: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1405:5: throw: if ‘dbus_timeout_get_interval’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1405:5: danger: ‘a2Timeout’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 1403|     a2Timeout->timeout = timeout;
# 1404|     if (dbus_timeout_get_enabled(timeout))
# 1405|->     asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
# 1406|     dbus_timeout_set_data(timeout, a2Timeout, NULL);
# 1407|     return TRUE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1406:3: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Timeout’
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1402:33: acquire_memory: allocated here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1404:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1406:3: branch_false: ...to here
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1406:3: throw: if ‘dbus_timeout_set_data’ throws an exception...
brltty-6.8/minimal/Drivers/Screen/AtSpi2/a2_screen.c:1406:3: danger: ‘a2Timeout’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1404|     if (dbus_timeout_get_enabled(timeout))
# 1405|       asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
# 1406|->   dbus_timeout_set_data(timeout, a2Timeout, NULL);
# 1407|     return TRUE;
# 1408|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:93:7: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#   91|   
#   92|       if (!newArray) {
#   93|->       logMallocError();
#   94|         return 0;
#   95|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:110:33: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  108|   static int
#  109|   setScreenContent (const char *text) {
#  110|->   unsigned int characterCount = countUtf8Characters(text);
#  111|     fileCharacters = malloc(characterCount * sizeof(*fileCharacters));
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:114:5: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  112|   
#  113|     if (fileCharacters) {
#  114|->     makeWcharsFromUtf8(text, fileCharacters, characterCount);
#  115|   
#  116|       const wchar_t *current = fileCharacters;

Error: COMPILER_WARNING (CWE-704): [#def383]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c: scope_hint: In function ‘setScreenContent’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:120:23: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  120 |       wchar_t *next = wcschr(current, WC_C('\n'));
#      |                       ^~~~~~
#  118|   
#  119|       while (current < end) {
#  120|->       wchar_t *next = wcschr(current, WC_C('\n'));
#  121|   
#  122|         if (!next) {

Error: COMPILER_WARNING (CWE-704): [#def384]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:120:23: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  118|   
#  119|       while (current < end) {
#  120|->       wchar_t *next = wcschr(current, WC_C('\n'));
#  121|   
#  122|         if (!next) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:133:5: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  131|       return 1;
#  132|     } else {
#  133|->     logMallocError();
#  134|     }
#  135|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:151:30: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  149|   
#  150|         if (text) {
#  151|->         int fileDescriptor = open(filePath, O_RDONLY);
#  152|   
#  153|           if (fileDescriptor != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def387]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:157:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filePath, 0)’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  155|   
#  156|             if (result != -1) {
#  157|->             if (result < fileSize) fileSize = result;
#  158|               text[fileSize] = 0;
#  159|               setScreenContent(text);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def388]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:161:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filePath, 0)’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  159|               setScreenContent(text);
#  160|             } else {
#  161|->             problem = strerror(errno);
#  162|             }
#  163|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def389]
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:164:11: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/minimal/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  162|             }
#  163|   
#  164|->           close(fileDescriptor);
#  165|           } else {
#  166|             problem = strerror(errno);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:435:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(consoleName,  vt)’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2750:1: enter_function: entry to ‘selectRegion’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2751:7: call_function: calling ‘controlCurrentConsole’ from ‘selectRegion’
#  433|     if (vt) {
#  434|       int length = strlen(name);
#  435|->     if (name[length-1] == '0') length -= 1;
#  436|   
#  437|       char buffer[length+4];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:435:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(screenName,  vt)’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:1816:1: enter_function: entry to ‘isUnusedConsole’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:1820:7: call_function: calling ‘openScreenDevice’ from ‘isUnusedConsole’
#  433|     if (vt) {
#  434|       int length = strlen(name);
#  435|->     if (name[length-1] == '0') length -= 1;
#  436|   
#  437|       char buffer[length+4];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def392]
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:435:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(unicodeDeviceName,  vt)’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2040:1: enter_function: entry to ‘describe_LinuxScreen’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2041:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2046:7: branch_false: ...to here
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2046:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2047:9: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2047:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2048:12: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2048:12: call_function: calling ‘getScreenProperties’ from ‘describe_LinuxScreen’
#  433|     if (vt) {
#  434|       int length = strlen(name);
#  435|->     if (name[length-1] == '0') length -= 1;
#  436|   
#  437|       char buffer[length+4];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:476:19: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(consoleName,  vt)’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2805:1: enter_function: entry to ‘switchVirtualTerminal_LinuxScreen’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2808:11: call_function: inlined call to ‘controlMainConsole’ from ‘switchVirtualTerminal_LinuxScreen’
#  474|   
#  475|     if (name) {
#  476|->     int console = openCharacterDevice(name, O_WRONLY|O_NOCTTY, TTY_MAJOR, vt);
#  477|   
#  478|       if (console != -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def394]
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:479:7: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(consoleName,  vt)’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2805:1: enter_function: entry to ‘switchVirtualTerminal_LinuxScreen’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2808:11: call_function: inlined call to ‘controlMainConsole’ from ‘switchVirtualTerminal_LinuxScreen’
#  477|   
#  478|       if (console != -1) {
#  479|->       logMessage(LOG_CATEGORY(SCREEN_DRIVER),
#  480|           "%s console opened: %s: fd=%d",
#  481|           type, name, console

Error: GCC_ANALYZER_WARNING (CWE-401): [#def395]
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:585:7: warning[-Wanalyzer-malloc-leak]: leak of ‘sfm.entries’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:1389:1: enter_function: entry to ‘setTranslationTable’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:1391:20: call_function: calling ‘setScreenFontMap’ from ‘setTranslationTable’
#  583|       case GIO_UNIMAP: {
#  584|         struct unimapdesc *sfm = argument;
#  585|->       memset(sfm, 0, sizeof(*sfm));
#  586|         sfm->entries = NULL;
#  587|         sfm->entry_ct = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def396]
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:712:19: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(unicodeDeviceName,  vt)’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2040:1: enter_function: entry to ‘describe_LinuxScreen’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2041:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2046:7: branch_false: ...to here
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2046:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2047:9: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2047:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2048:12: branch_true: ...to here
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:2048:12: call_function: calling ‘getScreenProperties’ from ‘describe_LinuxScreen’
#  710|   
#  711|     if (name) {
#  712|->     int unicode = openCharacterDevice(name, O_RDWR, VCS_MAJOR, 0X40|vt);
#  713|   
#  714|       if (unicode != -1) {

Error: CPPCHECK_WARNING (CWE-457): [#def397]
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:788: warning[uninitvar]: Uninitialized variable: buffer
#  786|   static int
#  787|   readUnicodeData (off_t offset, void *buffer, size_t size) {
#  788|->   size_t count = (unicodeCacheUsed? readUnicodeCache: readUnicodeDevice)(offset, buffer, size);
#  789|     if (count == size) return 1;
#  790|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def398]
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:880:18: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(screenName,  vt)’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:1816:1: enter_function: entry to ‘isUnusedConsole’
brltty-6.8/minimal/Drivers/Screen/Linux/screen.c:1820:7: call_function: calling ‘openScreenDevice’ from ‘isUnusedConsole’
#  878|   
#  879|     if (name) {
#  880|->     int screen = openCharacterDevice(name, O_RDWR, VCS_MAJOR, 0X80|vt);
#  881|   
#  882|       if (screen != -1) {

Error: CPPCHECK_WARNING (CWE-476): [#def399]
brltty-6.8/minimal/Headers/bitfield.h:76: error[ctunullpointer]: Null pointer dereference: to
#   74|     }
#   75|   
#   76|-> DEFINE_PHYSICAL_ENDIAN_FUNCTIONS(16)
#   77|   DEFINE_PHYSICAL_ENDIAN_FUNCTIONS(32)
#   78|   DEFINE_PHYSICAL_ENDIAN_FUNCTIONS(64)

Error: COMPILER_WARNING: [#def400]
brltty-6.8/minimal/Drivers/Braille/TTY/braille.c:40: included_from: Included from here.
brltty-6.8/minimal/Headers/get_curses.h:54:2: warning[-Wcpp]: #warning curses package either unspecified or unsupported
#   54 | #warning curses package either unspecified or unsupported
#      |  ^~~~~~~
#   52|   
#   53|   #else /* curses package */
#   54|-> #warning curses package either unspecified or unsupported
#   55|   #endif /* curses package */
#   56|   

Error: COMPILER_WARNING: [#def401]
brltty-6.8/minimal/Headers/get_curses.h:54:2: warning[-Wcpp]: #warning curses package either unspecified or unsupported
#   52|   
#   53|   #else /* curses package */
#   54|-> #warning curses package either unspecified or unsupported
#   55|   #endif /* curses package */
#   56|   

Error: COMPILER_WARNING: [#def402]
brltty-6.8/minimal/Programs/kbd_linux.c:27: included_from: Included from here.
brltty-6.8/minimal/Programs/kbd_linux.c: scope_hint: In function ‘monitorKeyboard’
brltty-6.8/minimal/Headers/strfmt.h:65:12: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 251
#   65 | STR_FORMAT(snprintf, __VA_ARGS__)
#      |            ^
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 6 and 261 bytes into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#   63|   
#   64|   #define STR_PRINTF(...) \
#   65|-> STR_FORMAT(snprintf, __VA_ARGS__)
#   66|   
#   67|   #define STR_VPRINTF(format, arguments) \

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
brltty-6.8/minimal/Programs/addresses.c:85:7: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/addresses.c:109:1: enter_function: entry to ‘setAddressName’
brltty-6.8/minimal/Programs/addresses.c:124:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/addresses.c:124:6: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/addresses.c:128:5: branch_true: ...to here
brltty-6.8/minimal/Programs/addresses.c:131:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/addresses.c:137:9: branch_false: ...to here
brltty-6.8/minimal/Programs/addresses.c:137:9: call_function: calling ‘insertAddressEntry’ from ‘setAddressName’
#   83|   
#   84|       if (!newTable) {
#   85|->       logMallocError();
#   86|         return 0;
#   87|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
brltty-6.8/minimal/Programs/async_alarm.c:144:28: warning[-Wanalyzer-malloc-leak]: leak of ‘alarm’
brltty-6.8/minimal/Programs/async_alarm.c:124:1: enter_function: entry to ‘newAlarmElement’
brltty-6.8/minimal/Programs/async_alarm.c:126:19: call_function: calling ‘getAlarmQueue’ from ‘newAlarmElement’
brltty-6.8/minimal/Programs/async_alarm.c:126:19: return_function: returning to ‘newAlarmElement’ from ‘getAlarmQueue’
brltty-6.8/minimal/Programs/async_alarm.c:128:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_alarm.c:131:18: branch_true: ...to here
brltty-6.8/minimal/Programs/async_alarm.c:131:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_alarm.c:131:8: branch_true: following ‘true’ branch (when ‘alarm’ is non-NULL)...
brltty-6.8/minimal/Programs/async_alarm.c:132:7: branch_true: ...to here
brltty-6.8/minimal/Programs/async_alarm.c:144:28: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/minimal/Programs/async_alarm.c:144:28: danger: ‘alarm’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  142|   
#  143|         {
#  144|->         Element *element = enqueueItem(alarms, alarm);
#  145|   
#  146|           if (element) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def405]
brltty-6.8/minimal/Programs/async_event.c:109:9: warning[-Wanalyzer-malloc-leak]: leak of ‘event’
brltty-6.8/minimal/Programs/async_event.c:104:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_event.c:104:6: branch_true: following ‘true’ branch (when ‘event’ is non-NULL)...
brltty-6.8/minimal/Programs/async_event.c:104:6: branch_true: ...to here
brltty-6.8/minimal/Programs/async_event.c:109:9: throw: if ‘createAnonymousPipe’ throws an exception...
brltty-6.8/minimal/Programs/async_event.c:109:9: danger: ‘event’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  107|       event->data = data;
#  108|   
#  109|->     if (createAnonymousPipe(&event->pipeInput, &event->pipeOutput)) {
#  110|   #ifdef __MINGW32__
#  111|         if (!(event->monitorDescriptor = CreateEvent(NULL, TRUE, FALSE, NULL))) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def406]
brltty-6.8/minimal/Programs/async_io.c:169:34: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/minimal/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/minimal/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  167|   static AsyncIoData *
#  168|   getIoData (void) {
#  169|->   AsyncThreadSpecificData *tsd = asyncGetThreadSpecificData();
#  170|     if (!tsd) return NULL;
#  171|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def407]
brltty-6.8/minimal/Programs/async_io.c:169:34: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/minimal/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/minimal/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  167|   static AsyncIoData *
#  168|   getIoData (void) {
#  169|->   AsyncThreadSpecificData *tsd = asyncGetThreadSpecificData();
#  170|     if (!tsd) return NULL;
#  171|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
brltty-6.8/minimal/Programs/async_io.c:176:7: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/minimal/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/minimal/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  174|   
#  175|       if (!(iod = malloc(sizeof(*iod)))) {
#  176|->       logMallocError();
#  177|         return NULL;
#  178|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
brltty-6.8/minimal/Programs/async_io.c:176:7: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/minimal/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/minimal/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  174|   
#  175|       if (!(iod = malloc(sizeof(*iod)))) {
#  176|->       logMallocError();
#  177|         return NULL;
#  178|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
brltty-6.8/minimal/Programs/async_io.c:573:26: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/minimal/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/minimal/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  571|   
#  572|     if (!iod->functionQueue && create) {
#  573|->     iod->functionQueue = newQueue(deallocateFunctionEntry, NULL);
#  574|     }
#  575|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def411]
brltty-6.8/minimal/Programs/async_io.c:573:26: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/minimal/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/minimal/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  571|   
#  572|     if (!iod->functionQueue && create) {
#  573|->     iod->functionQueue = newQueue(deallocateFunctionEntry, NULL);
#  574|     }
#  575|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
brltty-6.8/minimal/Programs/async_io.c:850:28: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/minimal/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/minimal/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  848|   
#  849|         {
#  850|->         Element *element = findElement(functions, testFunctionEntry, &key);
#  851|           if (element) return element;
#  852|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def413]
brltty-6.8/minimal/Programs/async_io.c:850:28: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/minimal/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/minimal/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  848|   
#  849|         {
#  850|->         Element *element = findElement(functions, testFunctionEntry, &key);
#  851|           if (element) return element;
#  852|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def414]
brltty-6.8/minimal/Programs/async_io.c:862:37: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/minimal/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/minimal/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  860|           function->methods = methods;
#  861|   
#  862|->         if ((function->operations = newQueue(deallocateOperationEntry, NULL))) {
#  863|             {
#  864|               static AsyncQueueMethods methods = {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
brltty-6.8/minimal/Programs/async_io.c:862:37: warning[-Wanalyzer-malloc-leak]: leak of ‘function’
brltty-6.8/minimal/Programs/async_io.c:839:1: enter_function: entry to ‘getFunctionElement’
brltty-6.8/minimal/Programs/async_io.c:840:22: call_function: calling ‘getFunctionQueue’ from ‘getFunctionElement’
brltty-6.8/minimal/Programs/async_io.c:840:22: return_function: returning to ‘getFunctionElement’ from ‘getFunctionQueue’
brltty-6.8/minimal/Programs/async_io.c:842:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_io.c:844:19: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:851:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_io.c:889:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_io.c:855:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_io.c:858:23: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:858:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:858:10: branch_true: following ‘true’ branch (when ‘function’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:859:9: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:862:37: throw: if ‘newQueue’ throws an exception...
brltty-6.8/minimal/Programs/async_io.c:862:37: danger: ‘function’ leaks here; was allocated at [(18)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/17)
#  860|           function->methods = methods;
#  861|   
#  862|->         if ((function->operations = newQueue(deallocateOperationEntry, NULL))) {
#  863|             {
#  864|               static AsyncQueueMethods methods = {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
brltty-6.8/minimal/Programs/async_io.c:862:37: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/minimal/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/minimal/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  860|           function->methods = methods;
#  861|   
#  862|->         if ((function->operations = newQueue(deallocateOperationEntry, NULL))) {
#  863|             {
#  864|               static AsyncQueueMethods methods = {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
brltty-6.8/minimal/Programs/async_io.c:868:13: warning[-Wanalyzer-malloc-leak]: leak of ‘function’
brltty-6.8/minimal/Programs/async_io.c:839:1: enter_function: entry to ‘getFunctionElement’
brltty-6.8/minimal/Programs/async_io.c:840:22: call_function: calling ‘getFunctionQueue’ from ‘getFunctionElement’
brltty-6.8/minimal/Programs/async_io.c:840:22: return_function: returning to ‘getFunctionElement’ from ‘getFunctionQueue’
brltty-6.8/minimal/Programs/async_io.c:842:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_io.c:844:19: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:851:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_io.c:889:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_io.c:855:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_io.c:858:23: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:858:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:858:10: branch_true: following ‘true’ branch (when ‘function’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:859:9: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:862:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_io.c:868:13: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:868:13: throw: if ‘setQueueData’ throws an exception...
brltty-6.8/minimal/Programs/async_io.c:868:13: danger: ‘function’ leaks here; was allocated at [(18)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/17)
#  866|               };
#  867|   
#  868|->             setQueueData(function->operations, &methods);
#  869|             }
#  870|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
brltty-6.8/minimal/Programs/async_io.c:868:13: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/minimal/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/minimal/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  866|               };
#  867|   
#  868|->             setQueueData(function->operations, &methods);
#  869|             }
#  870|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
brltty-6.8/minimal/Programs/async_io.c:871:39: warning[-Wanalyzer-malloc-leak]: leak of ‘function’
brltty-6.8/minimal/Programs/async_io.c:839:1: enter_function: entry to ‘getFunctionElement’
brltty-6.8/minimal/Programs/async_io.c:840:22: call_function: calling ‘getFunctionQueue’ from ‘getFunctionElement’
brltty-6.8/minimal/Programs/async_io.c:840:22: return_function: returning to ‘getFunctionElement’ from ‘getFunctionQueue’
brltty-6.8/minimal/Programs/async_io.c:842:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_io.c:844:19: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:851:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_io.c:889:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_io.c:855:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_io.c:858:23: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:858:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:858:10: branch_true: following ‘true’ branch (when ‘function’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:859:9: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:862:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_io.c:868:13: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:871:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_io.c:871:39: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:871:39: throw: if the called function throws an exception...
brltty-6.8/minimal/Programs/async_io.c:871:39: danger: ‘function’ leaks here; was allocated at [(18)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/17)
#  869|             }
#  870|   
#  871|->           if (methods->beginFunction) methods->beginFunction(function);
#  872|   
#  873|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
brltty-6.8/minimal/Programs/async_io.c:871:39: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/minimal/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/minimal/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  869|             }
#  870|   
#  871|->           if (methods->beginFunction) methods->beginFunction(function);
#  872|   
#  873|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
brltty-6.8/minimal/Programs/async_io.c:874:32: warning[-Wanalyzer-malloc-leak]: leak of ‘function’
brltty-6.8/minimal/Programs/async_io.c:839:1: enter_function: entry to ‘getFunctionElement’
brltty-6.8/minimal/Programs/async_io.c:840:22: call_function: calling ‘getFunctionQueue’ from ‘getFunctionElement’
brltty-6.8/minimal/Programs/async_io.c:840:22: return_function: returning to ‘getFunctionElement’ from ‘getFunctionQueue’
brltty-6.8/minimal/Programs/async_io.c:842:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_io.c:844:19: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:851:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_io.c:889:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_io.c:855:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_io.c:858:23: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:858:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_io.c:858:10: branch_true: following ‘true’ branch (when ‘function’ is non-NULL)...
brltty-6.8/minimal/Programs/async_io.c:859:9: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:862:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_io.c:868:13: branch_true: ...to here
brltty-6.8/minimal/Programs/async_io.c:871:14: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_io.c:874:32: branch_false: ...to here
brltty-6.8/minimal/Programs/async_io.c:874:32: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/minimal/Programs/async_io.c:874:32: danger: ‘function’ leaks here; was allocated at [(18)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/17)
#  872|   
#  873|             {
#  874|->             Element *element = enqueueItem(functions, function);
#  875|               if (element) return element;
#  876|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def422]
brltty-6.8/minimal/Programs/async_signal.c:165:3: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/minimal/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/minimal/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:574:13: call_function: calling ‘asyncWithAllSignalsBlocked’ from ‘getSignalElement’
#  163|   
#  164|     if (!error) return 1;
#  165|->   logActionError(error, "pthread_setmask");
#  166|   #else /* GOT_PTHREADS */
#  167|     if (sigprocmask(how, newMask, oldMask) != -1) return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def423]
brltty-6.8/minimal/Programs/async_signal.c:267:5: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/minimal/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/minimal/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:574:13: call_function: calling ‘asyncWithAllSignalsBlocked’ from ‘getSignalElement’
#  265|       }
#  266|     } else {
#  267|->     logSystemError("sigfillset");
#  268|     }
#  269|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def424]
brltty-6.8/minimal/Programs/async_signal.c:517:31: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/minimal/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/minimal/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:574:13: call_function: calling ‘asyncWithAllSignalsBlocked’ from ‘getSignalElement’
#  515|     AddSignalEntryParameters *parameters = data;
#  516|   
#  517|->   parameters->signalElement = enqueueItem(parameters->signalQueue, parameters->signalEntry);
#  518|   }
#  519|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def425]
brltty-6.8/minimal/Programs/async_signal.c:557:30: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/minimal/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/minimal/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:557:30: throw: if ‘newQueue’ throws an exception...
brltty-6.8/minimal/Programs/async_signal.c:557:30: danger: ‘sig’ leaks here; was allocated at [(18)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/17)
#  555|           initializeSignalMonitoring(sig);
#  556|   
#  557|->         if ((sig->monitors = newQueue(deallocateMonitorEntry, NULL))) {
#  558|             {
#  559|               static AsyncQueueMethods methods = {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def426]
brltty-6.8/minimal/Programs/async_signal.c:563:13: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/minimal/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/minimal/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:563:13: throw: if ‘setQueueData’ throws an exception...
brltty-6.8/minimal/Programs/async_signal.c:563:13: danger: ‘sig’ leaks here; was allocated at [(18)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/17)
#  561|               };
#  562|   
#  563|->             setQueueData(sig->monitors, &methods);
#  564|             }
#  565|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def427]
brltty-6.8/minimal/Programs/async_signal.c:578:11: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/minimal/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/minimal/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/minimal/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/minimal/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/minimal/Programs/async_signal.c:574:13: call_function: calling ‘asyncWithAllSignalsBlocked’ from ‘getSignalElement’
brltty-6.8/minimal/Programs/async_signal.c:574:13: return_function: returning to ‘getSignalElement’ from ‘asyncWithAllSignalsBlocked’
brltty-6.8/minimal/Programs/async_signal.c:575:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/minimal/Programs/async_signal.c:578:11: throw: if ‘deallocateQueue’ throws an exception...
brltty-6.8/minimal/Programs/async_signal.c:578:11: danger: ‘sig’ leaks here; was allocated at [(18)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/17)
#  576|             }
#  577|   
#  578|->           deallocateQueue(sig->monitors);
#  579|           }
#  580|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def428]
brltty-6.8/minimal/Programs/async_task.c:47:34: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/minimal/Programs/async_task.c:100:1: enter_function: entry to ‘asyncAddTask’
brltty-6.8/minimal/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/minimal/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/minimal/Programs/async_task.c:108:8: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
brltty-6.8/minimal/Programs/async_task.c:110:16: branch_false: ...to here
brltty-6.8/minimal/Programs/async_task.c:110:16: call_function: calling ‘addTask’ from ‘asyncAddTask’
#   45|   static AsyncTaskData *
#   46|   getTaskData (void) {
#   47|->   AsyncThreadSpecificData *tsd = asyncGetThreadSpecificData();
#   48|     if (!tsd) return NULL;
#   49|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def429]
brltty-6.8/minimal/Programs/async_task.c:54:7: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/minimal/Programs/async_task.c:100:1: enter_function: entry to ‘asyncAddTask’
brltty-6.8/minimal/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/minimal/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/minimal/Programs/async_task.c:108:8: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
brltty-6.8/minimal/Programs/async_task.c:110:16: branch_false: ...to here
brltty-6.8/minimal/Programs/async_task.c:110:16: call_function: calling ‘addTask’ from ‘asyncAddTask’
#   52|   
#   53|       if (!(td = malloc(sizeof(*td)))) {
#   54|->       logMallocError();
#   55|         return NULL;
#   56|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def430]
brltty-6.8/minimal/Programs/async_task.c:79:21: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/minimal/Programs/async_task.c:100:1: enter_function: entry to ‘asyncAddTask’
brltty-6.8/minimal/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/minimal/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/minimal/Programs/async_task.c:108:8: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
brltty-6.8/minimal/Programs/async_task.c:110:16: branch_false: ...to here
brltty-6.8/minimal/Programs/async_task.c:110:16: call_function: calling ‘addTask’ from ‘asyncAddTask’
#   77|   
#   78|     if (!td->taskQueue && create) {
#   79|->     td->taskQueue = newQueue(deallocateTaskDefinition, NULL);
#   80|     }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
brltty-6.8/minimal/Programs/async_task.c:90:9: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/minimal/Programs/async_task.c:100:1: enter_function: entry to ‘asyncAddTask’
brltty-6.8/minimal/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/minimal/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/minimal/Programs/async_task.c:108:8: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
brltty-6.8/minimal/Programs/async_task.c:110:16: branch_false: ...to here
brltty-6.8/minimal/Programs/async_task.c:110:16: call_function: calling ‘addTask’ from ‘asyncAddTask’
#   88|   
#   89|     if (queue) {
#   90|->     if (enqueueItem(queue, task)) {
#   91|         logSymbol(LOG_CATEGORY(ASYNC_EVENTS), task->callback, "task added");
#   92|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def432]
brltty-6.8/minimal/Programs/async_task.c:109:11: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/minimal/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/minimal/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/minimal/Programs/async_task.c:108:8: branch_true: following ‘true’ branch (when ‘event’ is non-NULL)...
brltty-6.8/minimal/Programs/async_task.c:109:11: branch_true: ...to here
brltty-6.8/minimal/Programs/async_task.c:109:11: throw: if ‘asyncSignalEvent’ throws an exception...
brltty-6.8/minimal/Programs/async_task.c:109:11: danger: ‘task’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  107|   
#  108|       if (event) {
#  109|->       if (asyncSignalEvent(event, task)) return 1;
#  110|       } else if (addTask(task)) {
#  111|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def433]
brltty-6.8/minimal/Programs/auth.c:290:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*definition.initialize(parameter)’
brltty-6.8/minimal/Programs/auth.c:662:1: enter_function: entry to ‘authBegin’
brltty-6.8/minimal/Programs/auth.c:665:6: branch_true: following ‘true’ branch (when ‘auth’ is non-NULL)...
brltty-6.8/minimal/Programs/auth.c:666:5: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:675:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/auth.c:676:12: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:676:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:681:35: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:681:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/auth.c:682:13: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:682:13: call_function: calling ‘initializeMethodDescriptors’ from ‘authBegin’
#  288|   
#  289|     if ((keyfile = malloc(sizeof(*keyfile)))) {
#  290|->     if (*parameter) {
#  291|         keyfile->path = parameter;
#  292|         return keyfile;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
brltty-6.8/minimal/Programs/auth.c:294:7: warning[-Wanalyzer-malloc-leak]: leak of ‘keyfile’
brltty-6.8/minimal/Programs/auth.c:662:1: enter_function: entry to ‘authBegin’
brltty-6.8/minimal/Programs/auth.c:665:6: branch_true: following ‘true’ branch (when ‘auth’ is non-NULL)...
brltty-6.8/minimal/Programs/auth.c:666:5: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:675:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/auth.c:676:12: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:676:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:681:35: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:681:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/auth.c:682:13: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:682:13: call_function: calling ‘initializeMethodDescriptors’ from ‘authBegin’
#  292|         return keyfile;
#  293|       } else {
#  294|->       logMessage(LOG_ERR, "path to key file not specified");
#  295|       }
#  296|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
brltty-6.8/minimal/Programs/auth.c:350:11: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
brltty-6.8/minimal/Programs/auth.c:338:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/auth.c:338:6: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
brltty-6.8/minimal/Programs/auth.c:343:10: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:343:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:350:11: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:350:11: throw: if ‘isInteger’ throws an exception...
brltty-6.8/minimal/Programs/auth.c:350:11: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  348|       {
#  349|         int value;
#  350|->       if (isInteger(&value, parameter)) {
#  351|           user->id = value;
#  352|           return user;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
brltty-6.8/minimal/Programs/auth.c:357:32: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
brltty-6.8/minimal/Programs/auth.c:338:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/auth.c:338:6: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
brltty-6.8/minimal/Programs/auth.c:343:10: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:343:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:350:11: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:350:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:372:1: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:357:32: throw: if ‘getpwnam’ throws an exception...
brltty-6.8/minimal/Programs/auth.c:357:32: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  355|   
#  356|       {
#  357|->       const struct passwd *p = getpwnam(parameter);
#  358|         if (p) {
#  359|           user->id = p->pw_uid;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
brltty-6.8/minimal/Programs/auth.c:364:5: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
brltty-6.8/minimal/Programs/auth.c:338:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/auth.c:338:6: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
brltty-6.8/minimal/Programs/auth.c:343:10: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:343:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:350:11: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:350:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:372:1: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:358:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:364:5: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:364:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/auth.c:364:5: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  362|       }
#  363|   
#  364|->     logMessage(LOG_ERR, "unknown user: %s", parameter);
#  365|       free(user);
#  366|   #endif /* __MINGW32__ */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def438]
brltty-6.8/minimal/Programs/auth.c:405:11: warning[-Wanalyzer-malloc-leak]: leak of ‘group’
brltty-6.8/minimal/Programs/auth.c:393:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/auth.c:393:6: branch_true: following ‘true’ branch (when ‘group’ is non-NULL)...
brltty-6.8/minimal/Programs/auth.c:398:10: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:398:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:405:11: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:405:11: throw: if ‘isInteger’ throws an exception...
brltty-6.8/minimal/Programs/auth.c:405:11: danger: ‘group’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  403|       {
#  404|         int value;
#  405|->       if (isInteger(&value, parameter)) {
#  406|           group->id = value;
#  407|           return group;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
brltty-6.8/minimal/Programs/auth.c:412:31: warning[-Wanalyzer-malloc-leak]: leak of ‘group’
brltty-6.8/minimal/Programs/auth.c:393:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/auth.c:393:6: branch_true: following ‘true’ branch (when ‘group’ is non-NULL)...
brltty-6.8/minimal/Programs/auth.c:398:10: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:398:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:405:11: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:405:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:427:1: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:412:31: throw: if ‘getgrnam’ throws an exception...
brltty-6.8/minimal/Programs/auth.c:412:31: danger: ‘group’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  410|   
#  411|       {
#  412|->       const struct group *g = getgrnam(parameter);
#  413|         if (g) {
#  414|           group->id = g->gr_gid;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
brltty-6.8/minimal/Programs/auth.c:419:5: warning[-Wanalyzer-malloc-leak]: leak of ‘group’
brltty-6.8/minimal/Programs/auth.c:393:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/auth.c:393:6: branch_true: following ‘true’ branch (when ‘group’ is non-NULL)...
brltty-6.8/minimal/Programs/auth.c:398:10: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:398:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:405:11: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:405:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:427:1: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:413:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/auth.c:419:5: branch_false: ...to here
brltty-6.8/minimal/Programs/auth.c:419:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/auth.c:419:5: danger: ‘group’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  417|       }
#  418|   
#  419|->     logMessage(LOG_ERR, "unknown group: %s", parameter);
#  420|       free(group);
#  421|   #endif /* __MINGW32__ */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def441]
brltty-6.8/minimal/Programs/auth.c:675:29: warning[-Wanalyzer-malloc-leak]: leak of ‘auth’
brltty-6.8/minimal/Programs/auth.c:665:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/auth.c:665:6: branch_true: following ‘true’ branch (when ‘auth’ is non-NULL)...
brltty-6.8/minimal/Programs/auth.c:666:5: branch_true: ...to here
brltty-6.8/minimal/Programs/auth.c:675:29: throw: if ‘splitString’ throws an exception...
brltty-6.8/minimal/Programs/auth.c:675:29: danger: ‘auth’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  673|       }
#  674|   
#  675|->     if ((auth->parameters = splitString(parameter, '+', &auth->count))) {
#  676|         if (!auth->count) {
#  677|           auth->methods = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
brltty-6.8/minimal/Programs/bluetooth.c:45:3: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:522:106: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:32: call_function: calling ‘bthDiscoverSerialPortChannel’ from ‘bthOpenConnection’
#   43|     };
#   44|   
#   45|->   logMessage(LOG_CATEGORY(BLUETOOTH_IO), "discovering serial port channel");
#   46|     int discovered = bthDiscoverChannel(channel, bcx, uuid, sizeof(uuid), timeout);
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def443]
brltty-6.8/minimal/Programs/bluetooth.c:46:20: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:522:106: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:32: call_function: calling ‘bthDiscoverSerialPortChannel’ from ‘bthOpenConnection’
#   44|   
#   45|     logMessage(LOG_CATEGORY(BLUETOOTH_IO), "discovering serial port channel");
#   46|->   int discovered = bthDiscoverChannel(channel, bcx, uuid, sizeof(uuid), timeout);
#   47|   
#   48|     if (discovered) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
brltty-6.8/minimal/Programs/bluetooth.c:59:3: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:523:9: call_function: inlined call to ‘bthLogChannel’ from ‘bthOpenConnection’
#   57|   static void
#   58|   bthLogChannel (uint8_t channel) {
#   59|->   logMessage(LOG_CATEGORY(BLUETOOTH_IO), "RFCOMM channel: %u", channel);
#   60|   }
#   61|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def445]
brltty-6.8/minimal/Programs/bluetooth.c:86:10: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
#   84|     static Queue *devices = NULL;
#   85|   
#   86|->   return getProgramQueue(&devices, "bluetooth-device-queue", create,
#   87|                            bthCreateDeviceQueue, NULL);
#   88|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
brltty-6.8/minimal/Programs/bluetooth.c:103:35: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
#  101|   
#  102|     if (devices) {
#  103|->     BluetoothDeviceEntry *entry = findItem(devices, bthTestDeviceAddress, &address);
#  104|       if (entry) return entry;
#  105|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
brltty-6.8/minimal/Programs/bluetooth.c:113:13: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:530:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:534:17: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:540:9: call_function: calling ‘bthRememberConnectError’ from ‘bthOpenConnection’
#  111|           entry->paired = 0;
#  112|   
#  113|->         if (enqueueItem(devices, entry)) return entry;
#  114|           free(entry);
#  115|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
brltty-6.8/minimal/Programs/bluetooth.c:113:13: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/bluetooth.c:184:1: enter_function: entry to ‘bthRememberConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:185:33: call_function: calling ‘bthGetDeviceEntry’ from ‘bthRememberConnectError’
#  111|           entry->paired = 0;
#  112|   
#  113|->         if (enqueueItem(devices, entry)) return entry;
#  114|           free(entry);
#  115|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def449]
brltty-6.8/minimal/Programs/bluetooth.c:116:9: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:530:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:534:17: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:540:9: call_function: calling ‘bthRememberConnectError’ from ‘bthOpenConnection’
#  114|           free(entry);
#  115|         } else {
#  116|->         logMallocError();
#  117|         }
#  118|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
brltty-6.8/minimal/Programs/bluetooth.c:509:34: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:34: throw: if ‘bthNewConnectionExtension’ throws an exception...
brltty-6.8/minimal/Programs/bluetooth.c:509:34: danger: ‘connection’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  507|       connection->channel = request->channel;
#  508|   
#  509|->     if ((connection->extension = bthNewConnectionExtension(connection->address))) {
#  510|         int alreadyTried = 0;
#  511|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def451]
brltty-6.8/minimal/Programs/bluetooth.c:527:11: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:527:11: throw: if ‘startTimePeriod’ throws an exception...
brltty-6.8/minimal/Programs/bluetooth.c:527:11: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/1)
#  525|           {
#  526|             TimePeriod period;
#  527|->           startTimePeriod(&period, BLUETOOTH_CHANNEL_BUSY_RETRY_TIMEOUT);
#  528|   
#  529|             while (1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
brltty-6.8/minimal/Programs/bluetooth.c:530:17: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:530:17: throw: if ‘bthOpenChannel’ throws an exception...
brltty-6.8/minimal/Programs/bluetooth.c:530:17: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/1)
#  528|   
#  529|             while (1) {
#  530|->             if (bthOpenChannel(connection->extension, connection->channel, request->timeout)) {
#  531|                 return connection;
#  532|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
brltty-6.8/minimal/Programs/bluetooth.c:534:17: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:530:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:534:17: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:534:17: throw: if ‘afterTimePeriod’ throws an exception...
brltty-6.8/minimal/Programs/bluetooth.c:534:17: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/1)
#  532|               }
#  533|   
#  534|->             if (afterTimePeriod(&period, NULL)) break;
#  535|               if (errno != EBUSY) break;
#  536|               asyncWait(BLUETOOTH_CHANNEL_BUSY_RETRY_INTERVAL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
brltty-6.8/minimal/Programs/bluetooth.c:536:13: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:530:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:534:17: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:534:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:535:17: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:535:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:536:13: branch_false: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:536:13: throw: if ‘asyncWait’ throws an exception...
brltty-6.8/minimal/Programs/bluetooth.c:536:13: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/1)
#  534|               if (afterTimePeriod(&period, NULL)) break;
#  535|               if (errno != EBUSY) break;
#  536|->             asyncWait(BLUETOOTH_CHANNEL_BUSY_RETRY_INTERVAL);
#  537|             }
#  538|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
brltty-6.8/minimal/Programs/bluetooth.c:543:7: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/minimal/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/minimal/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/minimal/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/minimal/Programs/bluetooth.c:543:7: throw: if ‘bthReleaseConnectionExtension’ throws an exception...
brltty-6.8/minimal/Programs/bluetooth.c:543:7: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/1)
#  541|         }
#  542|   
#  543|->       bthReleaseConnectionExtension(connection->extension);
#  544|       }
#  545|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def456]
brltty-6.8/minimal/Programs/bluetooth_linux.c:220:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socketDescriptor’
brltty-6.8/minimal/Programs/bluetooth_linux.c:217:39: acquire_resource: socket created here
brltty-6.8/minimal/Programs/bluetooth_linux.c:219:6: branch_true: following ‘true’ branch (when ‘socketDescriptor != -1’)...
brltty-6.8/minimal/Programs/bluetooth_linux.c:220:5: branch_true: ...to here
brltty-6.8/minimal/Programs/bluetooth_linux.c:220:5: throw: if ‘setCloseOnExec’ throws an exception...
brltty-6.8/minimal/Programs/bluetooth_linux.c:220:5: danger: ‘socketDescriptor’ leaks here
#  218|   
#  219|     if (socketDescriptor != -1) {
#  220|->     setCloseOnExec(socketDescriptor, 1);
#  221|   
#  222|       if (setBlockingIo(socketDescriptor, 0)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
brltty-6.8/minimal/Programs/brl_base.c:391:28: warning[-Wanalyzer-malloc-leak]: leak of ‘msg’
brltty-6.8/minimal/Programs/brl_base.c:374:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/brl_base.c:377:10: branch_true: ...to here
brltty-6.8/minimal/Programs/brl_base.c:377:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/brl_base.c:383:23: branch_false: ...to here
brltty-6.8/minimal/Programs/brl_base.c:383:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/brl_base.c:383:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
brltty-6.8/minimal/Programs/brl_base.c:383:8: branch_true: ...to here
brltty-6.8/minimal/Programs/brl_base.c:391:28: throw: if ‘findElement’ throws an exception...
brltty-6.8/minimal/Programs/brl_base.c:391:28: danger: ‘msg’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  389|   
#  390|         {
#  391|->         Element *element = findElement(brl->acknowledgements.messages, findOldBrailleMessage, msg);
#  392|   
#  393|           if (element) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
brltty-6.8/minimal/Programs/brl_base.c:576:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/brl_base.c:560:6: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
brltty-6.8/minimal/Programs/brl_base.c:560:6: branch_true: ...to here
brltty-6.8/minimal/Programs/brl_base.c:566:8: branch_false: following ‘false’ branch (when ‘count > 3’)...
brltty-6.8/minimal/Programs/brl_base.c:571:31: branch_false: ...to here
brltty-6.8/minimal/Programs/brl_base.c:571:24: acquire_memory: allocated here
brltty-6.8/minimal/Programs/brl_base.c:571:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/brl_base.c:571:8: branch_true: ...to here
brltty-6.8/minimal/Programs/brl_base.c:572:24: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/minimal/Programs/brl_base.c:573:34: branch_true: ...to here
brltty-6.8/minimal/Programs/brl_base.c:576:7: throw: if ‘qsort’ throws an exception...
brltty-6.8/minimal/Programs/brl_base.c:576:7: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  574|         }
#  575|   
#  576|->       qsort(map->sorted, map->count, sizeof(*map->sorted), sortKeyNumberSets);
#  577|         return map;
#  578|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
brltty-6.8/minimal/Programs/brl_base.c:576:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/minimal/Programs/brl_base.c:560:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/brl_base.c:560:6: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
brltty-6.8/minimal/Programs/brl_base.c:560:6: branch_true: ...to here
brltty-6.8/minimal/Programs/brl_base.c:566:8: branch_false: following ‘false’ branch (when ‘count > 3’)...
brltty-6.8/minimal/Programs/brl_base.c:571:31: branch_false: ...to here
brltty-6.8/minimal/Programs/brl_base.c:571:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/brl_base.c:571:8: branch_true: ...to here
brltty-6.8/minimal/Programs/brl_base.c:572:24: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/minimal/Programs/brl_base.c:573:34: branch_true: ...to here
brltty-6.8/minimal/Programs/brl_base.c:576:7: throw: if ‘qsort’ throws an exception...
brltty-6.8/minimal/Programs/brl_base.c:576:7: danger: ‘map’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  574|         }
#  575|   
#  576|->       qsort(map->sorted, map->count, sizeof(*map->sorted), sortKeyNumberSets);
#  577|         return map;
#  578|       }

Error: CPPCHECK_WARNING (CWE-562): [#def460]
brltty-6.8/minimal/Programs/brlapi_client.c:619: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  617|       handle->altPacket = packet;
#  618|       handle->altSize = size;
#  619|->     handle->altRes = &res;
#  620|       sem_init(&sem, 0, 0);
#  621|       handle->altSem = &sem;

Error: CPPCHECK_WARNING (CWE-562): [#def461]
brltty-6.8/minimal/Programs/brlapi_client.c:621: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  619|       handle->altRes = &res;
#  620|       sem_init(&sem, 0, 0);
#  621|->     handle->altSem = &sem;
#  622|     }
#  623|     pthread_mutex_unlock(&handle->read_mutex);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
brltty-6.8/minimal/Programs/brlapi_client.c:2718:9: warning[-Wanalyzer-malloc-leak]: leak of ‘brlapi_error_location()’
brltty-6.8/minimal/Programs/brlapi_client.c:1448:24: enter_function: entry to ‘brlapi__getParameter’
brltty-6.8/minimal/Programs/brlapi_client.c:1454:5: call_function: calling ‘brlapi_error_location’ from ‘brlapi__getParameter’
brltty-6.8/minimal/Programs/brlapi_client.c:1454:5: return_function: returning to ‘brlapi__getParameter’ from ‘brlapi_error_location’
brltty-6.8/minimal/Programs/brlapi_client.c:2718:9: danger: ‘brlapi_error_location()’ leaks here; was allocated at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
# 2716|   #endif /* WINDOWS */
# 2717|       pthread_once(&error_key_once, error_key_alloc);
# 2718|->     if (pthread_error_ok) {
# 2719|         if ((errorp=(brlapi_error_t *) pthread_getspecific(error_key)))
# 2720|           /* normal case */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
brltty-6.8/minimal/Programs/brlapi_client.c:2726:18: warning[-Wanalyzer-malloc-leak]: leak of ‘errorp’
brltty-6.8/minimal/Programs/brlapi_client.c:2560:20: enter_function: entry to ‘brlapi__ignoreKeyRanges’
brltty-6.8/minimal/Programs/brlapi_client.c:2562:10: call_function: calling ‘ignore_accept_key_ranges’ from ‘brlapi__ignoreKeyRanges’
# 2724|           if ((errorp=malloc(sizeof(*errorp))) && !pthread_setspecific(error_key,errorp)) {
# 2725|   	  memset(errorp,0,sizeof(*errorp));
# 2726|->           return errorp;
# 2727|   	}
# 2728|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
brltty-6.8/minimal/Programs/brlapi_client.c:2734:1: warning[-Wanalyzer-malloc-leak]: leak of ‘errorp’
brltty-6.8/minimal/Programs/brlapi_client.c:2724:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/brlapi_client.c:2724:12: branch_true: following ‘true’ branch (when ‘errorp’ is non-NULL)...
brltty-6.8/minimal/Programs/brlapi_client.c:2724:50: branch_true: ...to here
brltty-6.8/minimal/Programs/brlapi_client.c:2724:13: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/brlapi_client.c:2724:13: branch_false: ...to here
brltty-6.8/minimal/Programs/brlapi_client.c:2734:1: danger: ‘errorp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 2732|     /* fall-back: shared errno :/ */
# 2733|     return &brlapi_error;
# 2734|-> }
# 2735|   
# 2736|   brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t new)

Error: CPPCHECK_WARNING (CWE-476): [#def465]
brltty-6.8/minimal/Programs/brlapi_common.h:606: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  604|     }
#  605|     ret=strdup(path);
#  606|->   delim=strchr(ret,'+');
#  607|     if (delim)
#  608|       *delim = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def466]
brltty-6.8/minimal/Programs/brlapi_server.c:2453: error[ctunullpointer]: Null pointer dereference: c
# 2451|     struct Subscription *s;
# 2452|   
# 2453|->   for (s=c->subscriptions.next; s!=&c->subscriptions; s=s->next) {
# 2454|       if (s->parameter == param
# 2455|   	&& s->subparam == subparam

Error: CPPCHECK_WARNING (CWE-476): [#def467]
brltty-6.8/minimal/Programs/brlapi_server.c:2602: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2600|         paramState[param].local_subscriptions++;
# 2601|       s = malloc(sizeof(*s));
# 2602|->     s->parameter = param;
# 2603|       s->subparam = subparam;
# 2604|       s->flags = flags;

Error: CPPCHECK_WARNING (CWE-476): [#def468]
brltty-6.8/minimal/Programs/brlapi_server.c:2603: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2601|       s = malloc(sizeof(*s));
# 2602|       s->parameter = param;
# 2603|->     s->subparam = subparam;
# 2604|       s->flags = flags;
# 2605|       s->next = c->subscriptions.next;

Error: CPPCHECK_WARNING (CWE-476): [#def469]
brltty-6.8/minimal/Programs/brlapi_server.c:2604: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2602|       s->parameter = param;
# 2603|       s->subparam = subparam;
# 2604|->     s->flags = flags;
# 2605|       s->next = c->subscriptions.next;
# 2606|       s->prev = &c->subscriptions;

Error: CPPCHECK_WARNING (CWE-476): [#def470]
brltty-6.8/minimal/Programs/brlapi_server.c:2605: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2603|       s->subparam = subparam;
# 2604|       s->flags = flags;
# 2605|->     s->next = c->subscriptions.next;
# 2606|       s->prev = &c->subscriptions;
# 2607|       s->next->prev = s;

Error: CPPCHECK_WARNING (CWE-476): [#def471]
brltty-6.8/minimal/Programs/brlapi_server.c:2606: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2604|       s->flags = flags;
# 2605|       s->next = c->subscriptions.next;
# 2606|->     s->prev = &c->subscriptions;
# 2607|       s->next->prev = s;
# 2608|       s->prev->next = s;

Error: CPPCHECK_WARNING (CWE-476): [#def472]
brltty-6.8/minimal/Programs/brlapi_server.c:2607: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2605|       s->next = c->subscriptions.next;
# 2606|       s->prev = &c->subscriptions;
# 2607|->     s->next->prev = s;
# 2608|       s->prev->next = s;
# 2609|       unlockMutex(&apiConnectionsMutex);

Error: CPPCHECK_WARNING (CWE-476): [#def473]
brltty-6.8/minimal/Programs/brlapi_server.c:2608: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2606|       s->prev = &c->subscriptions;
# 2607|       s->next->prev = s;
# 2608|->     s->prev->next = s;
# 2609|       unlockMutex(&apiConnectionsMutex);
# 2610|     } else if (flags & BRLAPI_PARAMF_UNSUBSCRIBE) {

Error: CPPCHECK_WARNING (CWE-401): [#def474]
brltty-6.8/minimal/Programs/brlapi_server.c:4612: error[memleakOnRealloc]: Common realloc mistake: 'coreWindowText' nulled but not freed upon failure
# 4610|     displayDimensions[1] = htonl(brl->textRows);
# 4611|     displaySize = brl->textColumns * brl->textRows;
# 4612|->   coreWindowText = realloc(coreWindowText, displaySize * sizeof(*coreWindowText));
# 4613|     coreWindowDots = realloc(coreWindowDots, displaySize * sizeof(*coreWindowDots));
# 4614|     coreWindowCursor = 0;

Error: CPPCHECK_WARNING (CWE-401): [#def475]
brltty-6.8/minimal/Programs/brlapi_server.c:4613: error[memleakOnRealloc]: Common realloc mistake: 'coreWindowDots' nulled but not freed upon failure
# 4611|     displaySize = brl->textColumns * brl->textRows;
# 4612|     coreWindowText = realloc(coreWindowText, displaySize * sizeof(*coreWindowText));
# 4613|->   coreWindowDots = realloc(coreWindowDots, displaySize * sizeof(*coreWindowDots));
# 4614|     coreWindowCursor = 0;
# 4615|     handleParamUpdate(NULL, NULL, BRLAPI_PARAM_DISPLAY_SIZE, 0, BRLAPI_PARAMF_GLOBAL, displayDimensions, sizeof(displayDimensions));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def476]
brltty-6.8/minimal/Programs/brltty-ctb.c:310:23: warning[-Wanalyzer-malloc-leak]: leak of ‘makeUtf8FromCells(__builtin_alloca_with_align((sizetype)((int)text.length << 3), 8), (long unsigned int)outputCount)’
brltty-6.8/minimal/Programs/brltty-ctb.c:362:8: enter_function: entry to ‘processContractsOperands’
brltty-6.8/minimal/Programs/brltty-ctb.c:365:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/brltty-ctb.c:368:9: branch_true: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:368:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/brltty-ctb.c:368:62: branch_true: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:382:25: call_function: calling ‘makeUtf8FromCells’ from ‘processContractsOperands’
brltty-6.8/minimal/Programs/brltty-ctb.c:382:25: return_function: returning to ‘processContractsOperands’ from ‘makeUtf8FromCells’
brltty-6.8/minimal/Programs/brltty-ctb.c:382:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/brltty-ctb.c:385:26: branch_true: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:385:26: call_function: calling ‘makeUtf8FromCells’ from ‘processContractsOperands’
brltty-6.8/minimal/Programs/brltty-ctb.c:385:26: return_function: returning to ‘processContractsOperands’ from ‘makeUtf8FromCells’
brltty-6.8/minimal/Programs/brltty-ctb.c:385:15: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/brltty-ctb.c:386:15: branch_true: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:386:15: throw: if ‘reportDataError’ throws an exception...
brltty-6.8/minimal/Programs/brltty-ctb.c:310:23: danger: ‘makeUtf8FromCells(__builtin_alloca_with_align((sizetype)((int)text.length << 3), 8), (long unsigned int)outputCount)’ leaks here; was allocated at [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18)
#  308|   static char *
#  309|   makeUtf8FromCells (unsigned char *cells, size_t count) {
#  310|->   char *text = malloc((count * UTF8_LEN_MAX) + 1);
#  311|   
#  312|     if (text) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def477]
brltty-6.8/minimal/Programs/brltty-ctb.c:318:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ch’
brltty-6.8/minimal/Programs/brltty-ctb.c:310:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/brltty-ctb.c:312:6: branch_true: following ‘true’ branch (when ‘text’ is non-NULL)...
brltty-6.8/minimal/Programs/brltty-ctb.c:312:6: branch_true: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:316:15: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/minimal/Programs/brltty-ctb.c:318:45: branch_true: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:318:21: throw: if ‘convertWcharToUtf8’ throws an exception...
brltty-6.8/minimal/Programs/brltty-ctb.c:318:21: danger: ‘ch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  316|       for (i=0; i<count; i+=1) {
#  317|         Utf8Buffer utf8;
#  318|->       size_t utfs = convertWcharToUtf8(cells[i]|UNICODE_BRAILLE_ROW, utf8);
#  319|   
#  320|         if (utfs) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def478]
brltty-6.8/minimal/Programs/brltty-ctb.c:318:21: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/minimal/Programs/brltty-ctb.c:310:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/brltty-ctb.c:312:6: branch_true: following ‘true’ branch (when ‘text’ is non-NULL)...
brltty-6.8/minimal/Programs/brltty-ctb.c:312:6: branch_true: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:316:15: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/minimal/Programs/brltty-ctb.c:318:45: branch_true: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:320:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/brltty-ctb.c:323:10: branch_false: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:316:15: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/minimal/Programs/brltty-ctb.c:318:45: branch_true: ...to here
brltty-6.8/minimal/Programs/brltty-ctb.c:318:21: throw: if ‘convertWcharToUtf8’ throws an exception...
brltty-6.8/minimal/Programs/brltty-ctb.c:318:21: danger: ‘text’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  316|       for (i=0; i<count; i+=1) {
#  317|         Utf8Buffer utf8;
#  318|->       size_t utfs = convertWcharToUtf8(cells[i]|UNICODE_BRAILLE_ROW, utf8);
#  319|   
#  320|         if (utfs) {

Error: CPPCHECK_WARNING (CWE-457): [#def479]
brltty-6.8/minimal/Programs/brltty-lscmds.c:236: warning[uninitvar]: Uninitialized variables: commands.name, commands.description, commands.code, commands.isToggle, commands.isMotion, commands.isRow, commands.isVertical, commands.isHorizontal, commands.isPanning, commands.isInput, commands.isCharacter, commands.isBraille, commands.isKeyboard, commands.isRouting, commands.isColumn, commands.isOffset, commands.isRange
#  234|       commands[index] = &commandTable[index];
#  235|     }
#  236|->   qsort(commands, count, sizeof(commands[0]), compareCommands);
#  237|   
#  238|     for (int index=0; index<count; index+=1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def480]
brltty-6.8/minimal/Programs/brltty-lsinc.c:51:10: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/minimal/Programs/brltty-lsinc.c:49:12: acquire_memory: allocated here
brltty-6.8/minimal/Programs/brltty-lsinc.c:50:8: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
brltty-6.8/minimal/Programs/brltty-lsinc.c:51:10: branch_false: ...to here
brltty-6.8/minimal/Programs/brltty-lsinc.c:51:10: throw: if ‘tsearch’ throws an exception...
brltty-6.8/minimal/Programs/brltty-lsinc.c:51:10: danger: ‘name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   49|       name = strdup(name);
#   50|       if (!name) noMemory();
#   51|->     if (!tsearch(name, &namesTree, compareStrings)) noMemory();
#   52|       printf("%s\n", name);
#   53|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def481]
brltty-6.8/minimal/Programs/brltty-lsinc.c:54:1: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/minimal/Programs/brltty-lsinc.c:49:12: acquire_memory: allocated here
brltty-6.8/minimal/Programs/brltty-lsinc.c:50:8: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
brltty-6.8/minimal/Programs/brltty-lsinc.c:51:10: branch_false: ...to here
brltty-6.8/minimal/Programs/brltty-lsinc.c:51:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/brltty-lsinc.c:52:5: branch_false: ...to here
brltty-6.8/minimal/Programs/brltty-lsinc.c:54:1: danger: ‘name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   52|       printf("%s\n", name);
#   53|     }
#   54|-> }
#   55|   
#   56|   static DATA_CONDITION_TESTER(testConditionOperand) {

Error: CPPCHECK_WARNING (CWE-457): [#def482]
brltty-6.8/minimal/Programs/brltty-ttb.c:403: warning[uninitvar]: Uninitialized variables: inputCharactersBuffer.character, inputCharactersBuffer.dots
#  401|   
#  402|     qsort(
#  403|->     inputCharactersBuffer, inputCharacterCount,
#  404|       sizeof(inputCharactersBuffer[0]),
#  405|       sortInputCharacterEntries

Error: GCC_ANALYZER_WARNING (CWE-401): [#def483]
brltty-6.8/minimal/Programs/charset.c:149:8: warning[-Wanalyzer-malloc-leak]: leak of ‘charset’
brltty-6.8/minimal/Programs/charset.c:144:19: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset.c:144:6: branch_false: following ‘false’ branch (when ‘charset’ is non-NULL)...
brltty-6.8/minimal/Programs/charset.c:149:8: branch_false: ...to here
brltty-6.8/minimal/Programs/charset.c:149:8: throw: if ‘registerCharacterSet’ throws an exception...
brltty-6.8/minimal/Programs/charset.c:149:8: danger: ‘charset’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  147|     }
#  148|   
#  149|->   if (!registerCharacterSet(charset)) {
#  150|       free(charset);
#  151|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def484]
brltty-6.8/minimal/Programs/charset.c:157:5: warning[-Wanalyzer-malloc-leak]: leak of ‘charset’
brltty-6.8/minimal/Programs/charset.c:144:19: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset.c:144:6: branch_false: following ‘false’ branch (when ‘charset’ is non-NULL)...
brltty-6.8/minimal/Programs/charset.c:149:8: branch_false: ...to here
brltty-6.8/minimal/Programs/charset.c:149:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset.c:154:7: branch_false: ...to here
brltty-6.8/minimal/Programs/charset.c:154:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset.c:157:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset.c:157:5: throw: if ‘registerProgramMemory’ throws an exception...
brltty-6.8/minimal/Programs/charset.c:157:5: danger: ‘charset’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  155|       free(currentCharset);
#  156|     } else {
#  157|->     registerProgramMemory("current-charset", &currentCharset);
#  158|     }
#  159|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def485]
brltty-6.8/minimal/Programs/charset_iconv.c:121:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:9: danger: out-of-bounds write from byte 88 till byte 95 but ‘convTable’ ends at byte 64
#  119|   
#  120|     while (conv < convEnd) {
#  121|->     if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|         logSystemError("iconv_open");
#  123|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def486]
brltty-6.8/minimal/Programs/charset_iconv.c:121:39: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:39: danger: out-of-bounds read from byte 80 till byte 87 but ‘convTable’ ends at byte 64
#  119|   
#  120|     while (conv < convEnd) {
#  121|->     if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|         logSystemError("iconv_open");
#  123|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def487]
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(*conv.toCharset, *conv.fromCharset)’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: throw: if ‘iconv_open’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: danger: ‘iconv_open(*conv.toCharset, *conv.fromCharset)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  119|   
#  120|     while (conv < convEnd) {
#  121|->     if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|         logSystemError("iconv_open");
#  123|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def488]
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: danger: out-of-bounds read from byte 72 till byte 79 but ‘convTable’ ends at byte 64
#  119|   
#  120|     while (conv < convEnd) {
#  121|->     if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|         logSystemError("iconv_open");
#  123|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def489]
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[0].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: danger: ‘convTable[0].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  120|     while (conv < convEnd) {
#  121|       if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|->       logSystemError("iconv_open");
#  123|   
#  124|         while (conv > convTable) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def490]
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  120|     while (conv < convEnd) {
#  121|       if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|->       logSystemError("iconv_open");
#  123|   
#  124|         while (conv > convTable) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def491]
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[2].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: danger: ‘convTable[2].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  120|     while (conv < convEnd) {
#  121|       if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|->       logSystemError("iconv_open");
#  123|   
#  124|         while (conv > convTable) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def492]
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[3].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: danger: ‘convTable[3].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  120|     while (conv < convEnd) {
#  121|       if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|->       logSystemError("iconv_open");
#  123|   
#  124|         while (conv > convTable) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def493]
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:124:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:125:9: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  124|         while (conv > convTable) {
#  125|           conv -= 1;
#  126|->         iconv_close(conv->newHandle);
#  127|         }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def494]
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[2].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:124:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:125:9: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: danger: ‘convTable[2].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  124|         while (conv > convTable) {
#  125|           conv -= 1;
#  126|->         iconv_close(conv->newHandle);
#  127|         }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def495]
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[3].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:124:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:125:9: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: danger: ‘convTable[3].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  124|         while (conv > convTable) {
#  125|           conv -= 1;
#  126|->         iconv_close(conv->newHandle);
#  127|         }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def496]
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:124:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:125:9: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:126:9: danger: out-of-bounds read from byte 88 till byte 95 but ‘convTable’ ends at byte 64
#  124|         while (conv > convTable) {
#  125|           conv -= 1;
#  126|->         iconv_close(conv->newHandle);
#  127|         }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def497]
brltty-6.8/minimal/Programs/charset_iconv.c:129:14: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[0].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:124:14: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:129:14: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:129:14: danger: ‘convTable[0].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  127|         }
#  128|   
#  129|->       return 0;
#  130|       }
#  131|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def498]
brltty-6.8/minimal/Programs/charset_iconv.c:129:14: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:129:14: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  127|         }
#  128|   
#  129|->       return 0;
#  130|       }
#  131|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def499]
brltty-6.8/minimal/Programs/charset_iconv.c:138:10: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:138:10: danger: out-of-bounds read from byte 64 till byte 71 but ‘convTable’ ends at byte 64
#  136|       conv -= 1;
#  137|   
#  138|->     if (*conv->handle == CHARSET_ICONV_NULL) {
#  139|         firstTime = 1;
#  140|       } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def500]
brltty-6.8/minimal/Programs/charset_iconv.c:141:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:138:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:141:7: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:141:7: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:141:7: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  139|         firstTime = 1;
#  140|       } else {
#  141|->       iconv_close(*conv->handle);
#  142|       }
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def501]
brltty-6.8/minimal/Programs/charset_iconv.c:141:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[firstTime].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:138:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:141:7: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:141:7: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:141:7: danger: ‘convTable[firstTime].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  139|         firstTime = 1;
#  140|       } else {
#  141|->       iconv_close(*conv->handle);
#  142|       }
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def502]
brltty-6.8/minimal/Programs/charset_iconv.c:144:21: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:138:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:144:21: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:144:21: danger: out-of-bounds read from byte 88 till byte 95 but ‘convTable’ ends at byte 64
#  142|       }
#  143|   
#  144|->     *conv->handle = conv->newHandle;
#  145|     }
#  146|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def503]
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[0].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:138:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:144:21: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:147:6: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:147:6: branch_true: following ‘true’ branch (when ‘firstTime != 0’)...
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: throw: if ‘onProgramExit’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: danger: ‘convTable[0].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  145|     }
#  146|   
#  147|->   if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def504]
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:138:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:144:21: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:147:6: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:147:6: branch_true: following ‘true’ branch (when ‘firstTime != 0’)...
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: throw: if ‘onProgramExit’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
#  145|     }
#  146|   
#  147|->   if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def505]
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[2].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:138:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:144:21: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:135:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:147:6: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:147:6: branch_true: following ‘true’ branch (when ‘firstTime != 0’)...
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: throw: if ‘onProgramExit’ throws an exception...
brltty-6.8/minimal/Programs/charset_iconv.c:147:18: danger: ‘convTable[2].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
#  145|     }
#  146|   
#  147|->   if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def506]
brltty-6.8/minimal/Programs/charset_iconv.c:149:1: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[2].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:149:1: danger: ‘convTable[2].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/2)
#  147|     if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|-> }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def507]
brltty-6.8/minimal/Programs/charset_iconv.c:149:1: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[3].newHandle’
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/minimal/Programs/charset_iconv.c:149:1: danger: ‘convTable[3].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
#  147|     if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|-> }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def508]
brltty-6.8/minimal/Programs/clipboard.c:81:32: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/clipboard.c:80:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/clipboard.c:80:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/clipboard.c:81:32: branch_true: ...to here
brltty-6.8/minimal/Programs/clipboard.c:81:32: throw: if ‘allocateCharacters’ throws an exception...
brltty-6.8/minimal/Programs/clipboard.c:81:32: danger: ‘entry’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   79|   
#   80|       if ((entry = malloc(sizeof(*entry)))) {
#   81|->       if ((entry->characters = allocateCharacters(length))) {
#   82|           wmemcpy(entry->characters, characters, length);
#   83|           entry->length = length;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def509]
brltty-6.8/minimal/Programs/clipboard.c:85:13: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/clipboard.c:80:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/clipboard.c:80:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/clipboard.c:81:32: branch_true: ...to here
brltty-6.8/minimal/Programs/clipboard.c:81:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/clipboard.c:82:9: branch_true: ...to here
brltty-6.8/minimal/Programs/clipboard.c:85:13: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/minimal/Programs/clipboard.c:85:13: danger: ‘entry’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   83|           entry->length = length;
#   84|   
#   85|->         if (enqueueItem(queue, entry)) {
#   86|             return 1;
#   87|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def510]
brltty-6.8/minimal/Programs/clipboard.c:91:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/clipboard.c:80:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/clipboard.c:80:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/clipboard.c:81:32: branch_true: ...to here
brltty-6.8/minimal/Programs/clipboard.c:81:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/clipboard.c:91:9: branch_false: ...to here
brltty-6.8/minimal/Programs/clipboard.c:91:9: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/clipboard.c:91:9: danger: ‘entry’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   89|           free(entry->characters);
#   90|         } else {
#   91|->         logMallocError();
#   92|         }
#   93|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def511]
brltty-6.8/minimal/Programs/clipboard.c:256:31: warning[-Wanalyzer-malloc-leak]: leak of ‘cpb’
brltty-6.8/minimal/Programs/clipboard.c:249:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/clipboard.c:249:6: branch_true: following ‘true’ branch (when ‘cpb’ is non-NULL)...
brltty-6.8/minimal/Programs/clipboard.c:250:5: branch_true: ...to here
brltty-6.8/minimal/Programs/clipboard.c:256:31: throw: if ‘newQueue’ throws an exception...
brltty-6.8/minimal/Programs/clipboard.c:256:31: danger: ‘cpb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  254|       cpb->buffer.length = 0;
#  255|   
#  256|->     if ((cpb->history.queue = newQueue(deallocateClipboardHistoryEntry, NULL))) {
#  257|         return cpb;
#  258|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def512]
brltty-6.8/minimal/Programs/clipboard.c:264:1: warning[-Wanalyzer-malloc-leak]: leak of ‘cpb’
brltty-6.8/minimal/Programs/clipboard.c:249:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/clipboard.c:249:6: branch_true: following ‘true’ branch (when ‘cpb’ is non-NULL)...
brltty-6.8/minimal/Programs/clipboard.c:250:5: branch_true: ...to here
brltty-6.8/minimal/Programs/clipboard.c:256:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/clipboard.c:256:8: branch_false: ...to here
brltty-6.8/minimal/Programs/clipboard.c:264:1: danger: ‘cpb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  262|   
#  263|     return NULL;
#  264|-> }
#  265|   
#  266|   void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def513]
brltty-6.8/minimal/Programs/clipboard.c:282:1: warning[-Wanalyzer-malloc-leak]: leak of ‘cpb’
brltty-6.8/minimal/Programs/clipboard.c:300:1: enter_function: entry to ‘getMainClipboard’
brltty-6.8/minimal/Programs/clipboard.c:304:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/clipboard.c:305:24: branch_true: ...to here
brltty-6.8/minimal/Programs/clipboard.c:305:24: call_function: calling ‘newClipboard’ from ‘getMainClipboard’
#  280|   lockMainClipboard (void) {
#  281|     obtainExclusiveLock(getMainClipboardLock());
#  282|-> }
#  283|   
#  284|   void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def514]
brltty-6.8/minimal/Programs/cmd_clipboard.c:713:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ccd’
brltty-6.8/minimal/Programs/cmd_clipboard.c:711:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmd_clipboard.c:711:6: branch_true: following ‘true’ branch (when ‘ccd’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_clipboard.c:712:5: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_clipboard.c:713:22: throw: if ‘getMainClipboard’ throws an exception...
brltty-6.8/minimal/Programs/cmd_clipboard.c:713:22: danger: ‘ccd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  711|     if ((ccd = malloc(sizeof(*ccd)))) {
#  712|       memset(ccd, 0, sizeof(*ccd));
#  713|->     ccd->clipboard = getMainClipboard();
#  714|   
#  715|       ccd->begin.column = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def515]
brltty-6.8/minimal/Programs/cmd_clipboard.c:719:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ccd’
brltty-6.8/minimal/Programs/cmd_clipboard.c:711:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmd_clipboard.c:711:6: branch_true: following ‘true’ branch (when ‘ccd’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_clipboard.c:712:5: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_clipboard.c:719:9: throw: if ‘pushCommandHandler’ throws an exception...
brltty-6.8/minimal/Programs/cmd_clipboard.c:719:9: danger: ‘ccd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  717|       ccd->begin.offset = 0;
#  718|   
#  719|->     if (pushCommandHandler("clipboard", KTB_CTX_DEFAULT,
#  720|                              handleClipboardCommands, destroyClipboardCommandData, ccd)) {
#  721|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
brltty-6.8/minimal/Programs/cmd_input.c:428:31: warning[-Wanalyzer-malloc-leak]: leak of ‘icd’
brltty-6.8/minimal/Programs/cmd_input.c:423:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmd_input.c:423:6: branch_true: following ‘true’ branch (when ‘icd’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_input.c:424:5: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_input.c:428:31: throw: if ‘registerReportListener’ throws an exception...
brltty-6.8/minimal/Programs/cmd_input.c:428:31: danger: ‘icd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  426|       initializeModifierFlags(icd);
#  427|   
#  428|->     if ((icd->resetListener = registerReportListener(REPORT_BRAILLE_DEVICE_ONLINE, inputCommandDataResetListener, icd))) {
#  429|         if (pushCommandHandler("input", KTB_CTX_DEFAULT,
#  430|                                handleInputCommands, destroyInputCommandData, icd)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def517]
brltty-6.8/minimal/Programs/cmd_keycodes.c:799:31: warning[-Wanalyzer-malloc-leak]: leak of ‘kcd’
brltty-6.8/minimal/Programs/cmd_keycodes.c:795:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmd_keycodes.c:795:6: branch_true: following ‘true’ branch (when ‘kcd’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_keycodes.c:796:5: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_keycodes.c:799:31: throw: if ‘registerReportListener’ throws an exception...
brltty-6.8/minimal/Programs/cmd_keycodes.c:799:31: danger: ‘kcd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  797|       resetKeycodeCommandData(kcd);
#  798|   
#  799|->     if ((kcd->resetListener = registerReportListener(REPORT_BRAILLE_DEVICE_ONLINE, keycodeCommandDataResetListener, kcd))) {
#  800|         if (pushCommandHandler("keycodes", KTB_CTX_DEFAULT,
#  801|                                handleKeycodeCommands, destroyKeycodeCommandData, kcd)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def518]
brltty-6.8/minimal/Programs/cmd_learn.c:58:13: warning[-Wanalyzer-malloc-leak]: leak of ‘lmp’
brltty-6.8/minimal/Programs/cmd_learn.c:54:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmd_learn.c:54:10: branch_true: following ‘true’ branch (when ‘lmp’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_learn.c:56:9: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_learn.c:58:13: throw: if ‘asyncAddTask’ throws an exception...
brltty-6.8/minimal/Programs/cmd_learn.c:58:13: danger: ‘lmp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   56|           lmp->timeout = LEARN_MODE_TIMEOUT;
#   57|   
#   58|->         if (asyncAddTask(NULL, presentLearnMode, lmp)) break;
#   59|           free(lmp);
#   60|         } else {

Error: CPPCHECK_WARNING (CWE-457): [#def519]
brltty-6.8/minimal/Programs/cmd_navigation.c:233: warning[uninitvar]: Uninitialized variable: text
#  231|     }
#  232|   
#  233|->   return !!rgxMatchTextCharacters(promptPatterns, text, length, NULL, NULL);
#  234|   }
#  235|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def520]
brltty-6.8/minimal/Programs/cmd_override.c:194:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ocd’
brltty-6.8/minimal/Programs/cmd_override.c:189:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmd_override.c:189:6: branch_true: following ‘true’ branch (when ‘ocd’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_override.c:190:5: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_override.c:194:9: throw: if ‘pushCommandHandler’ throws an exception...
brltty-6.8/minimal/Programs/cmd_override.c:194:9: danger: ‘ocd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  192|       ocd->selection.started = 0;
#  193|   
#  194|->     if (pushCommandHandler("override", KTB_CTX_DEFAULT,
#  195|                              handleOverrideCommands, destroyOverrideCommandData, ocd)) {
#  196|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def521]
brltty-6.8/minimal/Programs/cmd_preferences.c:180:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pcd’
brltty-6.8/minimal/Programs/cmd_preferences.c:177:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmd_preferences.c:177:6: branch_true: following ‘true’ branch (when ‘pcd’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_preferences.c:178:5: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_preferences.c:180:9: throw: if ‘pushCommandHandler’ throws an exception...
brltty-6.8/minimal/Programs/cmd_preferences.c:180:9: danger: ‘pcd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  178|       memset(pcd, 0, sizeof(*pcd));
#  179|   
#  180|->     if (pushCommandHandler("preferences", KTB_CTX_DEFAULT,
#  181|                              handlePreferencesCommands, destroyPreferencesCommandData, pcd)) {
#  182|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def522]
brltty-6.8/minimal/Programs/cmd_queue.c:271:13: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
brltty-6.8/minimal/Programs/cmd_queue.c:260:6: branch_false: following ‘false’ branch (when ‘command != -1’)...
brltty-6.8/minimal/Programs/cmd_queue.c:263:20: branch_false: ...to here
brltty-6.8/minimal/Programs/cmd_queue.c:265:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/cmd_queue.c:266:32: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_queue.c:266:32: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmd_queue.c:268:10: branch_true: following ‘true’ branch (when ‘item’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_queue.c:269:9: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_queue.c:271:13: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/minimal/Programs/cmd_queue.c:271:13: danger: ‘item’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  269|           item->command = command;
#  270|   
#  271|->         if (enqueueItem(queue, item)) {
#  272|             setCommandAlarm(NULL);
#  273|             return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def523]
brltty-6.8/minimal/Programs/cmd_queue.c:307:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/minimal/Programs/cmd_queue.c:287:1: enter_function: entry to ‘pushCommandHandler’
brltty-6.8/minimal/Programs/cmd_queue.c:296:6: branch_true: following ‘true’ branch (when ‘chl’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_queue.c:297:5: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_queue.c:305:35: call_function: inlined call to ‘getCommandHandlerTop’ from ‘pushCommandHandler’
brltty-6.8/minimal/Programs/cmd_queue.c:307:28: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_queue.c:307:28: danger: dereference of NULL ‘<unknown>’
#  305|         CommandHandlerLevel **top = getCommandHandlerTop();
#  306|   
#  307|->       chl->previousLevel = *top;
#  308|         *top = chl;
#  309|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def524]
brltty-6.8/minimal/Programs/cmd_queue.c:323:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/minimal/Programs/cmd_queue.c:321:1: enter_function: entry to ‘popCommandHandler’
brltty-6.8/minimal/Programs/cmd_queue.c:322:31: call_function: inlined call to ‘getCommandHandlerTop’ from ‘popCommandHandler’
brltty-6.8/minimal/Programs/cmd_queue.c:323:24: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_queue.c:323:24: danger: dereference of NULL ‘<unknown>’
#  321|   popCommandHandler (void) {
#  322|     CommandHandlerLevel **top = getCommandHandlerTop();
#  323|->   CommandHandlerLevel *chl = *top;
#  324|   
#  325|     if (!chl) return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def525]
brltty-6.8/minimal/Programs/cmd_touch.c:116:54: warning[-Wanalyzer-malloc-leak]: leak of ‘tcd’
brltty-6.8/minimal/Programs/cmd_touch.c:113:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmd_touch.c:113:6: branch_true: following ‘true’ branch (when ‘tcd’ is non-NULL)...
brltty-6.8/minimal/Programs/cmd_touch.c:114:5: branch_true: ...to here
brltty-6.8/minimal/Programs/cmd_touch.c:116:54: throw: if ‘registerReportListener’ throws an exception...
brltty-6.8/minimal/Programs/cmd_touch.c:116:54: danger: ‘tcd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  114|       memset(tcd, 0, sizeof(*tcd));
#  115|   
#  116|->     if ((tcd->reportListeners.brailleWindowUpdated = registerReportListener(REPORT_BRAILLE_WINDOW_UPDATED, brailleWindowUpdatedListener, tcd))) {
#  117|         return tcd;
#  118|       }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def526]
brltty-6.8/minimal/Programs/cmdline.c:451:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*indexToLetter[index]’
brltty-6.8/minimal/Programs/cmdline.c:413:32: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/cmdline.c:438:5: branch_false: ...to here
brltty-6.8/minimal/Programs/cmdline.c:447:32: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/cmdline.c:448:42: branch_true: ...to here
brltty-6.8/minimal/Programs/cmdline.c:450:10: branch_false: following ‘false’ branch (when ‘word’ is non-NULL)...
brltty-6.8/minimal/Programs/cmdline.c:451:11: branch_false: ...to here
brltty-6.8/minimal/Programs/cmdline.c:451:11: danger: use of uninitialized value ‘*indexToLetter[index]’ here
#  449|         const char *word = option->word;
#  450|         if (!word) continue;
#  451|->       int letter = indexToLetter[index];
#  452|   
#  453|         opt->name = word;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def527]
brltty-6.8/minimal/Programs/cmdline.c:877:17: warning[-Wanalyzer-malloc-leak]: leak of ‘newSetting’
brltty-6.8/minimal/Programs/cmdline.c:865:36: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/cmdline.c:866:40: branch_true: ...to here
brltty-6.8/minimal/Programs/cmdline.c:868:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/cmdline.c:869:19: branch_true: ...to here
brltty-6.8/minimal/Programs/cmdline.c:874:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/cmdline.c:875:13: branch_true: ...to here
brltty-6.8/minimal/Programs/cmdline.c:875:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/cmdline.c:876:29: branch_true: ...to here
brltty-6.8/minimal/Programs/cmdline.c:876:29: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmdline.c:876:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/cmdline.c:877:17: branch_true: ...to here
brltty-6.8/minimal/Programs/cmdline.c:877:17: throw: if the called function throws an exception...
brltty-6.8/minimal/Programs/cmdline.c:877:17: danger: ‘newSetting’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  875|           if (*setting) {
#  876|             if ((newSetting = strdup(setting))) {
#  877|->             if (option->internal.adjust(&newSetting)) {
#  878|                 setting = newSetting;
#  879|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
brltty-6.8/minimal/Programs/cmdline.c:1068:9: warning[-Wanalyzer-malloc-leak]: leak of ‘directive’
brltty-6.8/minimal/Programs/cmdline.c:1048:36: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/cmdline.c:1049:40: branch_true: ...to here
brltty-6.8/minimal/Programs/cmdline.c:1051:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/cmdline.c:1057:25: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmdline.c:1057:10: branch_false: following ‘false’ branch (when ‘directive’ is non-NULL)...
brltty-6.8/minimal/Programs/cmdline.c:1063:7: branch_false: ...to here
brltty-6.8/minimal/Programs/cmdline.c:1068:9: throw: if ‘convertUtf8ToWchars’ throws an exception...
brltty-6.8/minimal/Programs/cmdline.c:1068:9: danger: ‘directive’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1066|           const char *utf8 = keyword;
# 1067|           wchar_t *wc = directive->keyword;
# 1068|->         convertUtf8ToWchars(&utf8, &wc, length+1);
# 1069|         }
# 1070|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def529]
brltty-6.8/minimal/Programs/cmdline.c:1234:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
brltty-6.8/minimal/Programs/cmdline.c:1257:1: enter_function: entry to ‘processInputFile’
brltty-6.8/minimal/Programs/cmdline.c:1258:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
brltty-6.8/minimal/Programs/cmdline.c:1263:20: branch_false: ...to here
brltty-6.8/minimal/Programs/cmdline.c:1263:20: acquire_resource: opened here
brltty-6.8/minimal/Programs/cmdline.c:1265:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/cmdline.c:1270:32: branch_false: ...to here
brltty-6.8/minimal/Programs/cmdline.c:1270:32: call_function: calling ‘processInputStream’ from ‘processInputFile’
# 1232|     int ok = 0;
# 1233|   
# 1234|->   if (parameters->beginStream) {
# 1235|       parameters->beginStream(name, parameters->dataFileParameters.data);
# 1236|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
brltty-6.8/minimal/Programs/cmdline.c:1234:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
brltty-6.8/minimal/Programs/cmdline.c:1257:1: enter_function: entry to ‘processInputFile’
brltty-6.8/minimal/Programs/cmdline.c:1258:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
brltty-6.8/minimal/Programs/cmdline.c:1263:20: branch_false: ...to here
brltty-6.8/minimal/Programs/cmdline.c:1263:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/cmdline.c:1265:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/cmdline.c:1270:32: branch_false: ...to here
brltty-6.8/minimal/Programs/cmdline.c:1270:32: call_function: calling ‘processInputStream’ from ‘processInputFile’
# 1232|     int ok = 0;
# 1233|   
# 1234|->   if (parameters->beginStream) {
# 1235|       parameters->beginStream(name, parameters->dataFileParameters.data);
# 1236|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def531]
brltty-6.8/minimal/Programs/config.c:2806:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/minimal/Programs/config.c:2910:1: enter_function: entry to ‘background’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/minimal/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2934:12: call_function: inlined call to ‘makePidFile’ from ‘background’
# 2804|   static int
# 2805|   makePidFile (ProcessIdentifier pid) {
# 2806|->   return createPidFile(opt_pidFile, pid);
# 2807|   }
# 2808|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def532]
brltty-6.8/minimal/Programs/config.c:2918:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2918:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2918:3: danger: ‘fds[0]’ leaks here
# 2916|     }
# 2917|   
# 2918|->   fflush(stdout);
# 2919|     fflush(stderr);
# 2920|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def533]
brltty-6.8/minimal/Programs/config.c:2918:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2918:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2918:3: danger: ‘fds[1]’ leaks here
# 2916|     }
# 2917|   
# 2918|->   fflush(stdout);
# 2919|     fflush(stderr);
# 2920|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def534]
brltty-6.8/minimal/Programs/config.c:2919:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2919:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2919:3: danger: ‘fds[0]’ leaks here
# 2917|   
# 2918|     fflush(stdout);
# 2919|->   fflush(stderr);
# 2920|   
# 2921|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def535]
brltty-6.8/minimal/Programs/config.c:2919:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2919:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2919:3: danger: ‘fds[1]’ leaks here
# 2917|   
# 2918|     fflush(stdout);
# 2919|->   fflush(stderr);
# 2920|   
# 2921|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def536]
brltty-6.8/minimal/Programs/config.c:2925:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_true: following ‘true’ branch (when ‘child == -1’)...
brltty-6.8/minimal/Programs/config.c:2925:7: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2925:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2925:7: danger: ‘fds[0]’ leaks here
# 2923|   
# 2924|       if (child == -1) {
# 2925|->       logSystemError("fork");
# 2926|         exit(PROG_EXIT_FATAL);
# 2927|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def537]
brltty-6.8/minimal/Programs/config.c:2925:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_true: following ‘true’ branch (when ‘child == -1’)...
brltty-6.8/minimal/Programs/config.c:2925:7: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2925:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2925:7: danger: ‘fds[1]’ leaks here
# 2923|   
# 2924|       if (child == -1) {
# 2925|->       logSystemError("fork");
# 2926|         exit(PROG_EXIT_FATAL);
# 2927|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def538]
brltty-6.8/minimal/Programs/config.c:2932:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/minimal/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2932:11: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2932:11: danger: ‘fds[0]’ leaks here
# 2930|         ProgramExitStatus exitStatus = PROG_EXIT_SUCCESS;
# 2931|   
# 2932|->       if (close(fds[0]) == -1) logSystemError("close");
# 2933|   
# 2934|         if (!makePidFile(child)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def539]
brltty-6.8/minimal/Programs/config.c:2932:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/minimal/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2932:11: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2932:11: danger: ‘fds[1]’ leaks here
# 2930|         ProgramExitStatus exitStatus = PROG_EXIT_SUCCESS;
# 2931|   
# 2932|->       if (close(fds[0]) == -1) logSystemError("close");
# 2933|   
# 2934|         if (!makePidFile(child)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def540]
brltty-6.8/minimal/Programs/config.c:2932:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/minimal/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2932:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/config.c:2932:32: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2932:32: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2932:32: danger: ‘fds[1]’ leaks here
# 2930|         ProgramExitStatus exitStatus = PROG_EXIT_SUCCESS;
# 2931|   
# 2932|->       if (close(fds[0]) == -1) logSystemError("close");
# 2933|   
# 2934|         if (!makePidFile(child)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def541]
brltty-6.8/minimal/Programs/config.c:2940:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/minimal/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2940:11: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2940:11: danger: ‘fds[1]’ leaks here
# 2938|         }
# 2939|   
# 2940|->       if (close(fds[1]) == -1) logSystemError("close");
# 2941|         _exit(exitStatus);
# 2942|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def542]
brltty-6.8/minimal/Programs/config.c:2945:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/minimal/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2945:7: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2945:7: danger: ‘fds[0]’ leaks here
# 2943|     }
# 2944|   
# 2945|->   if (close(fds[1]) == -1) logSystemError("close");
# 2946|   
# 2947|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def543]
brltty-6.8/minimal/Programs/config.c:2945:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/minimal/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2945:7: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2945:7: danger: ‘fds[1]’ leaks here
# 2943|     }
# 2944|   
# 2945|->   if (close(fds[1]) == -1) logSystemError("close");
# 2946|   
# 2947|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def544]
brltty-6.8/minimal/Programs/config.c:2945:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/minimal/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2945:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/config.c:2945:28: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2945:28: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2945:28: danger: ‘fds[0]’ leaks here
# 2943|     }
# 2944|   
# 2945|->   if (close(fds[1]) == -1) logSystemError("close");
# 2946|   
# 2947|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def545]
brltty-6.8/minimal/Programs/config.c:2950:53: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/minimal/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2950:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/config.c:2950:53: branch_true: ...to here
brltty-6.8/minimal/Programs/config.c:2950:53: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2950:53: danger: ‘fds[0]’ leaks here
# 2948|       unsigned char buffer[1];
# 2949|   
# 2950|->     if (read(fds[0], buffer, sizeof(buffer)) == -1) logSystemError("read");
# 2951|       if (close(fds[0]) == -1) logSystemError("close");
# 2952|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def546]
brltty-6.8/minimal/Programs/config.c:2951:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/minimal/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/minimal/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/minimal/Programs/config.c:2951:9: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Programs/config.c:2951:9: danger: ‘fds[0]’ leaks here
# 2949|   
# 2950|       if (read(fds[0], buffer, sizeof(buffer)) == -1) logSystemError("read");
# 2951|->     if (close(fds[0]) == -1) logSystemError("close");
# 2952|     }
# 2953|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def547]
brltty-6.8/minimal/Programs/core.c:190:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pre’
brltty-6.8/minimal/Programs/core.c:181:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/core.c:181:6: branch_true: following ‘true’ branch (when ‘pre’ is non-NULL)...
brltty-6.8/minimal/Programs/core.c:184:28: branch_true: ...to here
brltty-6.8/minimal/Programs/core.c:190:5: throw: if ‘suspendUpdates’ throws an exception...
brltty-6.8/minimal/Programs/core.c:190:5: danger: ‘pre’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  188|       pre->speechRow = ses->spky;
#  189|   
#  190|->     suspendUpdates();
#  191|       return pre;
#  192|     } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def548]
brltty-6.8/minimal/Programs/core.c:1279:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iep’
brltty-6.8/minimal/Programs/core.c:1272:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/core.c:1275:16: branch_true: ...to here
brltty-6.8/minimal/Programs/core.c:1275:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/core.c:1275:8: branch_true: following ‘true’ branch (when ‘iep’ is non-NULL)...
brltty-6.8/minimal/Programs/core.c:1277:7: branch_true: ...to here
brltty-6.8/minimal/Programs/core.c:1279:11: throw: if ‘asyncSignalEvent’ throws an exception...
brltty-6.8/minimal/Programs/core.c:1279:11: danger: ‘iep’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1277|         iep->waitResult = waitResult;
# 1278|   
# 1279|->       if (asyncSignalEvent(interruptEvent, iep)) {
# 1280|           return 1;
# 1281|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def549]
brltty-6.8/minimal/Programs/core.c:1470:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ctd’
brltty-6.8/minimal/Programs/core.c:1512:1: enter_function: entry to ‘runCoreTask’
brltty-6.8/minimal/Programs/core.c:1515:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/core.c:1518:16: branch_true: ...to here
brltty-6.8/minimal/Programs/core.c:1518:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/core.c:1518:8: branch_true: following ‘true’ branch (when ‘ctd’ is non-NULL)...
brltty-6.8/minimal/Programs/core.c:1518:8: branch_true: ...to here
brltty-6.8/minimal/Programs/core.c:1527:10: branch_true: following ‘true’ branch (when ‘wait == 0’)...
brltty-6.8/minimal/Programs/core.c:1528:9: call_function: inlined call to ‘logCoreTaskAction’ from ‘runCoreTask’
# 1468|   static void
# 1469|   logCoreTaskAction (CoreTaskCallback *callback, const char *action) {
# 1470|->   logSymbol(LOG_DEBUG, callback, "%s core task", action);
# 1471|   }
# 1472|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def550]
brltty-6.8/minimal/Programs/core.c:1527:39: warning[-Wanalyzer-malloc-leak]: leak of ‘ctd’
brltty-6.8/minimal/Programs/core.c:1515:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/core.c:1518:16: branch_true: ...to here
brltty-6.8/minimal/Programs/core.c:1518:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/core.c:1518:8: branch_true: following ‘true’ branch (when ‘ctd’ is non-NULL)...
brltty-6.8/minimal/Programs/core.c:1518:8: branch_true: ...to here
brltty-6.8/minimal/Programs/core.c:1527:10: branch_false: following ‘false’ branch (when ‘wait != 0’)...
brltty-6.8/minimal/Programs/core.c:1527:39: branch_false: ...to here
brltty-6.8/minimal/Programs/core.c:1527:39: throw: if ‘asyncNewEvent’ throws an exception...
brltty-6.8/minimal/Programs/core.c:1527:39: danger: ‘ctd’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1525|         ctd->wait.finished = 0;
# 1526|   
# 1527|->       if (!wait || (ctd->wait.event = asyncNewEvent(setCoreTaskFinished, NULL))) {
# 1528|           logCoreTaskAction(callback, "scheduling");
# 1529|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def551]
brltty-6.8/minimal/Programs/core.c:1530:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ctd’
brltty-6.8/minimal/Programs/core.c:1512:1: enter_function: entry to ‘runCoreTask’
brltty-6.8/minimal/Programs/core.c:1515:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/core.c:1518:16: branch_true: ...to here
brltty-6.8/minimal/Programs/core.c:1518:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/core.c:1518:8: branch_true: following ‘true’ branch (when ‘ctd’ is non-NULL)...
brltty-6.8/minimal/Programs/core.c:1518:8: branch_true: ...to here
brltty-6.8/minimal/Programs/core.c:1527:10: branch_true: following ‘true’ branch (when ‘wait == 0’)...
brltty-6.8/minimal/Programs/core.c:1528:9: call_function: inlined call to ‘logCoreTaskAction’ from ‘runCoreTask’
brltty-6.8/minimal/Programs/core.c:1530:13: throw: if ‘asyncAddTask’ throws an exception...
brltty-6.8/minimal/Programs/core.c:1530:13: danger: ‘ctd’ leaks here; was allocated at [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3)
# 1528|           logCoreTaskAction(callback, "scheduling");
# 1529|   
# 1530|->         if (asyncAddTask(addCoreTaskEvent, handleCoreTask, ctd)) {
# 1531|             wasScheduled = 1;
# 1532|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def552]
brltty-6.8/minimal/Programs/ctb_compile.c:750:33: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ctb_compile.c:748:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ctb_compile.c:748:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ctb_compile.c:749:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:750:33: throw: if ‘getContractionTableTranslationMethods_native’ throws an exception...
brltty-6.8/minimal/Programs/ctb_compile.c:750:33: danger: ‘table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  748|     if ((table = malloc(sizeof(*table)))) {
#  749|       table->managementMethods = &nativeManagementMethods;
#  750|->     table->translationMethods = getContractionTableTranslationMethods_native();
#  751|       initializeCommonFields(table);
#  752|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def553]
brltty-6.8/minimal/Programs/ctb_compile.c:822:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/ctb_compile.c:863:1: enter_function: entry to ‘compileContractionTable_external’
brltty-6.8/minimal/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:869:41: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:879:11: call_function: calling ‘startContractionCommand’ from ‘compileContractionTable_external’
#  820|       HostCommandOptions options;
#  821|   
#  822|->     initializeHostCommandOptions(&options);
#  823|       options.asynchronous = 1;
#  824|       options.standardInput = &table->data.external.standardInput;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def554]
brltty-6.8/minimal/Programs/ctb_compile.c:822:5: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ctb_compile.c:863:1: enter_function: entry to ‘compileContractionTable_external’
brltty-6.8/minimal/Programs/ctb_compile.c:866:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:879:11: call_function: calling ‘startContractionCommand’ from ‘compileContractionTable_external’
#  820|       HostCommandOptions options;
#  821|   
#  822|->     initializeHostCommandOptions(&options);
#  823|       options.asynchronous = 1;
#  824|       options.standardInput = &table->data.external.standardInput;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def555]
brltty-6.8/minimal/Programs/ctb_compile.c:827:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/ctb_compile.c:863:1: enter_function: entry to ‘compileContractionTable_external’
brltty-6.8/minimal/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:869:41: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:879:11: call_function: calling ‘startContractionCommand’ from ‘compileContractionTable_external’
#  825|       options.standardOutput = &table->data.external.standardOutput;
#  826|   
#  827|->     logMessage(LOG_DEBUG, "starting external contraction table: %s", table->data.external.command);
#  828|       if (runHostCommand(command, &options) != 0) return 0;
#  829|       logMessage(LOG_DEBUG, "external contraction table started: %s", table->data.external.command);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def556]
brltty-6.8/minimal/Programs/ctb_compile.c:827:5: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ctb_compile.c:863:1: enter_function: entry to ‘compileContractionTable_external’
brltty-6.8/minimal/Programs/ctb_compile.c:866:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:879:11: call_function: calling ‘startContractionCommand’ from ‘compileContractionTable_external’
#  825|       options.standardOutput = &table->data.external.standardOutput;
#  826|   
#  827|->     logMessage(LOG_DEBUG, "starting external contraction table: %s", table->data.external.command);
#  828|       if (runHostCommand(command, &options) != 0) return 0;
#  829|       logMessage(LOG_DEBUG, "external contraction table started: %s", table->data.external.command);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def557]
brltty-6.8/minimal/Programs/ctb_compile.c:871:35: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:869:41: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:871:35: throw: if ‘getContractionTableTranslationMethods_external’ throws an exception...
brltty-6.8/minimal/Programs/ctb_compile.c:871:35: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  869|       if ((table->data.external.command = strdup(name))) {
#  870|         table->managementMethods = &externalManagementMethods;
#  871|->       table->translationMethods = getContractionTableTranslationMethods_external();
#  872|         initializeCommonFields(table);
#  873|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def558]
brltty-6.8/minimal/Programs/ctb_compile.c:871:35: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ctb_compile.c:866:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:871:35: throw: if ‘getContractionTableTranslationMethods_external’ throws an exception...
brltty-6.8/minimal/Programs/ctb_compile.c:871:35: danger: ‘table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  869|       if ((table->data.external.command = strdup(name))) {
#  870|         table->managementMethods = &externalManagementMethods;
#  871|->       table->translationMethods = getContractionTableTranslationMethods_external();
#  872|         initializeCommonFields(table);
#  873|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def559]
brltty-6.8/minimal/Programs/ctb_compile.c:885:7: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ctb_compile.c:866:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:869:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/ctb_compile.c:885:7: branch_false: ...to here
brltty-6.8/minimal/Programs/ctb_compile.c:885:7: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/ctb_compile.c:885:7: danger: ‘table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  883|         free(table->data.external.command);
#  884|       } else {
#  885|->       logMallocError();
#  886|       }
#  887|   

Error: COMPILER_WARNING (CWE-704): [#def560]
brltty-6.8/minimal/Programs/ctb_external.c: scope_hint: In function ‘handleExternalResponse_outputOffsets’
brltty-6.8/minimal/Programs/ctb_external.c:240:27: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  240 |         char *delimiter = strchr(value, ',');
#      |                           ^~~~~~
#  238|   
#  239|         {
#  240|->         char *delimiter = strchr(value, ',');
#  241|   
#  242|           if (delimiter) {

Error: COMPILER_WARNING (CWE-704): [#def561]
brltty-6.8/minimal/Programs/ctb_external.c:240:27: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  238|   
#  239|         {
#  240|->         char *delimiter = strchr(value, ',');
#  241|   
#  242|           if (delimiter) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def562]
brltty-6.8/minimal/Programs/ctb_native.c:521:7: warning[-Wanalyzer-malloc-leak]: leak of ‘rule’
brltty-6.8/minimal/Programs/ctb_native.c:1221:1: enter_function: entry to ‘finishCharacterEntry_native’
brltty-6.8/minimal/Programs/ctb_native.c:1226:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/ctb_native.c:1230:23: branch_false: ...to here
brltty-6.8/minimal/Programs/ctb_native.c:1235:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ctb_native.c:1236:14: branch_true: ...to here
brltty-6.8/minimal/Programs/ctb_native.c:1236:14: call_function: calling ‘setAlwaysRule’ from ‘finishCharacterEntry_native’
#  519|   
#  520|       if (!newArray) {
#  521|->       logMallocError();
#  522|         return 0;
#  523|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def563]
brltty-6.8/minimal/Programs/datafile.c:95:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
brltty-6.8/minimal/Programs/datafile.c:239:1: enter_function: entry to ‘findDataOperand’
brltty-6.8/minimal/Programs/datafile.c:244:6: branch_true: following ‘true’ branch (when ‘description’ is non-NULL)...
brltty-6.8/minimal/Programs/datafile.c:244:20: branch_true: ...to here
brltty-6.8/minimal/Programs/datafile.c:244:20: call_function: calling ‘reportDataError’ from ‘findDataOperand’
#   93|   
#   94|       va_start(args, format);
#   95|->     formatInputError(message, sizeof(message), name, line, format, args);
#   96|       va_end(args);
#   97|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def564]
brltty-6.8/minimal/Programs/file.c:134:23: warning[-Wanalyzer-malloc-leak]: leak of ‘getPathDirectory(path)’
brltty-6.8/minimal/Programs/file.c:476:1: enter_function: entry to ‘ensureDirectory’
brltty-6.8/minimal/Programs/file.c:479:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/file.c:481:13: branch_false: ...to here
brltty-6.8/minimal/Programs/file.c:481:13: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/file.c:485:22: branch_false: ...to here
brltty-6.8/minimal/Programs/file.c:485:22: call_function: calling ‘getPathDirectory’ from ‘ensureDirectory’
brltty-6.8/minimal/Programs/file.c:485:22: return_function: returning to ‘ensureDirectory’ from ‘getPathDirectory’
brltty-6.8/minimal/Programs/file.c:486:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/file.c:489:11: branch_false: ...to here
brltty-6.8/minimal/Programs/file.c:489:10: branch_true: following ‘true’ branch (when the strings are non-equal)...
brltty-6.8/minimal/Programs/file.c:490:18: branch_true: ...to here
brltty-6.8/minimal/Programs/file.c:490:18: call_function: calling ‘ensureDirectory’ from ‘ensureDirectory’
#  132|     if (!length) length = strlen((path = CURRENT_DIRECTORY_NAME));
#  133|     {
#  134|->     char *directory = malloc(length + 1);
#  135|   
#  136|       if (directory) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def565]
brltty-6.8/minimal/Programs/file.c:204:10: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/minimal/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/minimal/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  202|     }
#  203|   
#  204|->   return joinStrings(&strings[first], size-first);
#  205|   }
#  206|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def566]
brltty-6.8/minimal/Programs/file.c:204:10: warning[-Wanalyzer-malloc-leak]: leak of ‘primary’
brltty-6.8/minimal/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/minimal/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  202|     }
#  203|   
#  204|->   return joinStrings(&strings[first], size-first);
#  205|   }
#  206|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def567]
brltty-6.8/minimal/Programs/file.c:617:15: warning[-Wanalyzer-malloc-leak]: leak of ‘getHomeDirectory()’
brltty-6.8/minimal/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/minimal/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  615|     char *path = getenv("HOME");
#  616|   
#  617|->   if (path && *path) {
#  618|       if ((path = strdup(path))) return path;
#  619|       logMallocError();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def568]
brltty-6.8/minimal/Programs/file.c:619:5: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/minimal/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/minimal/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  617|     if (path && *path) {
#  618|       if ((path = strdup(path))) return path;
#  619|->     logMallocError();
#  620|     }
#  621|   #endif /* get home directory */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def569]
brltty-6.8/minimal/Programs/file.c:636:3: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/minimal/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/minimal/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  634|     if (!path) return 0;
#  635|   
#  636|->   logMessage(LOG_DEBUG, "override directory: %s", path);
#  637|     paths[(*index)++] = path;
#  638|     return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def570]
brltty-6.8/minimal/Programs/file.c:636:3: warning[-Wanalyzer-malloc-leak]: leak of ‘primary’
brltty-6.8/minimal/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/minimal/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  634|     if (!path) return 0;
#  635|   
#  636|->   logMessage(LOG_DEBUG, "override directory: %s", path);
#  637|     paths[(*index)++] = path;
#  638|     return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
brltty-6.8/minimal/Programs/file.c:689:13: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/minimal/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/minimal/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  687|   
#  688|             if (!primary) {
#  689|->             logMallocError();
#  690|               goto done;
#  691|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def572]
brltty-6.8/minimal/Programs/file.c:739:11: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/minimal/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/minimal/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  737|             overrideDirectories = paths;
#  738|           } else {
#  739|->           deallocateStrings(paths);
#  740|           }
#  741|         } else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def573]
brltty-6.8/minimal/Programs/file.c:999:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path,  mode)’
brltty-6.8/minimal/Programs/file.c:996:16: acquire_resource: opened here
brltty-6.8/minimal/Programs/file.c:998:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/file.c:999:5: branch_true: ...to here
brltty-6.8/minimal/Programs/file.c:999:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/file.c:999:5: danger: ‘fopen(path,  mode)’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  997|   
#  998|     if (file) {
#  999|->     logMessage(LOG_DEBUG, "file opened: %s fd=%d", path, fileno(file));
# 1000|     } else {
# 1001|       logMessage((optional && (errno == ENOENT))? LOG_DEBUG: LOG_ERR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def574]
brltty-6.8/minimal/Programs/file.c:999:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path,  mode)’
brltty-6.8/minimal/Programs/file.c:996:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/file.c:998:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/file.c:999:5: branch_true: ...to here
brltty-6.8/minimal/Programs/file.c:999:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/file.c:999:5: danger: ‘fopen(path,  mode)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  997|   
#  998|     if (file) {
#  999|->     logMessage(LOG_DEBUG, "file opened: %s fd=%d", path, fileno(file));
# 1000|     } else {
# 1001|       logMessage((optional && (errno == ENOENT))? LOG_DEBUG: LOG_ERR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def575]
brltty-6.8/minimal/Programs/file.c:1033:11: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/minimal/Programs/file.c:1076:1: enter_function: entry to ‘processLines’
brltty-6.8/minimal/Programs/file.c:1090:10: call_function: calling ‘readLine’ from ‘processLines’
# 1031|   
# 1032|           if (!newBuffer) {
# 1033|->           logMallocError();
# 1034|             return 0;
# 1035|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def576]
brltty-6.8/minimal/Programs/file.c:1044:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/minimal/Programs/file.c:1076:1: enter_function: entry to ‘processLines’
brltty-6.8/minimal/Programs/file.c:1090:10: call_function: calling ‘readLine’ from ‘processLines’
# 1042|         if (!(line = fgets(&(*buffer)[count], (*size -count), file))) {
# 1043|           if (!ferror(file)) goto done;
# 1044|->         logSystemError("fgets");
# 1045|           return 0;
# 1046|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def577]
brltty-6.8/minimal/Programs/file.c:1063:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/minimal/Programs/file.c:1076:1: enter_function: entry to ‘processLines’
brltty-6.8/minimal/Programs/file.c:1090:10: call_function: calling ‘readLine’ from ‘processLines’
# 1061|       return 1;
# 1062|     } else if (ferror(file)) {
# 1063|->     logSystemError("fgets");
# 1064|     }
# 1065|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def578]
brltty-6.8/minimal/Programs/gio.c:97:16: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:156:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:184:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:185:17: call_function: inlined call to ‘gioStartEndpoint’ from ‘gioConnectResource’
#   95|     {
#   96|       int delay = endpoint->options.readyDelay;
#   97|->     if (delay) asyncWait(delay);
#   98|     }
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def579]
brltty-6.8/minimal/Programs/gio.c:157:30: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:156:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:157:30: throw: if the called function throws an exception...
brltty-6.8/minimal/Programs/gio.c:157:30: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  155|   
#  156|         if (descriptor && properties->private->getOptions) {
#  157|->         endpoint->options = *properties->private->getOptions(descriptor);
#  158|         } else {
#  159|           gioInitializeOptions(&endpoint->options);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def580]
brltty-6.8/minimal/Programs/gio.c:163:35: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:163:35: throw: if the called function throws an exception...
brltty-6.8/minimal/Programs/gio.c:163:35: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  161|   
#  162|         if (properties->private->getHandleMethods) {
#  163|->         endpoint->handleMethods = properties->private->getHandleMethods();
#  164|         } else {
#  165|           endpoint->handleMethods = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def581]
brltty-6.8/minimal/Programs/gio.c:169:33: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:162:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/gio.c:162:10: branch_false: ...to here
brltty-6.8/minimal/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:169:33: throw: if the called function throws an exception...
brltty-6.8/minimal/Programs/gio.c:169:33: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  167|   
#  168|         if (properties->private->connectResource) {
#  169|->         if ((endpoint->handle = properties->private->connectResource(identifier, descriptor))) {
#  170|             {
#  171|               GioGetChainedEndpointMethod *getChainedEndpoint = endpoint->handleMethods->getChainedEndpoint;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def582]
brltty-6.8/minimal/Programs/gio.c:171:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:162:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/gio.c:162:10: branch_false: ...to here
brltty-6.8/minimal/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:171:63: release_memory: using NULL here
brltty-6.8/minimal/Programs/gio.c:171:42: danger: dereference of NULL ‘*endpoint.handleMethods’
#  169|           if ((endpoint->handle = properties->private->connectResource(identifier, descriptor))) {
#  170|             {
#  171|->             GioGetChainedEndpointMethod *getChainedEndpoint = endpoint->handleMethods->getChainedEndpoint;
#  172|   
#  173|               if (getChainedEndpoint) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def583]
brltty-6.8/minimal/Programs/gio.c:174:46: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:173:16: branch_true: following ‘true’ branch (when ‘getChainedEndpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:174:46: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:174:46: throw: if the called function throws an exception...
brltty-6.8/minimal/Programs/gio.c:174:46: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
#  172|   
#  173|               if (getChainedEndpoint) {
#  174|->               GioEndpoint *chainedEndpoint = getChainedEndpoint(endpoint->handle);
#  175|   
#  176|                 if (chainedEndpoint) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def584]
brltty-6.8/minimal/Programs/gio.c:184:56: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:184:14: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/gio.c:184:56: branch_false: ...to here
brltty-6.8/minimal/Programs/gio.c:184:56: throw: if the called function throws an exception...
brltty-6.8/minimal/Programs/gio.c:184:56: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
#  182|             }
#  183|   
#  184|->           if (!properties->private->prepareEndpoint || properties->private->prepareEndpoint(endpoint)) {
#  185|               if (gioStartEndpoint(endpoint)) {
#  186|                 return endpoint;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def585]
brltty-6.8/minimal/Programs/gio.c:199:9: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:162:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/gio.c:162:10: branch_false: ...to here
brltty-6.8/minimal/Programs/gio.c:168:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/gio.c:199:9: branch_false: ...to here
brltty-6.8/minimal/Programs/gio.c:199:9: throw: if ‘logUnsupportedOperation’ throws an exception...
brltty-6.8/minimal/Programs/gio.c:199:9: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
#  197|           }
#  198|         } else {
#  199|->         logUnsupportedOperation("connectResource");
#  200|         }
#  201|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def586]
brltty-6.8/minimal/Programs/gio.c:224:5: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:173:16: branch_true: following ‘true’ branch (when ‘getChainedEndpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:174:46: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:176:18: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:177:17: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:178:17: call_function: calling ‘gioDisconnectResource’ from ‘gioConnectResource’
#  222|   
#  223|     if (!method) {
#  224|->     logUnsupportedOperation("disconnectResource");
#  225|       errno = ENOSYS;
#  226|     } else if (method(endpoint->handle)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def587]
brltty-6.8/minimal/Programs/gio.c:226:14: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/minimal/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/minimal/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/minimal/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:173:16: branch_true: following ‘true’ branch (when ‘getChainedEndpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:174:46: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:176:18: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio.c:177:17: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:178:17: call_function: calling ‘gioDisconnectResource’ from ‘gioConnectResource’
#  224|       logUnsupportedOperation("disconnectResource");
#  225|       errno = ENOSYS;
#  226|->   } else if (method(endpoint->handle)) {
#  227|       ok = 1;
#  228|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def588]
brltty-6.8/minimal/Programs/gio.c:413:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hio’
brltty-6.8/minimal/Programs/gio.c:682:1: enter_function: entry to ‘gioNewHandleInputObject’
brltty-6.8/minimal/Programs/gio.c:688:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:688:6: branch_true: following ‘true’ branch (when ‘hio’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:688:6: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:697:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:698:11: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:698:11: call_function: calling ‘gioMonitorInput’ from ‘gioNewHandleInputObject’
#  411|   
#  412|     if (method) {
#  413|->     if (method(endpoint->handle, callback, data)) {
#  414|         return 1;
#  415|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def589]
brltty-6.8/minimal/Programs/gio.c:704:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hio’
brltty-6.8/minimal/Programs/gio.c:688:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio.c:688:6: branch_true: following ‘true’ branch (when ‘hio’ is non-NULL)...
brltty-6.8/minimal/Programs/gio.c:688:6: branch_true: ...to here
brltty-6.8/minimal/Programs/gio.c:704:9: throw: if ‘asyncNewRelativeAlarm’ throws an exception...
brltty-6.8/minimal/Programs/gio.c:704:9: danger: ‘hio’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  702|       }
#  703|   
#  704|->     if (asyncNewRelativeAlarm(&hio->pollAlarm, 0, handleInputAlarm, hio)) {
#  705|         if (asyncResetAlarmInterval(hio->pollAlarm, pollInterval)) {
#  706|           return hio;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def590]
brltty-6.8/minimal/Programs/gio_bluetooth.c:143:3: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_bluetooth.c:150:1: enter_function: entry to ‘connectBluetoothResource’
brltty-6.8/minimal/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_bluetooth.c:166:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio_bluetooth.c:167:11: call_function: inlined call to ‘gioIsHidSupported’ from ‘connectBluetoothResource’
brltty-6.8/minimal/Programs/gio_bluetooth.c:167:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio_bluetooth.c:168:36: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_bluetooth.c:168:36: call_function: calling ‘getHidEndpoint’ from ‘connectBluetoothResource’
#  141|     STR_BEGIN(identifier, sizeof(identifier));
#  142|     STR_PRINTF("hid:address=");
#  143|->   STR_FORMAT(bthFormatAddress, address);
#  144|     STR_END;
#  145|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def591]
brltty-6.8/minimal/Programs/gio_bluetooth.c:146:10: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_bluetooth.c:150:1: enter_function: entry to ‘connectBluetoothResource’
brltty-6.8/minimal/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_bluetooth.c:166:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio_bluetooth.c:167:11: call_function: inlined call to ‘gioIsHidSupported’ from ‘connectBluetoothResource’
brltty-6.8/minimal/Programs/gio_bluetooth.c:167:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio_bluetooth.c:168:36: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_bluetooth.c:168:36: call_function: calling ‘getHidEndpoint’ from ‘connectBluetoothResource’
#  144|     STR_END;
#  145|   
#  146|->   return gioConnectResource(identifier, descriptor);
#  147|   }
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def592]
brltty-6.8/minimal/Programs/gio_bluetooth.c:160:5: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_bluetooth.c:160:5: throw: if ‘bthInitializeConnectionRequest’ throws an exception...
brltty-6.8/minimal/Programs/gio_bluetooth.c:160:5: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  158|   
#  159|       BluetoothConnectionRequest request;
#  160|->     bthInitializeConnectionRequest(&request);
#  161|   
#  162|       request.driver = braille->definition.code;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def593]
brltty-6.8/minimal/Programs/gio_bluetooth.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_bluetooth.c:166:9: throw: if ‘bthApplyParameters’ throws an exception...
brltty-6.8/minimal/Programs/gio_bluetooth.c:166:9: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  164|       request.discover = descriptor->bluetooth.discoverChannel;
#  165|   
#  166|->     if (bthApplyParameters(&request, identifier)) {
#  167|         if (gioIsHidSupported(descriptor)) {
#  168|           GioEndpoint *hidEndpoint = getHidEndpoint(request.address, descriptor);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def594]
brltty-6.8/minimal/Programs/gio_bluetooth.c:176:33: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_bluetooth.c:150:1: enter_function: entry to ‘connectBluetoothResource’
brltty-6.8/minimal/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_bluetooth.c:166:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio_bluetooth.c:167:11: call_function: inlined call to ‘gioIsHidSupported’ from ‘connectBluetoothResource’
brltty-6.8/minimal/Programs/gio_bluetooth.c:176:33: throw: if ‘bthOpenConnection’ throws an exception...
brltty-6.8/minimal/Programs/gio_bluetooth.c:176:33: danger: ‘handle’ leaks here; was allocated at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  174|         }
#  175|   
#  176|->       if ((handle->connection = bthOpenConnection(&request))) {
#  177|           return handle;
#  178|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def595]
brltty-6.8/minimal/Programs/gio_hid.c:245:9: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_hid.c:240:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_hid.c:242:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_hid.c:243:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_hid.c:245:9: throw: if ‘hidOpenDeviceWithParameters’ throws an exception...
brltty-6.8/minimal/Programs/gio_hid.c:245:9: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  243|       memset(handle, 0, sizeof(*handle));
#  244|   
#  245|->     if (hidOpenDeviceWithParameters(&handle->device, identifier)) {
#  246|         if (handle->device) {
#  247|           handle->model = getHidModelEntry(

Error: GCC_ANALYZER_WARNING (CWE-401): [#def596]
brltty-6.8/minimal/Programs/gio_internal.h:168:10: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_bluetooth.c:150:1: enter_function: entry to ‘connectBluetoothResource’
brltty-6.8/minimal/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_bluetooth.c:166:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio_bluetooth.c:167:11: call_function: inlined call to ‘gioIsHidSupported’ from ‘connectBluetoothResource’
#  166|   static inline int
#  167|   gioIsHidSupported (const GioDescriptor *descriptor) {
#  168|->   return gioProperties_hid.private->isSupported(descriptor);
#  169|   }
#  170|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def597]
brltty-6.8/minimal/Programs/gio_serial.c:134:27: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_serial.c:129:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_serial.c:131:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_serial.c:132:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_serial.c:134:27: throw: if ‘serialOpenDevice’ throws an exception...
brltty-6.8/minimal/Programs/gio_serial.c:134:27: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  132|       memset(handle, 0, sizeof(*handle));
#  133|   
#  134|->     if ((handle->device = serialOpenDevice(identifier))) {
#  135|         if (serialSetParameters(handle->device, descriptor->serial.parameters)) {
#  136|           handle->parameters = *descriptor->serial.parameters;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def598]
brltty-6.8/minimal/Programs/gio_serial.c:135:11: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_serial.c:129:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_serial.c:131:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_serial.c:132:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_serial.c:134:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio_serial.c:135:47: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_serial.c:135:11: throw: if ‘serialSetParameters’ throws an exception...
brltty-6.8/minimal/Programs/gio_serial.c:135:11: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  133|   
#  134|       if ((handle->device = serialOpenDevice(identifier))) {
#  135|->       if (serialSetParameters(handle->device, descriptor->serial.parameters)) {
#  136|           handle->parameters = *descriptor->serial.parameters;
#  137|           return handle;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def599]
brltty-6.8/minimal/Programs/gio_serial.c:140:7: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_serial.c:129:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_serial.c:131:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_serial.c:132:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_serial.c:134:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio_serial.c:135:47: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_serial.c:135:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/gio_serial.c:140:7: branch_false: ...to here
brltty-6.8/minimal/Programs/gio_serial.c:140:7: throw: if ‘serialCloseDevice’ throws an exception...
brltty-6.8/minimal/Programs/gio_serial.c:140:7: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  138|         }
#  139|   
#  140|->       serialCloseDevice(handle->device);
#  141|       }
#  142|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def600]
brltty-6.8/minimal/Programs/gio_usb.c:330:28: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_usb.c:325:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_usb.c:327:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_usb.c:328:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_usb.c:330:28: throw: if ‘usbOpenChannel’ throws an exception...
brltty-6.8/minimal/Programs/gio_usb.c:330:28: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  328|       memset(handle, 0, sizeof(*handle));
#  329|   
#  330|->     if ((handle->channel = usbOpenChannel(descriptor->usb.channelDefinitions, identifier))) {
#  331|         const UsbChannel *channel = handle->channel;
#  332|         const UsbChannelDefinition *definition = channel->definition;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def601]
brltty-6.8/minimal/Programs/gio_usb.c:345:21: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/minimal/Programs/gio_usb.c:325:23: acquire_memory: allocated here
brltty-6.8/minimal/Programs/gio_usb.c:327:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_usb.c:328:5: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_usb.c:330:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/gio_usb.c:332:35: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_usb.c:345:12: branch_true: following ‘true’ branch (when ‘method’ is non-NULL)...
brltty-6.8/minimal/Programs/gio_usb.c:345:21: branch_true: ...to here
brltty-6.8/minimal/Programs/gio_usb.c:345:21: throw: if the called function throws an exception...
brltty-6.8/minimal/Programs/gio_usb.c:345:21: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  343|           GioUsbSetConnectionPropertiesMethod *method = descriptor->usb.setConnectionProperties;
#  344|   
#  345|->         if (method) method(properties, definition);
#  346|         }
#  347|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def602]
brltty-6.8/minimal/Programs/hid.c:236:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/minimal/Programs/hid.c:211:1: enter_function: entry to ‘hidSetFilterIdentifiers’
brltty-6.8/minimal/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/minimal/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:237:12: call_function: calling ‘hidParseDeviceIdentifier’ from ‘hidSetFilterIdentifiers’
brltty-6.8/minimal/Programs/hid.c:237:12: return_function: returning to ‘hidSetFilterIdentifiers’ from ‘hidParseDeviceIdentifier’
brltty-6.8/minimal/Programs/hid.c:237:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/hid.c:243:5: branch_false: ...to here
brltty-6.8/minimal/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/minimal/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:237:12: call_function: calling ‘hidParseDeviceIdentifier’ from ‘hidSetFilterIdentifiers’
brltty-6.8/minimal/Programs/hid.c:237:12: return_function: returning to ‘hidSetFilterIdentifiers’ from ‘hidParseDeviceIdentifier’
brltty-6.8/minimal/Programs/hid.c:237:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/hid.c:243:5: branch_false: ...to here
brltty-6.8/minimal/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/minimal/Programs/hid.c:236:9: danger: out-of-bounds read from byte 56 till byte 63 but ‘identifierTable’ ends at byte 48
#  234|   
#  235|     while (cur < end) {
#  236|->     if (cur->operand && *cur->operand) {
#  237|         if (!hidParseDeviceIdentifier(cur->identifier, cur->operand)) {
#  238|           logMessage(LOG_ERR, "invalid %s identifier: %s", cur->name, cur->operand);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def603]
brltty-6.8/minimal/Programs/hid.c:237:37: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/minimal/Programs/hid.c:211:1: enter_function: entry to ‘hidSetFilterIdentifiers’
brltty-6.8/minimal/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/minimal/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:237:12: call_function: calling ‘hidParseDeviceIdentifier’ from ‘hidSetFilterIdentifiers’
brltty-6.8/minimal/Programs/hid.c:237:12: return_function: returning to ‘hidSetFilterIdentifiers’ from ‘hidParseDeviceIdentifier’
brltty-6.8/minimal/Programs/hid.c:237:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/hid.c:243:5: branch_false: ...to here
brltty-6.8/minimal/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/minimal/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:237:12: call_function: calling ‘hidParseDeviceIdentifier’ from ‘hidSetFilterIdentifiers’
brltty-6.8/minimal/Programs/hid.c:237:12: return_function: returning to ‘hidSetFilterIdentifiers’ from ‘hidParseDeviceIdentifier’
brltty-6.8/minimal/Programs/hid.c:237:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/hid.c:243:5: branch_false: ...to here
brltty-6.8/minimal/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/minimal/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/hid.c:237:37: danger: out-of-bounds read from byte 64 till byte 71 but ‘identifierTable’ ends at byte 48
#  235|     while (cur < end) {
#  236|       if (cur->operand && *cur->operand) {
#  237|->       if (!hidParseDeviceIdentifier(cur->identifier, cur->operand)) {
#  238|           logMessage(LOG_ERR, "invalid %s identifier: %s", cur->name, cur->operand);
#  239|           return 0;

Error: CPPCHECK_WARNING (CWE-401): [#def604]
brltty-6.8/minimal/Programs/hid_linux.c:92: error[memleak]: Memory leak: items
#   90|           items->count = size;
#   91|           memcpy(items->bytes, descriptor.value, size);
#   92|->         return (handle->hidItems = items);
#   93|         } else {
#   94|           logMallocError();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def605]
brltty-6.8/minimal/Programs/ihex.c:161:8: warning[-Wanalyzer-malloc-leak]: leak of ‘ihexParseRecord(rpd)’
brltty-6.8/minimal/Programs/ihex.c:300:1: enter_function: entry to ‘ihexProcessLine’
brltty-6.8/minimal/Programs/ihex.c:307:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/ihex.c:308:6: branch_false: ...to here
brltty-6.8/minimal/Programs/ihex.c:308:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/ihex.c:310:3: branch_false: ...to here
brltty-6.8/minimal/Programs/ihex.c:311:30: call_function: calling ‘ihexParseRecord’ from ‘ihexProcessLine’
brltty-6.8/minimal/Programs/ihex.c:311:30: return_function: returning to ‘ihexProcessLine’ from ‘ihexParseRecord’
brltty-6.8/minimal/Programs/ihex.c:314:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ihex.c:315:9: branch_true: ...to here
brltty-6.8/minimal/Programs/ihex.c:315:9: call_function: calling ‘ihexCallHandler’ from ‘ihexProcessLine’
#  159|     const char *character = rpd->record;
#  160|   
#  161|->   if (!*character || (*character != IHEX_RECORD_PREFIX)) {
#  162|       ihexReportProblem(rpd, "not an ihex record");
#  163|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def606]
brltty-6.8/minimal/Programs/kbd.c:158:9: warning[-Wanalyzer-malloc-leak]: leak of ‘kio’
brltty-6.8/minimal/Programs/kbd.c:145:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/kbd.c:145:6: branch_true: following ‘true’ branch (when ‘kio’ is non-NULL)...
brltty-6.8/minimal/Programs/kbd.c:146:5: branch_true: ...to here
brltty-6.8/minimal/Programs/kbd.c:158:9: throw: if ‘newKeyboardInstanceExtension’ throws an exception...
brltty-6.8/minimal/Programs/kbd.c:158:9: danger: ‘kio’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  156|       kio->deferred.size = count;
#  157|   
#  158|->     if (newKeyboardInstanceExtension(&kio->kix)) {
#  159|         if (enqueueItem(kmo->instanceQueue, kio)) {
#  160|           return kio;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def607]
brltty-6.8/minimal/Programs/kbd.c:210:9: warning[-Wanalyzer-malloc-leak]: leak of ‘kmo’
brltty-6.8/minimal/Programs/kbd.c:204:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/kbd.c:204:6: branch_true: following ‘true’ branch (when ‘kmo’ is non-NULL)...
brltty-6.8/minimal/Programs/kbd.c:205:5: branch_true: ...to here
brltty-6.8/minimal/Programs/kbd.c:210:9: throw: if ‘newKeyboardMonitorExtension’ throws an exception...
brltty-6.8/minimal/Programs/kbd.c:210:9: danger: ‘kmo’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  208|       kmo->handleKeyEvent = handleKeyEvent;
#  209|   
#  210|->     if (newKeyboardMonitorExtension(&kmo->kmx)) {
#  211|         if ((kmo->instanceQueue = newQueue(NULL, NULL))) {
#  212|           if (monitorKeyboards(kmo)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def608]
brltty-6.8/minimal/Programs/kbd_linux.c:647:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*kio_94(D)->kix.device.path, 0)’
brltty-6.8/minimal/Programs/kbd_linux.c:647:36: acquire_resource: opened here
brltty-6.8/minimal/Programs/kbd_linux.c:647:6: danger: ‘open(*kio_94(D)->kix.device.path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  645|     const char *deviceName = locatePathName(kio->kix->device.path);
#  646|   
#  647|->   if ((kio->kix->file.descriptor = open(kio->kix->device.path, O_RDONLY)) != -1) {
#  648|       struct stat status;
#  649|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def609]
brltty-6.8/minimal/Programs/kbd_linux.c:775:21: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/dev/input")’
brltty-6.8/minimal/Programs/kbd_linux.c:772:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/kbd_linux.c:772:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/kbd_linux.c:772:6: branch_true: ...to here
brltty-6.8/minimal/Programs/kbd_linux.c:775:21: throw: if ‘readdir’ throws an exception...
brltty-6.8/minimal/Programs/kbd_linux.c:775:21: danger: ‘opendir("/dev/input")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  773|       struct dirent *entry;
#  774|   
#  775|->     while ((entry = readdir(directory))) {
#  776|         KeyboardInstanceObject *kio;
#  777|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def610]
brltty-6.8/minimal/Programs/kbd_linux.c:830:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(__builtin_alloca_with_align(strlen(device) + 9, 8), 0)’
brltty-6.8/minimal/Programs/kbd_linux.c:820:21: acquire_resource: opened here
brltty-6.8/minimal/Programs/kbd_linux.c:820:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/kbd_linux.c:824:19: branch_true: ...to here
brltty-6.8/minimal/Programs/kbd_linux.c:824:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/kbd_linux.c:824:8: branch_false: ...to here
brltty-6.8/minimal/Programs/kbd_linux.c:830:5: danger: ‘open(__builtin_alloca_with_align(strlen(device) + 9, 8), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  828|       }
#  829|   
#  830|->     close(descriptor);
#  831|     } else {
#  832|       logMessage(LOG_DEBUG, "cannot open sysfs dev file: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def611]
brltty-6.8/minimal/Programs/ktb_compile.c:171:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ktd.table’
brltty-6.8/minimal/Programs/ktb_compile.c:1816:1: enter_function: entry to ‘compileKeyTable’
brltty-6.8/minimal/Programs/ktb_compile.c:1819:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ktb_compile.c:1822:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ktb_compile.c:1832:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ktb_compile.c:1832:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ktb_compile.c:1833:7: branch_true: ...to here
brltty-6.8/minimal/Programs/ktb_compile.c:1866:11: call_function: calling ‘defineInitialKeyContexts’ from ‘compileKeyTable’
#  169|   
#  170|       if (!newTable) {
#  171|->       logMallocError();
#  172|         return NULL;
#  173|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def612]
brltty-6.8/minimal/Programs/ktb_compile.c:203:10: warning[-Wanalyzer-malloc-leak]: leak of ‘newTable’
brltty-6.8/minimal/Programs/ktb_compile.c:1115:8: enter_function: entry to ‘processContextOperands’
brltty-6.8/minimal/Programs/ktb_compile.c:1121:25: call_function: inlined call to ‘getCurrentKeyContext’ from ‘processContextOperands’
#  201|     }
#  202|   
#  203|->   return &ktd->table->keyContexts.table[context];
#  204|   }
#  205|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def613]
brltty-6.8/minimal/Programs/ktb_compile.c:216:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ktd.table’
brltty-6.8/minimal/Programs/ktb_compile.c:1816:1: enter_function: entry to ‘compileKeyTable’
brltty-6.8/minimal/Programs/ktb_compile.c:1819:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ktb_compile.c:1822:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ktb_compile.c:1832:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ktb_compile.c:1832:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ktb_compile.c:1833:7: branch_true: ...to here
brltty-6.8/minimal/Programs/ktb_compile.c:1866:11: call_function: calling ‘defineInitialKeyContexts’ from ‘compileKeyTable’
#  214|   
#  215|     if (!(*string = malloc(ARRAY_SIZE(*string, length+1)))) {
#  216|->     logMallocError();
#  217|       return 0;
#  218|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def614]
brltty-6.8/minimal/Programs/menu.c:182:5: warning[-Wanalyzer-malloc-leak]: leak of ‘submenu’
brltty-6.8/minimal/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:963:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
#  180|       return menu;
#  181|     } else {
#  182|->     logMallocError();
#  183|     }
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def615]
brltty-6.8/minimal/Programs/menu.c:190:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘item’
brltty-6.8/minimal/Programs/menu.c:1164:1: enter_function: entry to ‘getCurrentMenuItem’
brltty-6.8/minimal/Programs/menu.c:1165:23: call_function: inlined call to ‘getSelectedMenuItem’ from ‘getCurrentMenuItem’
brltty-6.8/minimal/Programs/menu.c:1165:23: call_function: inlined call to ‘getSelectedMenuItem’ from ‘getCurrentMenuItem’
brltty-6.8/minimal/Programs/menu.c:1168:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:1169:8: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:1169:8: branch_true: following ‘true’ branch (when ‘oldItem’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:1169:18: call_function: inlined call to ‘endMenuItem’ from ‘getCurrentMenuItem’
brltty-6.8/minimal/Programs/menu.c:1170:24: call_function: calling ‘beginMenuItem’ from ‘getCurrentMenuItem’
#  188|   static int
#  189|   beginMenuItem (MenuItem *item) {
#  190|->   return !item->methods->beginItem || item->methods->beginItem(item);
#  191|   }
#  192|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def616]
brltty-6.8/minimal/Programs/menu.c:195:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/minimal/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:966:26: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenu’
brltty-6.8/minimal/Programs/menu.c:966:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:970:20: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:970:20: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:970:20: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenuItem’
brltty-6.8/minimal/Programs/menu.c:970:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:973:21: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:973:21: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:973:21: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenuItem’
brltty-6.8/minimal/Programs/menu.c:973:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/menu.c:992:7: branch_false: ...to here
brltty-6.8/minimal/Programs/menu.c:992:7: call_function: calling ‘destroyMenu’ from ‘newSubmenuMenuItem’
#  193|   static void
#  194|   endMenuItem (MenuItem *item, int deallocating) {
#  195|->   if (item->methods->endItem) item->methods->endItem(item, deallocating);
#  196|   }
#  197|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def617]
brltty-6.8/minimal/Programs/menu.c:288:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘item’
brltty-6.8/minimal/Programs/menu.c:947:1: enter_function: entry to ‘getComment_close’
brltty-6.8/minimal/Programs/menu.c:948:27: call_function: calling ‘getParentMenuItem’ from ‘getComment_close’
brltty-6.8/minimal/Programs/menu.c:948:27: return_function: returning to ‘getComment_close’ from ‘getParentMenuItem’
brltty-6.8/minimal/Programs/menu.c:948:10: call_function: calling ‘getMenuItemTitle’ from ‘getComment_close’
#  286|   const char *
#  287|   getMenuItemTitle (const MenuItem *item) {
#  288|->   return getLocalizedText(item->title);
#  289|   }
#  290|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def618]
brltty-6.8/minimal/Programs/menu.c:313:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newMenuItem(newMenu(), 0, &closeName)’
brltty-6.8/minimal/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:966:26: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenu’
brltty-6.8/minimal/Programs/menu.c:966:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:970:20: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:970:20: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:970:20: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenuItem’
brltty-6.8/minimal/Programs/menu.c:970:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:973:21: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:973:21: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
#  311|   static MenuItem *
#  312|   newMenuItem (Menu *menu, unsigned char *setting, const MenuString *name) {
#  313|->   if (menu->items.count == menu->items.size) {
#  314|       unsigned int newSize = menu->items.size? (menu->items.size << 1): 0X10;
#  315|       MenuItem *newArray = realloc(menu->items.array, (newSize * sizeof(*newArray)));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def619]
brltty-6.8/minimal/Programs/menu.c:318:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:966:26: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenu’
brltty-6.8/minimal/Programs/menu.c:966:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:970:20: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:970:20: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
#  316|   
#  317|       if (!newArray) {
#  318|->       logMallocError();
#  319|         return NULL;
#  320|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def620]
brltty-6.8/minimal/Programs/menu.c:318:7: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/minimal/Programs/menu.c:701:1: enter_function: entry to ‘newFilesMenuItem’
brltty-6.8/minimal/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:724:14: branch_true: following ‘true’ branch (when ‘subdirectory’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:725:32: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:730:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:731:30: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:731:30: call_function: calling ‘newMenuItem’ from ‘newFilesMenuItem’
#  316|   
#  317|       if (!newArray) {
#  318|->       logMallocError();
#  319|         return NULL;
#  320|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def621]
brltty-6.8/minimal/Programs/menu.c:318:7: warning[-Wanalyzer-malloc-leak]: leak of ‘submenu’
brltty-6.8/minimal/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:963:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
brltty-6.8/minimal/Programs/menu.c:966:26: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenu’
brltty-6.8/minimal/Programs/menu.c:966:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:970:20: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:970:20: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
#  316|   
#  317|       if (!newArray) {
#  318|->       logMallocError();
#  319|         return NULL;
#  320|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def622]
brltty-6.8/minimal/Programs/menu.c:329:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/minimal/Programs/menu.c:312:1: enter_function: entry to ‘newMenuItem’
brltty-6.8/minimal/Programs/menu.c:327:22: call_function: calling ‘getMenuItem’ from ‘newMenuItem’
brltty-6.8/minimal/Programs/menu.c:327:22: return_function: returning to ‘newMenuItem’ from ‘getMenuItem’
brltty-6.8/minimal/Programs/menu.c:329:5: danger: dereference of NULL ‘getMenuItem(menu, *menu.items.count)’
#  327|       MenuItem *item = getMenuItem(menu, menu->items.count++);
#  328|   
#  329|->     item->menu = menu;
#  330|       item->setting = setting;
#  331|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def623]
brltty-6.8/minimal/Programs/menu.c:542:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".", 0)’
brltty-6.8/minimal/Programs/menu.c:533:29: acquire_resource: opened here
brltty-6.8/minimal/Programs/menu.c:535:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:542:17: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:542:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/menu.c:588:88: branch_false: ...to here
brltty-6.8/minimal/Programs/menu.c:587:9: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:542:17: danger: ‘open(".", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  540|   #endif /* HAVE_FCHDIR */
#  541|       {
#  542|->       if (chdir(files->directory) != -1) {
#  543|   #if defined(HAVE_GLOB)
#  544|           memset(&files->glob, 0, sizeof(files->glob));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def624]
brltty-6.8/minimal/Programs/menu.c:716:17: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/minimal/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:716:17: throw: if ‘joinStrings’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:716:17: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  714|       {
#  715|         const char *strings[] = {"*", extension};
#  716|->       pattern = joinStrings(strings, ARRAY_COUNT(strings));
#  717|       }
#  718|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def625]
brltty-6.8/minimal/Programs/menu.c:722:39: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/minimal/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:722:39: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:39: throw: if ‘ensureFileExtension’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:722:39: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  720|         files->pattern = pattern; 
#  721|   
#  722|->       if ((files->initial = *initial? ensureFileExtension(initial, extension): strdup(""))) {
#  723|           if ((files->current = strdup(files->initial))) {
#  724|             if (subdirectory) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def626]
brltty-6.8/minimal/Programs/menu.c:725:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:723:31: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:724:14: branch_true: following ‘true’ branch (when ‘subdirectory’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:725:32: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:725:32: throw: if ‘makePath’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:725:32: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  723|           if ((files->current = strdup(files->initial))) {
#  724|             if (subdirectory) {
#  725|->             files->directory = makePath(directory, subdirectory);
#  726|             } else if (!(files->directory = strdup(directory))) {
#  727|               logMallocError();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def627]
brltty-6.8/minimal/Programs/menu.c:725:32: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/minimal/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:724:14: branch_true: following ‘true’ branch (when ‘subdirectory’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:725:32: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:725:32: throw: if ‘makePath’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:725:32: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  723|           if ((files->current = strdup(files->initial))) {
#  724|             if (subdirectory) {
#  725|->             files->directory = makePath(directory, subdirectory);
#  726|             } else if (!(files->directory = strdup(directory))) {
#  727|               logMallocError();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def628]
brltty-6.8/minimal/Programs/menu.c:727:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:723:31: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:724:14: branch_false: following ‘false’ branch (when ‘subdirectory’ is NULL)...
brltty-6.8/minimal/Programs/menu.c:726:43: branch_false: ...to here
brltty-6.8/minimal/Programs/menu.c:726:21: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:727:13: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:727:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:727:13: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  725|               files->directory = makePath(directory, subdirectory);
#  726|             } else if (!(files->directory = strdup(directory))) {
#  727|->             logMallocError();
#  728|             }
#  729|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def629]
brltty-6.8/minimal/Programs/menu.c:727:13: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/minimal/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:724:14: branch_false: following ‘false’ branch (when ‘subdirectory’ is NULL)...
brltty-6.8/minimal/Programs/menu.c:726:43: branch_false: ...to here
brltty-6.8/minimal/Programs/menu.c:726:21: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:727:13: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:727:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:727:13: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  725|               files->directory = makePath(directory, subdirectory);
#  726|             } else if (!(files->directory = strdup(directory))) {
#  727|->             logMallocError();
#  728|             }
#  729|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def630]
brltty-6.8/minimal/Programs/menu.c:744:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:29: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/menu.c:722:80: branch_false: ...to here
brltty-6.8/minimal/Programs/menu.c:722:80: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:722:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:723:31: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:723:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/menu.c:744:11: branch_false: ...to here
brltty-6.8/minimal/Programs/menu.c:744:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:744:11: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
#  742|             free(files->current);
#  743|           } else {
#  744|->           logMallocError();
#  745|           }
#  746|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def631]
brltty-6.8/minimal/Programs/menu.c:744:11: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/minimal/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:723:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/menu.c:744:11: branch_false: ...to here
brltty-6.8/minimal/Programs/menu.c:744:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:744:11: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  742|             free(files->current);
#  743|           } else {
#  744|->           logMallocError();
#  745|           }
#  746|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def632]
brltty-6.8/minimal/Programs/menu.c:749:9: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/minimal/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/menu.c:722:39: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:722:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/menu.c:749:9: branch_false: ...to here
brltty-6.8/minimal/Programs/menu.c:749:9: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:749:9: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  747|           free(files->initial);
#  748|         } else {
#  749|->         logMallocError();
#  750|         }
#  751|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def633]
brltty-6.8/minimal/Programs/menu.c:754:7: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/minimal/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/minimal/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/minimal/Programs/menu.c:719:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/menu.c:754:7: branch_false: ...to here
brltty-6.8/minimal/Programs/menu.c:754:7: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/menu.c:754:7: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  752|         free(pattern);
#  753|       } else {
#  754|->       logMallocError();
#  755|       }
#  756|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def634]
brltty-6.8/minimal/Programs/menu.c:1075:8: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/minimal/Programs/menu.c:1142:1: enter_function: entry to ‘changeMenuSettingScaled’
brltty-6.8/minimal/Programs/menu.c:1143:20: call_function: calling ‘getCurrentMenuItem’ from ‘changeMenuSettingScaled’
brltty-6.8/minimal/Programs/menu.c:1143:20: return_function: returning to ‘changeMenuSettingScaled’ from ‘getCurrentMenuItem’
brltty-6.8/minimal/Programs/menu.c:1145:7: call_function: inlined call to ‘activateMenuItem’ from ‘changeMenuSettingScaled’
# 1073|   static int
# 1074|   activateMenuItem (MenuItem *item) {
# 1075|->   if (!item->methods->activateItem) return 0;
# 1076|     item->methods->activateItem(item);
# 1077|     return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def635]
brltty-6.8/minimal/Programs/menu.c:1181:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/minimal/Programs/menu.c:1177:1: enter_function: entry to ‘getCurrentSubmenu’
brltty-6.8/minimal/Programs/menu.c:1179:22: call_function: calling ‘getCurrentMenuItem’ from ‘getCurrentSubmenu’
brltty-6.8/minimal/Programs/menu.c:1179:22: return_function: returning to ‘getCurrentSubmenu’ from ‘getCurrentMenuItem’
brltty-6.8/minimal/Programs/menu.c:1181:9: danger: dereference of NULL ‘getCurrentMenuItem(menu)’
# 1179|       MenuItem *item = getCurrentMenuItem(menu);
# 1180|   
# 1181|->     if (item->methods != &menuItemMethods_submenu) break;
# 1182|       if (!item->data.submenu->opened) break;
# 1183|       menu = item->data.submenu->menu;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def636]
brltty-6.8/minimal/Programs/message.c:376:5: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/minimal/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/minimal/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/minimal/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  374|       int cellCount = cellsSize;
#  375|   
#  376|->     contractText(
#  377|         contractionTable, NULL,
#  378|         text, &textCount,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def637]
brltty-6.8/minimal/Programs/message.c:389:27: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/minimal/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/minimal/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/minimal/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  387|         toCellOffset[textCount] = cellCount;
#  388|   
#  389|->       int *toTextOffset = makeInverseOffsetMap(toCellOffset, textLength);
#  390|         if (!toTextOffset) break;
#  391|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def638]
brltty-6.8/minimal/Programs/message.c:423:7: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/minimal/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/minimal/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/minimal/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  421|     }
#  422|   
#  423|->   if (canBraille()) {
#  424|       MessageData mgd = {
#  425|         .parameters = mgp,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def639]
brltty-6.8/minimal/Programs/message.c:430:17: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/minimal/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/minimal/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/minimal/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  428|   
#  429|         .clipboard = {
#  430|->         .main = getMainClipboard(),
#  431|           .start = NULL,
#  432|           .offset = 0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def640]
brltty-6.8/minimal/Programs/message.c:436:31: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/minimal/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/minimal/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/minimal/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  434|       };
#  435|   
#  436|->     const size_t textLength = countUtf8Characters(mgp->text);
#  437|       wchar_t text[textLength + 1];
#  438|       makeWcharsFromUtf8(mgp->text, text, ARRAY_COUNT(text));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def641]
brltty-6.8/minimal/Programs/message.c:438:5: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/minimal/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/minimal/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/minimal/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  436|       const size_t textLength = countUtf8Characters(mgp->text);
#  437|       wchar_t text[textLength + 1];
#  438|->     makeWcharsFromUtf8(mgp->text, text, ARRAY_COUNT(text));
#  439|   
#  440|       mgd.braille.message = text;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def642]
brltty-6.8/minimal/Programs/message.c:448:9: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/minimal/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/minimal/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/minimal/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  446|       int wordWrap = prefs.wordWrap;
#  447|   
#  448|->     if (isContracting()) {
#  449|         size_t brailleLength;
#  450|         int *offsetMap;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def643]
brltty-6.8/minimal/Programs/message.c:466:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*mgd.segments.first.start’
brltty-6.8/minimal/Programs/message.c:416:1: enter_function: entry to ‘presentMessage’
brltty-6.8/minimal/Programs/message.c:423:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/message.c:423:21: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:448:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/message.c:463:20: branch_false: ...to here
brltty-6.8/minimal/Programs/message.c:465:25: call_function: calling ‘makeSegments’ from ‘presentMessage’
brltty-6.8/minimal/Programs/message.c:465:25: return_function: returning to ‘presentMessage’ from ‘makeSegments’
brltty-6.8/minimal/Programs/message.c:466:27: danger: use of uninitialized value ‘*mgd.segments.first.start’ here
#  464|       mgd.segments.current = mgd.segments.first = messageSegments;
#  465|       mgd.segments.last = makeSegments(messageSegments, characters, characterCount, wordWrap);
#  466|->     mgd.clipboard.start = mgd.segments.first->start;
#  467|   
#  468|       int apiWasLinked = api.isServerLinked();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def644]
brltty-6.8/minimal/Programs/message.c:545:11: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/minimal/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/minimal/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/minimal/Programs/message.c:539:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/message.c:544:7: branch_false: ...to here
brltty-6.8/minimal/Programs/message.c:545:11: throw: if ‘asyncAddTask’ throws an exception...
brltty-6.8/minimal/Programs/message.c:545:11: danger: ‘mgp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  543|       } else {
#  544|         mgp->deallocate = 1;
#  545|->       if (asyncAddTask(NULL, presentMessage, mgp)) return 1;
#  546|       }
#  547|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def645]
brltty-6.8/minimal/Programs/messages.c:545:3: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
brltty-6.8/minimal/Programs/messages.c:610:1: enter_function: entry to ‘setMessagesDirectory’
brltty-6.8/minimal/Programs/messages.c:611:10: call_function: calling ‘updateProperty’ from ‘setMessagesDirectory’
#  543|   setDirectory (const char *directory) {
#  544|     if (bindtextdomain(domainName, directory)) return 1;
#  545|->   logSystemError("bindtextdomain");
#  546|     return 0;
#  547|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def646]
brltty-6.8/minimal/Programs/messages.c:552:5: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
brltty-6.8/minimal/Programs/messages.c:620:1: enter_function: entry to ‘setMessagesDomain’
brltty-6.8/minimal/Programs/messages.c:621:10: call_function: calling ‘updateProperty’ from ‘setMessagesDomain’
#  550|   setDomain (const char *domain) {
#  551|     if (!textdomain(domain)) {
#  552|->     logSystemError("textdomain");
#  553|       return 0;
#  554|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def647]
brltty-6.8/minimal/Programs/messages.c:557:5: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
brltty-6.8/minimal/Programs/messages.c:620:1: enter_function: entry to ‘setMessagesDomain’
brltty-6.8/minimal/Programs/messages.c:621:10: call_function: calling ‘updateProperty’ from ‘setMessagesDomain’
#  555|   
#  556|     if (!bind_textdomain_codeset(domain, "UTF-8")) {
#  557|->     logSystemError("bind_textdomain_codeset");
#  558|     }
#  559|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def648]
brltty-6.8/minimal/Programs/messages.c:595:20: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
brltty-6.8/minimal/Programs/messages.c:592:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/messages.c:594:6: branch_true: following ‘true’ branch (when ‘copy’ is non-NULL)...
brltty-6.8/minimal/Programs/messages.c:595:8: branch_true: ...to here
brltty-6.8/minimal/Programs/messages.c:595:8: branch_false: following ‘false’ branch (when ‘setter’ is non-NULL)...
brltty-6.8/minimal/Programs/messages.c:595:20: branch_false: ...to here
brltty-6.8/minimal/Programs/messages.c:595:20: throw: if the called function throws an exception...
brltty-6.8/minimal/Programs/messages.c:595:20: danger: ‘copy’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  593|   
#  594|     if (copy) {
#  595|->     if (!setter || setter(value)) {
#  596|         if (*property) free(*property);
#  597|         *property = copy;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def649]
brltty-6.8/minimal/Programs/mntpt.c:65:5: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
brltty-6.8/minimal/Programs/mntpt.c:55:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:55:6: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:58:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:59:34: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:60:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:60:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:65:5: branch_false: ...to here
brltty-6.8/minimal/Programs/mntpt.c:65:5: throw: if ‘closeMountsTable’ throws an exception...
brltty-6.8/minimal/Programs/mntpt.c:65:5: danger: ‘path’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   63|       }
#   64|   
#   65|->     closeMountsTable(table);
#   66|     }
#   67|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def650]
brltty-6.8/minimal/Programs/mntpt.c:85:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   83|       FILE *table;
#   84|   
#   85|->     if ((table = openMountsTable(1))) {
#   86|         addMountEntry(table, entry);
#   87|         closeMountsTable(table);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def651]
brltty-6.8/minimal/Programs/mntpt.c:85:18: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   83|       FILE *table;
#   84|   
#   85|->     if ((table = openMountsTable(1))) {
#   86|         addMountEntry(table, entry);
#   87|         closeMountsTable(table);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def652]
brltty-6.8/minimal/Programs/mntpt.c:86:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   84|   
#   85|       if ((table = openMountsTable(1))) {
#   86|->       addMountEntry(table, entry);
#   87|         closeMountsTable(table);
#   88|       } else if ((errno == EROFS) || (errno == EACCES)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def653]
brltty-6.8/minimal/Programs/mntpt.c:86:7: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   84|   
#   85|       if ((table = openMountsTable(1))) {
#   86|->       addMountEntry(table, entry);
#   87|         closeMountsTable(table);
#   88|       } else if ((errno == EROFS) || (errno == EACCES)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def654]
brltty-6.8/minimal/Programs/mntpt.c:94:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   92|   
#   93|     if (retry) {
#   94|->     asyncNewRelativeAlarm(NULL, MOUNT_TABLE_UPDATE_RETRY_INTERVAL, retryMountsTableUpdate, entry);
#   95|     } else {
#   96|       if (entry->mountPath) free(entry->mountPath);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def655]
brltty-6.8/minimal/Programs/mntpt.c:94:5: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   92|   
#   93|     if (retry) {
#   94|->     asyncNewRelativeAlarm(NULL, MOUNT_TABLE_UPDATE_RETRY_INTERVAL, retryMountsTableUpdate, entry);
#   95|     } else {
#   96|       if (entry->mountPath) free(entry->mountPath);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def656]
brltty-6.8/minimal/Programs/mntpt.c:122:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:118:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/mntpt.c:122:15: branch_false: ...to here
brltty-6.8/minimal/Programs/mntpt.c:122:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/mntpt.c:122:15: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  120|                 return 1;
#  121|               } else {
#  122|->               logMallocError();
#  123|               }
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def657]
brltty-6.8/minimal/Programs/mntpt.c:122:15: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:118:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/mntpt.c:122:15: branch_false: ...to here
brltty-6.8/minimal/Programs/mntpt.c:122:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/mntpt.c:122:15: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  120|                 return 1;
#  121|               } else {
#  122|->               logMallocError();
#  123|               }
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def658]
brltty-6.8/minimal/Programs/mntpt.c:127:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/mntpt.c:127:13: branch_false: ...to here
brltty-6.8/minimal/Programs/mntpt.c:127:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/mntpt.c:127:13: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  125|               free(entry->mountType);
#  126|             } else {
#  127|->             logMallocError();
#  128|             }
#  129|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def659]
brltty-6.8/minimal/Programs/mntpt.c:127:13: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:117:14: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/mntpt.c:127:13: branch_false: ...to here
brltty-6.8/minimal/Programs/mntpt.c:127:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/mntpt.c:127:13: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  125|               free(entry->mountType);
#  126|             } else {
#  127|->             logMallocError();
#  128|             }
#  129|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def660]
brltty-6.8/minimal/Programs/mntpt.c:132:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/mntpt.c:132:11: branch_false: ...to here
brltty-6.8/minimal/Programs/mntpt.c:132:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/mntpt.c:132:11: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  130|             free(entry->mountReference);
#  131|           } else {
#  132|->           logMallocError();
#  133|           }
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def661]
brltty-6.8/minimal/Programs/mntpt.c:132:11: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:116:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/mntpt.c:132:11: branch_false: ...to here
brltty-6.8/minimal/Programs/mntpt.c:132:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/mntpt.c:132:11: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  130|             free(entry->mountReference);
#  131|           } else {
#  132|->           logMallocError();
#  133|           }
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def662]
brltty-6.8/minimal/Programs/mntpt.c:137:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/minimal/Programs/mntpt.c:115:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/mntpt.c:137:9: branch_false: ...to here
brltty-6.8/minimal/Programs/mntpt.c:137:9: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/mntpt.c:137:9: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  135|           free(entry->mountPath);
#  136|         } else {
#  137|->         logMallocError();
#  138|         }
#  139|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def663]
brltty-6.8/minimal/Programs/msg_queue.c:121:13: warning[-Wanalyzer-malloc-leak]: leak of ‘mhp’
brltty-6.8/minimal/Programs/msg_queue.c:101:1: enter_function: entry to ‘messageReceiverThread’
brltty-6.8/minimal/Programs/msg_queue.c:107:22: call_function: calling ‘receiveMessage’ from ‘messageReceiverThread’
brltty-6.8/minimal/Programs/msg_queue.c:107:22: return_function: returning to ‘messageReceiverThread’ from ‘receiveMessage’
brltty-6.8/minimal/Programs/msg_queue.c:109:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/msg_queue.c:112:18: branch_true: ...to here
brltty-6.8/minimal/Programs/msg_queue.c:112:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/msg_queue.c:112:10: branch_true: following ‘true’ branch (when ‘mhp’ is non-NULL)...
brltty-6.8/minimal/Programs/msg_queue.c:115:21: branch_true: ...to here
brltty-6.8/minimal/Programs/msg_queue.c:121:13: throw: if ‘asyncSignalEvent’ throws an exception...
brltty-6.8/minimal/Programs/msg_queue.c:121:13: danger: ‘mhp’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  119|           memcpy(mhp->content, buffer, mhp->length);
#  120|   
#  121|->         if (asyncSignalEvent(mra->event, mhp)) continue;
#  122|           free(mhp);
#  123|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def664]
brltty-6.8/minimal/Programs/msg_queue.c:149:23: warning[-Wanalyzer-malloc-leak]: leak of ‘mra’
brltty-6.8/minimal/Programs/msg_queue.c:139:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/msg_queue.c:139:6: branch_true: following ‘true’ branch (when ‘mra’ is non-NULL)...
brltty-6.8/minimal/Programs/msg_queue.c:140:5: branch_true: ...to here
brltty-6.8/minimal/Programs/msg_queue.c:149:23: throw: if ‘asyncNewEvent’ throws an exception...
brltty-6.8/minimal/Programs/msg_queue.c:149:23: danger: ‘mra’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  147|       mra->size = size;
#  148|   
#  149|->     if ((mra->event = asyncNewEvent(handleReceivedMessage, mra))) {
#  150|         int threadCreationError = createThread(name, &mra->thread, NULL, messageReceiverThread, mra);
#  151|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def665]
brltty-6.8/minimal/Programs/notes_beep.c:35:9: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/notes_beep.c:34:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/notes_beep.c:34:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/notes_beep.c:35:9: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_beep.c:35:9: throw: if ‘canBeep’ throws an exception...
brltty-6.8/minimal/Programs/notes_beep.c:35:9: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   33|   
#   34|     if ((device = malloc(sizeof(*device)))) {
#   35|->     if (canBeep()) {
#   36|         logMessage(LOG_DEBUG, "beeper enabled");
#   37|         return device;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def666]
brltty-6.8/minimal/Programs/notes_beep.c:36:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/notes_beep.c:34:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/notes_beep.c:34:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/notes_beep.c:35:9: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_beep.c:35:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/notes_beep.c:36:7: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_beep.c:36:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/notes_beep.c:36:7: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   34|     if ((device = malloc(sizeof(*device)))) {
#   35|       if (canBeep()) {
#   36|->       logMessage(LOG_DEBUG, "beeper enabled");
#   37|         return device;
#   38|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def667]
brltty-6.8/minimal/Programs/notes_fm.c:36:9: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/notes_fm.c:35:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/notes_fm.c:35:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/notes_fm.c:36:9: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_fm.c:36:9: throw: if ‘fmEnablePorts’ throws an exception...
brltty-6.8/minimal/Programs/notes_fm.c:36:9: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   34|   
#   35|     if ((device = malloc(sizeof(*device)))) {
#   36|->     if (fmEnablePorts(errorLevel)) {
#   37|         if (fmTestCard(errorLevel)) {
#   38|           device->channelNumber = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def668]
brltty-6.8/minimal/Programs/notes_fm.c:37:11: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/notes_fm.c:35:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/notes_fm.c:35:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/notes_fm.c:36:9: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_fm.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/notes_fm.c:37:11: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_fm.c:37:11: throw: if ‘fmTestCard’ throws an exception...
brltty-6.8/minimal/Programs/notes_fm.c:37:11: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   35|     if ((device = malloc(sizeof(*device)))) {
#   36|       if (fmEnablePorts(errorLevel)) {
#   37|->       if (fmTestCard(errorLevel)) {
#   38|           device->channelNumber = 0;
#   39|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def669]
brltty-6.8/minimal/Programs/notes_fm.c:40:9: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/notes_fm.c:35:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/notes_fm.c:35:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/notes_fm.c:36:9: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_fm.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/notes_fm.c:37:11: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_fm.c:37:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/notes_fm.c:38:9: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_fm.c:40:9: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/notes_fm.c:40:9: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   38|           device->channelNumber = 0;
#   39|   
#   40|->         logMessage(LOG_DEBUG, "FM enabled");
#   41|           return device;
#   42|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def670]
brltty-6.8/minimal/Programs/notes_fm.c:44:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/notes_fm.c:35:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/notes_fm.c:35:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/notes_fm.c:36:9: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_fm.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/notes_fm.c:37:11: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_fm.c:37:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/notes_fm.c:44:7: branch_false: ...to here
brltty-6.8/minimal/Programs/notes_fm.c:44:7: throw: if ‘fmDisablePorts’ throws an exception...
brltty-6.8/minimal/Programs/notes_fm.c:44:7: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   42|         }
#   43|   
#   44|->       fmDisablePorts();
#   45|       }
#   46|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def671]
brltty-6.8/minimal/Programs/notes_midi.c:42:25: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/notes_midi.c:41:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/notes_midi.c:41:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/notes_midi.c:42:25: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_midi.c:42:25: throw: if ‘openMidiDevice’ throws an exception...
brltty-6.8/minimal/Programs/notes_midi.c:42:25: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   40|   
#   41|     if ((device = malloc(sizeof(*device)))) {
#   42|->     if ((device->midi = openMidiDevice(errorLevel, opt_midiDevice))) {
#   43|         device->channelNumber = 0;
#   44|         setMidiInstrument(device->midi, device->channelNumber, prefs.midiInstrument);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def672]
brltty-6.8/minimal/Programs/notes_midi.c:44:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/notes_midi.c:41:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/notes_midi.c:41:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/notes_midi.c:42:25: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_midi.c:42:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/notes_midi.c:43:7: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_midi.c:44:7: throw: if ‘setMidiInstrument’ throws an exception...
brltty-6.8/minimal/Programs/notes_midi.c:44:7: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   42|       if ((device->midi = openMidiDevice(errorLevel, opt_midiDevice))) {
#   43|         device->channelNumber = 0;
#   44|->       setMidiInstrument(device->midi, device->channelNumber, prefs.midiInstrument);
#   45|   
#   46|         logMessage(LOG_DEBUG, "MIDI enabled");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def673]
brltty-6.8/minimal/Programs/notes_midi.c:46:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/notes_midi.c:41:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/notes_midi.c:41:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/notes_midi.c:42:25: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_midi.c:42:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/notes_midi.c:43:7: branch_true: ...to here
brltty-6.8/minimal/Programs/notes_midi.c:46:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/notes_midi.c:46:7: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   44|         setMidiInstrument(device->midi, device->channelNumber, prefs.midiInstrument);
#   45|   
#   46|->       logMessage(LOG_DEBUG, "MIDI enabled");
#   47|         return device;
#   48|       }

Error: CPPCHECK_WARNING (CWE-758): [#def674]
brltty-6.8/minimal/Programs/notes_pcm.c:219: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  217|          * high-order (sign) bit is set.
#  218|          */
#  219|->       int32_t amplitude = currentValue ^ (currentValue >> 31);
#  220|   
#  221|         /* Convert the 31-bit amplitude from unsigned to signed. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def675]
brltty-6.8/minimal/Programs/params_linux.c:47:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/cmdline", "r")’
brltty-6.8/minimal/Programs/params_linux.c:32:6: branch_true: following ‘true’ branch (when ‘parameters’ is non-NULL)...
brltty-6.8/minimal/Programs/params_linux.c:36:17: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:36:17: acquire_resource: opened here
brltty-6.8/minimal/Programs/params_linux.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:38:20: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:40:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:40:10: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:43:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
brltty-6.8/minimal/Programs/params_linux.c:46:16: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:46:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:47:21: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:46:15: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:48:61: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:50:16: branch_false: following ‘false’ branch (when ‘newParameters’ is NULL)...
brltty-6.8/minimal/Programs/params_linux.c:54:15: branch_false: ...to here
brltty-6.8/minimal/Programs/params_linux.c:54:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/params_linux.c:47:21: danger: ‘fopen("/proc/cmdline", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   45|   
#   46|             if ((strncmp(token, name, nameLength) == 0) &&
#   47|->               (token[nameLength] == '=')) {
#   48|               char *newParameters = strdup(token + nameLength + 1);
#   49|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def676]
brltty-6.8/minimal/Programs/params_linux.c:47:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/cmdline", "r")’
brltty-6.8/minimal/Programs/params_linux.c:32:6: branch_true: following ‘true’ branch (when ‘parameters’ is non-NULL)...
brltty-6.8/minimal/Programs/params_linux.c:36:17: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:36:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/params_linux.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:38:20: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:40:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:40:10: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:43:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
brltty-6.8/minimal/Programs/params_linux.c:46:16: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:46:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:47:21: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:46:15: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:48:61: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:50:16: branch_false: following ‘false’ branch (when ‘newParameters’ is NULL)...
brltty-6.8/minimal/Programs/params_linux.c:54:15: branch_false: ...to here
brltty-6.8/minimal/Programs/params_linux.c:54:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/params_linux.c:47:21: danger: ‘fopen("/proc/cmdline", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   45|   
#   46|             if ((strncmp(token, name, nameLength) == 0) &&
#   47|->               (token[nameLength] == '=')) {
#   48|               char *newParameters = strdup(token + nameLength + 1);
#   49|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def677]
brltty-6.8/minimal/Programs/params_linux.c:54:15: warning[-Wanalyzer-malloc-leak]: leak of ‘parameters’
brltty-6.8/minimal/Programs/params_linux.c:32:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/params_linux.c:32:6: branch_true: following ‘true’ branch (when ‘parameters’ is non-NULL)...
brltty-6.8/minimal/Programs/params_linux.c:36:17: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:38:20: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:40:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:40:10: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:43:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
brltty-6.8/minimal/Programs/params_linux.c:46:16: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:46:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:47:21: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:46:15: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/params_linux.c:48:61: branch_true: ...to here
brltty-6.8/minimal/Programs/params_linux.c:50:16: branch_false: following ‘false’ branch (when ‘newParameters’ is NULL)...
brltty-6.8/minimal/Programs/params_linux.c:54:15: branch_false: ...to here
brltty-6.8/minimal/Programs/params_linux.c:54:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/params_linux.c:54:15: danger: ‘parameters’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   52|                 parameters = newParameters;
#   53|               } else {
#   54|->               logMallocError();
#   55|               }
#   56|             }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def678]
brltty-6.8/minimal/Programs/parse.c:97:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*element’
brltty-6.8/minimal/Programs/parse.c:579:1: enter_function: entry to ‘getParameters’
brltty-6.8/minimal/Programs/parse.c:590:8: branch_true: following ‘true’ branch (when ‘values’ is non-NULL)...
brltty-6.8/minimal/Programs/parse.c:590:8: branch_true: ...to here
brltty-6.8/minimal/Programs/parse.c:593:14: branch_false: following ‘false’ branch (when ‘count <= index’)...
brltty-6.8/minimal/Programs/parse.c:602:10: branch_false: ...to here
brltty-6.8/minimal/Programs/parse.c:602:10: branch_false: following ‘false’ branch (when ‘count != index’)...
brltty-6.8/minimal/Programs/parse.c:607:7: branch_false: ...to here
brltty-6.8/minimal/Programs/parse.c:607:7: call_function: calling ‘deallocateStrings’ from ‘getParameters’
#   95|   deallocateStrings (char **array) {
#   96|     char **element = array;
#   97|->   while (*element) free(*element++);
#   98|     free(array);
#   99|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def679]
brltty-6.8/minimal/Programs/parse.c:112:11: warning[-Wanalyzer-malloc-leak]: leak of ‘splitString(value, 44, 0)’
brltty-6.8/minimal/Programs/parse.c:156:1: enter_function: entry to ‘changeListSetting’
brltty-6.8/minimal/Programs/parse.c:157:20: call_function: calling ‘splitString’ from ‘changeListSetting’
brltty-6.8/minimal/Programs/parse.c:157:20: return_function: returning to ‘changeListSetting’ from ‘splitString’
brltty-6.8/minimal/Programs/parse.c:159:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/parse.c:160:9: branch_true: ...to here
brltty-6.8/minimal/Programs/parse.c:160:9: call_function: calling ‘changeStringSetting’ from ‘changeListSetting’
#  110|         int index = 0;
#  111|   
#  112|->       if (*start) {
#  113|           while (1) {
#  114|             const char *end = strchr(start, delimiter);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def680]
brltty-6.8/minimal/Programs/parse.c:595:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/parse.c:590:8: branch_true: following ‘true’ branch (when ‘values’ is non-NULL)...
brltty-6.8/minimal/Programs/parse.c:590:8: branch_true: ...to here
brltty-6.8/minimal/Programs/parse.c:593:14: branch_true: following ‘true’ branch (when ‘count > index’)...
brltty-6.8/minimal/Programs/parse.c:594:21: branch_true: ...to here
brltty-6.8/minimal/Programs/parse.c:594:31: acquire_memory: allocated here
brltty-6.8/minimal/Programs/parse.c:594:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/parse.c:599:9: branch_false: ...to here
brltty-6.8/minimal/Programs/parse.c:593:14: branch_true: following ‘true’ branch (when ‘count > index’)...
brltty-6.8/minimal/Programs/parse.c:594:21: branch_true: ...to here
brltty-6.8/minimal/Programs/parse.c:594:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/parse.c:595:11: branch_true: ...to here
brltty-6.8/minimal/Programs/parse.c:595:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/parse.c:595:11: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  593|         while (index < count) {
#  594|           if (!(values[index] = strdup(""))) {
#  595|->           logMallocError();
#  596|             break;
#  597|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def681]
brltty-6.8/minimal/Programs/parse.c:595:11: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
brltty-6.8/minimal/Programs/parse.c:590:19: acquire_memory: allocated here
brltty-6.8/minimal/Programs/parse.c:590:8: branch_true: following ‘true’ branch (when ‘values’ is non-NULL)...
brltty-6.8/minimal/Programs/parse.c:590:8: branch_true: ...to here
brltty-6.8/minimal/Programs/parse.c:593:14: branch_true: following ‘true’ branch (when ‘count > index’)...
brltty-6.8/minimal/Programs/parse.c:594:21: branch_true: ...to here
brltty-6.8/minimal/Programs/parse.c:594:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/parse.c:595:11: branch_true: ...to here
brltty-6.8/minimal/Programs/parse.c:595:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/parse.c:595:11: danger: ‘values’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  593|         while (index < count) {
#  594|           if (!(values[index] = strdup(""))) {
#  595|->           logMallocError();
#  596|             break;
#  597|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def682]
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1104:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1102|   
# 1103|       if (!(newArray = realloc(scf->argument.array, ARRAY_SIZE(newArray, newSize)))) {
# 1104|->       logMallocError();
# 1105|         return 0;
# 1106|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def683]
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1144:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1142|         free(eqValue);
# 1143|       } else {
# 1144|->       logMallocError();
# 1145|       }
# 1146|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def684]
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1190:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1188|   static void
# 1189|   scfSortValues (SCFValueDescriptor *values, size_t count) {
# 1190|->   qsort(values, count, sizeof(*values), scfValueSorter);
# 1191|   }
# 1192|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def685]
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1202:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1200|       while (from < end) {
# 1201|         if (from->value == to->value) {
# 1202|->         logMessage(LOG_WARNING,
# 1203|             "%s: duplicate value: %s: 0X%08"PRIX32,
# 1204|             scfLogLabel, name, from->value

Error: GCC_ANALYZER_WARNING (CWE-401): [#def686]
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1229:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/minimal/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1227|       scfRemoveDuplicateValues(descriptors, &count, name);
# 1228|   
# 1229|->     logMessage(SCF_LOG_LEVEL,
# 1230|         "%s: value group size: %s: %zu", scfLogLabel, name, count
# 1231|       );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def687]
brltty-6.8/minimal/Programs/pipe.c:243:3: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/minimal/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  241|   static int
#  242|   createFifo (NamedPipeObject *obj) {
#  243|->   lockUmask();
#  244|     int result = mkfifo(obj->host.path, 0);
#  245|     unlockUmask();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def688]
brltty-6.8/minimal/Programs/pipe.c:245:3: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/minimal/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  243|     lockUmask();
#  244|     int result = mkfifo(obj->host.path, 0);
#  245|->   unlockUmask();
#  246|   
#  247|     if ((result == -1) && (errno == EEXIST)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def689]
brltty-6.8/minimal/Programs/pipe.c:251:7: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/minimal/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  249|   
#  250|       if (lstat(obj->host.path, &fifo) == -1) {
#  251|->       logMessage(LOG_ERR, "cannot stat FIFO: %s: %s",
#  252|                    obj->host.path, strerror(errno));
#  253|       } else if (S_ISFIFO(fifo.st_mode)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def690]
brltty-6.8/minimal/Programs/pipe.c:259:5: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/minimal/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  257|   
#  258|     if (result != -1) {
#  259|->     lockUmask();
#  260|       int changed = chmod(obj->host.path, S_IRUSR|S_IWUSR|S_IWGRP|S_IWOTH) != -1;
#  261|       unlockUmask();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def691]
brltty-6.8/minimal/Programs/pipe.c:261:5: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/minimal/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  259|       lockUmask();
#  260|       int changed = chmod(obj->host.path, S_IRUSR|S_IWUSR|S_IWGRP|S_IWOTH) != -1;
#  261|->     unlockUmask();
#  262|   
#  263|       if (changed) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def692]
brltty-6.8/minimal/Programs/pipe.c:265:36: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/minimal/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  263|       if (changed) {
#  264|         // open read-write even though we only read to prevent an end-of-file condition
#  265|->       if ((obj->input.descriptor = open(obj->host.path, O_RDWR|O_NONBLOCK)) != -1) {
#  266|           logMessage(LOG_DEBUG, "FIFO created: %s: fd=%d",
#  267|                      obj->host.path, obj->input.descriptor);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def693]
brltty-6.8/minimal/Programs/pipe.c:266:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
brltty-6.8/minimal/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/minimal/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  264|         // open read-write even though we only read to prevent an end-of-file condition
#  265|         if ((obj->input.descriptor = open(obj->host.path, O_RDWR|O_NONBLOCK)) != -1) {
#  266|->         logMessage(LOG_DEBUG, "FIFO created: %s: fd=%d",
#  267|                      obj->host.path, obj->input.descriptor);
#  268|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def694]
brltty-6.8/minimal/Programs/pipe.c:266:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/minimal/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  264|         // open read-write even though we only read to prevent an end-of-file condition
#  265|         if ((obj->input.descriptor = open(obj->host.path, O_RDWR|O_NONBLOCK)) != -1) {
#  266|->         logMessage(LOG_DEBUG, "FIFO created: %s: fd=%d",
#  267|                      obj->host.path, obj->input.descriptor);
#  268|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def695]
brltty-6.8/minimal/Programs/pipe.c:282:5: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/minimal/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  280|       removePipe(obj);
#  281|     } else {
#  282|->     logMessage(LOG_ERR, "cannot create FIFO: %s: %s",
#  283|                  obj->host.path, strerror(errno));
#  284|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def696]
brltty-6.8/minimal/Programs/pipe.c:323:31: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:323:31: throw: if ‘getNamedPipeDirectory’ throws an exception...
brltty-6.8/minimal/Programs/pipe.c:323:31: danger: ‘obj’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  321|   
#  322|       {
#  323|->       const char *directory = getNamedPipeDirectory();
#  324|   
#  325|         obj->host.path = directory? makePath(directory, name): NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def697]
brltty-6.8/minimal/Programs/pipe.c:325:35: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/minimal/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/minimal/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/minimal/Programs/pipe.c:325:35: throw: if ‘makePath’ throws an exception...
brltty-6.8/minimal/Programs/pipe.c:325:35: danger: ‘obj’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  323|         const char *directory = getNamedPipeDirectory();
#  324|   
#  325|->       obj->host.path = directory? makePath(directory, name): NULL;
#  326|       }
#  327|   

Error: GCC_ANALYZER_WARNING (CWE-129): [#def698]
brltty-6.8/minimal/Programs/prefs.c:96:26: warning[-Wanalyzer-tainted-array-index]: use of attacker-controlled value ‘newPreferences.expandCurrentWord’ in array lookup without checking for negative
brltty-6.8/minimal/Programs/prefs.c:351:1: enter_function: entry to ‘loadPreferencesFile’
brltty-6.8/minimal/Programs/prefs.c:357:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/prefs.c:359:21: branch_true: ...to here
brltty-6.8/minimal/Programs/prefs.c:361:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/prefs.c:364:15: branch_false: ...to here
brltty-6.8/minimal/Programs/prefs.c:364:15: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/prefs.c:365:17: branch_false: ...to here
brltty-6.8/minimal/Programs/prefs.c:364:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/prefs.c:366:17: branch_false: ...to here
brltty-6.8/minimal/Programs/prefs.c:364:16: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/prefs.c:374:7: branch_false: ...to here
brltty-6.8/minimal/Programs/prefs.c:396:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/prefs.c:397:9: branch_true: ...to here
brltty-6.8/minimal/Programs/prefs.c:397:9: call_function: calling ‘setStatusStyle’ from ‘loadPreferencesFile’
#   94|   
#   95|     if (style < styleCount) {
#   96|->     const unsigned char *fields = styleTable[style];
#   97|       if (*fields != sfEnd) setStatusFields(fields);
#   98|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def699]
brltty-6.8/minimal/Programs/prefs.c:557:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "w")’
brltty-6.8/minimal/Programs/prefs.c:565:16: acquire_resource: opened here
brltty-6.8/minimal/Programs/prefs.c:567:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/prefs.c:568:9: branch_true: ...to here
brltty-6.8/minimal/Programs/prefs.c:576:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/prefs.c:557:10: danger: ‘fopen(path, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  555|     );
#  556|   
#  557|->   return !ferror(file);
#  558|   }
#  559|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def700]
brltty-6.8/minimal/Programs/prefs.c:557:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "w")’
brltty-6.8/minimal/Programs/prefs.c:565:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/prefs.c:567:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/prefs.c:568:9: branch_true: ...to here
brltty-6.8/minimal/Programs/prefs.c:576:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/prefs.c:557:10: danger: ‘fopen(path, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  555|     );
#  556|   
#  557|->   return !ferror(file);
#  558|   }
#  559|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def701]
brltty-6.8/minimal/Programs/profile.c:168:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pad.values’
brltty-6.8/minimal/Programs/profile.c:147:1: enter_function: entry to ‘activateProfile’
brltty-6.8/minimal/Programs/profile.c:150:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/profile.c:153:17: branch_true: ...to here
brltty-6.8/minimal/Programs/profile.c:153:17: call_function: calling ‘makeProfilePath’ from ‘activateProfile’
brltty-6.8/minimal/Programs/profile.c:153:17: return_function: returning to ‘activateProfile’ from ‘makeProfilePath’
brltty-6.8/minimal/Programs/profile.c:153:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/profile.c:154:29: branch_true: ...to here
brltty-6.8/minimal/Programs/profile.c:158:25: acquire_memory: allocated here
brltty-6.8/minimal/Programs/profile.c:158:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/profile.c:158:10: branch_true: ...to here
brltty-6.8/minimal/Programs/profile.c:168:13: throw: if ‘processDataFile’ throws an exception...
brltty-6.8/minimal/Programs/profile.c:168:13: danger: ‘pad.values’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  166|           };
#  167|   
#  168|->         if (processDataFile(path, &parameters)) {
#  169|             if (changeProperties(profile, pad.values)) {
#  170|               ok = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def702]
brltty-6.8/minimal/Programs/program.c:294:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pidFile, "r")’
brltty-6.8/minimal/Programs/program.c:286:15: acquire_resource: opened here
brltty-6.8/minimal/Programs/program.c:286:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/program.c:290:17: branch_true: ...to here
brltty-6.8/minimal/Programs/program.c:290:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/program.c:292:22: branch_true: ...to here
brltty-6.8/minimal/Programs/program.c:295:13: throw: if ‘cancelProcess’ throws an exception...
brltty-6.8/minimal/Programs/program.c:294:12: danger: ‘fopen(pidFile, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  292|         long int pid = strtol(line, &end, 10);
#  293|   
#  294|->       if (!*end || isspace((unsigned char)*end)) {
#  295|           if (cancelProcess(pid)) cancelled = 1;
#  296|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def703]
brltty-6.8/minimal/Programs/program.c:294:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pidFile, "r")’
brltty-6.8/minimal/Programs/program.c:286:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/program.c:286:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/program.c:290:17: branch_true: ...to here
brltty-6.8/minimal/Programs/program.c:290:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/program.c:292:22: branch_true: ...to here
brltty-6.8/minimal/Programs/program.c:295:13: throw: if ‘cancelProcess’ throws an exception...
brltty-6.8/minimal/Programs/program.c:294:12: danger: ‘fopen(pidFile, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  292|         long int pid = strtol(line, &end, 10);
#  293|   
#  294|->       if (!*end || isspace((unsigned char)*end)) {
#  295|           if (cancelProcess(pid)) cancelled = 1;
#  296|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def704]
brltty-6.8/minimal/Programs/queue.c:65:27: warning[-Wanalyzer-malloc-leak]: leak of ‘newElement(queue,  item)’
brltty-6.8/minimal/Programs/queue.c:208:1: enter_function: entry to ‘enqueueItem’
brltty-6.8/minimal/Programs/queue.c:209:22: call_function: calling ‘newElement’ from ‘enqueueItem’
brltty-6.8/minimal/Programs/queue.c:209:22: return_function: returning to ‘enqueueItem’ from ‘newElement’
brltty-6.8/minimal/Programs/queue.c:211:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/queue.c:211:16: branch_true: ...to here
brltty-6.8/minimal/Programs/queue.c:211:16: call_function: calling ‘linkElement’ from ‘enqueueItem’
#   63|     {
#   64|       static int identifier = 0;
#   65|->     element->identifier = ++identifier;
#   66|     }
#   67|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def705]
brltty-6.8/minimal/Programs/report.c:191:29: warning[-Wanalyzer-malloc-leak]: leak of ‘rli’
brltty-6.8/minimal/Programs/report.c:172:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/report.c:173:10: branch_true: ...to here
brltty-6.8/minimal/Programs/report.c:181:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/report.c:186:18: branch_false: ...to here
brltty-6.8/minimal/Programs/report.c:186:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/report.c:186:10: branch_true: following ‘true’ branch (when ‘rli’ is non-NULL)...
brltty-6.8/minimal/Programs/report.c:187:9: branch_true: ...to here
brltty-6.8/minimal/Programs/report.c:191:29: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/minimal/Programs/report.c:191:29: danger: ‘rli’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  189|           rli->data = data;
#  190|   
#  191|->         if ((rli->element = enqueueItem(report->listeners, rli))) {
#  192|             logSymbol(LOG_DEBUG, listener, "report listener registered: %u", identifier);
#  193|             return rli;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def706]
brltty-6.8/minimal/Programs/rgx.c:81:5: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/minimal/Programs/rgx.c:106:1: enter_function: entry to ‘rgxAddPatternCharacters’
brltty-6.8/minimal/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:136:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/rgx.c:151:9: branch_false: ...to here
brltty-6.8/minimal/Programs/rgx.c:151:9: call_function: calling ‘rgxLogError’ from ‘rgxAddPatternCharacters’
#   79|     {
#   80|       size_t oldLength = STR_LENGTH;
#   81|->     STR_FORMAT(rgxFormatErrorMessage, error);
#   82|       if (STR_LENGTH == oldLength) STR_PRINTF("unrecognized error %d", error);
#   83|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def707]
brltty-6.8/minimal/Programs/rgx.c:92:3: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/minimal/Programs/rgx.c:106:1: enter_function: entry to ‘rgxAddPatternCharacters’
brltty-6.8/minimal/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:136:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/rgx.c:151:9: branch_false: ...to here
brltty-6.8/minimal/Programs/rgx.c:151:9: call_function: calling ‘rgxLogError’ from ‘rgxAddPatternCharacters’
#   90|   
#   91|     STR_END;
#   92|->   logMessage(LOG_WARNING, "%s", log);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def708]
brltty-6.8/minimal/Programs/rgx.c:132:32: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/minimal/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:132:32: throw: if ‘rgxCompilePattern’ throws an exception...
brltty-6.8/minimal/Programs/rgx.c:132:32: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  130|         RGX_OffsetType offset;
#  131|   
#  132|->       matcher->compiled.code = rgxCompilePattern(
#  133|           internal, length, rgx->options, &offset, &error
#  134|         );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def709]
brltty-6.8/minimal/Programs/rgx.c:137:34: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/minimal/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:136:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:137:34: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:137:34: throw: if ‘rgxAllocateData’ throws an exception...
brltty-6.8/minimal/Programs/rgx.c:137:34: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  135|   
#  136|         if (matcher->compiled.code) {
#  137|->         matcher->compiled.data = rgxAllocateData(matcher->compiled.code);
#  138|   
#  139|           if (matcher->compiled.data) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def710]
brltty-6.8/minimal/Programs/rgx.c:140:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/minimal/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:136:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:137:34: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:139:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:140:15: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:140:15: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/minimal/Programs/rgx.c:140:15: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  138|   
#  139|           if (matcher->compiled.data) {
#  140|->           if (enqueueItem(rgx->matchers, matcher)) {
#  141|               return matcher;
#  142|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def711]
brltty-6.8/minimal/Programs/rgx.c:146:11: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/minimal/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:136:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:137:34: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:139:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/rgx.c:146:11: branch_false: ...to here
brltty-6.8/minimal/Programs/rgx.c:146:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/rgx.c:146:11: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  144|             rgxDeallocateData(matcher->compiled.data);
#  145|           } else {
#  146|->           logMallocError();
#  147|           }
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def712]
brltty-6.8/minimal/Programs/rgx.c:149:9: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/minimal/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:136:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/rgx.c:137:34: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:139:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/rgx.c:146:11: branch_false: ...to here
brltty-6.8/minimal/Programs/rgx.c:149:9: throw: if ‘rgxDeallocateCode’ throws an exception...
brltty-6.8/minimal/Programs/rgx.c:149:9: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  147|           }
#  148|   
#  149|->         rgxDeallocateCode(matcher->compiled.code);
#  150|         } else {
#  151|           rgxLogError(error, matcher, &offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def713]
brltty-6.8/minimal/Programs/rgx.c:156:7: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/minimal/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/minimal/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:124:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/rgx.c:156:7: branch_false: ...to here
brltty-6.8/minimal/Programs/rgx.c:156:7: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/minimal/Programs/rgx.c:156:7: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  154|         free(matcher->pattern.characters);
#  155|       } else {
#  156|->       logMallocError();
#  157|       }
#  158|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def714]
brltty-6.8/minimal/Programs/rgx.c:356:26: warning[-Wanalyzer-malloc-leak]: leak of ‘rgx’
brltty-6.8/minimal/Programs/rgx.c:351:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/rgx.c:351:6: branch_true: following ‘true’ branch (when ‘rgx’ is non-NULL)...
brltty-6.8/minimal/Programs/rgx.c:351:6: branch_true: ...to here
brltty-6.8/minimal/Programs/rgx.c:356:26: throw: if ‘newQueue’ throws an exception...
brltty-6.8/minimal/Programs/rgx.c:356:26: danger: ‘rgx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  354|       rgx->options = 0;
#  355|   
#  356|->     if ((rgx->matchers = newQueue(rgxDeallocateMatcher, NULL))) {
#  357|         return rgx;
#  358|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def715]
brltty-6.8/minimal/Programs/routing.c:156:5: warning[-Wanalyzer-malloc-leak]: leak of ‘crd.vertical.buffer’
brltty-6.8/minimal/Programs/routing.c:478:1: enter_function: entry to ‘startRoutingProcess’
brltty-6.8/minimal/Programs/routing.c:496:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/routing.c:497:18: branch_true: ...to here
brltty-6.8/minimal/Programs/routing.c:497:18: call_function: calling ‘routeCursor’ from ‘startRoutingProcess’
#  154|       }
#  155|   
#  156|->     logRouting("screen: num=%d cols=%d rows=%d",
#  157|                  crd->screen.number,
#  158|                  crd->screen.width, crd->screen.height);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def716]
brltty-6.8/minimal/Programs/serial.c:716:30: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
brltty-6.8/minimal/Programs/serial.c:707:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/serial.c:710:19: branch_true: ...to here
brltty-6.8/minimal/Programs/serial.c:710:19: acquire_memory: allocated here
brltty-6.8/minimal/Programs/serial.c:710:8: branch_true: following ‘true’ branch (when ‘serial’ is non-NULL)...
brltty-6.8/minimal/Programs/serial.c:711:7: branch_true: ...to here
brltty-6.8/minimal/Programs/serial.c:716:30: throw: if ‘getDevicePath’ throws an exception...
brltty-6.8/minimal/Programs/serial.c:716:30: danger: ‘serial’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  714|           const char *name = parameters[SERIAL_PARM_NAME];
#  715|           if (!*name) name = SERIAL_FIRST_DEVICE;
#  716|->         serial->devicePath = getDevicePath(name);
#  717|         }
#  718|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def717]
brltty-6.8/minimal/Programs/serial.c:723:13: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
brltty-6.8/minimal/Programs/serial.c:707:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/serial.c:710:19: branch_true: ...to here
brltty-6.8/minimal/Programs/serial.c:710:19: acquire_memory: allocated here
brltty-6.8/minimal/Programs/serial.c:710:8: branch_true: following ‘true’ branch (when ‘serial’ is non-NULL)...
brltty-6.8/minimal/Programs/serial.c:711:7: branch_true: ...to here
brltty-6.8/minimal/Programs/serial.c:719:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/serial.c:720:9: branch_true: ...to here
brltty-6.8/minimal/Programs/serial.c:723:13: throw: if ‘serialConnectDevice’ throws an exception...
brltty-6.8/minimal/Programs/serial.c:723:13: danger: ‘serial’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  721|           serial->stream = NULL;
#  722|   
#  723|->         if (serialConnectDevice(serial, serial->devicePath)) {
#  724|             int ok = 1;
#  725|   

Error: CPPCHECK_WARNING (CWE-457): [#def718]
brltty-6.8/minimal/Programs/serial_termios.c:222: error[uninitvar]: Uninitialized variable: size
#  220|   
#  221|     attributes->c_cflag &= ~CSIZE;
#  222|->   attributes->c_cflag |= size;
#  223|     return 1;
#  224|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def719]
brltty-6.8/minimal/Programs/system_linux.c:939:9: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/minimal/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/minimal/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
#  937|           fclose(stream);
#  938|         } else {
#  939|->         logMessage(LOG_WARNING, "cannot open %s: %s", path, strerror(errno));
#  940|         }
#  941|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def720]
brltty-6.8/minimal/Programs/system_linux.c:939:9: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
#  937|           fclose(stream);
#  938|         } else {
#  939|->         logMessage(LOG_WARNING, "cannot open %s: %s", path, strerror(errno));
#  940|         }
#  941|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def721]
brltty-6.8/minimal/Programs/system_linux.c:945:16: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/minimal/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/minimal/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
#  943|       {
#  944|         const char *const arguments[] = {command, "-q", name, NULL};
#  945|->       int ok = executeHostCommand(arguments) == 0;
#  946|   
#  947|         if (!ok) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def722]
brltty-6.8/minimal/Programs/system_linux.c:945:16: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
#  943|       {
#  944|         const char *const arguments[] = {command, "-q", name, NULL};
#  945|->       int ok = executeHostCommand(arguments) == 0;
#  946|   
#  947|         if (!ok) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def723]
brltty-6.8/minimal/Programs/system_linux.c:948:9: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/minimal/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/minimal/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
#  946|   
#  947|         if (!ok) {
#  948|->         logMessage(LOG_WARNING, "kernel module not installed: %s", name);
#  949|           return 0;
#  950|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def724]
brltty-6.8/minimal/Programs/system_linux.c:948:9: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
#  946|   
#  947|         if (!ok) {
#  948|->         logMessage(LOG_WARNING, "kernel module not installed: %s", name);
#  949|           return 0;
#  950|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def725]
brltty-6.8/minimal/Programs/system_linux.c:972:13: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/minimal/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/minimal/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
#  970|   
#  971|     if (!installed) wait = 0;
#  972|->   if (wait) asyncWait(500);
#  973|     return installed;
#  974|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def726]
brltty-6.8/minimal/Programs/system_linux.c:972:13: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
#  970|   
#  971|     if (!installed) wait = 0;
#  972|->   if (wait) asyncWait(500);
#  973|     return installed;
#  974|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def727]
brltty-6.8/minimal/Programs/system_linux.c:984:21: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/minimal/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
#  982|     #endif /* O_CLOEXEC */
#  983|   
#  984|->   if ((descriptor = open(path, flags)) != -1) goto opened;
#  985|     if (!allowModeSubset) goto failed;
#  986|     if ((flags & O_ACCMODE) != O_RDWR) goto failed;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def728]
brltty-6.8/minimal/Programs/system_linux.c:997:23: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/minimal/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
#  995|   
#  996|     tryWriteOnly:
#  997|->     if ((descriptor = open(path, (flags | O_WRONLY))) != -1) goto opened;
#  998|   
#  999|     tryReadOnly:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def729]
brltty-6.8/minimal/Programs/system_linux.c:1000:23: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/minimal/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
#  998|   
#  999|     tryReadOnly:
# 1000|->     if ((descriptor = open(path, (flags | O_RDONLY))) != -1) goto opened;
# 1001|   
# 1002|       errno = error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def730]
brltty-6.8/minimal/Programs/system_linux.c:1006:3: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/minimal/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
# 1004|   
# 1005|   failed:
# 1006|->   logMessage(LOG_DEBUG, "cannot open device: %s: %s", path, strerror(errno));
# 1007|     return -1;
# 1008|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def731]
brltty-6.8/minimal/Programs/system_linux.c:1010:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘descriptor’
brltty-6.8/minimal/Programs/system_linux.c:984:21: acquire_resource: opened here
brltty-6.8/minimal/Programs/system_linux.c:984:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/system_linux.c:984:3: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1010:3: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/system_linux.c:1010:3: danger: ‘descriptor’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1008|   
# 1009|   opened:
# 1010|->   logMessage(LOG_DEBUG, "device opened: %s: fd=%d", path, descriptor);
# 1011|     return descriptor;
# 1012|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def732]
brltty-6.8/minimal/Programs/system_linux.c:1010:3: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/minimal/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
# 1008|   
# 1009|   opened:
# 1010|->   logMessage(LOG_DEBUG, "device opened: %s: fd=%d", path, descriptor);
# 1011|     return descriptor;
# 1012|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def733]
brltty-6.8/minimal/Programs/system_linux.c:1075:16: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/minimal/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
# 1073|   int
# 1074|   openCharacterDevice (const char *name, int flags, int major, int minor) {
# 1075|->   char *path = getDevicePath(name);
# 1076|     int descriptor;
# 1077|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def734]
brltty-6.8/minimal/Programs/system_linux.c:1084:19: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/minimal/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
# 1082|         free(path);
# 1083|   
# 1084|->       if ((path = makeWritablePath(locatePathName(name)))) {
# 1085|           descriptor = createCharacterDevice(path, flags, major, minor);
# 1086|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def735]
brltty-6.8/minimal/Programs/system_linux.c:1126:16: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/minimal/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/minimal/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
# 1124|       {
# 1125|         static const char *const names[] = {"uinput", "input/uinput", NULL};
# 1126|->       device = resolveDeviceName(names, 0, "uinput");
# 1127|       }
# 1128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def736]
brltty-6.8/minimal/Programs/system_linux.c:1126:16: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/minimal/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/minimal/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/minimal/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/minimal/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/minimal/Programs/system_linux.c:1126:16: throw: if ‘resolveDeviceName’ throws an exception...
brltty-6.8/minimal/Programs/system_linux.c:1126:16: danger: ‘uinput’ leaks here; was allocated at [(2)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/1)
# 1124|       {
# 1125|         static const char *const names[] = {"uinput", "input/uinput", NULL};
# 1126|->       device = resolveDeviceName(names, 0, "uinput");
# 1127|       }
# 1128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def737]
brltty-6.8/minimal/Programs/thread.c:74:5: warning[-Wanalyzer-malloc-leak]: leak of ‘run’
brltty-6.8/minimal/Programs/thread.c:68:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/thread.c:68:6: branch_true: following ‘true’ branch (when ‘run’ is non-NULL)...
brltty-6.8/minimal/Programs/thread.c:70:21: branch_true: ...to here
brltty-6.8/minimal/Programs/thread.c:74:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/thread.c:74:5: danger: ‘run’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   72|       strcpy(run->name, create->name);
#   73|   
#   74|->     logMessage(LOG_CATEGORY(ASYNC_EVENTS), "creating thread: %s", create->name);
#   75|       create->error = pthread_create(create->thread, create->attributes, runThread, run);
#   76|       if (!create->error) return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def738]
brltty-6.8/minimal/Programs/ttb_compile.c:44:10: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/minimal/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:353:28: call_function: calling ‘getTextTableHeader’ from ‘makeTextTable’
#   42|   void *
#   43|   getTextTableItem (TextTableData *ttd, TextTableOffset offset) {
#   44|->   return getDataItem(ttd->area, offset);
#   45|   }
#   46|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def739]
brltty-6.8/minimal/Programs/ttb_compile.c:76:32: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/minimal/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:360:15: call_function: calling ‘getUnicodeCell’ from ‘makeTextTable’
#   74|   
#   75|     {
#   76|->     UnicodeGroupEntry *group = getDataItem(ttd->area, groupOffset);
#   77|       unsigned int planeNumber = UNICODE_PLANE_NUMBER(character);
#   78|       DataOffset planeOffset = group->planes[planeNumber];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def740]
brltty-6.8/minimal/Programs/ttb_compile.c:101:32: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/minimal/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:360:15: call_function: calling ‘getUnicodeCell’ from ‘makeTextTable’
#   99|   
#  100|     {
#  101|->     UnicodePlaneEntry *plane = getDataItem(ttd->area, planeOffset);
#  102|       unsigned int rowNumber = UNICODE_ROW_NUMBER(character);
#  103|       DataOffset rowOffset = plane->rows[rowNumber];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def741]
brltty-6.8/minimal/Programs/ttb_compile.c:124:10: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/minimal/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:360:15: call_function: calling ‘getUnicodeCell’ from ‘makeTextTable’
#  122|     DataOffset rowOffset = getUnicodeRowOffset(ttd, character, allocate);
#  123|     if (!rowOffset) return NULL;
#  124|->   return getDataItem(ttd->area, rowOffset);
#  125|   }
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def742]
brltty-6.8/minimal/Programs/ttb_compile.c:264:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ttd’
brltty-6.8/minimal/Programs/ttb_compile.c:257:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ttb_compile.c:257:6: branch_true: following ‘true’ branch (when ‘ttd’ is non-NULL)...
brltty-6.8/minimal/Programs/ttb_compile.c:258:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:264:22: throw: if ‘newDataArea’ throws an exception...
brltty-6.8/minimal/Programs/ttb_compile.c:264:22: danger: ‘ttd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  262|       ttd->alias.count = 0;
#  263|   
#  264|->     if ((ttd->area = newDataArea())) {
#  265|         if (allocateDataItem(ttd->area, NULL, sizeof(TextTableHeader), __alignof__(TextTableHeader))) {
#  266|           return ttd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def743]
brltty-6.8/minimal/Programs/ttb_compile.c:265:11: warning[-Wanalyzer-malloc-leak]: leak of ‘ttd’
brltty-6.8/minimal/Programs/ttb_compile.c:257:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ttb_compile.c:257:6: branch_true: following ‘true’ branch (when ‘ttd’ is non-NULL)...
brltty-6.8/minimal/Programs/ttb_compile.c:258:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:264:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ttb_compile.c:265:11: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:265:11: throw: if ‘allocateDataItem’ throws an exception...
brltty-6.8/minimal/Programs/ttb_compile.c:265:11: danger: ‘ttd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  263|   
#  264|       if ((ttd->area = newDataArea())) {
#  265|->       if (allocateDataItem(ttd->area, NULL, sizeof(TextTableHeader), __alignof__(TextTableHeader))) {
#  266|           return ttd;
#  267|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def744]
brltty-6.8/minimal/Programs/ttb_compile.c:269:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ttd’
brltty-6.8/minimal/Programs/ttb_compile.c:257:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ttb_compile.c:257:6: branch_true: following ‘true’ branch (when ‘ttd’ is non-NULL)...
brltty-6.8/minimal/Programs/ttb_compile.c:258:5: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:264:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ttb_compile.c:265:11: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:265:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/ttb_compile.c:269:7: branch_false: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:269:7: throw: if ‘destroyDataArea’ throws an exception...
brltty-6.8/minimal/Programs/ttb_compile.c:269:7: danger: ‘ttd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  267|         }
#  268|   
#  269|->       destroyDataArea(ttd->area);
#  270|       }
#  271|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def745]
brltty-6.8/minimal/Programs/ttb_compile.c:333:11: warning[-Wanalyzer-malloc-leak]: leak of ‘parameters.data’
brltty-6.8/minimal/Programs/ttb_compile.c:323:1: enter_function: entry to ‘processTextTableLines’
brltty-6.8/minimal/Programs/ttb_compile.c:324:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ttb_compile.c:327:16: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:327:16: call_function: calling ‘newTextTableData’ from ‘processTextTableLines’
brltty-6.8/minimal/Programs/ttb_compile.c:327:16: return_function: returning to ‘processTextTableLines’ from ‘newTextTableData’
brltty-6.8/minimal/Programs/ttb_compile.c:327:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/ttb_compile.c:328:32: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:333:11: throw: if ‘processDataStream’ throws an exception...
brltty-6.8/minimal/Programs/ttb_compile.c:333:11: danger: ‘parameters.data’ leaks here; was allocated at [(6)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/5)
#  331|         };
#  332|   
#  333|->       if (processDataStream(NULL, stream, name, &parameters)) {
#  334|           if (finishTextTableData(ttd)) {
#  335|             return ttd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def746]
brltty-6.8/minimal/Programs/ttb_compile.c:354:19: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:354:19: throw: if ‘getDataSize’ throws an exception...
brltty-6.8/minimal/Programs/ttb_compile.c:354:19: danger: ‘table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  352|   
#  353|       table->header.fields = getTextTableHeader(ttd);
#  354|->     table->size = getDataSize(ttd->area);
#  355|   
#  356|       table->options.tryBaseCharacter = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def747]
brltty-6.8/minimal/Programs/ttb_compile.c:364:5: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/minimal/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/minimal/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/minimal/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:360:15: call_function: calling ‘getUnicodeCell’ from ‘makeTextTable’
brltty-6.8/minimal/Programs/ttb_compile.c:360:15: return_function: returning to ‘makeTextTable’ from ‘getUnicodeCell’
brltty-6.8/minimal/Programs/ttb_compile.c:361:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/ttb_compile.c:364:5: branch_false: ...to here
brltty-6.8/minimal/Programs/ttb_compile.c:364:5: throw: if ‘resetDataArea’ throws an exception...
brltty-6.8/minimal/Programs/ttb_compile.c:364:5: danger: ‘table’ leaks here; was allocated at [(2)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/1)
#  362|       }
#  363|   
#  364|->     resetDataArea(ttd->area);
#  365|     }
#  366|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def748]
brltty-6.8/minimal/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(0)’
brltty-6.8/minimal/Programs/tune.c:431:1: enter_function: entry to ‘tuneSetDevice’
brltty-6.8/minimal/Programs/tune.c:466:16: call_function: calling ‘newTuneRequest’ from ‘tuneSetDevice’
brltty-6.8/minimal/Programs/tune.c:466:16: return_function: returning to ‘tuneSetDevice’ from ‘newTuneRequest’
brltty-6.8/minimal/Programs/tune.c:466:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/tune.c:467:7: branch_true: ...to here
brltty-6.8/minimal/Programs/tune.c:468:12: call_function: calling ‘sendTuneRequest’ from ‘tuneSetDevice’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def749]
brltty-6.8/minimal/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(1)’
brltty-6.8/minimal/Programs/tune.c:476:1: enter_function: entry to ‘tunePlayNotes’
brltty-6.8/minimal/Programs/tune.c:477:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/tune.c:480:16: branch_true: ...to here
brltty-6.8/minimal/Programs/tune.c:480:16: call_function: calling ‘newTuneRequest’ from ‘tunePlayNotes’
brltty-6.8/minimal/Programs/tune.c:480:16: return_function: returning to ‘tunePlayNotes’ from ‘newTuneRequest’
brltty-6.8/minimal/Programs/tune.c:480:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/tune.c:481:7: branch_true: ...to here
brltty-6.8/minimal/Programs/tune.c:483:12: call_function: calling ‘sendTuneRequest’ from ‘tunePlayNotes’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def750]
brltty-6.8/minimal/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(2)’
brltty-6.8/minimal/Programs/tune.c:489:1: enter_function: entry to ‘tunePlayTones’
brltty-6.8/minimal/Programs/tune.c:490:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/tune.c:493:16: branch_true: ...to here
brltty-6.8/minimal/Programs/tune.c:493:16: call_function: calling ‘newTuneRequest’ from ‘tunePlayTones’
brltty-6.8/minimal/Programs/tune.c:493:16: return_function: returning to ‘tunePlayTones’ from ‘newTuneRequest’
brltty-6.8/minimal/Programs/tune.c:493:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/tune.c:494:7: branch_true: ...to here
brltty-6.8/minimal/Programs/tune.c:496:12: call_function: calling ‘sendTuneRequest’ from ‘tunePlayTones’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def751]
brltty-6.8/minimal/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(3)’
brltty-6.8/minimal/Programs/tune.c:502:1: enter_function: entry to ‘tuneWait’
brltty-6.8/minimal/Programs/tune.c:505:14: call_function: calling ‘newTuneRequest’ from ‘tuneWait’
brltty-6.8/minimal/Programs/tune.c:505:14: return_function: returning to ‘tuneWait’ from ‘newTuneRequest’
brltty-6.8/minimal/Programs/tune.c:505:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/tune.c:506:5: branch_true: ...to here
brltty-6.8/minimal/Programs/tune.c:507:10: call_function: calling ‘sendTuneRequest’ from ‘tuneWait’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def752]
brltty-6.8/minimal/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(4)’
brltty-6.8/minimal/Programs/tune.c:518:1: enter_function: entry to ‘tuneSynchronize’
brltty-6.8/minimal/Programs/tune.c:521:14: call_function: calling ‘newTuneRequest’ from ‘tuneSynchronize’
brltty-6.8/minimal/Programs/tune.c:521:14: return_function: returning to ‘tuneSynchronize’ from ‘newTuneRequest’
brltty-6.8/minimal/Programs/tune.c:521:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/tune.c:522:32: branch_true: ...to here
brltty-6.8/minimal/Programs/tune.c:525:9: call_function: calling ‘sendTuneRequest’ from ‘tuneSynchronize’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def753]
brltty-6.8/minimal/Programs/tune_builder.c:643:47: warning[-Wanalyzer-malloc-leak]: leak of ‘tb’
brltty-6.8/minimal/Programs/tune_builder.c:660:1: enter_function: entry to ‘newTuneBuilder’
brltty-6.8/minimal/Programs/tune_builder.c:663:13: acquire_memory: allocated here
brltty-6.8/minimal/Programs/tune_builder.c:663:6: branch_true: following ‘true’ branch (when ‘tb’ is non-NULL)...
brltty-6.8/minimal/Programs/tune_builder.c:664:5: branch_true: ...to here
brltty-6.8/minimal/Programs/tune_builder.c:669:5: call_function: calling ‘resetTuneBuilder’ from ‘newTuneBuilder’
#  641|   
#  642|     setParameter(&tb->duration, "note duration", 1, UINT16_MAX, 0);
#  643|->   setParameter(&tb->note, "MIDI note number", getLowestNote(), getHighestNote(), NOTE_MIDDLE_C+noteOffsets[2]);
#  644|     setParameter(&tb->octave, "octave number", 0, 9, 0);
#  645|     setParameter(&tb->percentage, "percentage", 1, 100, 80);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def754]
brltty-6.8/minimal/Programs/tune_builder.c:643:64: warning[-Wanalyzer-malloc-leak]: leak of ‘tb’
brltty-6.8/minimal/Programs/tune_builder.c:660:1: enter_function: entry to ‘newTuneBuilder’
brltty-6.8/minimal/Programs/tune_builder.c:663:13: acquire_memory: allocated here
brltty-6.8/minimal/Programs/tune_builder.c:663:6: branch_true: following ‘true’ branch (when ‘tb’ is non-NULL)...
brltty-6.8/minimal/Programs/tune_builder.c:664:5: branch_true: ...to here
brltty-6.8/minimal/Programs/tune_builder.c:669:5: call_function: calling ‘resetTuneBuilder’ from ‘newTuneBuilder’
#  641|   
#  642|     setParameter(&tb->duration, "note duration", 1, UINT16_MAX, 0);
#  643|->   setParameter(&tb->note, "MIDI note number", getLowestNote(), getHighestNote(), NOTE_MIDDLE_C+noteOffsets[2]);
#  644|     setParameter(&tb->octave, "octave number", 0, 9, 0);
#  645|     setParameter(&tb->percentage, "percentage", 1, 100, 80);

Error: CPPCHECK_WARNING (CWE-457): [#def755]
brltty-6.8/minimal/Programs/update.c:301: warning[uninitvar]: Uninitialized variable: inputText
#  299|     contractText(
#  300|       contractionTable, &brd->contracted.cache,
#  301|->     inputText, &inputLength,
#  302|       cells, &outputLength,
#  303|       offsetsArray, getCursorOffsetForContracting()

Error: GCC_ANALYZER_WARNING (CWE-457): [#def756]
brltty-6.8/minimal/Programs/update.c:714:43: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*compactCells[i]’
brltty-6.8/minimal/Programs/update.c:634:1: enter_function: entry to ‘renderInfoLine’
brltty-6.8/minimal/Programs/update.c:638:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/update.c:644:23: branch_false: ...to here
brltty-6.8/minimal/Programs/update.c:659:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/update.c:668:5: branch_false: ...to here
brltty-6.8/minimal/Programs/update.c:675:3: call_function: calling ‘getBrailleVariantCharacter’ from ‘renderInfoLine’
brltty-6.8/minimal/Programs/update.c:675:3: return_function: returning to ‘renderInfoLine’ from ‘getBrailleVariantCharacter’
brltty-6.8/minimal/Programs/update.c:687:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/update.c:701:12: branch_false: ...to here
brltty-6.8/minimal/Programs/update.c:708:30: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/update.c:710:5: branch_false: ...to here
brltty-6.8/minimal/Programs/update.c:710:28: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/update.c:713:10: branch_true: ...to here
brltty-6.8/minimal/Programs/update.c:713:10: branch_false: following ‘false’ branch (when ‘threshold <= i’)...
brltty-6.8/minimal/Programs/update.c:716:21: branch_false: ...to here
brltty-6.8/minimal/Programs/update.c:710:28: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/update.c:713:10: branch_true: ...to here
brltty-6.8/minimal/Programs/update.c:713:10: branch_false: following ‘false’ branch (when ‘threshold <= i’)...
brltty-6.8/minimal/Programs/update.c:716:21: branch_false: ...to here
brltty-6.8/minimal/Programs/update.c:710:28: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/update.c:713:10: branch_true: ...to here
brltty-6.8/minimal/Programs/update.c:714:43: danger: use of uninitialized value ‘*compactCells[i]’ here
#  712|   
#  713|         if (i < threshold) {
#  714|->         character = UNICODE_BRAILLE_ROW | compactCells[i];
#  715|         } else {
#  716|           character = convertCharToWchar(text[i]);

Error: CPPCHECK_WARNING (CWE-457): [#def757]
brltty-6.8/minimal/Programs/update.c:724: warning[uninitvar]: Uninitialized variable: characters
#  722|     }
#  723|   
#  724|->   return writeBrailleCharacters(mode, characters, length);
#  725|   }
#  726|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def758]
brltty-6.8/minimal/Programs/usb.c:62:10: warning[-Wanalyzer-malloc-leak]: leak of ‘descriptors’
brltty-6.8/minimal/Programs/usb.c:494:1: enter_function: entry to ‘usbConfigureDevice’
brltty-6.8/minimal/Programs/usb.c:506:52: call_function: calling ‘usbConfigurationDescriptor’ from ‘usbConfigureDevice’
#   60|     int timeout
#   61|   ) {
#   62|->   return usbControlTransfer(device, UsbControlDirection_Input, recipient, type,
#   63|                               request, value, index, buffer, length, timeout);
#   64|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def759]
brltty-6.8/minimal/Programs/usb.c:461:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘descriptor.configuration.wTotalLength’
brltty-6.8/minimal/Programs/usb.c:760:1: enter_function: entry to ‘usbGetEndpoint’
brltty-6.8/minimal/Programs/usb.c:762:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/usb.c:763:45: branch_false: ...to here
brltty-6.8/minimal/Programs/usb.c:763:45: call_function: calling ‘usbEndpointDescriptor’ from ‘usbGetEndpoint’
#  459|   
#  460|         if (number < device->descriptor.bNumConfigurations) {
#  461|->         int length = getLittleEndian16(descriptor.configuration.wTotalLength);
#  462|           UsbDescriptor *descriptors;
#  463|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def760]
brltty-6.8/minimal/Programs/usb.c:490:10: warning[-Wanalyzer-malloc-leak]: leak of ‘descriptors’
brltty-6.8/minimal/Programs/usb.c:494:1: enter_function: entry to ‘usbConfigureDevice’
brltty-6.8/minimal/Programs/usb.c:506:52: call_function: calling ‘usbConfigurationDescriptor’ from ‘usbConfigureDevice’
#  488|     }
#  489|   
#  490|->   return device->configuration;
#  491|   }
#  492|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def761]
brltty-6.8/minimal/Programs/usb.c:874:5: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/usb.c:1028:1: enter_function: entry to ‘usbOpenDevice’
brltty-6.8/minimal/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1040:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/usb.c:1052:7: branch_false: ...to here
brltty-6.8/minimal/Programs/usb.c:1052:7: call_function: calling ‘usbRemoveEndpoints’ from ‘usbOpenDevice’
#  872|   usbRemoveEndpoints (UsbDevice *device, int final) {
#  873|     if (device->endpoints) {
#  874|->     processQueue(device->endpoints, usbFinishEndpoint, NULL);
#  875|       deleteElements(device->endpoints);
#  876|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def762]
brltty-6.8/minimal/Programs/usb.c:875:5: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/usb.c:1028:1: enter_function: entry to ‘usbOpenDevice’
brltty-6.8/minimal/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1040:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/usb.c:1052:7: branch_false: ...to here
brltty-6.8/minimal/Programs/usb.c:1052:7: call_function: calling ‘usbRemoveEndpoints’ from ‘usbOpenDevice’
#  873|     if (device->endpoints) {
#  874|       processQueue(device->endpoints, usbFinishEndpoint, NULL);
#  875|->     deleteElements(device->endpoints);
#  876|   
#  877|       if (final) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def763]
brltty-6.8/minimal/Programs/usb.c:878:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/usb.c:1028:1: enter_function: entry to ‘usbOpenDevice’
brltty-6.8/minimal/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1040:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/usb.c:1052:7: branch_false: ...to here
brltty-6.8/minimal/Programs/usb.c:1052:7: call_function: calling ‘usbRemoveEndpoints’ from ‘usbOpenDevice’
#  876|   
#  877|       if (final) {
#  878|->       deallocateQueue(device->endpoints);
#  879|         device->endpoints = NULL;
#  880|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def764]
brltty-6.8/minimal/Programs/usb.c:898:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/minimal/Programs/usb.c:894:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb.c:894:6: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/minimal/Programs/usb.c:896:5: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:898:9: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/minimal/Programs/usb.c:898:9: danger: ‘entry’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  896|       entry->filter = filter;
#  897|   
#  898|->     if (enqueueItem(device->inputFilters, entry)) return 1;
#  899|   
#  900|       free(entry);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def765]
brltty-6.8/minimal/Programs/usb.c:1039:30: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1039:30: throw: if ‘newQueue’ throws an exception...
brltty-6.8/minimal/Programs/usb.c:1039:30: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1037|       device->disableEndpointReset = 0;
# 1038|   
# 1039|->     if ((device->endpoints = newQueue(usbDeallocateEndpoint, NULL))) {
# 1040|         if ((device->inputFilters = newQueue(usbDeallocateInputFilter, NULL))) {
# 1041|           if (usbReadDeviceDescriptor(device)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def766]
brltty-6.8/minimal/Programs/usb.c:1040:35: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1040:35: throw: if ‘newQueue’ throws an exception...
brltty-6.8/minimal/Programs/usb.c:1040:35: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 1038|   
# 1039|       if ((device->endpoints = newQueue(usbDeallocateEndpoint, NULL))) {
# 1040|->       if ((device->inputFilters = newQueue(usbDeallocateInputFilter, NULL))) {
# 1041|           if (usbReadDeviceDescriptor(device)) {
# 1042|             if (device->descriptor.bDescriptorType == UsbDescriptorType_Device) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def767]
brltty-6.8/minimal/Programs/usb.c:1041:13: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/minimal/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/minimal/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1040:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb.c:1041:13: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1041:13: throw: if ‘usbReadDeviceDescriptor’ throws an exception...
brltty-6.8/minimal/Programs/usb.c:1041:13: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 1039|       if ((device->endpoints = newQueue(usbDeallocateEndpoint, NULL))) {
# 1040|         if ((device->inputFilters = newQueue(usbDeallocateInputFilter, NULL))) {
# 1041|->         if (usbReadDeviceDescriptor(device)) {
# 1042|             if (device->descriptor.bDescriptorType == UsbDescriptorType_Device) {
# 1043|               if (device->descriptor.bLength == UsbDescriptorSize_Device) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def768]
brltty-6.8/minimal/Programs/usb.c:1641:28: warning[-Wanalyzer-malloc-leak]: leak of ‘channel’
brltty-6.8/minimal/Programs/usb.c:1638:18: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb.c:1638:6: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
brltty-6.8/minimal/Programs/usb.c:1641:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb.c:1641:28: throw: if ‘usbFindDevice’ throws an exception...
brltty-6.8/minimal/Programs/usb.c:1641:28: danger: ‘channel’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 1639|       memset(channel, 0, sizeof(*channel));
# 1640|   
# 1641|->     if ((channel->device = usbFindDevice(usbChooseChannel, data))) {
# 1642|         channel->definition = data->definition;
# 1643|         return channel;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def769]
brltty-6.8/minimal/Programs/usb_cdc_acm.c:235:10: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
#  233|     const UsbDescriptor *descriptor = NULL;
#  234|   
#  235|->   while (usbNextDescriptor(device, &descriptor)) {
#  236|       if (descriptor->header.bDescriptorType == UsbDescriptorType_Interface) {
#  237|         if (descriptor->interface.bInterfaceClass == 0X02) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def770]
brltty-6.8/minimal/Programs/usb_cdc_acm.c:243:3: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
#  241|     }
#  242|   
#  243|->   logMessage(LOG_WARNING, "USB: communication interface descriptor not found");
#  244|     errno = ENOENT;
#  245|     return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def771]
brltty-6.8/minimal/Programs/usb_cdc_acm.c:252:10: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:282:32: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:282:32: call_function: calling ‘usbFindInterruptInputEndpoint’ from ‘usbMakeData_CDC_ACM’
#  250|     const UsbDescriptor *descriptor = (const UsbDescriptor *)interface;
#  251|   
#  252|->   while (usbNextDescriptor(device, &descriptor)) {
#  253|       if (descriptor->header.bDescriptorType == UsbDescriptorType_Interface) break;
#  254|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def772]
brltty-6.8/minimal/Programs/usb_cdc_acm.c:264:3: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:282:32: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:282:32: call_function: calling ‘usbFindInterruptInputEndpoint’ from ‘usbMakeData_CDC_ACM’
#  262|     }
#  263|   
#  264|->   logMessage(LOG_WARNING, "USB: interrupt input endpoint descriptor not found");
#  265|     errno = ENOENT;
#  266|     return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def773]
brltty-6.8/minimal/Programs/usb_cdc_acm.c:280:11: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:280:11: throw: if ‘usbClaimInterface’ throws an exception...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:280:11: danger: ‘usd’ leaks here; was allocated at [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1)
#  278|         unsigned char interfaceNumber = usd->interface->bInterfaceNumber;
#  279|   
#  280|->       if (usbClaimInterface(device, interfaceNumber)) {
#  281|           if (usbSetAlternative(device, usd->interface->bInterfaceNumber, usd->interface->bAlternateSetting)) {
#  282|             if ((usd->endpoint = usbFindInterruptInputEndpoint(device, usd->interface))) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def774]
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:13: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:13: throw: if ‘usbSetAlternative’ throws an exception...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:13: danger: ‘usd’ leaks here; was allocated at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  279|   
#  280|         if (usbClaimInterface(device, interfaceNumber)) {
#  281|->         if (usbSetAlternative(device, usd->interface->bInterfaceNumber, usd->interface->bAlternateSetting)) {
#  282|             if ((usd->endpoint = usbFindInterruptInputEndpoint(device, usd->interface))) {
#  283|               usbBeginInput(device, USB_ENDPOINT_NUMBER(usd->endpoint));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def775]
brltty-6.8/minimal/Programs/usb_cdc_acm.c:283:13: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:282:32: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:282:32: call_function: calling ‘usbFindInterruptInputEndpoint’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:282:32: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindInterruptInputEndpoint’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:282:14: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:283:35: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:283:13: throw: if ‘usbBeginInput’ throws an exception...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:283:13: danger: ‘usd’ leaks here; was allocated at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
#  281|           if (usbSetAlternative(device, usd->interface->bInterfaceNumber, usd->interface->bAlternateSetting)) {
#  282|             if ((usd->endpoint = usbFindInterruptInputEndpoint(device, usd->interface))) {
#  283|->             usbBeginInput(device, USB_ENDPOINT_NUMBER(usd->endpoint));
#  284|               *serialData = usd;
#  285|               return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def776]
brltty-6.8/minimal/Programs/usb_cdc_acm.c:289:9: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/minimal/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:281:12: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:289:9: branch_false: ...to here
brltty-6.8/minimal/Programs/usb_cdc_acm.c:289:9: throw: if ‘usbReleaseInterface’ throws an exception...
brltty-6.8/minimal/Programs/usb_cdc_acm.c:289:9: danger: ‘usd’ leaks here; was allocated at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
#  287|           }
#  288|   
#  289|->         usbReleaseInterface(device, interfaceNumber);
#  290|         }
#  291|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def777]
brltty-6.8/minimal/Programs/usb_hid.c:63:26: warning[-Wanalyzer-malloc-leak]: leak of ‘items’
brltty-6.8/minimal/Programs/usb_hid.c:45:1: enter_function: entry to ‘usbHidGetItems’
brltty-6.8/minimal/Programs/usb_hid.c:51:33: call_function: calling ‘usbHidDescriptor’ from ‘usbHidGetItems’
brltty-6.8/minimal/Programs/usb_hid.c:51:33: return_function: returning to ‘usbHidGetItems’ from ‘usbHidDescriptor’
brltty-6.8/minimal/Programs/usb_hid.c:53:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_hid.c:54:18: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_hid.c:54:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_hid.c:55:47: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_hid.c:62:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_hid.c:62:10: branch_true: following ‘true’ branch (when ‘items’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_hid.c:67:22: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_hid.c:63:26: throw: if ‘usbControlRead’ throws an exception...
brltty-6.8/minimal/Programs/usb_hid.c:63:26: danger: ‘items’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#   61|   
#   62|         if ((items = malloc(size))) {
#   63|->         ssize_t result = usbControlRead(
#   64|             device, UsbControlRecipient_Interface, UsbControlType_Standard,
#   65|             UsbStandardRequest_GetDescriptor,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def778]
brltty-6.8/minimal/Programs/usb_linux.c:83:7: warning[-Wanalyzer-malloc-leak]: leak of ‘usbGetDriver(device,  interface)’
brltty-6.8/minimal/Programs/usb_linux.c:222:1: enter_function: entry to ‘usbDisconnectInterface’
brltty-6.8/minimal/Programs/usb_linux.c:223:18: call_function: calling ‘usbGetDriver’ from ‘usbDisconnectInterface’
brltty-6.8/minimal/Programs/usb_linux.c:223:18: return_function: returning to ‘usbDisconnectInterface’ from ‘usbGetDriver’
brltty-6.8/minimal/Programs/usb_linux.c:225:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:226:19: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:228:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:83:7: danger: ‘usbGetDriver(device,  interface)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   81|   static int
#   82|   usbOpenUsbfsFile (UsbDeviceExtension *devx) {
#   83|->   if (devx->usbfsFile == -1) {
#   84|       int openFlags = O_RDWR;
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def779]
brltty-6.8/minimal/Programs/usb_linux.c:96:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*devx.usbfsFile’
brltty-6.8/minimal/Programs/usb_linux.c:329:1: enter_function: entry to ‘usbResetDevice’
brltty-6.8/minimal/Programs/usb_linux.c:334:7: call_function: calling ‘usbOpenUsbfsFile’ from ‘usbResetDevice’
#   94|       }
#   95|   
#   96|->     logMessage(LOG_CATEGORY(USB_IO), "usbfs file opened: %s fd=%d",
#   97|                  devx->host->usbfsPath, devx->usbfsFile);
#   98|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def780]
brltty-6.8/minimal/Programs/usb_linux.c:97:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*devx_11(D)->host.usbfsPath, 524290)’
brltty-6.8/minimal/Programs/usb_linux.c:209:1: enter_function: entry to ‘usbDisconnectDriver’
brltty-6.8/minimal/Programs/usb_linux.c:212:7: call_function: calling ‘usbControlDriver’ from ‘usbDisconnectDriver’
#   95|   
#   96|       logMessage(LOG_CATEGORY(USB_IO), "usbfs file opened: %s fd=%d",
#   97|->                devx->host->usbfsPath, devx->usbfsFile);
#   98|     }
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def781]
brltty-6.8/minimal/Programs/usb_linux.c:132:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(makePath(*devx_22->host.sysfsPath, "power/autosuspend"), 524289)’
brltty-6.8/minimal/Programs/usb_linux.c:116:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:117:18: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:119:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:126:18: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:126:18: acquire_resource: opened here
brltty-6.8/minimal/Programs/usb_linux.c:128:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:128:10: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:132:16: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:133:27: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:134:28: throw: if ‘write’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:132:16: danger: ‘open(makePath(*devx_22->host.sysfsPath, "power/autosuspend"), 524289)’ leaks here; was opened at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  130|           const char *const *value = values;
#  131|   
#  132|->         while (*value) {
#  133|             size_t length = strlen(*value);
#  134|             ssize_t result = write(file, *value, length);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def782]
brltty-6.8/minimal/Programs/usb_linux.c:584:21: warning[-Wanalyzer-malloc-leak]: leak of ‘usbMakeURB(*<unknown>.descriptor,  buffer,  length,  context)’
brltty-6.8/minimal/Programs/usb_linux.c:657:1: enter_function: entry to ‘usbSubmitRequest’
brltty-6.8/minimal/Programs/usb_linux.c:669:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:670:29: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:673:18: call_function: calling ‘usbMakeURB’ from ‘usbSubmitRequest’
brltty-6.8/minimal/Programs/usb_linux.c:673:18: return_function: returning to ‘usbSubmitRequest’ from ‘usbMakeURB’
brltty-6.8/minimal/Programs/usb_linux.c:673:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:674:9: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:677:13: call_function: calling ‘usbSubmitURB’ from ‘usbSubmitRequest’
#  582|     struct usbdevfs_urb *urb;
#  583|   
#  584|->   if ((urb = malloc(sizeof(*urb) + length))) {
#  585|       memset(urb, 0, sizeof(*urb));
#  586|       urb->endpoint = endpoint->bEndpointAddress;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def783]
brltty-6.8/minimal/Programs/usb_linux.c:1187:36: warning[-Wanalyzer-malloc-leak]: leak of ‘eptx’
brltty-6.8/minimal/Programs/usb_linux.c:1183:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1183:6: branch_true: following ‘true’ branch (when ‘eptx’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1184:5: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1187:36: throw: if ‘newQueue’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:1187:36: danger: ‘eptx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1185|       usbInitializeSignalMonitor(eptx);
# 1186|   
# 1187|->     if ((eptx->completedRequests = newQueue(NULL, NULL))) {
# 1188|         switch (USB_ENDPOINT_DIRECTION(endpoint->descriptor)) {
# 1189|           case UsbEndpointDirection_Input:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def784]
brltty-6.8/minimal/Programs/usb_linux.c:1197:7: warning[-Wanalyzer-malloc-leak]: leak of ‘eptx’
brltty-6.8/minimal/Programs/usb_linux.c:1183:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1183:6: branch_true: following ‘true’ branch (when ‘eptx’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1184:5: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1187:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1197:7: branch_false: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1197:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:1197:7: danger: ‘eptx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 1195|         return 1;
# 1196|       } else {
# 1197|->       logSystemError("USB endpoint completed request queue allocate");
# 1198|       }
# 1199|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def785]
brltty-6.8/minimal/Programs/usb_linux.c:1254:25: warning[-Wanalyzer-malloc-leak]: leak of ‘devx’
brltty-6.8/minimal/Programs/usb_linux.c:1248:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1248:6: branch_true: following ‘true’ branch (when ‘devx’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1248:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1254:25: throw: if ‘usbTestDevice’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:1254:25: danger: ‘devx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1252|       usbInitializeUsbfsMonitor(devx);
# 1253|   
# 1254|->     if ((test->device = usbTestDevice(devx, test->chooser, test->data))) return 1;
# 1255|   
# 1256|       usbDeallocateDeviceExtension(devx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def786]
brltty-6.8/minimal/Programs/usb_linux.c:1272:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
# 1270|       while (1) {
# 1271|         if (tail == usbfsPath) return 0;
# 1272|->       if (!isPathSeparator(*--tail)) continue;
# 1273|         if (++count == 2) break;
# 1274|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def787]
brltty-6.8/minimal/Programs/usb_linux.c:1272:12: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
# 1270|       while (1) {
# 1271|         if (tail == usbfsPath) return 0;
# 1272|->       if (!isPathSeparator(*--tail)) continue;
# 1273|         if (++count == 2) break;
# 1274|       }

Error: CPPCHECK_WARNING (CWE-457): [#def788]
brltty-6.8/minimal/Programs/usb_linux.c:1298: error[uninitvar]: Uninitialized variable: &length
# 1296|           char path[strlen(*format) + (2 * 0X10) + 1];
# 1297|   
# 1298|->         snprintf(path, sizeof(path), *format, &length, bus, device, minor);
# 1299|           path[length] = 0;
# 1300|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def789]
brltty-6.8/minimal/Programs/usb_linux.c:1303:27: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
# 1301|           if (access(path, F_OK) != -1) {
# 1302|             char *sysfsPath = strdup(path);
# 1303|->           if (!sysfsPath) logSystemError("strdup");
# 1304|             return sysfsPath;
# 1305|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def790]
brltty-6.8/minimal/Programs/usb_linux.c:1303:27: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
# 1301|           if (access(path, F_OK) != -1) {
# 1302|             char *sysfsPath = strdup(path);
# 1303|->           if (!sysfsPath) logSystemError("strdup");
# 1304|             return sysfsPath;
# 1305|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def791]
brltty-6.8/minimal/Programs/usb_linux.c:1325:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: return_function: returning to ‘usbAddHostDevice’ from ‘usbMakeSysfsPath’
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1323|         char *path;
# 1324|   
# 1325|->       if ((path = makePath(host->sysfsPath, "descriptors"))) {
# 1326|           int openFlags = O_RDONLY;
# 1327|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def792]
brltty-6.8/minimal/Programs/usb_linux.c:1325:19: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: return_function: returning to ‘usbAddHostDevice’ from ‘usbMakeSysfsPath’
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1323|         char *path;
# 1324|   
# 1325|->       if ((path = makePath(host->sysfsPath, "descriptors"))) {
# 1326|           int openFlags = O_RDONLY;
# 1327|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def793]
brltty-6.8/minimal/Programs/usb_linux.c:1332:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: return_function: returning to ‘usbAddHostDevice’ from ‘usbMakeSysfsPath’
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1330|           #endif /* O_CLOEXEC */
# 1331|   
# 1332|->         if ((file = open(path, openFlags)) != -1) {
# 1333|             sysfs = 1;
# 1334|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def794]
brltty-6.8/minimal/Programs/usb_linux.c:1332:21: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: return_function: returning to ‘usbAddHostDevice’ from ‘usbMakeSysfsPath’
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1330|           #endif /* O_CLOEXEC */
# 1331|   
# 1332|->         if ((file = open(path, openFlags)) != -1) {
# 1333|             sysfs = 1;
# 1334|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def795]
brltty-6.8/minimal/Programs/usb_linux.c:1348:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1346|       #endif /* O_CLOEXEC */
# 1347|   
# 1348|->     file = open(host->usbfsPath, openFlags);
# 1349|     }
# 1350|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def796]
brltty-6.8/minimal/Programs/usb_linux.c:1348:12: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1346|       #endif /* O_CLOEXEC */
# 1347|   
# 1348|->     file = open(host->usbfsPath, openFlags);
# 1349|     }
# 1350|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def797]
brltty-6.8/minimal/Programs/usb_linux.c:1352:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1350|   
# 1351|     if (file != -1) {
# 1352|->     int count = read(file, &host->usbDescriptor, UsbDescriptorSize_Device);
# 1353|   
# 1354|       if (count == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def798]
brltty-6.8/minimal/Programs/usb_linux.c:1355:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘file’
brltty-6.8/minimal/Programs/usb_linux.c:1348:12: acquire_resource: opened here
brltty-6.8/minimal/Programs/usb_linux.c:1351:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1352:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1354:8: branch_true: following ‘true’ branch (when ‘count == -1’)...
brltty-6.8/minimal/Programs/usb_linux.c:1355:7: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1355:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:1355:7: danger: ‘file’ leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 1353|   
# 1354|       if (count == -1) {
# 1355|->       logSystemError("USB device descriptor read");
# 1356|       } else if (count != UsbDescriptorSize_Device) {
# 1357|         logMessage(LOG_ERR, "USB short device descriptor: %d", count);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def799]
brltty-6.8/minimal/Programs/usb_linux.c:1355:7: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1353|   
# 1354|       if (count == -1) {
# 1355|->       logSystemError("USB device descriptor read");
# 1356|       } else if (count != UsbDescriptorSize_Device) {
# 1357|         logMessage(LOG_ERR, "USB short device descriptor: %d", count);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def800]
brltty-6.8/minimal/Programs/usb_linux.c:1357:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘file’
brltty-6.8/minimal/Programs/usb_linux.c:1348:12: acquire_resource: opened here
brltty-6.8/minimal/Programs/usb_linux.c:1351:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1352:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1354:8: branch_false: following ‘false’ branch (when ‘count != -1’)...
brltty-6.8/minimal/Programs/usb_linux.c:1356:15: branch_false: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1356:15: branch_true: following ‘true’ branch (when ‘count != 18’)...
brltty-6.8/minimal/Programs/usb_linux.c:1357:7: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1357:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:1357:7: danger: ‘file’ leaks here; was opened at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
# 1355|         logSystemError("USB device descriptor read");
# 1356|       } else if (count != UsbDescriptorSize_Device) {
# 1357|->       logMessage(LOG_ERR, "USB short device descriptor: %d", count);
# 1358|       } else {
# 1359|         ok = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def801]
brltty-6.8/minimal/Programs/usb_linux.c:1357:7: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1355|         logSystemError("USB device descriptor read");
# 1356|       } else if (count != UsbDescriptorSize_Device) {
# 1357|->       logMessage(LOG_ERR, "USB short device descriptor: %d", count);
# 1358|       } else {
# 1359|         ok = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def802]
brltty-6.8/minimal/Programs/usb_linux.c:1369:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘file’
brltty-6.8/minimal/Programs/usb_linux.c:1348:12: acquire_resource: opened here
brltty-6.8/minimal/Programs/usb_linux.c:1351:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1352:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1369:5: throw: if ‘close’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:1369:5: danger: ‘file’ leaks here; was opened at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
# 1367|       }
# 1368|   
# 1369|->     close(file);
# 1370|     }
# 1371|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def803]
brltty-6.8/minimal/Programs/usb_linux.c:1369:5: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1367|       }
# 1368|   
# 1369|->     close(file);
# 1370|     }
# 1371|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def804]
brltty-6.8/minimal/Programs/usb_linux.c:1386:18: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
brltty-6.8/minimal/Programs/usb_linux.c:1384:12: return_function: returning to ‘usbAddHostDevice’ from ‘usbReadHostDeviceDescriptor’
brltty-6.8/minimal/Programs/usb_linux.c:1384:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1386:18: branch_false: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1386:18: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:1386:18: danger: ‘host’ leaks here; was allocated at [(2)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/1)
# 1384|         if (!usbReadHostDeviceDescriptor(host)) {
# 1385|           ok = 1;
# 1386|->       } else if (enqueueItem(usbHostDevices, host)) {
# 1387|           return 1;
# 1388|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def805]
brltty-6.8/minimal/Programs/usb_linux.c:1393:7: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/minimal/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1381:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1393:7: branch_false: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1393:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:1393:7: danger: ‘host’ leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
# 1391|         free(host->usbfsPath);
# 1392|       } else {
# 1393|->       logSystemError("strdup");
# 1394|       }
# 1395|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def806]
brltty-6.8/minimal/Programs/usb_linux.c:1414:21: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(root)’
brltty-6.8/minimal/Programs/usb_linux.c:1410:20: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_linux.c:1410:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_linux.c:1410:6: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_linux.c:1414:21: throw: if ‘readdir’ throws an exception...
brltty-6.8/minimal/Programs/usb_linux.c:1414:21: danger: ‘opendir(root)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
# 1412|   
# 1413|       ok = 1;
# 1414|->     while ((entry = readdir(directory))) {
# 1415|         size_t nameLength = strlen(entry->d_name);
# 1416|         struct stat status;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def807]
brltty-6.8/minimal/Programs/usb_serial.c:109:7: warning[-Wanalyzer-malloc-leak]: leak of ‘target’
brltty-6.8/minimal/Programs/usb_serial.c:95:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/usb_serial.c:98:22: branch_true: ...to here
brltty-6.8/minimal/Programs/usb_serial.c:98:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/usb_serial.c:98:8: branch_false: following ‘false’ branch (when ‘adapters’ is non-NULL)...
brltty-6.8/minimal/Programs/usb_serial.c:105:44: branch_false: ...to here
brltty-6.8/minimal/Programs/usb_serial.c:108:14: branch_false: following ‘false’ branch (when ‘source >= end’)...
brltty-6.8/minimal/Programs/usb_serial.c:109:7: branch_false: ...to here
brltty-6.8/minimal/Programs/usb_serial.c:109:7: throw: if ‘qsort’ throws an exception...
brltty-6.8/minimal/Programs/usb_serial.c:109:7: danger: ‘target’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  107|   
#  108|         while (source < end) *target++ = source++;
#  109|->       qsort(adapters, usbSerialAdapterCount, sizeof(*adapters), usbSortSerialAdapters);
#  110|       }
#  111|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def808]
brltty-6.8/minimal/Programs/variables.c:54:7: warning[-Wanalyzer-malloc-leak]: leak of ‘variable’
brltty-6.8/minimal/Programs/variables.c:208:1: enter_function: entry to ‘findVariable’
brltty-6.8/minimal/Programs/variables.c:221:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/variables.c:221:8: branch_true: following ‘true’ branch (when ‘variable’ is non-NULL)...
brltty-6.8/minimal/Programs/variables.c:221:8: branch_true: ...to here
brltty-6.8/minimal/Programs/variables.c:226:11: call_function: calling ‘setCharacterString’ from ‘findVariable’
#   52|   
#   53|       if (!(newCharacters = malloc(ARRAY_SIZE(newCharacters, (length + 1))))) {
#   54|->       logMallocError();
#   55|         return 0;
#   56|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def809]
brltty-6.8/minimal/Programs/variables.c:111:27: warning[-Wanalyzer-malloc-leak]: leak of ‘vnl’
brltty-6.8/minimal/Programs/variables.c:325:1: enter_function: entry to ‘getGlobalVariables’
brltty-6.8/minimal/Programs/variables.c:328:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/variables.c:331:17: branch_true: ...to here
brltty-6.8/minimal/Programs/variables.c:331:17: call_function: calling ‘newVariableNestingLevel’ from ‘getGlobalVariables’
#  109|       vnl->references = 0;
#  110|   
#  111|->     if ((vnl->variables = newQueue(deallocateVariable, NULL))) {
#  112|         if ((vnl->previous = previous)) claimVariableNestingLevel(previous);
#  113|         return vnl;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def810]
brltty-6.8/minimal/Programs/variables.c:227:13: warning[-Wanalyzer-malloc-leak]: leak of ‘variable’
brltty-6.8/minimal/Programs/variables.c:208:1: enter_function: entry to ‘findVariable’
brltty-6.8/minimal/Programs/variables.c:221:21: acquire_memory: allocated here
brltty-6.8/minimal/Programs/variables.c:221:8: branch_true: following ‘true’ branch (when ‘variable’ is non-NULL)...
brltty-6.8/minimal/Programs/variables.c:221:8: branch_true: ...to here
brltty-6.8/minimal/Programs/variables.c:226:11: call_function: calling ‘setCharacterString’ from ‘findVariable’
brltty-6.8/minimal/Programs/variables.c:226:11: return_function: returning to ‘findVariable’ from ‘setCharacterString’
brltty-6.8/minimal/Programs/variables.c:226:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/variables.c:227:13: branch_true: ...to here
brltty-6.8/minimal/Programs/variables.c:227:13: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/minimal/Programs/variables.c:227:13: danger: ‘variable’ leaks here; was allocated at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  225|   
#  226|         if (setCharacterString(&variable->name, name, length)) {
#  227|->         if (enqueueItem(vnl->variables, variable)) {
#  228|             return variable;
#  229|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def811]
brltty-6.8/minimal/Programs/xbrlapi.c:415:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/minimal/Programs/xbrlapi.c:525:13: enter_function: entry to ‘add_window’
brltty-6.8/minimal/Programs/xbrlapi.c:528:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:528:6: branch_false: following ‘false’ branch (when ‘cur’ is non-NULL)...
brltty-6.8/minimal/Programs/xbrlapi.c:532:3: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:536:18: call_function: inlined call to ‘getWindowName’ from ‘add_window’
#  413|   
#  414|     if (netProperty != None) do {
#  415|->     Status result = XGetWindowProperty(
#  416|         dpy, win, netProperty, offset_0, value_length, dont_delete,
#  417|         /*XA_STRING*/AnyPropertyType,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def812]
brltty-6.8/minimal/Programs/xbrlapi.c:429:10: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/minimal/Programs/xbrlapi.c:525:13: enter_function: entry to ‘add_window’
brltty-6.8/minimal/Programs/xbrlapi.c:528:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:528:6: branch_false: following ‘false’ branch (when ‘cur’ is non-NULL)...
brltty-6.8/minimal/Programs/xbrlapi.c:532:3: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:536:18: call_function: inlined call to ‘getWindowName’ from ‘add_window’
#  427|       value_length += bytes_after;
#  428|       if (!bytes_after) break;
#  429|->     if (!XFree(value)) fatal("tempo_XFree(value)");
#  430|     } while (1);
#  431|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def813]
brltty-6.8/minimal/Programs/xbrlapi.c:433:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/minimal/Programs/xbrlapi.c:525:13: enter_function: entry to ‘add_window’
brltty-6.8/minimal/Programs/xbrlapi.c:528:15: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:528:6: branch_false: following ‘false’ branch (when ‘cur’ is non-NULL)...
brltty-6.8/minimal/Programs/xbrlapi.c:532:3: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:536:18: call_function: inlined call to ‘getWindowName’ from ‘add_window’
#  431|   
#  432|     if (!value) do {
#  433|->     Status result = XGetWindowProperty(
#  434|         dpy, win, xaProperty, offset_0, value_length, dont_delete,
#  435|         /*XA_STRING*/AnyPropertyType,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def814]
brltty-6.8/minimal/Programs/xbrlapi.c:446:10: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/minimal/Programs/xbrlapi.c:780:13: enter_function: entry to ‘toX_f’
brltty-6.8/minimal/Programs/xbrlapi.c:802:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:804:8: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:804:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:807:15: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:812:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:814:10: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:814:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:816:10: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:816:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:1175:1: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:828:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:835:19: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:842:8: branch_false: following ‘false’ branch (when the strings are equal)...
brltty-6.8/minimal/Programs/xbrlapi.c:851:3: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:851:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:852:10: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:853:10: call_function: calling ‘grabWindows’ from ‘toX_f’
#  444|       if (value_length >= (item_count + 1)) break;
#  445|       value_length += bytes_after + 1;
#  446|->     if (!XFree(value)) fatal("tempo_XFree(value)");
#  447|     } while (1);
#  448|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def815]
brltty-6.8/minimal/Programs/xbrlapi.c:450:5: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/minimal/Programs/xbrlapi.c:780:13: enter_function: entry to ‘toX_f’
brltty-6.8/minimal/Programs/xbrlapi.c:802:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:804:8: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:804:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:807:15: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:812:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:814:10: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:814:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:816:10: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:816:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:1175:1: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:828:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:835:19: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:842:8: branch_false: following ‘false’ branch (when the strings are equal)...
brltty-6.8/minimal/Programs/xbrlapi.c:851:3: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:851:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:852:10: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:853:10: call_function: calling ‘grabWindows’ from ‘toX_f’
#  448|   
#  449|     if (actual_type == None) {
#  450|->     XFree(value);
#  451|       return NULL;
#  452|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def816]
brltty-6.8/minimal/Programs/xbrlapi.c:456:3: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/minimal/Programs/xbrlapi.c:780:13: enter_function: entry to ‘toX_f’
brltty-6.8/minimal/Programs/xbrlapi.c:802:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:804:8: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:804:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:807:15: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:812:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:814:10: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:814:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:816:10: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:816:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:1175:1: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:828:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:835:19: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:842:8: branch_false: following ‘false’ branch (when the strings are equal)...
brltty-6.8/minimal/Programs/xbrlapi.c:851:3: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:851:12: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:852:10: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:853:10: call_function: calling ‘grabWindows’ from ‘toX_f’
#  454|     value[item_count++] = 0;
#  455|     ret = strdup((char *)value);
#  456|->   XFree(value);
#  457|     debugf("window property: type %ld, len %ld, value \"%s\"\n", actual_type, item_count, ret);
#  458|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def817]
brltty-6.8/minimal/Programs/xbrlapi.c:456:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:455:9: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:456:3: throw: if ‘XFree’ throws an exception...
brltty-6.8/minimal/Programs/xbrlapi.c:456:3: danger: ‘ret’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  454|     value[item_count++] = 0;
#  455|     ret = strdup((char *)value);
#  456|->   XFree(value);
#  457|     debugf("window property: type %ld, len %ld, value \"%s\"\n", actual_type, item_count, ret);
#  458|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def818]
brltty-6.8/minimal/Programs/xbrlapi.c:457:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:455:9: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:457:3: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:457:3: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:457:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/minimal/Programs/xbrlapi.c:457:3: danger: ‘ret’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  455|     ret = strdup((char *)value);
#  456|     XFree(value);
#  457|->   debugf("window property: type %ld, len %ld, value \"%s\"\n", actual_type, item_count, ret);
#  458|   
#  459|   #ifdef HAVE_ICONV_H

Error: GCC_ANALYZER_WARNING (CWE-401): [#def819]
brltty-6.8/minimal/Programs/xbrlapi.c:468:11: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:455:9: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:461:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:468:11: throw: if ‘iconv’ throws an exception...
brltty-6.8/minimal/Programs/xbrlapi.c:468:11: danger: ‘input’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  466|         char *ret2 = output;
#  467|   
#  468|->       if (iconv(utf8Conv, &input, &input_size, &output, &output_size) == -1) {
#  469|   	free(ret2);
#  470|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def820]
brltty-6.8/minimal/Programs/xbrlapi.c:468:11: warning[-Wanalyzer-malloc-leak]: leak of ‘output’
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:461:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:465:22: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:468:11: throw: if ‘iconv’ throws an exception...
brltty-6.8/minimal/Programs/xbrlapi.c:468:11: danger: ‘output’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
#  466|         char *ret2 = output;
#  467|   
#  468|->       if (iconv(utf8Conv, &input, &input_size, &output, &output_size) == -1) {
#  469|   	free(ret2);
#  470|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def821]
brltty-6.8/minimal/Programs/xbrlapi.c:473:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:455:9: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:461:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:468:10: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:471:9: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:473:9: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:473:9: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:473:9: throw: if ‘fflush’ throws an exception...
brltty-6.8/minimal/Programs/xbrlapi.c:473:9: danger: ‘ret’ leaks here; was allocated at [(12)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/11)
#  471|   	free(ret);
#  472|   	ret = realloc(ret2, item_count * MB_CUR_MAX - output_size);
#  473|-> 	debugf("-> %s\n",ret);
#  474|         }
#  475|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def822]
brltty-6.8/minimal/Programs/xbrlapi.c:500:9: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/minimal/Programs/xbrlapi.c:494:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:495:9: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:495:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:496:11: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:498:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:499:16: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:499:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:500:9: throw: if ‘XFree’ throws an exception...
brltty-6.8/minimal/Programs/xbrlapi.c:500:9: danger: ‘name’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  498|         if (hint->res_name) {
#  499|           name = strdup(hint->res_name);
#  500|->         XFree(hint->res_name);
#  501|         }
#  502|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def823]
brltty-6.8/minimal/Programs/xbrlapi.c:504:5: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/minimal/Programs/xbrlapi.c:494:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:495:9: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:495:8: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:496:11: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:498:10: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:499:16: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:499:16: acquire_memory: allocated here
brltty-6.8/minimal/Programs/xbrlapi.c:504:5: throw: if ‘XFree’ throws an exception...
brltty-6.8/minimal/Programs/xbrlapi.c:504:5: danger: ‘name’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  502|       }
#  503|   
#  504|->     XFree(hint);
#  505|     }
#  506|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def824]
brltty-6.8/minimal/Programs/xbrlapi.c:702:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘state’ where non-null expected
brltty-6.8/minimal/Programs/xbrlapi.c:708:13: enter_function: entry to ‘setFocus’
brltty-6.8/minimal/Programs/xbrlapi.c:716:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:720:21: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:730:6: branch_true: following ‘true’ branch (when ‘commandName’ is NULL)...
brltty-6.8/minimal/Programs/xbrlapi.c:730:35: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:730:35: acquire_memory: this call could return NULL
brltty-6.8/minimal/Programs/xbrlapi.c:732:3: call_function: inlined call to ‘writeStateToFile’ from ‘setFocus’
#  700|   
#  701|       if (stream) {
#  702|->       fputs(state, stream);
#  703|         fclose(stream);
#  704|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def825]
brltty-6.8/minimal/Programs/xbrlapi.c:726:3: warning[-Wanalyzer-malloc-leak]: leak of ‘commandName’
brltty-6.8/minimal/Programs/xbrlapi.c:708:13: enter_function: entry to ‘setFocus’
brltty-6.8/minimal/Programs/xbrlapi.c:712:27: call_function: calling ‘window_of_Window’ from ‘setFocus’
brltty-6.8/minimal/Programs/xbrlapi.c:712:27: return_function: returning to ‘setFocus’ from ‘window_of_Window’
brltty-6.8/minimal/Programs/xbrlapi.c:716:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:717:5: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:718:19: call_function: calling ‘getWindowApplicationName’ from ‘setFocus’
brltty-6.8/minimal/Programs/xbrlapi.c:718:19: return_function: returning to ‘setFocus’ from ‘getWindowApplicationName’
brltty-6.8/minimal/Programs/xbrlapi.c:726:3: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:726:3: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:726:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/minimal/Programs/xbrlapi.c:726:3: danger: ‘commandName’ leaks here; was allocated at [(17)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/16)
#  724|     if (!windowName) windowName = "";
#  725|     if (!*windowName) windowName = "unnamed window";
#  726|->   debugf("focused window: %s\n", windowName);
#  727|     writeStateToFile(windowNameFile, windowName);
#  728|     if (!quiet) api_setName(windowName);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def826]
brltty-6.8/minimal/Programs/xbrlapi.c:731:3: warning[-Wanalyzer-malloc-leak]: leak of ‘commandName’
brltty-6.8/minimal/Programs/xbrlapi.c:708:13: enter_function: entry to ‘setFocus’
brltty-6.8/minimal/Programs/xbrlapi.c:712:27: call_function: calling ‘window_of_Window’ from ‘setFocus’
brltty-6.8/minimal/Programs/xbrlapi.c:712:27: return_function: returning to ‘setFocus’ from ‘window_of_Window’
brltty-6.8/minimal/Programs/xbrlapi.c:716:6: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:717:5: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:718:19: call_function: calling ‘getWindowApplicationName’ from ‘setFocus’
brltty-6.8/minimal/Programs/xbrlapi.c:718:19: return_function: returning to ‘setFocus’ from ‘getWindowApplicationName’
brltty-6.8/minimal/Programs/xbrlapi.c:728:6: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:730:6: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:730:6: branch_false: following ‘false’ branch (when ‘commandName’ is non-NULL)...
brltty-6.8/minimal/Programs/xbrlapi.c:731:3: branch_false: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:731:3: branch_true: following ‘true’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:731:3: branch_true: ...to here
brltty-6.8/minimal/Programs/xbrlapi.c:731:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/minimal/Programs/xbrlapi.c:731:3: danger: ‘commandName’ leaks here; was allocated at [(17)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/16)
#  729|   
#  730|     if (!commandName) commandName = strdup("");
#  731|->   debugf("focused command: %s\n", commandName);
#  732|     writeStateToFile(commandNameFile, commandName);
#  733|     free(commandName);

Error: GCC_ANALYZER_WARNING (CWE-479): [#def827]
brltty-6.8/minimal/Programs/xbrlapi.c:1183:3: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
brltty-6.8/minimal/Programs/xbrlapi.c:1187:1: enter_function: entry to ‘main’
brltty-6.8/minimal/Programs/xbrlapi.c:1198:5: branch_false: following ‘false’ branch...
brltty-6.8/minimal/Programs/xbrlapi.c:1183:3: danger: call to ‘exit’ from within signal handler
# 1181|   static void term_handler(int foo) {
# 1182|     api_cleanExit();
# 1183|->   exit(PROG_EXIT_SUCCESS);
# 1184|   }
# 1185|   

Error: CPPCHECK_WARNING (CWE-457): [#def828]
brltty-6.8/python3/Bindings/Java/bindings.c:1270: warning[uninitvar]: Uninitialized variable: booleans
# 1268|                 env, handle,
# 1269|                 parameter, subparam, flags,
# 1270|->               booleans, count
# 1271|               );
# 1272|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def829]
brltty-6.8/python3/Bindings/Java/bindings.c:1409:34: warning[-Wanalyzer-malloc-leak]: leak of ‘wpd’
brltty-6.8/python3/Bindings/Java/bindings.c:1397:3: branch_false: following ‘false’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1402:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: acquire_memory: allocated here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: following ‘true’ branch (when ‘wpd’ is non-NULL)...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1409:34: throw: if the called function throws an exception...
brltty-6.8/python3/Bindings/Java/bindings.c:1409:34: danger: ‘wpd’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 1407|         wpd->handle = handle;
# 1408|   
# 1409|->       if ((wpd->watcher.object = (*env)->NewGlobalRef(env, watcher))) {
# 1410|           wpd->watcher.class = (*env)->FindClass(
# 1411|             env, BRLAPI_OBJECT("ParameterWatcher")

Error: GCC_ANALYZER_WARNING (CWE-401): [#def830]
brltty-6.8/python3/Bindings/Java/bindings.c:1410:30: warning[-Wanalyzer-malloc-leak]: leak of ‘wpd’
brltty-6.8/python3/Bindings/Java/bindings.c:1397:3: branch_false: following ‘false’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1402:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: acquire_memory: allocated here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: following ‘true’ branch (when ‘wpd’ is non-NULL)...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1409:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1410:30: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1410:30: throw: if the called function throws an exception...
brltty-6.8/python3/Bindings/Java/bindings.c:1410:30: danger: ‘wpd’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 1408|   
# 1409|         if ((wpd->watcher.object = (*env)->NewGlobalRef(env, watcher))) {
# 1410|->         wpd->watcher.class = (*env)->FindClass(
# 1411|             env, BRLAPI_OBJECT("ParameterWatcher")
# 1412|           );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def831]
brltty-6.8/python3/Bindings/Java/bindings.c:1415:33: warning[-Wanalyzer-malloc-leak]: leak of ‘wpd’
brltty-6.8/python3/Bindings/Java/bindings.c:1397:3: branch_false: following ‘false’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1402:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: acquire_memory: allocated here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: following ‘true’ branch (when ‘wpd’ is non-NULL)...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1409:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1410:30: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1414:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1415:33: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1415:33: throw: if the called function throws an exception...
brltty-6.8/python3/Bindings/Java/bindings.c:1415:33: danger: ‘wpd’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 1413|   
# 1414|           if (wpd->watcher.class) {
# 1415|->           wpd->watcher.method = (*env)->GetMethodID(
# 1416|               env, wpd->watcher.class, "onParameterUpdated",
# 1417|               JAVA_SIG_METHOD(JAVA_SIG_VOID,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def832]
brltty-6.8/python3/Bindings/Java/bindings.c:1425:31: warning[-Wanalyzer-malloc-leak]: leak of ‘wpd’
brltty-6.8/python3/Bindings/Java/bindings.c:1397:3: branch_false: following ‘false’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1402:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: acquire_memory: allocated here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: following ‘true’ branch (when ‘wpd’ is non-NULL)...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1409:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1410:30: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1414:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1415:33: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1424:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1425:31: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1425:31: throw: if ‘brlapi__watchParameter’ throws an exception...
brltty-6.8/python3/Bindings/Java/bindings.c:1425:31: danger: ‘wpd’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1423|   
# 1424|             if (wpd->watcher.method) {
# 1425|->             wpd->descriptor = brlapi__watchParameter(
# 1426|                 handle, parameter, subparam, flags,
# 1427|                 handleWatchedParameter, wpd, NULL, 0

Error: GCC_ANALYZER_WARNING (CWE-401): [#def833]
brltty-6.8/python3/Bindings/Java/bindings.c:1435:9: warning[-Wanalyzer-malloc-leak]: leak of ‘wpd’
brltty-6.8/python3/Bindings/Java/bindings.c:1397:3: branch_false: following ‘false’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1402:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:16: acquire_memory: allocated here
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: following ‘true’ branch (when ‘wpd’ is non-NULL)...
brltty-6.8/python3/Bindings/Java/bindings.c:1405:8: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1409:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1410:30: branch_true: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1414:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Bindings/Java/bindings.c:1435:9: branch_false: ...to here
brltty-6.8/python3/Bindings/Java/bindings.c:1435:9: throw: if the called function throws an exception...
brltty-6.8/python3/Bindings/Java/bindings.c:1435:9: danger: ‘wpd’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 1433|           }
# 1434|   
# 1435|->         (*env)->DeleteGlobalRef(env, wpd->watcher.object);
# 1436|         }
# 1437|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def834]
brltty-6.8/python3/Bindings/Python/bindings.c:70:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&str)’
brltty-6.8/python3/Bindings/Python/bindings.c:66:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Bindings/Python/bindings.c:70:54: acquire_memory: allocated here
brltty-6.8/python3/Bindings/Python/bindings.c:70:5: danger: ‘strdup(&str)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#   68|     else
#   69|   #endif
#   70|->     pthread_setspecific(brlapi_protocolExceptionKey, strdup(str));
#   71|   }
#   72|   

Error: CPPCHECK_WARNING (CWE-476): [#def835]
brltty-6.8/python3/Bindings/Python/bindings.c:146: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: descr
#  144|   
#  145|     descr = malloc(sizeof(*descr));
#  146|->   descr->callback = func;
#  147|   
#  148|     brlapi_descr = brlapi__watchParameter(handle, param, subparam, flags, brlapi_python_parameter_callback, descr, NULL, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def836]
brltty-6.8/python3/Bindings/Python/bindings.c:146:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘descr’
brltty-6.8/python3/Bindings/Python/bindings.c:132:42: enter_function: entry to ‘brlapi_python_watchParameter’
brltty-6.8/python3/Bindings/Python/bindings.c:138:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Bindings/Python/bindings.c:143:3: call_function: inlined call to ‘Py_INCREF’ from ‘brlapi_python_watchParameter’
brltty-6.8/python3/Bindings/Python/bindings.c:145:11: branch_true: ...to here
brltty-6.8/python3/Bindings/Python/bindings.c:145:11: acquire_memory: this call could return NULL
brltty-6.8/python3/Bindings/Python/bindings.c:146:3: danger: ‘descr’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  144|   
#  145|     descr = malloc(sizeof(*descr));
#  146|->   descr->callback = func;
#  147|   
#  148|     brlapi_descr = brlapi__watchParameter(handle, param, subparam, flags, brlapi_python_parameter_callback, descr, NULL, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def837]
brltty-6.8/python3/Bindings/Python/bindings.c:148:18: warning[-Wanalyzer-malloc-leak]: leak of ‘descr’
brltty-6.8/python3/Bindings/Python/bindings.c:132:42: enter_function: entry to ‘brlapi_python_watchParameter’
brltty-6.8/python3/Bindings/Python/bindings.c:138:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Bindings/Python/bindings.c:143:3: call_function: inlined call to ‘Py_INCREF’ from ‘brlapi_python_watchParameter’
brltty-6.8/python3/Bindings/Python/bindings.c:145:11: branch_true: ...to here
brltty-6.8/python3/Bindings/Python/bindings.c:145:11: acquire_memory: allocated here
brltty-6.8/python3/Bindings/Python/bindings.c:148:18: throw: if ‘brlapi__watchParameter’ throws an exception...
brltty-6.8/python3/Bindings/Python/bindings.c:148:18: danger: ‘descr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  146|     descr->callback = func;
#  147|   
#  148|->   brlapi_descr = brlapi__watchParameter(handle, param, subparam, flags, brlapi_python_parameter_callback, descr, NULL, 0);
#  149|   
#  150|     if (!brlapi_descr) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def838]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:7279:11: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19249:12: enter_function: entry to ‘__pyx_setprop_6brlapi_11WriteStruct_text’
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19250:6: branch_true: following ‘true’ branch (when ‘v’ is non-NULL)...
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19251:12: call_function: inlined call to ‘__pyx_pw_6brlapi_11WriteStruct_4text_3__set__’ from ‘__pyx_setprop_6brlapi_11WriteStruct_text’
# 7277|    * 				self.props.text = text
# 7278|   */
# 7279|->     (void)(memcpy(((void *)__pyx_v_text), ((void *)__pyx_v_c_val), __pyx_v_size));
# 7280|   
# 7281|       /* "brlapi.pyx":346

Error: GCC_ANALYZER_WARNING (CWE-688): [#def839]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:7279:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘__pyx_v_text’ where non-null expected
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19249:12: enter_function: entry to ‘__pyx_setprop_6brlapi_11WriteStruct_text’
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19250:6: branch_true: following ‘true’ branch (when ‘v’ is non-NULL)...
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19251:12: call_function: inlined call to ‘__pyx_pw_6brlapi_11WriteStruct_4text_3__set__’ from ‘__pyx_setprop_6brlapi_11WriteStruct_text’
# 7277|    * 				self.props.text = text
# 7278|   */
# 7279|->     (void)(memcpy(((void *)__pyx_v_text), ((void *)__pyx_v_c_val), __pyx_v_size));
# 7280|   
# 7281|       /* "brlapi.pyx":346

Error: CPPCHECK_WARNING (CWE-476): [#def840]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:7288: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: __pyx_v_text
# 7286|    * 				self.props.textSize = size
# 7287|   */
# 7288|->     (__pyx_v_text[__pyx_v_size]) = 0;
# 7289|   
# 7290|       /* "brlapi.pyx":347

Error: GCC_ANALYZER_WARNING (CWE-688): [#def841]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:7729:11: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19277:12: enter_function: entry to ‘__pyx_setprop_6brlapi_11WriteStruct_charset’
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19278:6: branch_true: following ‘true’ branch (when ‘v’ is non-NULL)...
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19279:12: call_function: inlined call to ‘__pyx_pw_6brlapi_11WriteStruct_7charset_3__set__’ from ‘__pyx_setprop_6brlapi_11WriteStruct_charset’
# 7727|    * 				self.props.charset = charset
# 7728|   */
# 7729|->     (void)(memcpy(((void *)__pyx_v_charset), ((void *)__pyx_v_c_val), __pyx_v_size));
# 7730|   
# 7731|       /* "brlapi.pyx":379

Error: GCC_ANALYZER_WARNING (CWE-688): [#def842]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:7729:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘__pyx_v_charset’ where non-null expected
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19277:12: enter_function: entry to ‘__pyx_setprop_6brlapi_11WriteStruct_charset’
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19278:6: branch_true: following ‘true’ branch (when ‘v’ is non-NULL)...
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19279:12: call_function: inlined call to ‘__pyx_pw_6brlapi_11WriteStruct_7charset_3__set__’ from ‘__pyx_setprop_6brlapi_11WriteStruct_charset’
# 7727|    * 				self.props.charset = charset
# 7728|   */
# 7729|->     (void)(memcpy(((void *)__pyx_v_charset), ((void *)__pyx_v_c_val), __pyx_v_size));
# 7730|   
# 7731|       /* "brlapi.pyx":379

Error: CPPCHECK_WARNING (CWE-476): [#def843]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:7738: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: __pyx_v_charset
# 7736|    * 			else:
# 7737|   */
# 7738|->     (__pyx_v_charset[__pyx_v_size]) = 0;
# 7739|   
# 7740|       /* "brlapi.pyx":380

Error: GCC_ANALYZER_WARNING (CWE-688): [#def844]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:8068:11: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19291:12: enter_function: entry to ‘__pyx_setprop_6brlapi_11WriteStruct_attrAnd’
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19292:6: branch_true: following ‘true’ branch (when ‘v’ is non-NULL)...
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19293:12: call_function: inlined call to ‘__pyx_pw_6brlapi_11WriteStruct_7attrAnd_3__set__’ from ‘__pyx_setprop_6brlapi_11WriteStruct_attrAnd’
# 8066|    * 				self.props.andMask = NULL
# 8067|   */
# 8068|->     (void)(memcpy(((void *)__pyx_v_self->props.andMask), ((void *)__pyx_v_c_val), __pyx_v_size));
# 8069|   
# 8070|       /* "brlapi.pyx":398

Error: GCC_ANALYZER_WARNING (CWE-688): [#def845]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:8068:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(__pyx_v_size)’ where non-null expected
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19291:12: enter_function: entry to ‘__pyx_setprop_6brlapi_11WriteStruct_attrAnd’
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19292:6: branch_true: following ‘true’ branch (when ‘v’ is non-NULL)...
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19293:12: call_function: inlined call to ‘__pyx_pw_6brlapi_11WriteStruct_7attrAnd_3__set__’ from ‘__pyx_setprop_6brlapi_11WriteStruct_attrAnd’
# 8066|    * 				self.props.andMask = NULL
# 8067|   */
# 8068|->     (void)(memcpy(((void *)__pyx_v_self->props.andMask), ((void *)__pyx_v_c_val), __pyx_v_size));
# 8069|   
# 8070|       /* "brlapi.pyx":398

Error: GCC_ANALYZER_WARNING (CWE-688): [#def846]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:8389:11: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19305:12: enter_function: entry to ‘__pyx_setprop_6brlapi_11WriteStruct_attrOr’
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19306:6: branch_true: following ‘true’ branch (when ‘v’ is non-NULL)...
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19307:12: call_function: inlined call to ‘__pyx_pw_6brlapi_11WriteStruct_6attrOr_3__set__’ from ‘__pyx_setprop_6brlapi_11WriteStruct_attrOr’
# 8387|    * 				self.props.orMask = NULL
# 8388|   */
# 8389|->     (void)(memcpy(((void *)__pyx_v_self->props.orMask), ((void *)__pyx_v_c_val), __pyx_v_size));
# 8390|   
# 8391|       /* "brlapi.pyx":422

Error: GCC_ANALYZER_WARNING (CWE-688): [#def847]
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:8389:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(__pyx_v_size)’ where non-null expected
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19305:12: enter_function: entry to ‘__pyx_setprop_6brlapi_11WriteStruct_attrOr’
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19306:6: branch_true: following ‘true’ branch (when ‘v’ is non-NULL)...
brltty-6.8/python3/Bindings/Python/brlapi.auto.c:19307:12: call_function: inlined call to ‘__pyx_pw_6brlapi_11WriteStruct_6attrOr_3__set__’ from ‘__pyx_setprop_6brlapi_11WriteStruct_attrOr’
# 8387|    * 				self.props.orMask = NULL
# 8388|   */
# 8389|->     (void)(memcpy(((void *)__pyx_v_self->props.orMask), ((void *)__pyx_v_c_val), __pyx_v_size));
# 8390|   
# 8391|       /* "brlapi.pyx":422

Error: CPPCHECK_WARNING (CWE-457): [#def848]
brltty-6.8/python3/Bindings/Tcl/bindings.c:450: warning[uninitvar]: Uninitialized variable: path
#  448|       }
#  449|   
#  450|->     TEST_BRLAPI_OK(brlapi__enterTtyModeWithPath(session->handle, path, count, options.driver));
#  451|     } else {
#  452|       TEST_BRLAPI_OK(brlapi__enterTtyModeWithPath(session->handle, NULL, 0, options.driver));

Error: CPPCHECK_WARNING (CWE-457): [#def849]
brltty-6.8/python3/Bindings/Tcl/bindings.c:670: warning[uninitvar]: Uninitialized variable: buffer
#  668|                 }
#  669|   
#  670|-> 	      TEST_BRLAPI_OK(brlapi__setParameter(session->handle, parameter, subparam, options.flags, buffer, sizeof(buffer)));
#  671|                 break;
#  672|               }

Error: CPPCHECK_WARNING (CWE-457): [#def850]
brltty-6.8/python3/Bindings/Tcl/bindings.c:683: warning[uninitvar]: Uninitialized variable: buffer
#  681|                 }
#  682|   
#  683|-> 	      TEST_BRLAPI_OK(brlapi__setParameter(session->handle, parameter, subparam, options.flags, buffer, sizeof(buffer)));
#  684|                 break;
#  685|               }

Error: CPPCHECK_WARNING (CWE-457): [#def851]
brltty-6.8/python3/Bindings/Tcl/bindings.c:696: warning[uninitvar]: Uninitialized variable: buffer
#  694|                 }
#  695|   
#  696|-> 	      TEST_BRLAPI_OK(brlapi__setParameter(session->handle, parameter, subparam, options.flags, buffer, sizeof(buffer)));
#  697|                 break;
#  698|               }

Error: CPPCHECK_WARNING (CWE-457): [#def852]
brltty-6.8/python3/Bindings/Tcl/bindings.c:709: warning[uninitvar]: Uninitialized variable: buffer
#  707|                 }
#  708|   
#  709|-> 	      TEST_BRLAPI_OK(brlapi__setParameter(session->handle, parameter, subparam, options.flags, buffer, sizeof(buffer)));
#  710|                 break;
#  711|               }

Error: CPPCHECK_WARNING (CWE-457): [#def853]
brltty-6.8/python3/Bindings/Tcl/bindings.c:722: warning[uninitvar]: Uninitialized variable: buffer
#  720|                 }
#  721|   
#  722|-> 	      TEST_BRLAPI_OK(brlapi__setParameter(session->handle, parameter, subparam, options.flags, buffer, sizeof(buffer)));
#  723|                 break;
#  724|               }

Error: CPPCHECK_WARNING (CWE-457): [#def854]
brltty-6.8/python3/Bindings/Tcl/bindings.c:1573: warning[uninitvar]: Uninitialized variable: cells
# 1571|       }
# 1572|   
# 1573|->     setByteArrayResult(interp, cells, elementCount);
# 1574|     } else {
# 1575|       setByteArrayResult(interp, NULL, elementCount);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def855]
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:731:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*new[<unknown>]’
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1935:1: enter_function: entry to ‘brl_construct’
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1936:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1937:5: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1940:9: call_function: calling ‘connectResource’ from ‘brl_construct’
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1940:9: return_function: returning to ‘brl_construct’ from ‘connectResource’
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1940:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1941:15: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1951:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1952:13: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1952:13: call_function: calling ‘updateSettings’ from ‘brl_construct’
#  729|             unsigned char *byte = &new[settings->offset];
#  730|   
#  731|->           *byte &= ~settings->disable;
#  732|             *byte |= settings->enable;
#  733|           }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def856]
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1211:5: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1722:1: enter_function: entry to ‘detectModel2u’
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1727:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1727:21: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1727:21: call_function: calling ‘setVersions2’ from ‘detectModel2u’
# 1209|   
# 1210|     while (1) {
# 1211|->     STR_PRINTF("%u", *byte);
# 1212|       if (byte == overlay.bytes) break;
# 1213|   

Error: GCC_ANALYZER_WARNING (CWE-124): [#def857]
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1214:5: warning[-Wanalyzer-out-of-bounds]: stack-based buffer underwrite
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1722:1: enter_function: entry to ‘detectModel2u’
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1727:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1727:21: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Alva/braille.c:1727:21: call_function: calling ‘setVersions2’ from ‘detectModel2u’
# 1212|       if (byte == overlay.bytes) break;
# 1213|   
# 1214|->     *byte = 0;
# 1215|       if (!overlay.u32) break;
# 1216|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def858]
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:195:21: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&directoryPath)’
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:192:20: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:192:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:192:6: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:195:21: throw: if ‘readdir’ throws an exception...
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:195:21: danger: ‘opendir(&directoryPath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  193|       struct dirent *entry;
#  194|   
#  195|->     while ((entry = readdir(directory))) {
#  196|         unsigned int eventNumber;
#  197|         char extra;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def859]
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:208:5: warning[-Wanalyzer-malloc-leak]: leak of ‘devicePath’
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:192:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:192:6: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:195:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:199:18: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:203:28: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:203:12: branch_false: following ‘false’ branch (when ‘devicePath’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:204:9: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:208:5: throw: if ‘closedir’ throws an exception...
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:208:5: danger: ‘devicePath’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  206|       }
#  207|   
#  208|->     closedir(directory);
#  209|     } else {
#  210|       logMessage(LOG_ERR, "event device input directory open error: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def860]
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:284:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/braille0", 1)’
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:323:1: enter_function: entry to ‘brl_construct’
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:324:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:324:6: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:330:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:331:11: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/B2G/braille.c:331:11: call_function: calling ‘openBrailleDevice’ from ‘brl_construct’
#  282|   static int
#  283|   openBrailleDevice (BrailleDisplay *brl) {
#  284|->   if ((brl->data->braille.fileDescriptor = open(BRAILLE_DEVICE_PATH, O_WRONLY)) != -1) {
#  285|       return 1;
#  286|     } else {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def861]
brltty-6.8/python3/Drivers/Braille/Baum/braille.c:2736:36: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘packet[1]’
brltty-6.8/python3/Drivers/Braille/Baum/braille.c:2803:1: enter_function: entry to ‘processPowerBraillePackets’
brltty-6.8/python3/Drivers/Braille/Baum/braille.c:2807:18: call_function: inlined call to ‘getPowerBraillePacket’ from ‘processPowerBraillePackets’
# 2734|               continue;
# 2735|           }
# 2736|->       } else if ((offset == 2) && (packet[1] == PB_RSP_SENSORS)) {
# 2737|           length += byte;
# 2738|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def862]
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:311:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*brl.textRows * 8)’
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:523:1: enter_function: entry to ‘brl_construct’
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:524:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:525:5: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:557:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:558:11: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:558:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:561:13: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:561:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:566:15: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Canute/braille.c:566:15: call_function: calling ‘allocateRowEntries’ from ‘brl_construct’
#  309|     RowEntry ***rowEntries = &brl->data->window.rowEntries;
#  310|   
#  311|->   if (!(*rowEntries = malloc(ARRAY_SIZE(*rowEntries, brl->textRows)))) {
#  312|       logMallocError();
#  313|       return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def863]
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:247:6: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*brl_47(D)->data.display.externalRows, (long unsigned int)*brl_47(D)->data.display.externalColumns)’
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:529:1: enter_function: entry to ‘reconfigureDisplay’
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:531:22: call_function: calling ‘configureDisplay’ from ‘reconfigureDisplay’
#  245|   static int
#  246|   makeArrays (BrailleDisplay *brl) {
#  247|->   if ((brl->data->arrays.externalCells = calloc(brl->data->display.externalRows, brl->data->display.externalColumns))) {
#  248|       if ((brl->data->arrays.internalCells = calloc(brl->data->display.internalRows, brl->data->display.internalColumns))) {
#  249|         if ((brl->data->arrays.externalRows = malloc(ARRAY_SIZE(brl->data->arrays.externalRows, brl->data->display.externalRows)))) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def864]
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:707:23: warning[-Wanalyzer-null-argument]: use of NULL ‘data’ where non-null expected
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1301:1: enter_function: entry to ‘writeIdentifyRequest’
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1302:10: call_function: calling ‘writeRequest’ from ‘writeIdentifyRequest’
#  705|     packet.fields.seq = 0;
#  706|   
#  707|->   uint8_t *checksum = mempcpy(packet.fields.data, data, size);
#  708|     uint16_t length = (checksum - &packet.fields.destination) + 1;
#  709|     putUint16(packet.fields.length, length);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def865]
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1082:7: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1073:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1073:21: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1075:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1075:31: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1077:19: branch_false: following ‘false’ branch (when ‘dataSize <= i’)...
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1077:19: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1081:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1082:12: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/DotPad/braille.c:1082:7: danger: write of 1 byte at offset ‘(int)arraySize’ exceeds the buffer
# 1080|   
# 1081|       while (dataSize < arraySize) {
# 1082|->       data[dataSize++] = 0;
# 1083|       }
# 1084|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def866]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:33:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:191:17: enter_function: entry to ‘brl_message’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:211:3: call_function: calling ‘brl_write’ from ‘brl_message’
#   31|   void		eutp_abort(int exitstatus)
#   32|   {
#   33|->   brlapi_leaveRawMode();
#   34|     brlapi_closeConnection();
#   35|     exit(exitstatus);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def867]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:33:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   31|   void		eutp_abort(int exitstatus)
#   32|   {
#   33|->   brlapi_leaveRawMode();
#   34|     brlapi_closeConnection();
#   35|     exit(exitstatus);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def868]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:33:3: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   31|   void		eutp_abort(int exitstatus)
#   32|   {
#   33|->   brlapi_leaveRawMode();
#   34|     brlapi_closeConnection();
#   35|     exit(exitstatus);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def869]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:34:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:191:17: enter_function: entry to ‘brl_message’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:211:3: call_function: calling ‘brl_write’ from ‘brl_message’
#   32|   {
#   33|     brlapi_leaveRawMode();
#   34|->   brlapi_closeConnection();
#   35|     exit(exitstatus);
#   36|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def870]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:34:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   32|   {
#   33|     brlapi_leaveRawMode();
#   34|->   brlapi_closeConnection();
#   35|     exit(exitstatus);
#   36|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def871]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:34:3: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   32|   {
#   33|     brlapi_leaveRawMode();
#   34|->   brlapi_closeConnection();
#   35|     exit(exitstatus);
#   36|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def872]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:67:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
#   65|       {
#   66|         alarm(20);
#   67|->       res = brlapi_recvRaw(buf, BUFFER_SIZE);
#   68|         alarm(0);
#   69|         if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def873]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:67:13: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
#   65|       {
#   66|         alarm(20);
#   67|->       res = brlapi_recvRaw(buf, BUFFER_SIZE);
#   68|         alarm(0);
#   69|         if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def874]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:71:11: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:260:17: enter_function: entry to ‘brl_listfiles’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:263:31: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:270:10: branch_true: following ‘true’ branch (when ‘end == 0’)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:272:11: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:272:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:273:9: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:273:9: call_function: calling ‘showbrfile’ from ‘brl_listfiles’
#   69|         if (res < 0)
#   70|   	{
#   71|-> 	  brlapi_perror("reading on terminal");
#   72|   	  eutp_abort(E_READ);
#   73|   	  return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def875]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:71:11: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
#   69|         if (res < 0)
#   70|   	{
#   71|-> 	  brlapi_perror("reading on terminal");
#   72|   	  eutp_abort(E_READ);
#   73|   	  return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def876]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:86:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:191:17: enter_function: entry to ‘brl_message’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:211:3: call_function: calling ‘brl_write’ from ‘brl_message’
#   84|   
#   85|     alarm(20);
#   86|->   res = brlapi_sendRaw(str, len);
#   87|     alarm(0);
#   88|     if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def877]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:86:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   84|   
#   85|     alarm(20);
#   86|->   res = brlapi_sendRaw(str, len);
#   87|     alarm(0);
#   88|     if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def878]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:86:9: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   84|   
#   85|     alarm(20);
#   86|->   res = brlapi_sendRaw(str, len);
#   87|     alarm(0);
#   88|     if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def879]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:90:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:191:17: enter_function: entry to ‘brl_message’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:211:3: call_function: calling ‘brl_write’ from ‘brl_message’
#   88|     if (res < 0)
#   89|       {
#   90|->       brlapi_perror("Error writing to the terminal");
#   91|         eutp_abort(E_WRITE);
#   92|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def880]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:90:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   88|     if (res < 0)
#   89|       {
#   90|->       brlapi_perror("Error writing to the terminal");
#   91|         eutp_abort(E_WRITE);
#   92|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def881]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:90:7: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
#   88|     if (res < 0)
#   89|       {
#   90|->       brlapi_perror("Error writing to the terminal");
#   91|         eutp_abort(E_WRITE);
#   92|         return 0;

Error: CPPCHECK_WARNING (CWE-682): [#def882]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:200: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  198|     unsigned char*	p = buffer;
#  199|   
#  200|->   *p++ = 'D';
#  201|     *p++ = 'M';
#  202|     while (*q)

Error: CPPCHECK_WARNING (CWE-476): [#def883]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:200: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p++
#  198|     unsigned char*	p = buffer;
#  199|   
#  200|->   *p++ = 'D';
#  201|     *p++ = 'M';
#  202|     while (*q)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def884]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:200:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:197:27: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:200:3: danger: ‘buffer’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  198|     unsigned char*	p = buffer;
#  199|   
#  200|->   *p++ = 'D';
#  201|     *p++ = 'M';
#  202|     while (*q)

Error: CPPCHECK_WARNING (CWE-476): [#def885]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:224: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  222|     unsigned char* str = malloc(256); /* the string to display */
#  223|   
#  224|->   buf[0] = '\005';
#  225|     buf[1] = 'F';
#  226|     buf[2] = 'N';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def886]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:224:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:221:24: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:224:3: danger: ‘buf’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  222|     unsigned char* str = malloc(256); /* the string to display */
#  223|   
#  224|->   buf[0] = '\005';
#  225|     buf[1] = 'F';
#  226|     buf[2] = 'N';

Error: CPPCHECK_WARNING (CWE-476): [#def887]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:225: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  223|   
#  224|     buf[0] = '\005';
#  225|->   buf[1] = 'F';
#  226|     buf[2] = 'N';
#  227|     buf[3] = ext;

Error: CPPCHECK_WARNING (CWE-476): [#def888]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:226: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  224|     buf[0] = '\005';
#  225|     buf[1] = 'F';
#  226|->   buf[2] = 'N';
#  227|     buf[3] = ext;
#  228|     buf[4] = (env->brfilenum & 0xff00) >> 2;

Error: CPPCHECK_WARNING (CWE-476): [#def889]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:227: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  225|     buf[1] = 'F';
#  226|     buf[2] = 'N';
#  227|->   buf[3] = ext;
#  228|     buf[4] = (env->brfilenum & 0xff00) >> 2;
#  229|     buf[5] = env->brfilenum & 0x00ff;

Error: CPPCHECK_WARNING (CWE-476): [#def890]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:228: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  226|     buf[2] = 'N';
#  227|     buf[3] = ext;
#  228|->   buf[4] = (env->brfilenum & 0xff00) >> 2;
#  229|     buf[5] = env->brfilenum & 0x00ff;
#  230|     brl_write(buf+1, 5);

Error: CPPCHECK_WARNING (CWE-476): [#def891]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:229: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  227|     buf[3] = ext;
#  228|     buf[4] = (env->brfilenum & 0xff00) >> 2;
#  229|->   buf[5] = env->brfilenum & 0x00ff;
#  230|     brl_write(buf+1, 5);
#  231|     while (1)

Error: CPPCHECK_WARNING (CWE-682): [#def892]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  228|     buf[4] = (env->brfilenum & 0xff00) >> 2;
#  229|     buf[5] = env->brfilenum & 0x00ff;
#  230|->   brl_write(buf+1, 5);
#  231|     while (1)
#  232|       {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def893]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:244:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘str’ where non-null expected
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: return_function: returning to ‘showbrfile’ from ‘brl_read’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:239:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:244:22: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:244:3: danger: argument 1 (‘str’) from [(2)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/1) could be NULL where non-null expected
#argument 1 of ‘__builtin_memcpy’ must be non-null
#  242|         return 0;
#  243|       }
#  244|->   strcpy((char*)str, env->brpc ? "BR>PC " : "PC>BR ");
#  245|     strncat((char*)str, ((char*)&(buf[6])), buf[0] - 5);
#  246|     strcat((char*)str, ".");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def894]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:252:1: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:217:25: enter_function: entry to ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:222:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: call_function: calling ‘brl_write’ from ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:230:3: return_function: returning to ‘showbrfile’ from ‘brl_write’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: call_function: calling ‘brl_read’ from ‘showbrfile’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:233:7: return_function: returning to ‘showbrfile’ from ‘brl_read’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:239:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:241:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_brl.c:252:1: danger: ‘str’ leaks here; was allocated at [(2)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/1)
#  250|     free(str);
#  251|     return 0;
#  252|-> }
#  253|   
#  254|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def895]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:44:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   42|     if ((tmpmap = malloc(size)) == NULL)
#   43|       {
#   44|->       perror("malloc");
#   45|         eutp_abort(9);
#   46|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def896]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:45:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   43|       {
#   44|         perror("malloc");
#   45|->       eutp_abort(9);
#   46|       }
#   47|     if ((tmpmap2 = malloc(2 * size)) == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def897]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   47|     if ((tmpmap2 = malloc(2 * size)) == NULL)
#   48|       {
#   49|->       perror("malloc");
#   50|         eutp_abort(9);
#   51|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def898]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:17: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_false: following ‘false’ branch (when ‘tmpmap’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:47:18: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_true: following ‘true’ branch (when ‘tmpmap2’ is NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: throw: if ‘perror’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: danger: ‘tmpmap’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   47|     if ((tmpmap2 = malloc(2 * size)) == NULL)
#   48|       {
#   49|->       perror("malloc");
#   50|         eutp_abort(9);
#   51|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def899]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:50:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   48|       {
#   49|         perror("malloc");
#   50|->       eutp_abort(9);
#   51|       }
#   52|     for (i = 0; i < size; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def900]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:50:7: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:17: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_false: following ‘false’ branch (when ‘tmpmap’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:47:18: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_true: following ‘true’ branch (when ‘tmpmap2’ is NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:49:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:50:7: throw: if ‘eutp_abort’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:50:7: danger: ‘tmpmap’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   48|       {
#   49|         perror("malloc");
#   50|->       eutp_abort(9);
#   51|       }
#   52|     for (i = 0; i < size; i++)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def901]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:53:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tmpmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:17: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: release_memory: assuming ‘tmpmap’ is NULL
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_true: following ‘true’ branch (when ‘tmpmap’ is NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:44:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_false: following ‘false’ branch (when ‘tmpmap2’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:52:8: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:53:17: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:53:5: danger: dereference of NULL ‘tmpmap + i’
#   51|       }
#   52|     for (i = 0; i < size; i++)
#   53|->     tmpmap[i] = (*map)[i];
#   54|     p = tmpmap;
#   55|     p2 = tmpmap2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def902]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:68:17: enter_function: entry to ‘k2txt’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:121:10: call_function: calling ‘dos2unix’ from ‘k2txt’
#   54|     p = tmpmap;
#   55|     p2 = tmpmap2;
#   56|->   iconv(env->dos2unix, &p, &i, &p2, &o);
#   57|     newsize = (2 * size) - o;
#   58|     *map = realloc(*map, newsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def903]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: warning[-Wanalyzer-malloc-leak]: leak of ‘p2’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_true: following ‘true’ branch (when ‘tmpmap’ is NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:44:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:47:18: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_false: following ‘false’ branch (when ‘tmpmap2’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:52:8: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:54:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: throw: if ‘iconv’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: danger: ‘p2’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#   54|     p = tmpmap;
#   55|     p2 = tmpmap2;
#   56|->   iconv(env->dos2unix, &p, &i, &p2, &o);
#   57|     newsize = (2 * size) - o;
#   58|     *map = realloc(*map, newsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def904]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:17: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:42:6: branch_false: following ‘false’ branch (when ‘tmpmap’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:47:18: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:47:6: branch_false: following ‘false’ branch (when ‘tmpmap2’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:52:8: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:53:17: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:53:17: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:52:15: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:54:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: throw: if ‘iconv’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:56:3: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   54|     p = tmpmap;
#   55|     p2 = tmpmap2;
#   56|->   iconv(env->dos2unix, &p, &i, &p2, &o);
#   57|     newsize = (2 * size) - o;
#   58|     *map = realloc(*map, newsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def905]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:81:14: warning[-Wanalyzer-malloc-leak]: leak of ‘newmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:81:14: danger: ‘newmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#   79|       {
#   80|         perror("open");
#   81|->       return 0;
#   82|       }
#   83|     fstat(fd, &st);

Error: COMPILER_WARNING (CWE-252): [#def906]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c: scope_hint: In function ‘k2txt’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:87:3: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   87 |   read(fd, map, size);
#      |   ^~~~~~~~~~~~~~~~~~~
#   85|     map = malloc(size + 1);
#   86|     newmap = malloc(size + 1);
#   87|->   read(fd, map, size);
#   88|     map[size] = 0;
#   89|     close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def907]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#   87|     read(fd, map, size);
#   88|     map[size] = 0;
#   89|->   close(fd);
#   90|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def908]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: warning[-Wanalyzer-malloc-leak]: leak of ‘newmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:89:3: danger: ‘newmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#   87|     read(fd, map, size);
#   88|     map[size] = 0;
#   89|->   close(fd);
#   90|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def909]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: throw: if ‘open’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#   88|     map[size] = 0;
#   89|     close(fd);
#   90|->   if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {
#   92|         perror("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def910]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: warning[-Wanalyzer-malloc-leak]: leak of ‘newmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: throw: if ‘open’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:13: danger: ‘newmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#   88|     map[size] = 0;
#   89|     close(fd);
#   90|->   if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {
#   92|         perror("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def911]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: throw: if ‘perror’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#   90|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {
#   92|->       perror("open");
#   93|         return 0;
#   94|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def912]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: throw: if ‘perror’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: danger: ‘newmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#   90|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#   91|       {
#   92|->       perror("open");
#   93|         return 0;
#   94|       }

Error: CPPCHECK_WARNING (CWE-401): [#def913]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:93: error[memleak]: Memory leak: newmap
#   91|       {
#   92|         perror("open");
#   93|->       return 0;
#   94|       }
#   95|     while (flg_hdr)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def914]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:97:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:97:11: danger: ‘map + (sizetype)i’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#   95|     while (flg_hdr)
#   96|       {
#   97|->       if (map[i] == 'R' && map[ i - 1] == '\x0b')
#   98|   	flg_hdr = 2;
#   99|         if (flg_hdr == 2 && map[i] == '$' && map[i - 1] == '\x1b')

Error: GCC_ANALYZER_WARNING (CWE-476): [#def915]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:111:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘newmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:111:9: danger: ‘malloc(size + 1) + (sizetype)o’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  109|       {
#  110|         if (map[i] == 'P' && map[i - 1] == '\x1b')
#  111|-> 	newmap[o++] = '\n';
#  112|         if (map[i] == 'L' && map[i - 1] == '\x1b')
#  113|   	newmap[o++] = '\n';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def916]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:113:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘newmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:113:9: danger: ‘malloc(size + 1) + (sizetype)o’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  111|   	newmap[o++] = '\n';
#  112|         if (map[i] == 'L' && map[i - 1] == '\x1b')
#  113|-> 	newmap[o++] = '\n';
#  114|         if (map[i] == '\x1b' && map[i - 1] == '\x1b')
#  115|   	newmap[o++] = '\x1b';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def917]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:115:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘newmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:115:9: danger: ‘malloc(size + 1) + (sizetype)o’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  113|   	newmap[o++] = '\n';
#  114|         if (map[i] == '\x1b' && map[i - 1] == '\x1b')
#  115|-> 	newmap[o++] = '\x1b';
#  116|         if (map[i] != '\x1b' && map[i - 1] != '\x1b')
#  117|   	newmap[o++] = map[i];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def918]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:117:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘newmap’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:86:12: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:107:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:110:14: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:117:9: danger: ‘malloc(size + 1) + (sizetype)o’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  115|   	newmap[o++] = '\x1b';
#  116|         if (map[i] != '\x1b' && map[i - 1] != '\x1b')
#  117|-> 	newmap[o++] = map[i];
#  118|         i++;
#  119|       }

Error: COMPILER_WARNING (CWE-252): [#def919]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:122:3: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  122 |   write(fd, newmap, size);
#      |   ^~~~~~~~~~~~~~~~~~~~~~~
#  120|     /* Convert text into the current charset */
#  121|     size = dos2unix(env, &newmap, o);
#  122|->   write(fd, newmap, size);
#  123|     free(map);
#  124|     free(newmap);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def920]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:127:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:78:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:83:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:85:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:90:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:92:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:127:1: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  125|     close(fd);
#  126|     return 1;
#  127|-> }
#  128|   
#  129|   /*

Error: CPPCHECK_WARNING (CWE-686): [#def921]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:146: error[invalidFunctionArgBool]: Invalid toupper() argument nr 1. A non-boolean value is required.
#  144|     /* Reconnaissance de l'extension */
#  145|     i = strlen((char*)name);
#  146|->   if (name[i - 2] == '.' && (toupper(name[i - 1] == 'K')
#  147|   			     || toupper(name[i - 1]) == 'T'
#  148|   			     || toupper(name[i - 1] == 'A')

Error: CPPCHECK_WARNING (CWE-686): [#def922]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:148: error[invalidFunctionArgBool]: Invalid toupper() argument nr 1. A non-boolean value is required.
#  146|     if (name[i - 2] == '.' && (toupper(name[i - 1] == 'K')
#  147|   			     || toupper(name[i - 1]) == 'T'
#  148|-> 			     || toupper(name[i - 1] == 'A')
#  149|   			     || toupper(name[i - 1] == 'L')
#  150|   			     || toupper(name[i - 1]) == 'B'))

Error: CPPCHECK_WARNING (CWE-686): [#def923]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:149: error[invalidFunctionArgBool]: Invalid toupper() argument nr 1. A non-boolean value is required.
#  147|   			     || toupper(name[i - 1]) == 'T'
#  148|   			     || toupper(name[i - 1] == 'A')
#  149|-> 			     || toupper(name[i - 1] == 'L')
#  150|   			     || toupper(name[i - 1]) == 'B'))
#  151|       {

Error: COMPILER_WARNING (CWE-252): [#def924]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c: scope_hint: In function ‘txt2k’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:191:3: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  191 |   read(fd, map, size);
#      |   ^~~~~~~~~~~~~~~~~~~
#  189|     size = st.st_size;
#  190|     map = malloc(size + 1);
#  191|->   read(fd, map, size);
#  192|     map[size] = 0;
#  193|     close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def925]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:193:3: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:183:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:188:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:190:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:193:3: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:193:3: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  191|     read(fd, map, size);
#  192|     map[size] = 0;
#  193|->   close(fd);
#  194|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#  195|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def926]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:194:13: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:183:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:188:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:190:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:194:13: throw: if ‘open’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:194:13: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  192|     map[size] = 0;
#  193|     close(fd);
#  194|->   if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#  195|       {
#  196|         perror("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def927]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:196:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:183:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:188:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:190:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:194:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:196:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:196:7: throw: if ‘perror’ throws an exception...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:196:7: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  194|     if ((fd = open(destfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1)
#  195|       {
#  196|->       perror("open");
#  197|         return 0;
#  198|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def928]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:202:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:183:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:188:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:190:9: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_convert.c:202:1: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
#  200|   
#  201|     return 1;
#  202|-> }

Error: COMPILER_WARNING (CWE-252): [#def929]
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_transfer.c: scope_hint: In function ‘brtopc’
brltty-6.8/python3/Drivers/Braille/EuroBraille/eutp_transfer.c:123:7: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  123 |       write(fd, &(buf[3]), buf[0] - 2);
#      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  121|         sprintf((char*)str, "... %s %d", filename, lines);
#  122|         brl_message((char*)str, 0);
#  123|->       write(fd, &(buf[3]), buf[0] - 2);
#  124|         lines++;
#  125|       }

Error: GCC_ANALYZER_WARNING (CWE-121): [#def930]
brltty-6.8/python3/Drivers/Braille/HandyTech/braille.c:885:7: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
brltty-6.8/python3/Drivers/Braille/HandyTech/braille.c:877:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/HandyTech/braille.c:877:6: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/HandyTech/braille.c:878:12: branch_true: following ‘true’ branch (when ‘size != 0’)...
brltty-6.8/python3/Drivers/Braille/HandyTech/braille.c:878:18: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/HandyTech/braille.c:880:21: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/HandyTech/braille.c:880:29: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/HandyTech/braille.c:885:7: danger: write of ‘(unsigned char)hidInDataSize + 254’ bytes at offset ‘2’ exceeds the buffer
#  883|         report[0] = HT_HID_RPT_InData;
#  884|         report[1] = count;
#  885|->       memcpy(report+2, &buffer[index], count);
#  886|         memset(&report[count+2], 0, sizeof(report)-count-2);
#  887|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def931]
brltty-6.8/python3/Drivers/Braille/MDV/braille.c:192:10: warning[-Wanalyzer-null-argument]: use of NULL ‘data’ where non-null expected
brltty-6.8/python3/Drivers/Braille/MDV/braille.c:298:1: enter_function: entry to ‘writeIdentifyRequest’
brltty-6.8/python3/Drivers/Braille/MDV/braille.c:299:10: call_function: calling ‘writePacket’ from ‘writeIdentifyRequest’
#  190|     packet.fields.code = code;
#  191|     packet.fields.length = length;
#  192|->   byte = mempcpy(byte, data, length);
#  193|   
#  194|     uint16_t checksum = calculateChecksum(&packet.fields.stx, byte);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def932]
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:252:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:273:1: enter_function: entry to ‘brl_writeWindow’
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:285:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:295:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:301:30: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:302:35: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:305:35: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:319:7: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:320:7: call_function: calling ‘writeText’ from ‘brl_writeWindow’
#  250|     int column;
#  251|     for (column=0; column<columns; column++) {
#  252|->     wchar_t c = buffer[column];
#  253|   
#  254|   #ifdef HAVE_ICONV_H

Error: GCC_ANALYZER_WARNING (CWE-688): [#def933]
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:86:10: warning[-Wanalyzer-null-argument]: use of NULL ‘data’ where non-null expected
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:141:1: enter_function: entry to ‘brl_construct’
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:142:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:147:23: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:147:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:149:5: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:151:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:152:11: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:152:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:153:13: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/TechniBraille/braille.c:153:13: call_function: calling ‘writePacket’ from ‘brl_construct’
#   84|     *byte++ = function;
#   85|     *byte++ = count;
#   86|->   byte = mempcpy(byte, data, count);
#   87|   
#   88|     {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def934]
brltty-6.8/python3/Drivers/Braille/Virtual/braille.c:572:7: warning[-Wanalyzer-malloc-leak]: leak of ‘readCommandLine()’
brltty-6.8/python3/Drivers/Braille/Virtual/braille.c:1195:1: enter_function: entry to ‘brl_readCommand’
brltty-6.8/python3/Drivers/Braille/Virtual/braille.c:1197:16: call_function: calling ‘readCommandLine’ from ‘brl_readCommand’
brltty-6.8/python3/Drivers/Braille/Virtual/braille.c:1197:16: return_function: returning to ‘brl_readCommand’ from ‘readCommandLine’
brltty-6.8/python3/Drivers/Braille/Virtual/braille.c:1199:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Virtual/braille.c:1201:5: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Virtual/braille.c:1201:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Drivers/Braille/Virtual/braille.c:572:7: danger: ‘readCommandLine()’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  570|   static int
#  571|   fillInputBuffer (void) {
#  572|->   if ((inputLength < INPUT_SIZE) && !inputEnd) {
#  573|       int count = operations->read(fileDescriptor, &inputBuffer[inputLength], INPUT_SIZE-inputLength);
#  574|       if (!count) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def935]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:94:5: warning[-Wanalyzer-malloc-leak]: leak of ‘keyname’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#   92|      *(c-1)='\0';
#   93|      if (!strcmp(s,"keyname")) {
#   94|->     keyname = (char *) malloc(strlen(c)+1);
#   95|       strcpy(keyname,c);
#   96|      } else if (!strcmp(s,"socketport")) {

Error: CPPCHECK_WARNING (CWE-476): [#def936]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:95: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: keyname
#   93|      if (!strcmp(s,"keyname")) {
#   94|       keyname = (char *) malloc(strlen(c)+1);
#   95|->     strcpy(keyname,c);
#   96|      } else if (!strcmp(s,"socketport")) {
#   97|       socketport = (char *) malloc(strlen(c)+1);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def937]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:95:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘keyname’ where non-null expected
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#   93|      if (!strcmp(s,"keyname")) {
#   94|       keyname = (char *) malloc(strlen(c)+1);
#   95|->     strcpy(keyname,c);
#   96|      } else if (!strcmp(s,"socketport")) {
#   97|       socketport = (char *) malloc(strlen(c)+1);

Error: CPPCHECK_WARNING (CWE-476): [#def938]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:98: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: socketport
#   96|      } else if (!strcmp(s,"socketport")) {
#   97|       socketport = (char *) malloc(strlen(c)+1);
#   98|->     strcpy(socketport,c);
#   99|      } else if (!strcmp(s,"vbs_ext")) {
#  100|       visiobases_ext = (char *) malloc(5);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def939]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:98:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘socketport’ where non-null expected
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#   96|      } else if (!strcmp(s,"socketport")) {
#   97|       socketport = (char *) malloc(strlen(c)+1);
#   98|->     strcpy(socketport,c);
#   99|      } else if (!strcmp(s,"vbs_ext")) {
#  100|       visiobases_ext = (char *) malloc(5);

Error: CPPCHECK_WARNING (CWE-476): [#def940]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:101: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: visiobases_ext
#   99|      } else if (!strcmp(s,"vbs_ext")) {
#  100|       visiobases_ext = (char *) malloc(5);
#  101|->     strncpy(visiobases_ext,c,4);
#  102|       visiobases_ext[4]=0;
#  103|      } else if (!strcmp(s,"vbs_dir")) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def941]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:101:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘visiobases_ext’ where non-null expected
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#   99|      } else if (!strcmp(s,"vbs_ext")) {
#  100|       visiobases_ext = (char *) malloc(5);
#  101|->     strncpy(visiobases_ext,c,4);
#  102|       visiobases_ext[4]=0;
#  103|      } else if (!strcmp(s,"vbs_dir")) {

Error: CPPCHECK_WARNING (CWE-476): [#def942]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:102: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: visiobases_ext
#  100|       visiobases_ext = (char *) malloc(5);
#  101|       strncpy(visiobases_ext,c,4);
#  102|->     visiobases_ext[4]=0;
#  103|      } else if (!strcmp(s,"vbs_dir")) {
#  104|       visiobases_dir = (char *) malloc(strlen(c)+1);

Error: CPPCHECK_WARNING (CWE-476): [#def943]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:105: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: visiobases_dir
#  103|      } else if (!strcmp(s,"vbs_dir")) {
#  104|       visiobases_dir = (char *) malloc(strlen(c)+1);
#  105|->     strcpy(visiobases_dir,c);
#  106|      }
#  107|     } else {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def944]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:105:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘visiobases_dir’ where non-null expected
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:175:5: enter_function: entry to ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: call_function: calling ‘CheckSendOrRecv’ from ‘main’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:182:11: return_function: returning to ‘main’ from ‘CheckSendOrRecv’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:5: branch_true: following ‘true’ branch (when ‘home’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:185:29: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_main.c:189:3: call_function: calling ‘Parse’ from ‘main’
#  103|      } else if (!strcmp(s,"vbs_dir")) {
#  104|       visiobases_dir = (char *) malloc(strlen(c)+1);
#  105|->     strcpy(visiobases_dir,c);
#  106|      }
#  107|     } else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def945]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:107:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  105|   static void WaitForOk(void) {
#  106|    int res;
#  107|->  do { SEND(obuf,osize); RECV() }
#  108|    while ((res==0 || ibuf[0]!=VB_OK) && (showPacket(res),1));
#  109|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def946]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:107:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  105|   static void WaitForOk(void) {
#  106|    int res;
#  107|->  do { SEND(obuf,osize); RECV() }
#  108|    while ((res==0 || ibuf[0]!=VB_OK) && (showPacket(res),1));
#  109|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def947]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:277:11: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  275|   
#  276|   static int tryToFind(char *f, int *fd) {
#  277|->  if ((*fd=open(f,O_RDONLY))<0) {
#  278|     strcpy(ibuf,f);
#  279|     strcat(ibuf,visiobases_ext);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def948]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:280:12: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  278|     strcpy(ibuf,f);
#  279|     strcat(ibuf,visiobases_ext);
#  280|->   if ((*fd=open(ibuf,O_RDONLY))<0) {
#  281|      strcpy(ibuf,f);
#  282|      strcat(ibuf,".vis");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def949]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:283:13: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  281|      strcpy(ibuf,f);
#  282|      strcat(ibuf,".vis");
#  283|->    if ((*fd=open(ibuf,O_RDONLY))<0) {
#  284|       strcpy(ibuf,f);
#  285|       strcat(ibuf,".Vis");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def950]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:286:14: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  284|       strcpy(ibuf,f);
#  285|       strcat(ibuf,".Vis");
#  286|->     if ((*fd=open(ibuf,O_RDONLY))<0) {
#  287|        strcpy(ibuf,f);
#  288|        strcat(ibuf,".VIS");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def951]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:289:15: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:311:7: call_function: calling ‘tryToFind’ from ‘fileput’
#  287|        strcpy(ibuf,f);
#  288|        strcat(ibuf,".VIS");
#  289|->      if ((*fd=open(ibuf,O_RDONLY))<0) {
#  290|         return 0;
#  291|        }

Error: CPPCHECK_WARNING (CWE-476): [#def952]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:309: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f2
#  307|    if (visiobases_dir && (f[0]!='.' || (f[1]!='.' && f[1]!='/') || (f[1]=='.' && f[2]!='/'))) {
#  308|     char *f2 = malloc(strlen(visiobases_dir)+1+strlen(f));
#  309|->   strcpy(f2,visiobases_dir);
#  310|     strcat(f2,f);
#  311|     if (tryToFind(f2, &fd)) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def953]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:309:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘f2’ where non-null expected
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:5: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:307:25: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:308:14: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:309:3: danger: argument 1 (‘f2’) from [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#  307|    if (visiobases_dir && (f[0]!='.' || (f[1]!='.' && f[1]!='/') || (f[1]=='.' && f[2]!='/'))) {
#  308|     char *f2 = malloc(strlen(visiobases_dir)+1+strlen(f));
#  309|->   strcpy(f2,visiobases_dir);
#  310|     strcat(f2,f);
#  311|     if (tryToFind(f2, &fd)) {

Error: CPPCHECK_WARNING (CWE-476): [#def954]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:310: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f2
#  308|     char *f2 = malloc(strlen(visiobases_dir)+1+strlen(f));
#  309|     strcpy(f2,visiobases_dir);
#  310|->   strcat(f2,f);
#  311|     if (tryToFind(f2, &fd)) {
#  312|      free(f2);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def955]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:326:2: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: throw: if ‘brlapi_sendRaw’ throws an exception...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: danger: ‘fd’ leaks here; was opened at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
#  342|    sizetransferred=0;
#  343|    while(1) {
#  344|->   SEND(obuf,osize);
#  345|     printf("\r%s: %dKo...",filename,sizetransferred>>10);
#  346|     fflush(stdout);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def956]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:346:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:326:2: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:345:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:346:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:346:3: danger: ‘fd’ leaks here; was opened at [(8)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/7)
#  344|     SEND(obuf,osize);
#  345|     printf("\r%s: %dKo...",filename,sizetransferred>>10);
#  346|->   fflush(stdout);
#  347|     RECV();
#  348|     if (ibuf[0]==VB_NEXT) break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def957]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:347:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:326:2: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:345:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:347:3: throw: if ‘brlapi_recvRaw’ throws an exception...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:347:3: danger: ‘fd’ leaks here; was opened at [(8)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/7)
#  345|     printf("\r%s: %dKo...",filename,sizetransferred>>10);
#  346|     fflush(stdout);
#  347|->   RECV();
#  348|     if (ibuf[0]==VB_NEXT) break;
#  349|     if (res<2) { showPacket(res); continue; }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def958]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:371:2: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:326:2: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:344:3: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:345:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:347:3: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:371:2: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:371:2: danger: ‘fd’ leaks here; was opened at [(8)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/7)
#  369|    }
#  370|   /* transfer finished */
#  371|->  close(fd);
#  372|    printf("ok\n");
#  373|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def959]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:402:2: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  400|   /* if something nasty occured, try to clean */
#  401|   void transfer_abort(int exitnum) {
#  402|->  brlapi_sendRaw(VB_RESET,strlen(VB_RESET));
#  403|    brlapi_leaveRaw();
#  404|    brlapi_closeConnection();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def960]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:403:2: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  401|   void transfer_abort(int exitnum) {
#  402|    brlapi_sendRaw(VB_RESET,strlen(VB_RESET));
#  403|->  brlapi_leaveRaw();
#  404|    brlapi_closeConnection();
#  405|    exit(exitnum);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def961]
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:404:2: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:301:6: enter_function: entry to ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: call_function: calling ‘tryToFind’ from ‘fileput’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:7: return_function: returning to ‘fileput’ from ‘tryToFind’
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:318:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:323:1: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/VisioBraille/vstp_transfer.c:324:2: call_function: inlined call to ‘transfer_init’ from ‘fileput’
#  402|    brlapi_sendRaw(VB_RESET,strlen(VB_RESET));
#  403|    brlapi_leaveRaw();
#  404|->  brlapi_closeConnection();
#  405|    exit(exitnum);
#  406|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def962]
brltty-6.8/python3/Drivers/Braille/Voyager/braille.c:255:20: warning[-Wanalyzer-malloc-leak]: leak of ‘getUsbString(brl,  request)’
brltty-6.8/python3/Drivers/Braille/Voyager/braille.c:569:1: enter_function: entry to ‘logUsbString’
brltty-6.8/python3/Drivers/Braille/Voyager/braille.c:570:21: call_function: calling ‘getUsbString’ from ‘logUsbString’
brltty-6.8/python3/Drivers/Braille/Voyager/braille.c:570:21: return_function: returning to ‘logUsbString’ from ‘getUsbString’
brltty-6.8/python3/Drivers/Braille/Voyager/braille.c:572:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/Voyager/braille.c:573:5: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/Voyager/braille.c:573:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Drivers/Braille/Voyager/braille.c:255:20: danger: ‘getUsbString(brl,  request)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  253|     unsigned char *buffer, uint16_t size
#  254|   ) {
#  255|->   ssize_t result = gioAskResource(brl->gioEndpoint, UsbControlRecipient_Endpoint, UsbControlType_Vendor,
#  256|                                     request, value, index, buffer, size);
#  257|     int ok = result != -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def963]
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:782:16: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:778:15: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:778:6: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:779:5: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:782:16: throw: if ‘XtVaOpenApplication’ throws an exception...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:782:16: danger: ‘argv’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  780|   
#  781|       /* toplevel */
#  782|->     toplevel = XtVaOpenApplication(&app_con, "Brltty",
#  783|         NULL, 0,
#  784|         &argc, argv, fallback_resources,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def964]
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:38: warning[-Wanalyzer-malloc-leak]: leak of ‘args2’
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1121:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1126:22: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1128:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1129:39: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1131:12: branch_true: following ‘true’ branch (when ‘args2’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1132:31: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1136:14: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1137:37: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:38: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:38: throw: if ‘deallocateStrings’ throws an exception...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:38: danger: ‘args2’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 1139|               count += 1;
# 1140|   
# 1141|->             if (xtArgv != xtDefArgv) deallocateStrings(xtArgv);
# 1142|               xtArgv = args2;
# 1143|               xtArgc = count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def965]
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:38: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1121:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1126:22: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1128:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1129:39: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1131:12: branch_true: following ‘true’ branch (when ‘args2’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1132:31: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1132:24: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1136:14: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1137:37: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:38: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:38: throw: if ‘deallocateStrings’ throws an exception...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1141:38: danger: ‘name’ leaks here; was allocated at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
# 1139|               count += 1;
# 1140|   
# 1141|->             if (xtArgv != xtDefArgv) deallocateStrings(xtArgv);
# 1142|               xtArgv = args2;
# 1143|               xtArgc = count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def966]
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1148:13: warning[-Wanalyzer-malloc-leak]: leak of ‘args2’
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1121:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1126:22: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1128:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1129:39: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1131:12: branch_true: following ‘true’ branch (when ‘args2’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1132:31: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1136:14: branch_false: following ‘false’ branch (when ‘name’ is NULL)...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1148:13: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1148:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1148:13: danger: ‘args2’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1146|               reallocated = 1;
# 1147|             } else {
# 1148|->             logMallocError();
# 1149|             }
# 1150|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def967]
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1151:22: warning[-Wanalyzer-malloc-leak]: leak of ‘args2’
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1121:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1126:22: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1128:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1129:39: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1131:12: branch_true: following ‘true’ branch (when ‘args2’ is non-NULL)...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1132:31: branch_true: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1136:14: branch_false: following ‘false’ branch (when ‘name’ is NULL)...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1148:13: branch_false: ...to here
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1151:22: throw: if ‘deallocateStrings’ throws an exception...
brltty-6.8/python3/Drivers/Braille/XWindow/braille.c:1151:22: danger: ‘args2’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 1149|             }
# 1150|   
# 1151|->           if (args2) deallocateStrings(args2);
# 1152|           } else {
# 1153|             logMallocError();

Error: CPPCHECK_WARNING (CWE-401): [#def968]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:248: error[memleakOnRealloc]: Common realloc mistake: 'curRows' nulled but not freed upon failure
#  246|   static void addRows(long pos, long num) {
#  247|     curNumRows += num;
#  248|->   curRows = realloc(curRows,curNumRows*sizeof(*curRows));
#  249|     curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
#  250|     memmove(curRows      +pos+num,curRows      +pos,(curNumRows-(pos+num))*sizeof(*curRows));

Error: CPPCHECK_WARNING (CWE-401): [#def969]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:249: error[memleakOnRealloc]: Common realloc mistake: 'curRowLengths' nulled but not freed upon failure
#  247|     curNumRows += num;
#  248|     curRows = realloc(curRows,curNumRows*sizeof(*curRows));
#  249|->   curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
#  250|     memmove(curRows      +pos+num,curRows      +pos,(curNumRows-(pos+num))*sizeof(*curRows));
#  251|     memmove(curRowLengths+pos+num,curRowLengths+pos,(curNumRows-(pos+num))*sizeof(*curRowLengths));

Error: CPPCHECK_WARNING (CWE-401): [#def970]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:261: error[memleakOnRealloc]: Common realloc mistake: 'curRows' nulled but not freed upon failure
#  259|     memmove(curRowLengths+pos,curRowLengths+pos+num,(curNumRows-(pos+num))*sizeof(*curRowLengths));
#  260|     curNumRows -= num;
#  261|->   curRows = realloc(curRows,curNumRows*sizeof(*curRows));
#  262|     curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
#  263|   }

Error: CPPCHECK_WARNING (CWE-401): [#def971]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:262: error[memleakOnRealloc]: Common realloc mistake: 'curRowLengths' nulled but not freed upon failure
#  260|     curNumRows -= num;
#  261|     curRows = realloc(curRows,curNumRows*sizeof(*curRows));
#  262|->   curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
#  263|   }
#  264|   

Error: CPPCHECK_WARNING (CWE-476): [#def972]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:788: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  786|     }
#  787|     ret = malloc(sizeof(*ret) * count);
#  788|->   memcpy(ret, states, sizeof(*ret) * count);
#  789|   
#  790|   out:

Error: CPPCHECK_WARNING (CWE-476): [#def973]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1336: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a2Watch
# 1334|   {
# 1335|     struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1336|->   a2Watch->watch = watch;
# 1337|     int flags = dbus_watch_get_flags(watch);
# 1338|     if (dbus_watch_get_enabled(watch))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def974]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1336:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘a2Watch’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1336:3: danger: ‘a2Watch’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1334|   {
# 1335|     struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1336|->   a2Watch->watch = watch;
# 1337|     int flags = dbus_watch_get_flags(watch);
# 1338|     if (dbus_watch_get_enabled(watch))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def975]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1337:15: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1337:15: throw: if ‘dbus_watch_get_flags’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1337:15: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1335|     struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1336|     a2Watch->watch = watch;
# 1337|->   int flags = dbus_watch_get_flags(watch);
# 1338|     if (dbus_watch_get_enabled(watch))
# 1339|     {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def976]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:7: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:7: throw: if ‘dbus_watch_get_enabled’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:7: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1336|     a2Watch->watch = watch;
# 1337|     int flags = dbus_watch_get_flags(watch);
# 1338|->   if (dbus_watch_get_enabled(watch))
# 1339|     {
# 1340|       if (flags & DBUS_WATCH_READABLE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def977]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1341:7: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1341:7: throw: if ‘asyncMonitorFileInput’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1341:7: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1339|     {
# 1340|       if (flags & DBUS_WATCH_READABLE)
# 1341|->       asyncMonitorFileInput(&a2Watch->input_monitor, dbus_watch_get_unix_fd(watch), a2ProcessInput, a2Watch);
# 1342|       if (flags & DBUS_WATCH_WRITABLE)
# 1343|         asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def978]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: throw: if ‘dbus_watch_get_unix_fd’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1341:54: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1339|     {
# 1340|       if (flags & DBUS_WATCH_READABLE)
# 1341|->       asyncMonitorFileInput(&a2Watch->input_monitor, dbus_watch_get_unix_fd(watch), a2ProcessInput, a2Watch);
# 1342|       if (flags & DBUS_WATCH_WRITABLE)
# 1343|         asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def979]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1343:7: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_false: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1342:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1343:7: throw: if ‘asyncMonitorFileOutput’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1343:7: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1341|         asyncMonitorFileInput(&a2Watch->input_monitor, dbus_watch_get_unix_fd(watch), a2ProcessInput, a2Watch);
# 1342|       if (flags & DBUS_WATCH_WRITABLE)
# 1343|->       asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);
# 1344|     }
# 1345|     dbus_watch_set_data(watch, a2Watch, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def980]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1338:6: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1340:8: branch_false: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1342:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: throw: if ‘dbus_watch_get_unix_fd’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1343:56: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 1341|         asyncMonitorFileInput(&a2Watch->input_monitor, dbus_watch_get_unix_fd(watch), a2ProcessInput, a2Watch);
# 1342|       if (flags & DBUS_WATCH_WRITABLE)
# 1343|->       asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);
# 1344|     }
# 1345|     dbus_watch_set_data(watch, a2Watch, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def981]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1345:3: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Watch’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1335:29: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1345:3: throw: if ‘dbus_watch_set_data’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1345:3: danger: ‘a2Watch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1343|         asyncMonitorFileOutput(&a2Watch->output_monitor, dbus_watch_get_unix_fd(watch), a2ProcessOutput, a2Watch);
# 1344|     }
# 1345|->   dbus_watch_set_data(watch, a2Watch, NULL);
# 1346|     return TRUE;
# 1347|   }

Error: CPPCHECK_WARNING (CWE-476): [#def982]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1403: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a2Timeout
# 1401|   {
# 1402|     struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1403|->   a2Timeout->timeout = timeout;
# 1404|     if (dbus_timeout_get_enabled(timeout))
# 1405|       asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def983]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1403:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘a2Timeout’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1402:33: acquire_memory: this call could return NULL
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1403:3: danger: ‘a2Timeout’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 1401|   {
# 1402|     struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1403|->   a2Timeout->timeout = timeout;
# 1404|     if (dbus_timeout_get_enabled(timeout))
# 1405|       asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def984]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1404:7: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Timeout’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1402:33: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1404:7: throw: if ‘dbus_timeout_get_enabled’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1404:7: danger: ‘a2Timeout’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 1402|     struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1403|     a2Timeout->timeout = timeout;
# 1404|->   if (dbus_timeout_get_enabled(timeout))
# 1405|       asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
# 1406|     dbus_timeout_set_data(timeout, a2Timeout, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def985]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1405:5: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Timeout’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1402:33: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1404:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1405:5: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1405:5: throw: if ‘dbus_timeout_get_interval’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1405:5: danger: ‘a2Timeout’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 1403|     a2Timeout->timeout = timeout;
# 1404|     if (dbus_timeout_get_enabled(timeout))
# 1405|->     asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
# 1406|     dbus_timeout_set_data(timeout, a2Timeout, NULL);
# 1407|     return TRUE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def986]
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1406:3: warning[-Wanalyzer-malloc-leak]: leak of ‘a2Timeout’
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1402:33: acquire_memory: allocated here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1404:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1406:3: branch_false: ...to here
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1406:3: throw: if ‘dbus_timeout_set_data’ throws an exception...
brltty-6.8/python3/Drivers/Screen/AtSpi2/a2_screen.c:1406:3: danger: ‘a2Timeout’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1404|     if (dbus_timeout_get_enabled(timeout))
# 1405|       asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
# 1406|->   dbus_timeout_set_data(timeout, a2Timeout, NULL);
# 1407|     return TRUE;
# 1408|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def987]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:93:7: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#   91|   
#   92|       if (!newArray) {
#   93|->       logMallocError();
#   94|         return 0;
#   95|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def988]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:110:33: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  108|   static int
#  109|   setScreenContent (const char *text) {
#  110|->   unsigned int characterCount = countUtf8Characters(text);
#  111|     fileCharacters = malloc(characterCount * sizeof(*fileCharacters));
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def989]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:114:5: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  112|   
#  113|     if (fileCharacters) {
#  114|->     makeWcharsFromUtf8(text, fileCharacters, characterCount);
#  115|   
#  116|       const wchar_t *current = fileCharacters;

Error: COMPILER_WARNING (CWE-704): [#def990]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c: scope_hint: In function ‘setScreenContent’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:120:23: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  120 |       wchar_t *next = wcschr(current, WC_C('\n'));
#      |                       ^~~~~~
#  118|   
#  119|       while (current < end) {
#  120|->       wchar_t *next = wcschr(current, WC_C('\n'));
#  121|   
#  122|         if (!next) {

Error: COMPILER_WARNING (CWE-704): [#def991]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:120:23: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  118|   
#  119|       while (current < end) {
#  120|->       wchar_t *next = wcschr(current, WC_C('\n'));
#  121|   
#  122|         if (!next) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def992]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:133:5: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  131|       return 1;
#  132|     } else {
#  133|->     logMallocError();
#  134|     }
#  135|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def993]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:151:30: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  149|   
#  150|         if (text) {
#  151|->         int fileDescriptor = open(filePath, O_RDONLY);
#  152|   
#  153|           if (fileDescriptor != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def994]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:157:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filePath, 0)’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  155|   
#  156|             if (result != -1) {
#  157|->             if (result < fileSize) fileSize = result;
#  158|               text[fileSize] = 0;
#  159|               setScreenContent(text);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def995]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:161:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filePath, 0)’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  159|               setScreenContent(text);
#  160|             } else {
#  161|->             problem = strerror(errno);
#  162|             }
#  163|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def996]
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:164:11: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:341:1: enter_function: entry to ‘construct_FileViewerScreen’
brltty-6.8/python3/Drivers/Screen/FileViewer/screen.c:349:3: call_function: calling ‘loadFile’ from ‘construct_FileViewerScreen’
#  162|             }
#  163|   
#  164|->           close(fileDescriptor);
#  165|           } else {
#  166|             problem = strerror(errno);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def997]
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:435:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(consoleName,  vt)’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2750:1: enter_function: entry to ‘selectRegion’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2751:7: call_function: calling ‘controlCurrentConsole’ from ‘selectRegion’
#  433|     if (vt) {
#  434|       int length = strlen(name);
#  435|->     if (name[length-1] == '0') length -= 1;
#  436|   
#  437|       char buffer[length+4];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def998]
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:435:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(screenName,  vt)’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:1816:1: enter_function: entry to ‘isUnusedConsole’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:1820:7: call_function: calling ‘openScreenDevice’ from ‘isUnusedConsole’
#  433|     if (vt) {
#  434|       int length = strlen(name);
#  435|->     if (name[length-1] == '0') length -= 1;
#  436|   
#  437|       char buffer[length+4];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def999]
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:435:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(unicodeDeviceName,  vt)’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2040:1: enter_function: entry to ‘describe_LinuxScreen’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2041:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2046:7: branch_false: ...to here
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2046:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2047:9: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2047:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2048:12: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2048:12: call_function: calling ‘getScreenProperties’ from ‘describe_LinuxScreen’
#  433|     if (vt) {
#  434|       int length = strlen(name);
#  435|->     if (name[length-1] == '0') length -= 1;
#  436|   
#  437|       char buffer[length+4];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1000]
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:476:19: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(consoleName,  vt)’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2805:1: enter_function: entry to ‘switchVirtualTerminal_LinuxScreen’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2808:11: call_function: inlined call to ‘controlMainConsole’ from ‘switchVirtualTerminal_LinuxScreen’
#  474|   
#  475|     if (name) {
#  476|->     int console = openCharacterDevice(name, O_WRONLY|O_NOCTTY, TTY_MAJOR, vt);
#  477|   
#  478|       if (console != -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1001]
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:479:7: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(consoleName,  vt)’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2805:1: enter_function: entry to ‘switchVirtualTerminal_LinuxScreen’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2808:11: call_function: inlined call to ‘controlMainConsole’ from ‘switchVirtualTerminal_LinuxScreen’
#  477|   
#  478|       if (console != -1) {
#  479|->       logMessage(LOG_CATEGORY(SCREEN_DRIVER),
#  480|           "%s console opened: %s: fd=%d",
#  481|           type, name, console

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1002]
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:585:7: warning[-Wanalyzer-malloc-leak]: leak of ‘sfm.entries’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:1389:1: enter_function: entry to ‘setTranslationTable’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:1391:20: call_function: calling ‘setScreenFontMap’ from ‘setTranslationTable’
#  583|       case GIO_UNIMAP: {
#  584|         struct unimapdesc *sfm = argument;
#  585|->       memset(sfm, 0, sizeof(*sfm));
#  586|         sfm->entries = NULL;
#  587|         sfm->entry_ct = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1003]
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:712:19: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(unicodeDeviceName,  vt)’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2040:1: enter_function: entry to ‘describe_LinuxScreen’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2041:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2046:7: branch_false: ...to here
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2046:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2047:9: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2047:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2048:12: branch_true: ...to here
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:2048:12: call_function: calling ‘getScreenProperties’ from ‘describe_LinuxScreen’
#  710|   
#  711|     if (name) {
#  712|->     int unicode = openCharacterDevice(name, O_RDWR, VCS_MAJOR, 0X40|vt);
#  713|   
#  714|       if (unicode != -1) {

Error: CPPCHECK_WARNING (CWE-457): [#def1004]
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:788: warning[uninitvar]: Uninitialized variable: buffer
#  786|   static int
#  787|   readUnicodeData (off_t offset, void *buffer, size_t size) {
#  788|->   size_t count = (unicodeCacheUsed? readUnicodeCache: readUnicodeDevice)(offset, buffer, size);
#  789|     if (count == size) return 1;
#  790|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1005]
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:880:18: warning[-Wanalyzer-malloc-leak]: leak of ‘vtName(screenName,  vt)’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:1816:1: enter_function: entry to ‘isUnusedConsole’
brltty-6.8/python3/Drivers/Screen/Linux/screen.c:1820:7: call_function: calling ‘openScreenDevice’ from ‘isUnusedConsole’
#  878|   
#  879|     if (name) {
#  880|->     int screen = openCharacterDevice(name, O_RDWR, VCS_MAJOR, 0X80|vt);
#  881|   
#  882|       if (screen != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1006]
brltty-6.8/python3/Drivers/Speech/ExternalSpeech/speech.c:98:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sd’
brltty-6.8/python3/Drivers/Speech/ExternalSpeech/speech.c:95:12: acquire_resource: stream socket created here
brltty-6.8/python3/Drivers/Speech/ExternalSpeech/speech.c:97:6: branch_true: following ‘true’ branch (when ‘sd != -1’)...
brltty-6.8/python3/Drivers/Speech/ExternalSpeech/speech.c:98:9: branch_true: ...to here
brltty-6.8/python3/Drivers/Speech/ExternalSpeech/speech.c:98:9: throw: if ‘setCloseOnExec’ throws an exception...
brltty-6.8/python3/Drivers/Speech/ExternalSpeech/speech.c:98:9: danger: ‘sd’ leaks here
#   96|   
#   97|     if (sd != -1) {
#   98|->     if (setCloseOnExec(sd, 1)) {
#   99|         if (connect(sd, (const struct sockaddr *)&socketAddress, sizeof(socketAddress)) != -1) {
#  100|           if (setBlockingIo(sd, 0)) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1007]
brltty-6.8/python3/Drivers/Speech/SpeechDispatcher/speech.c:166:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/python3/Drivers/Speech/SpeechDispatcher/speech.c:165:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Drivers/Speech/SpeechDispatcher/speech.c:166:7: branch_true: ...to here
brltty-6.8/python3/Drivers/Speech/SpeechDispatcher/speech.c:166:7: danger: dereference of NULL ‘0’
#  164|       char **error_message = NULL;
#  165|       if (!(connectionHandle = spd_open2("brltty", "main", NULL, SPD_MODE_THREADED, NULL, autospawn, error_message))) {
#  166|->       logMessage(LOG_ERR, "speech dispatcher open failure: %s",*error_message);
#  167|         free(*error_message);
#  168|         return 0;

Error: CPPCHECK_WARNING (CWE-476): [#def1008]
brltty-6.8/python3/Headers/bitfield.h:76: error[ctunullpointer]: Null pointer dereference: to
#   74|     }
#   75|   
#   76|-> DEFINE_PHYSICAL_ENDIAN_FUNCTIONS(16)
#   77|   DEFINE_PHYSICAL_ENDIAN_FUNCTIONS(32)
#   78|   DEFINE_PHYSICAL_ENDIAN_FUNCTIONS(64)

Error: COMPILER_WARNING: [#def1009]
brltty-6.8/python3/Drivers/Braille/TTY/braille.c:40: included_from: Included from here.
brltty-6.8/python3/Headers/get_curses.h:54:2: warning[-Wcpp]: #warning curses package either unspecified or unsupported
#   54 | #warning curses package either unspecified or unsupported
#      |  ^~~~~~~
#   52|   
#   53|   #else /* curses package */
#   54|-> #warning curses package either unspecified or unsupported
#   55|   #endif /* curses package */
#   56|   

Error: COMPILER_WARNING: [#def1010]
brltty-6.8/python3/Headers/get_curses.h:54:2: warning[-Wcpp]: #warning curses package either unspecified or unsupported
#   52|   
#   53|   #else /* curses package */
#   54|-> #warning curses package either unspecified or unsupported
#   55|   #endif /* curses package */
#   56|   

Error: COMPILER_WARNING: [#def1011]
brltty-6.8/python3/Programs/kbd_linux.c:27: included_from: Included from here.
brltty-6.8/python3/Programs/kbd_linux.c: scope_hint: In function ‘monitorKeyboard’
brltty-6.8/python3/Headers/strfmt.h:65:12: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 251
#   65 | STR_FORMAT(snprintf, __VA_ARGS__)
#      |            ^
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 6 and 261 bytes into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#   63|   
#   64|   #define STR_PRINTF(...) \
#   65|-> STR_FORMAT(snprintf, __VA_ARGS__)
#   66|   
#   67|   #define STR_VPRINTF(format, arguments) \

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1012]
brltty-6.8/python3/Programs/addresses.c:85:7: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/addresses.c:109:1: enter_function: entry to ‘setAddressName’
brltty-6.8/python3/Programs/addresses.c:124:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/addresses.c:124:6: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/addresses.c:128:5: branch_true: ...to here
brltty-6.8/python3/Programs/addresses.c:131:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/addresses.c:137:9: branch_false: ...to here
brltty-6.8/python3/Programs/addresses.c:137:9: call_function: calling ‘insertAddressEntry’ from ‘setAddressName’
#   83|   
#   84|       if (!newTable) {
#   85|->       logMallocError();
#   86|         return 0;
#   87|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1013]
brltty-6.8/python3/Programs/async_alarm.c:144:28: warning[-Wanalyzer-malloc-leak]: leak of ‘alarm’
brltty-6.8/python3/Programs/async_alarm.c:124:1: enter_function: entry to ‘newAlarmElement’
brltty-6.8/python3/Programs/async_alarm.c:126:19: call_function: calling ‘getAlarmQueue’ from ‘newAlarmElement’
brltty-6.8/python3/Programs/async_alarm.c:126:19: return_function: returning to ‘newAlarmElement’ from ‘getAlarmQueue’
brltty-6.8/python3/Programs/async_alarm.c:128:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_alarm.c:131:18: branch_true: ...to here
brltty-6.8/python3/Programs/async_alarm.c:131:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_alarm.c:131:8: branch_true: following ‘true’ branch (when ‘alarm’ is non-NULL)...
brltty-6.8/python3/Programs/async_alarm.c:132:7: branch_true: ...to here
brltty-6.8/python3/Programs/async_alarm.c:144:28: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/python3/Programs/async_alarm.c:144:28: danger: ‘alarm’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  142|   
#  143|         {
#  144|->         Element *element = enqueueItem(alarms, alarm);
#  145|   
#  146|           if (element) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1014]
brltty-6.8/python3/Programs/async_event.c:109:9: warning[-Wanalyzer-malloc-leak]: leak of ‘event’
brltty-6.8/python3/Programs/async_event.c:104:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_event.c:104:6: branch_true: following ‘true’ branch (when ‘event’ is non-NULL)...
brltty-6.8/python3/Programs/async_event.c:104:6: branch_true: ...to here
brltty-6.8/python3/Programs/async_event.c:109:9: throw: if ‘createAnonymousPipe’ throws an exception...
brltty-6.8/python3/Programs/async_event.c:109:9: danger: ‘event’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  107|       event->data = data;
#  108|   
#  109|->     if (createAnonymousPipe(&event->pipeInput, &event->pipeOutput)) {
#  110|   #ifdef __MINGW32__
#  111|         if (!(event->monitorDescriptor = CreateEvent(NULL, TRUE, FALSE, NULL))) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1015]
brltty-6.8/python3/Programs/async_io.c:169:34: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/python3/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/python3/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  167|   static AsyncIoData *
#  168|   getIoData (void) {
#  169|->   AsyncThreadSpecificData *tsd = asyncGetThreadSpecificData();
#  170|     if (!tsd) return NULL;
#  171|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1016]
brltty-6.8/python3/Programs/async_io.c:169:34: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/python3/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/python3/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  167|   static AsyncIoData *
#  168|   getIoData (void) {
#  169|->   AsyncThreadSpecificData *tsd = asyncGetThreadSpecificData();
#  170|     if (!tsd) return NULL;
#  171|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1017]
brltty-6.8/python3/Programs/async_io.c:176:7: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/python3/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/python3/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  174|   
#  175|       if (!(iod = malloc(sizeof(*iod)))) {
#  176|->       logMallocError();
#  177|         return NULL;
#  178|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1018]
brltty-6.8/python3/Programs/async_io.c:176:7: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/python3/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/python3/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  174|   
#  175|       if (!(iod = malloc(sizeof(*iod)))) {
#  176|->       logMallocError();
#  177|         return NULL;
#  178|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1019]
brltty-6.8/python3/Programs/async_io.c:573:26: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/python3/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/python3/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  571|   
#  572|     if (!iod->functionQueue && create) {
#  573|->     iod->functionQueue = newQueue(deallocateFunctionEntry, NULL);
#  574|     }
#  575|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1020]
brltty-6.8/python3/Programs/async_io.c:573:26: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/python3/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/python3/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  571|   
#  572|     if (!iod->functionQueue && create) {
#  573|->     iod->functionQueue = newQueue(deallocateFunctionEntry, NULL);
#  574|     }
#  575|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1021]
brltty-6.8/python3/Programs/async_io.c:850:28: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/python3/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/python3/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  848|   
#  849|         {
#  850|->         Element *element = findElement(functions, testFunctionEntry, &key);
#  851|           if (element) return element;
#  852|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1022]
brltty-6.8/python3/Programs/async_io.c:850:28: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/python3/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/python3/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  848|   
#  849|         {
#  850|->         Element *element = findElement(functions, testFunctionEntry, &key);
#  851|           if (element) return element;
#  852|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1023]
brltty-6.8/python3/Programs/async_io.c:862:37: warning[-Wanalyzer-malloc-leak]: leak of ‘extension’
brltty-6.8/python3/Programs/async_io.c:943:1: enter_function: entry to ‘newFileMonitorOperation’
brltty-6.8/python3/Programs/async_io.c:947:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:947:6: branch_true: following ‘true’ branch (when ‘extension’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:948:27: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:951:26: call_function: calling ‘newOperation’ from ‘newFileMonitorOperation’
#  860|           function->methods = methods;
#  861|   
#  862|->         if ((function->operations = newQueue(deallocateOperationEntry, NULL))) {
#  863|             {
#  864|               static AsyncQueueMethods methods = {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1024]
brltty-6.8/python3/Programs/async_io.c:862:37: warning[-Wanalyzer-malloc-leak]: leak of ‘function’
brltty-6.8/python3/Programs/async_io.c:839:1: enter_function: entry to ‘getFunctionElement’
brltty-6.8/python3/Programs/async_io.c:840:22: call_function: calling ‘getFunctionQueue’ from ‘getFunctionElement’
brltty-6.8/python3/Programs/async_io.c:840:22: return_function: returning to ‘getFunctionElement’ from ‘getFunctionQueue’
brltty-6.8/python3/Programs/async_io.c:842:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_io.c:844:19: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:851:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_io.c:889:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_io.c:855:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_io.c:858:23: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:858:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:858:10: branch_true: following ‘true’ branch (when ‘function’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:859:9: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:862:37: throw: if ‘newQueue’ throws an exception...
brltty-6.8/python3/Programs/async_io.c:862:37: danger: ‘function’ leaks here; was allocated at [(18)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/17)
#  860|           function->methods = methods;
#  861|   
#  862|->         if ((function->operations = newQueue(deallocateOperationEntry, NULL))) {
#  863|             {
#  864|               static AsyncQueueMethods methods = {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1025]
brltty-6.8/python3/Programs/async_io.c:862:37: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/python3/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/python3/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  860|           function->methods = methods;
#  861|   
#  862|->         if ((function->operations = newQueue(deallocateOperationEntry, NULL))) {
#  863|             {
#  864|               static AsyncQueueMethods methods = {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1026]
brltty-6.8/python3/Programs/async_io.c:868:13: warning[-Wanalyzer-malloc-leak]: leak of ‘function’
brltty-6.8/python3/Programs/async_io.c:839:1: enter_function: entry to ‘getFunctionElement’
brltty-6.8/python3/Programs/async_io.c:840:22: call_function: calling ‘getFunctionQueue’ from ‘getFunctionElement’
brltty-6.8/python3/Programs/async_io.c:840:22: return_function: returning to ‘getFunctionElement’ from ‘getFunctionQueue’
brltty-6.8/python3/Programs/async_io.c:842:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_io.c:844:19: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:851:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_io.c:889:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_io.c:855:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_io.c:858:23: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:858:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:858:10: branch_true: following ‘true’ branch (when ‘function’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:859:9: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:862:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_io.c:868:13: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:868:13: throw: if ‘setQueueData’ throws an exception...
brltty-6.8/python3/Programs/async_io.c:868:13: danger: ‘function’ leaks here; was allocated at [(18)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/17)
#  866|               };
#  867|   
#  868|->             setQueueData(function->operations, &methods);
#  869|             }
#  870|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1027]
brltty-6.8/python3/Programs/async_io.c:868:13: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/python3/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/python3/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  866|               };
#  867|   
#  868|->             setQueueData(function->operations, &methods);
#  869|             }
#  870|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1028]
brltty-6.8/python3/Programs/async_io.c:871:39: warning[-Wanalyzer-malloc-leak]: leak of ‘function’
brltty-6.8/python3/Programs/async_io.c:839:1: enter_function: entry to ‘getFunctionElement’
brltty-6.8/python3/Programs/async_io.c:840:22: call_function: calling ‘getFunctionQueue’ from ‘getFunctionElement’
brltty-6.8/python3/Programs/async_io.c:840:22: return_function: returning to ‘getFunctionElement’ from ‘getFunctionQueue’
brltty-6.8/python3/Programs/async_io.c:842:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_io.c:844:19: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:851:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_io.c:889:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_io.c:855:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_io.c:858:23: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:858:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:858:10: branch_true: following ‘true’ branch (when ‘function’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:859:9: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:862:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_io.c:868:13: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:871:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_io.c:871:39: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:871:39: throw: if the called function throws an exception...
brltty-6.8/python3/Programs/async_io.c:871:39: danger: ‘function’ leaks here; was allocated at [(18)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/17)
#  869|             }
#  870|   
#  871|->           if (methods->beginFunction) methods->beginFunction(function);
#  872|   
#  873|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1029]
brltty-6.8/python3/Programs/async_io.c:871:39: warning[-Wanalyzer-malloc-leak]: leak of ‘operation’
brltty-6.8/python3/Programs/async_io.c:892:1: enter_function: entry to ‘newOperation’
brltty-6.8/python3/Programs/async_io.c:900:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:900:6: branch_true: following ‘true’ branch (when ‘operation’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:903:28: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:903:28: call_function: calling ‘getFunctionElement’ from ‘newOperation’
#  869|             }
#  870|   
#  871|->           if (methods->beginFunction) methods->beginFunction(function);
#  872|   
#  873|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1030]
brltty-6.8/python3/Programs/async_io.c:874:32: warning[-Wanalyzer-malloc-leak]: leak of ‘function’
brltty-6.8/python3/Programs/async_io.c:839:1: enter_function: entry to ‘getFunctionElement’
brltty-6.8/python3/Programs/async_io.c:840:22: call_function: calling ‘getFunctionQueue’ from ‘getFunctionElement’
brltty-6.8/python3/Programs/async_io.c:840:22: return_function: returning to ‘getFunctionElement’ from ‘getFunctionQueue’
brltty-6.8/python3/Programs/async_io.c:842:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_io.c:844:19: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:851:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_io.c:889:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_io.c:855:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_io.c:858:23: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:858:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_io.c:858:10: branch_true: following ‘true’ branch (when ‘function’ is non-NULL)...
brltty-6.8/python3/Programs/async_io.c:859:9: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:862:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_io.c:868:13: branch_true: ...to here
brltty-6.8/python3/Programs/async_io.c:871:14: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_io.c:874:32: branch_false: ...to here
brltty-6.8/python3/Programs/async_io.c:874:32: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/python3/Programs/async_io.c:874:32: danger: ‘function’ leaks here; was allocated at [(18)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/17)
#  872|   
#  873|             {
#  874|->             Element *element = enqueueItem(functions, function);
#  875|               if (element) return element;
#  876|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1031]
brltty-6.8/python3/Programs/async_signal.c:165:3: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/python3/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/python3/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:574:13: call_function: calling ‘asyncWithAllSignalsBlocked’ from ‘getSignalElement’
#  163|   
#  164|     if (!error) return 1;
#  165|->   logActionError(error, "pthread_setmask");
#  166|   #else /* GOT_PTHREADS */
#  167|     if (sigprocmask(how, newMask, oldMask) != -1) return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1032]
brltty-6.8/python3/Programs/async_signal.c:267:5: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/python3/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/python3/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:574:13: call_function: calling ‘asyncWithAllSignalsBlocked’ from ‘getSignalElement’
#  265|       }
#  266|     } else {
#  267|->     logSystemError("sigfillset");
#  268|     }
#  269|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1033]
brltty-6.8/python3/Programs/async_signal.c:517:31: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/python3/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/python3/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:574:13: call_function: calling ‘asyncWithAllSignalsBlocked’ from ‘getSignalElement’
#  515|     AddSignalEntryParameters *parameters = data;
#  516|   
#  517|->   parameters->signalElement = enqueueItem(parameters->signalQueue, parameters->signalEntry);
#  518|   }
#  519|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1034]
brltty-6.8/python3/Programs/async_signal.c:557:30: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/python3/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/python3/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:557:30: throw: if ‘newQueue’ throws an exception...
brltty-6.8/python3/Programs/async_signal.c:557:30: danger: ‘sig’ leaks here; was allocated at [(18)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/17)
#  555|           initializeSignalMonitoring(sig);
#  556|   
#  557|->         if ((sig->monitors = newQueue(deallocateMonitorEntry, NULL))) {
#  558|             {
#  559|               static AsyncQueueMethods methods = {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1035]
brltty-6.8/python3/Programs/async_signal.c:563:13: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/python3/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/python3/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:563:13: throw: if ‘setQueueData’ throws an exception...
brltty-6.8/python3/Programs/async_signal.c:563:13: danger: ‘sig’ leaks here; was allocated at [(18)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/17)
#  561|               };
#  562|   
#  563|->             setQueueData(sig->monitors, &methods);
#  564|             }
#  565|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1036]
brltty-6.8/python3/Programs/async_signal.c:578:11: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
brltty-6.8/python3/Programs/async_signal.c:533:1: enter_function: entry to ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: call_function: calling ‘getSignalQueue’ from ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:534:20: return_function: returning to ‘getSignalElement’ from ‘getSignalQueue’
brltty-6.8/python3/Programs/async_signal.c:536:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:538:30: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:545:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_signal.c:549:8: branch_true: following ‘true’ branch (when ‘create != 0’)...
brltty-6.8/python3/Programs/async_signal.c:552:18: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:552:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: following ‘true’ branch (when ‘sig’ is non-NULL)...
brltty-6.8/python3/Programs/async_signal.c:552:10: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:557:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/async_signal.c:563:13: branch_true: ...to here
brltty-6.8/python3/Programs/async_signal.c:574:13: call_function: calling ‘asyncWithAllSignalsBlocked’ from ‘getSignalElement’
brltty-6.8/python3/Programs/async_signal.c:574:13: return_function: returning to ‘getSignalElement’ from ‘asyncWithAllSignalsBlocked’
brltty-6.8/python3/Programs/async_signal.c:575:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/async_signal.c:589:1: branch_false: ...to here
brltty-6.8/python3/Programs/async_signal.c:578:11: throw: if ‘deallocateQueue’ throws an exception...
brltty-6.8/python3/Programs/async_signal.c:578:11: danger: ‘sig’ leaks here; was allocated at [(18)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/17)
#  576|             }
#  577|   
#  578|->           deallocateQueue(sig->monitors);
#  579|           }
#  580|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1037]
brltty-6.8/python3/Programs/async_task.c:47:34: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/python3/Programs/async_task.c:100:1: enter_function: entry to ‘asyncAddTask’
brltty-6.8/python3/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/python3/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/python3/Programs/async_task.c:108:8: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
brltty-6.8/python3/Programs/async_task.c:110:16: branch_false: ...to here
brltty-6.8/python3/Programs/async_task.c:110:16: call_function: calling ‘addTask’ from ‘asyncAddTask’
#   45|   static AsyncTaskData *
#   46|   getTaskData (void) {
#   47|->   AsyncThreadSpecificData *tsd = asyncGetThreadSpecificData();
#   48|     if (!tsd) return NULL;
#   49|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1038]
brltty-6.8/python3/Programs/async_task.c:54:7: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/python3/Programs/async_task.c:100:1: enter_function: entry to ‘asyncAddTask’
brltty-6.8/python3/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/python3/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/python3/Programs/async_task.c:108:8: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
brltty-6.8/python3/Programs/async_task.c:110:16: branch_false: ...to here
brltty-6.8/python3/Programs/async_task.c:110:16: call_function: calling ‘addTask’ from ‘asyncAddTask’
#   52|   
#   53|       if (!(td = malloc(sizeof(*td)))) {
#   54|->       logMallocError();
#   55|         return NULL;
#   56|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1039]
brltty-6.8/python3/Programs/async_task.c:79:21: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/python3/Programs/async_task.c:100:1: enter_function: entry to ‘asyncAddTask’
brltty-6.8/python3/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/python3/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/python3/Programs/async_task.c:108:8: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
brltty-6.8/python3/Programs/async_task.c:110:16: branch_false: ...to here
brltty-6.8/python3/Programs/async_task.c:110:16: call_function: calling ‘addTask’ from ‘asyncAddTask’
#   77|   
#   78|     if (!td->taskQueue && create) {
#   79|->     td->taskQueue = newQueue(deallocateTaskDefinition, NULL);
#   80|     }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1040]
brltty-6.8/python3/Programs/async_task.c:90:9: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/python3/Programs/async_task.c:100:1: enter_function: entry to ‘asyncAddTask’
brltty-6.8/python3/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/python3/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/python3/Programs/async_task.c:108:8: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
brltty-6.8/python3/Programs/async_task.c:110:16: branch_false: ...to here
brltty-6.8/python3/Programs/async_task.c:110:16: call_function: calling ‘addTask’ from ‘asyncAddTask’
#   88|   
#   89|     if (queue) {
#   90|->     if (enqueueItem(queue, task)) {
#   91|         logSymbol(LOG_CATEGORY(ASYNC_EVENTS), task->callback, "task added");
#   92|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1041]
brltty-6.8/python3/Programs/async_task.c:109:11: warning[-Wanalyzer-malloc-leak]: leak of ‘task’
brltty-6.8/python3/Programs/async_task.c:103:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/async_task.c:103:6: branch_true: following ‘true’ branch (when ‘task’ is non-NULL)...
brltty-6.8/python3/Programs/async_task.c:105:5: branch_true: ...to here
brltty-6.8/python3/Programs/async_task.c:108:8: branch_true: following ‘true’ branch (when ‘event’ is non-NULL)...
brltty-6.8/python3/Programs/async_task.c:109:11: branch_true: ...to here
brltty-6.8/python3/Programs/async_task.c:109:11: throw: if ‘asyncSignalEvent’ throws an exception...
brltty-6.8/python3/Programs/async_task.c:109:11: danger: ‘task’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  107|   
#  108|       if (event) {
#  109|->       if (asyncSignalEvent(event, task)) return 1;
#  110|       } else if (addTask(task)) {
#  111|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1042]
brltty-6.8/python3/Programs/auth.c:290:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*definition.initialize(parameter)’
brltty-6.8/python3/Programs/auth.c:662:1: enter_function: entry to ‘authBegin’
brltty-6.8/python3/Programs/auth.c:665:6: branch_true: following ‘true’ branch (when ‘auth’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:666:5: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:675:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/auth.c:676:12: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:676:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:681:35: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:681:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/auth.c:682:13: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:682:13: call_function: calling ‘initializeMethodDescriptors’ from ‘authBegin’
#  288|   
#  289|     if ((keyfile = malloc(sizeof(*keyfile)))) {
#  290|->     if (*parameter) {
#  291|         keyfile->path = parameter;
#  292|         return keyfile;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1043]
brltty-6.8/python3/Programs/auth.c:294:7: warning[-Wanalyzer-malloc-leak]: leak of ‘keyfile’
brltty-6.8/python3/Programs/auth.c:289:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:289:6: branch_true: following ‘true’ branch (when ‘keyfile’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:290:9: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:290:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:294:7: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:294:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/auth.c:294:7: danger: ‘keyfile’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  292|         return keyfile;
#  293|       } else {
#  294|->       logMessage(LOG_ERR, "path to key file not specified");
#  295|       }
#  296|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1044]
brltty-6.8/python3/Programs/auth.c:350:11: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
brltty-6.8/python3/Programs/auth.c:338:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:338:6: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:343:10: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:343:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:350:11: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:350:11: throw: if ‘isInteger’ throws an exception...
brltty-6.8/python3/Programs/auth.c:350:11: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  348|       {
#  349|         int value;
#  350|->       if (isInteger(&value, parameter)) {
#  351|           user->id = value;
#  352|           return user;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1045]
brltty-6.8/python3/Programs/auth.c:357:32: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
brltty-6.8/python3/Programs/auth.c:338:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:338:6: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:343:10: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:343:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:350:11: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:350:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:372:1: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:357:32: throw: if ‘getpwnam’ throws an exception...
brltty-6.8/python3/Programs/auth.c:357:32: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  355|   
#  356|       {
#  357|->       const struct passwd *p = getpwnam(parameter);
#  358|         if (p) {
#  359|           user->id = p->pw_uid;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1046]
brltty-6.8/python3/Programs/auth.c:364:5: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
brltty-6.8/python3/Programs/auth.c:338:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:338:6: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:343:10: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:343:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:350:11: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:350:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:372:1: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:358:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:364:5: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:364:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/auth.c:364:5: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  362|       }
#  363|   
#  364|->     logMessage(LOG_ERR, "unknown user: %s", parameter);
#  365|       free(user);
#  366|   #endif /* __MINGW32__ */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1047]
brltty-6.8/python3/Programs/auth.c:405:11: warning[-Wanalyzer-malloc-leak]: leak of ‘group’
brltty-6.8/python3/Programs/auth.c:393:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:393:6: branch_true: following ‘true’ branch (when ‘group’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:398:10: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:398:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:405:11: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:405:11: throw: if ‘isInteger’ throws an exception...
brltty-6.8/python3/Programs/auth.c:405:11: danger: ‘group’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  403|       {
#  404|         int value;
#  405|->       if (isInteger(&value, parameter)) {
#  406|           group->id = value;
#  407|           return group;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1048]
brltty-6.8/python3/Programs/auth.c:412:31: warning[-Wanalyzer-malloc-leak]: leak of ‘group’
brltty-6.8/python3/Programs/auth.c:393:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:393:6: branch_true: following ‘true’ branch (when ‘group’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:398:10: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:398:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:405:11: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:405:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:427:1: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:412:31: throw: if ‘getgrnam’ throws an exception...
brltty-6.8/python3/Programs/auth.c:412:31: danger: ‘group’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  410|   
#  411|       {
#  412|->       const struct group *g = getgrnam(parameter);
#  413|         if (g) {
#  414|           group->id = g->gr_gid;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1049]
brltty-6.8/python3/Programs/auth.c:419:5: warning[-Wanalyzer-malloc-leak]: leak of ‘group’
brltty-6.8/python3/Programs/auth.c:393:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:393:6: branch_true: following ‘true’ branch (when ‘group’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:398:10: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:398:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:405:11: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:405:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:427:1: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:413:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:419:5: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:419:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/auth.c:419:5: danger: ‘group’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  417|       }
#  418|   
#  419|->     logMessage(LOG_ERR, "unknown group: %s", parameter);
#  420|       free(group);
#  421|   #endif /* __MINGW32__ */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1050]
brltty-6.8/python3/Programs/auth.c:458:27: warning[-Wanalyzer-malloc-leak]: leak of ‘polkit’
brltty-6.8/python3/Programs/auth.c:453:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:453:6: branch_true: following ‘true’ branch (when ‘polkit’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:454:5: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:458:27: throw: if ‘polkit_authority_get_sync’ throws an exception...
brltty-6.8/python3/Programs/auth.c:458:27: danger: ‘polkit’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  456|       while (1) {
#  457|         GError *error = NULL;
#  458|->       polkit->authority = polkit_authority_get_sync(NULL, &error);
#  459|         if (polkit->authority) return polkit;
#  460|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1051]
brltty-6.8/python3/Programs/auth.c:475:9: warning[-Wanalyzer-malloc-leak]: leak of ‘polkit’
brltty-6.8/python3/Programs/auth.c:453:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:453:6: branch_true: following ‘true’ branch (when ‘polkit’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:454:5: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:459:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:464:7: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:467:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/auth.c:468:16: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:475:9: throw: if ‘g_error_free’ throws an exception...
brltty-6.8/python3/Programs/auth.c:475:9: danger: ‘polkit’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  473|                      error->message, code);
#  474|   
#  475|->         g_error_free(error);
#  476|           error = NULL;
#  477|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1052]
brltty-6.8/python3/Programs/auth.c:478:24: warning[-Wanalyzer-malloc-leak]: leak of ‘polkit’
brltty-6.8/python3/Programs/auth.c:453:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:453:6: branch_true: following ‘true’ branch (when ‘polkit’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:454:5: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:459:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:464:7: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:467:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/auth.c:468:16: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:478:24: throw: if ‘g_io_error_quark’ throws an exception...
brltty-6.8/python3/Programs/auth.c:478:24: danger: ‘polkit’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  476|           error = NULL;
#  477|   
#  478|->         if ((domain == G_IO_ERROR) || (code == G_IO_ERROR_NOT_FOUND)) wait = 1;
#  479|         }
#  480|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1053]
brltty-6.8/python3/Programs/auth.c:482:7: warning[-Wanalyzer-malloc-leak]: leak of ‘polkit’
brltty-6.8/python3/Programs/auth.c:453:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:453:6: branch_true: following ‘true’ branch (when ‘polkit’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:454:5: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:459:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:464:7: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:482:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/auth.c:482:7: danger: ‘polkit’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  480|   
#  481|         STR_END;
#  482|->       logMessage(LOG_WARNING, "%s", message);
#  483|   
#  484|         if (!wait) break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1054]
brltty-6.8/python3/Programs/auth.c:485:7: warning[-Wanalyzer-malloc-leak]: leak of ‘polkit’
brltty-6.8/python3/Programs/auth.c:453:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:453:6: branch_true: following ‘true’ branch (when ‘polkit’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:454:5: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:459:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:464:7: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:467:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/auth.c:468:16: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:484:10: branch_false: following ‘false’ branch (when ‘wait != 0’)...
brltty-6.8/python3/Programs/auth.c:485:7: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:485:7: throw: if ‘asyncWait’ throws an exception...
brltty-6.8/python3/Programs/auth.c:485:7: danger: ‘polkit’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  483|   
#  484|         if (!wait) break;
#  485|->       asyncWait(1000);
#  486|       }
#  487|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1055]
brltty-6.8/python3/Programs/auth.c:488:5: warning[-Wanalyzer-malloc-leak]: leak of ‘polkit’
brltty-6.8/python3/Programs/auth.c:453:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:453:6: branch_true: following ‘true’ branch (when ‘polkit’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:454:5: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:459:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/auth.c:464:7: branch_false: ...to here
brltty-6.8/python3/Programs/auth.c:484:10: branch_true: following ‘true’ branch (when ‘wait == 0’)...
brltty-6.8/python3/Programs/auth.c:494:1: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:488:5: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/auth.c:488:5: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:488:5: throw: if ‘g_free_sized’ throws an exception...
brltty-6.8/python3/Programs/auth.c:488:5: danger: ‘polkit’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  486|       }
#  487|   
#  488|->     g_free(polkit);
#  489|     } else {
#  490|       logMallocError();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1056]
brltty-6.8/python3/Programs/auth.c:675:29: warning[-Wanalyzer-malloc-leak]: leak of ‘auth’
brltty-6.8/python3/Programs/auth.c:665:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/auth.c:665:6: branch_true: following ‘true’ branch (when ‘auth’ is non-NULL)...
brltty-6.8/python3/Programs/auth.c:666:5: branch_true: ...to here
brltty-6.8/python3/Programs/auth.c:675:29: throw: if ‘splitString’ throws an exception...
brltty-6.8/python3/Programs/auth.c:675:29: danger: ‘auth’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  673|       }
#  674|   
#  675|->     if ((auth->parameters = splitString(parameter, '+', &auth->count))) {
#  676|         if (!auth->count) {
#  677|           auth->methods = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1057]
brltty-6.8/python3/Programs/bluetooth.c:45:3: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:522:106: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:32: call_function: calling ‘bthDiscoverSerialPortChannel’ from ‘bthOpenConnection’
#   43|     };
#   44|   
#   45|->   logMessage(LOG_CATEGORY(BLUETOOTH_IO), "discovering serial port channel");
#   46|     int discovered = bthDiscoverChannel(channel, bcx, uuid, sizeof(uuid), timeout);
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1058]
brltty-6.8/python3/Programs/bluetooth.c:46:20: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:522:106: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:32: call_function: calling ‘bthDiscoverSerialPortChannel’ from ‘bthOpenConnection’
#   44|   
#   45|     logMessage(LOG_CATEGORY(BLUETOOTH_IO), "discovering serial port channel");
#   46|->   int discovered = bthDiscoverChannel(channel, bcx, uuid, sizeof(uuid), timeout);
#   47|   
#   48|     if (discovered) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1059]
brltty-6.8/python3/Programs/bluetooth.c:59:3: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:523:9: call_function: inlined call to ‘bthLogChannel’ from ‘bthOpenConnection’
#   57|   static void
#   58|   bthLogChannel (uint8_t channel) {
#   59|->   logMessage(LOG_CATEGORY(BLUETOOTH_IO), "RFCOMM channel: %u", channel);
#   60|   }
#   61|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1060]
brltty-6.8/python3/Programs/bluetooth.c:86:10: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
#   84|     static Queue *devices = NULL;
#   85|   
#   86|->   return getProgramQueue(&devices, "bluetooth-device-queue", create,
#   87|                            bthCreateDeviceQueue, NULL);
#   88|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1061]
brltty-6.8/python3/Programs/bluetooth.c:103:35: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
#  101|   
#  102|     if (devices) {
#  103|->     BluetoothDeviceEntry *entry = findItem(devices, bthTestDeviceAddress, &address);
#  104|       if (entry) return entry;
#  105|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1062]
brltty-6.8/python3/Programs/bluetooth.c:113:13: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:530:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:534:17: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:540:9: call_function: calling ‘bthRememberConnectError’ from ‘bthOpenConnection’
#  111|           entry->paired = 0;
#  112|   
#  113|->         if (enqueueItem(devices, entry)) return entry;
#  114|           free(entry);
#  115|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1063]
brltty-6.8/python3/Programs/bluetooth.c:113:13: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/bluetooth.c:184:1: enter_function: entry to ‘bthRememberConnectError’
brltty-6.8/python3/Programs/bluetooth.c:185:33: call_function: calling ‘bthGetDeviceEntry’ from ‘bthRememberConnectError’
#  111|           entry->paired = 0;
#  112|   
#  113|->         if (enqueueItem(devices, entry)) return entry;
#  114|           free(entry);
#  115|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1064]
brltty-6.8/python3/Programs/bluetooth.c:116:9: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:530:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:534:17: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:540:9: call_function: calling ‘bthRememberConnectError’ from ‘bthOpenConnection’
#  114|           free(entry);
#  115|         } else {
#  116|->         logMallocError();
#  117|         }
#  118|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1065]
brltty-6.8/python3/Programs/bluetooth.c:509:34: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:34: throw: if ‘bthNewConnectionExtension’ throws an exception...
brltty-6.8/python3/Programs/bluetooth.c:509:34: danger: ‘connection’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  507|       connection->channel = request->channel;
#  508|   
#  509|->     if ((connection->extension = bthNewConnectionExtension(connection->address))) {
#  510|         int alreadyTried = 0;
#  511|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1066]
brltty-6.8/python3/Programs/bluetooth.c:527:11: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:527:11: throw: if ‘startTimePeriod’ throws an exception...
brltty-6.8/python3/Programs/bluetooth.c:527:11: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/1)
#  525|           {
#  526|             TimePeriod period;
#  527|->           startTimePeriod(&period, BLUETOOTH_CHANNEL_BUSY_RETRY_TIMEOUT);
#  528|   
#  529|             while (1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1067]
brltty-6.8/python3/Programs/bluetooth.c:530:17: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:530:17: throw: if ‘bthOpenChannel’ throws an exception...
brltty-6.8/python3/Programs/bluetooth.c:530:17: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/1)
#  528|   
#  529|             while (1) {
#  530|->             if (bthOpenChannel(connection->extension, connection->channel, request->timeout)) {
#  531|                 return connection;
#  532|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1068]
brltty-6.8/python3/Programs/bluetooth.c:534:17: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:530:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:534:17: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:534:17: throw: if ‘afterTimePeriod’ throws an exception...
brltty-6.8/python3/Programs/bluetooth.c:534:17: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/1)
#  532|               }
#  533|   
#  534|->             if (afterTimePeriod(&period, NULL)) break;
#  535|               if (errno != EBUSY) break;
#  536|               asyncWait(BLUETOOTH_CHANNEL_BUSY_RETRY_INTERVAL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1069]
brltty-6.8/python3/Programs/bluetooth.c:536:13: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:515:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:552:1: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:522:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:523:9: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:530:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:534:17: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:534:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:535:17: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:535:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/bluetooth.c:536:13: branch_false: ...to here
brltty-6.8/python3/Programs/bluetooth.c:536:13: throw: if ‘asyncWait’ throws an exception...
brltty-6.8/python3/Programs/bluetooth.c:536:13: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/1)
#  534|               if (afterTimePeriod(&period, NULL)) break;
#  535|               if (errno != EBUSY) break;
#  536|->             asyncWait(BLUETOOTH_CHANNEL_BUSY_RETRY_INTERVAL);
#  537|             }
#  538|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1070]
brltty-6.8/python3/Programs/bluetooth.c:543:7: warning[-Wanalyzer-malloc-leak]: leak of ‘connection’
brltty-6.8/python3/Programs/bluetooth.c:501:1: enter_function: entry to ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:504:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: following ‘true’ branch (when ‘connection’ is non-NULL)...
brltty-6.8/python3/Programs/bluetooth.c:504:6: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:509:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/bluetooth.c:515:13: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth.c:515:13: call_function: calling ‘bthRecallConnectError’ from ‘bthOpenConnection’
brltty-6.8/python3/Programs/bluetooth.c:515:13: return_function: returning to ‘bthOpenConnection’ from ‘bthRecallConnectError’
brltty-6.8/python3/Programs/bluetooth.c:543:7: throw: if ‘bthReleaseConnectionExtension’ throws an exception...
brltty-6.8/python3/Programs/bluetooth.c:543:7: danger: ‘connection’ leaks here; was allocated at [(2)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/1)
#  541|         }
#  542|   
#  543|->       bthReleaseConnectionExtension(connection->extension);
#  544|       }
#  545|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1071]
brltty-6.8/python3/Programs/bluetooth_linux.c:220:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socketDescriptor’
brltty-6.8/python3/Programs/bluetooth_linux.c:217:39: acquire_resource: socket created here
brltty-6.8/python3/Programs/bluetooth_linux.c:219:6: branch_true: following ‘true’ branch (when ‘socketDescriptor != -1’)...
brltty-6.8/python3/Programs/bluetooth_linux.c:220:5: branch_true: ...to here
brltty-6.8/python3/Programs/bluetooth_linux.c:220:5: throw: if ‘setCloseOnExec’ throws an exception...
brltty-6.8/python3/Programs/bluetooth_linux.c:220:5: danger: ‘socketDescriptor’ leaks here
#  218|   
#  219|     if (socketDescriptor != -1) {
#  220|->     setCloseOnExec(socketDescriptor, 1);
#  221|   
#  222|       if (setBlockingIo(socketDescriptor, 0)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1072]
brltty-6.8/python3/Programs/brl_base.c:391:28: warning[-Wanalyzer-malloc-leak]: leak of ‘msg’
brltty-6.8/python3/Programs/brl_base.c:374:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/brl_base.c:377:10: branch_true: ...to here
brltty-6.8/python3/Programs/brl_base.c:377:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/brl_base.c:383:23: branch_false: ...to here
brltty-6.8/python3/Programs/brl_base.c:383:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/brl_base.c:383:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
brltty-6.8/python3/Programs/brl_base.c:383:8: branch_true: ...to here
brltty-6.8/python3/Programs/brl_base.c:391:28: throw: if ‘findElement’ throws an exception...
brltty-6.8/python3/Programs/brl_base.c:391:28: danger: ‘msg’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  389|   
#  390|         {
#  391|->         Element *element = findElement(brl->acknowledgements.messages, findOldBrailleMessage, msg);
#  392|   
#  393|           if (element) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1073]
brltty-6.8/python3/Programs/brl_base.c:576:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/brl_base.c:560:6: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
brltty-6.8/python3/Programs/brl_base.c:560:6: branch_true: ...to here
brltty-6.8/python3/Programs/brl_base.c:566:8: branch_false: following ‘false’ branch (when ‘count > 3’)...
brltty-6.8/python3/Programs/brl_base.c:571:31: branch_false: ...to here
brltty-6.8/python3/Programs/brl_base.c:571:24: acquire_memory: allocated here
brltty-6.8/python3/Programs/brl_base.c:571:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/brl_base.c:571:8: branch_true: ...to here
brltty-6.8/python3/Programs/brl_base.c:572:24: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/python3/Programs/brl_base.c:573:34: branch_true: ...to here
brltty-6.8/python3/Programs/brl_base.c:576:7: throw: if ‘qsort’ throws an exception...
brltty-6.8/python3/Programs/brl_base.c:576:7: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  574|         }
#  575|   
#  576|->       qsort(map->sorted, map->count, sizeof(*map->sorted), sortKeyNumberSets);
#  577|         return map;
#  578|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1074]
brltty-6.8/python3/Programs/brl_base.c:576:7: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
brltty-6.8/python3/Programs/brl_base.c:560:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/brl_base.c:560:6: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
brltty-6.8/python3/Programs/brl_base.c:560:6: branch_true: ...to here
brltty-6.8/python3/Programs/brl_base.c:566:8: branch_false: following ‘false’ branch (when ‘count > 3’)...
brltty-6.8/python3/Programs/brl_base.c:571:31: branch_false: ...to here
brltty-6.8/python3/Programs/brl_base.c:571:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/brl_base.c:571:8: branch_true: ...to here
brltty-6.8/python3/Programs/brl_base.c:572:24: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/python3/Programs/brl_base.c:573:34: branch_true: ...to here
brltty-6.8/python3/Programs/brl_base.c:576:7: throw: if ‘qsort’ throws an exception...
brltty-6.8/python3/Programs/brl_base.c:576:7: danger: ‘map’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  574|         }
#  575|   
#  576|->       qsort(map->sorted, map->count, sizeof(*map->sorted), sortKeyNumberSets);
#  577|         return map;
#  578|       }

Error: CPPCHECK_WARNING (CWE-562): [#def1075]
brltty-6.8/python3/Programs/brlapi_client.c:619: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  617|       handle->altPacket = packet;
#  618|       handle->altSize = size;
#  619|->     handle->altRes = &res;
#  620|       sem_init(&sem, 0, 0);
#  621|       handle->altSem = &sem;

Error: CPPCHECK_WARNING (CWE-562): [#def1076]
brltty-6.8/python3/Programs/brlapi_client.c:621: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  619|       handle->altRes = &res;
#  620|       sem_init(&sem, 0, 0);
#  621|->     handle->altSem = &sem;
#  622|     }
#  623|     pthread_mutex_unlock(&handle->read_mutex);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1077]
brltty-6.8/python3/Programs/brlapi_client.c:2718:9: warning[-Wanalyzer-malloc-leak]: leak of ‘brlapi_error_location()’
brltty-6.8/python3/Programs/brlapi_client.c:1448:24: enter_function: entry to ‘brlapi__getParameter’
brltty-6.8/python3/Programs/brlapi_client.c:1454:5: call_function: calling ‘brlapi_error_location’ from ‘brlapi__getParameter’
brltty-6.8/python3/Programs/brlapi_client.c:1454:5: return_function: returning to ‘brlapi__getParameter’ from ‘brlapi_error_location’
brltty-6.8/python3/Programs/brlapi_client.c:2718:9: danger: ‘brlapi_error_location()’ leaks here; was allocated at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
# 2716|   #endif /* WINDOWS */
# 2717|       pthread_once(&error_key_once, error_key_alloc);
# 2718|->     if (pthread_error_ok) {
# 2719|         if ((errorp=(brlapi_error_t *) pthread_getspecific(error_key)))
# 2720|           /* normal case */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1078]
brltty-6.8/python3/Programs/brlapi_client.c:2726:18: warning[-Wanalyzer-malloc-leak]: leak of ‘errorp’
brltty-6.8/python3/Programs/brlapi_client.c:2560:20: enter_function: entry to ‘brlapi__ignoreKeyRanges’
brltty-6.8/python3/Programs/brlapi_client.c:2562:10: call_function: calling ‘ignore_accept_key_ranges’ from ‘brlapi__ignoreKeyRanges’
# 2724|           if ((errorp=malloc(sizeof(*errorp))) && !pthread_setspecific(error_key,errorp)) {
# 2725|   	  memset(errorp,0,sizeof(*errorp));
# 2726|->           return errorp;
# 2727|   	}
# 2728|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1079]
brltty-6.8/python3/Programs/brlapi_client.c:2734:1: warning[-Wanalyzer-malloc-leak]: leak of ‘errorp’
brltty-6.8/python3/Programs/brlapi_client.c:2724:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/brlapi_client.c:2724:12: branch_true: following ‘true’ branch (when ‘errorp’ is non-NULL)...
brltty-6.8/python3/Programs/brlapi_client.c:2724:50: branch_true: ...to here
brltty-6.8/python3/Programs/brlapi_client.c:2724:13: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/brlapi_client.c:2724:13: branch_false: ...to here
brltty-6.8/python3/Programs/brlapi_client.c:2734:1: danger: ‘errorp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 2732|     /* fall-back: shared errno :/ */
# 2733|     return &brlapi_error;
# 2734|-> }
# 2735|   
# 2736|   brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t new)

Error: CPPCHECK_WARNING (CWE-476): [#def1080]
brltty-6.8/python3/Programs/brlapi_common.h:606: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  604|     }
#  605|     ret=strdup(path);
#  606|->   delim=strchr(ret,'+');
#  607|     if (delim)
#  608|       *delim = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def1081]
brltty-6.8/python3/Programs/brlapi_server.c:2453: error[ctunullpointer]: Null pointer dereference: c
# 2451|     struct Subscription *s;
# 2452|   
# 2453|->   for (s=c->subscriptions.next; s!=&c->subscriptions; s=s->next) {
# 2454|       if (s->parameter == param
# 2455|   	&& s->subparam == subparam

Error: CPPCHECK_WARNING (CWE-476): [#def1082]
brltty-6.8/python3/Programs/brlapi_server.c:2602: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2600|         paramState[param].local_subscriptions++;
# 2601|       s = malloc(sizeof(*s));
# 2602|->     s->parameter = param;
# 2603|       s->subparam = subparam;
# 2604|       s->flags = flags;

Error: CPPCHECK_WARNING (CWE-476): [#def1083]
brltty-6.8/python3/Programs/brlapi_server.c:2603: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2601|       s = malloc(sizeof(*s));
# 2602|       s->parameter = param;
# 2603|->     s->subparam = subparam;
# 2604|       s->flags = flags;
# 2605|       s->next = c->subscriptions.next;

Error: CPPCHECK_WARNING (CWE-476): [#def1084]
brltty-6.8/python3/Programs/brlapi_server.c:2604: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2602|       s->parameter = param;
# 2603|       s->subparam = subparam;
# 2604|->     s->flags = flags;
# 2605|       s->next = c->subscriptions.next;
# 2606|       s->prev = &c->subscriptions;

Error: CPPCHECK_WARNING (CWE-476): [#def1085]
brltty-6.8/python3/Programs/brlapi_server.c:2605: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2603|       s->subparam = subparam;
# 2604|       s->flags = flags;
# 2605|->     s->next = c->subscriptions.next;
# 2606|       s->prev = &c->subscriptions;
# 2607|       s->next->prev = s;

Error: CPPCHECK_WARNING (CWE-476): [#def1086]
brltty-6.8/python3/Programs/brlapi_server.c:2606: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2604|       s->flags = flags;
# 2605|       s->next = c->subscriptions.next;
# 2606|->     s->prev = &c->subscriptions;
# 2607|       s->next->prev = s;
# 2608|       s->prev->next = s;

Error: CPPCHECK_WARNING (CWE-476): [#def1087]
brltty-6.8/python3/Programs/brlapi_server.c:2607: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2605|       s->next = c->subscriptions.next;
# 2606|       s->prev = &c->subscriptions;
# 2607|->     s->next->prev = s;
# 2608|       s->prev->next = s;
# 2609|       unlockMutex(&apiConnectionsMutex);

Error: CPPCHECK_WARNING (CWE-476): [#def1088]
brltty-6.8/python3/Programs/brlapi_server.c:2608: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2606|       s->prev = &c->subscriptions;
# 2607|       s->next->prev = s;
# 2608|->     s->prev->next = s;
# 2609|       unlockMutex(&apiConnectionsMutex);
# 2610|     } else if (flags & BRLAPI_PARAMF_UNSUBSCRIBE) {

Error: CPPCHECK_WARNING (CWE-401): [#def1089]
brltty-6.8/python3/Programs/brlapi_server.c:4612: error[memleakOnRealloc]: Common realloc mistake: 'coreWindowText' nulled but not freed upon failure
# 4610|     displayDimensions[1] = htonl(brl->textRows);
# 4611|     displaySize = brl->textColumns * brl->textRows;
# 4612|->   coreWindowText = realloc(coreWindowText, displaySize * sizeof(*coreWindowText));
# 4613|     coreWindowDots = realloc(coreWindowDots, displaySize * sizeof(*coreWindowDots));
# 4614|     coreWindowCursor = 0;

Error: CPPCHECK_WARNING (CWE-401): [#def1090]
brltty-6.8/python3/Programs/brlapi_server.c:4613: error[memleakOnRealloc]: Common realloc mistake: 'coreWindowDots' nulled but not freed upon failure
# 4611|     displaySize = brl->textColumns * brl->textRows;
# 4612|     coreWindowText = realloc(coreWindowText, displaySize * sizeof(*coreWindowText));
# 4613|->   coreWindowDots = realloc(coreWindowDots, displaySize * sizeof(*coreWindowDots));
# 4614|     coreWindowCursor = 0;
# 4615|     handleParamUpdate(NULL, NULL, BRLAPI_PARAM_DISPLAY_SIZE, 0, BRLAPI_PARAMF_GLOBAL, displayDimensions, sizeof(displayDimensions));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1091]
brltty-6.8/python3/Programs/brltty-ctb.c:310:23: warning[-Wanalyzer-malloc-leak]: leak of ‘makeUtf8FromCells(__builtin_alloca_with_align((sizetype)((int)text.length << 3), 8), (long unsigned int)outputCount)’
brltty-6.8/python3/Programs/brltty-ctb.c:362:8: enter_function: entry to ‘processContractsOperands’
brltty-6.8/python3/Programs/brltty-ctb.c:365:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/brltty-ctb.c:368:9: branch_true: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:368:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/brltty-ctb.c:368:62: branch_true: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:382:25: call_function: calling ‘makeUtf8FromCells’ from ‘processContractsOperands’
brltty-6.8/python3/Programs/brltty-ctb.c:382:25: return_function: returning to ‘processContractsOperands’ from ‘makeUtf8FromCells’
brltty-6.8/python3/Programs/brltty-ctb.c:382:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/brltty-ctb.c:385:26: branch_true: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:385:26: call_function: calling ‘makeUtf8FromCells’ from ‘processContractsOperands’
brltty-6.8/python3/Programs/brltty-ctb.c:385:26: return_function: returning to ‘processContractsOperands’ from ‘makeUtf8FromCells’
brltty-6.8/python3/Programs/brltty-ctb.c:385:15: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/brltty-ctb.c:386:15: branch_true: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:386:15: throw: if ‘reportDataError’ throws an exception...
brltty-6.8/python3/Programs/brltty-ctb.c:310:23: danger: ‘makeUtf8FromCells(__builtin_alloca_with_align((sizetype)((int)text.length << 3), 8), (long unsigned int)outputCount)’ leaks here; was allocated at [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18)
#  308|   static char *
#  309|   makeUtf8FromCells (unsigned char *cells, size_t count) {
#  310|->   char *text = malloc((count * UTF8_LEN_MAX) + 1);
#  311|   
#  312|     if (text) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1092]
brltty-6.8/python3/Programs/brltty-ctb.c:318:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ch’
brltty-6.8/python3/Programs/brltty-ctb.c:310:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/brltty-ctb.c:312:6: branch_true: following ‘true’ branch (when ‘text’ is non-NULL)...
brltty-6.8/python3/Programs/brltty-ctb.c:312:6: branch_true: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:316:15: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/python3/Programs/brltty-ctb.c:318:45: branch_true: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:318:21: throw: if ‘convertWcharToUtf8’ throws an exception...
brltty-6.8/python3/Programs/brltty-ctb.c:318:21: danger: ‘ch’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  316|       for (i=0; i<count; i+=1) {
#  317|         Utf8Buffer utf8;
#  318|->       size_t utfs = convertWcharToUtf8(cells[i]|UNICODE_BRAILLE_ROW, utf8);
#  319|   
#  320|         if (utfs) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1093]
brltty-6.8/python3/Programs/brltty-ctb.c:318:21: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/python3/Programs/brltty-ctb.c:310:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/brltty-ctb.c:312:6: branch_true: following ‘true’ branch (when ‘text’ is non-NULL)...
brltty-6.8/python3/Programs/brltty-ctb.c:312:6: branch_true: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:316:15: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/python3/Programs/brltty-ctb.c:318:45: branch_true: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:320:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/brltty-ctb.c:323:10: branch_false: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:316:15: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.8/python3/Programs/brltty-ctb.c:318:45: branch_true: ...to here
brltty-6.8/python3/Programs/brltty-ctb.c:318:21: throw: if ‘convertWcharToUtf8’ throws an exception...
brltty-6.8/python3/Programs/brltty-ctb.c:318:21: danger: ‘text’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  316|       for (i=0; i<count; i+=1) {
#  317|         Utf8Buffer utf8;
#  318|->       size_t utfs = convertWcharToUtf8(cells[i]|UNICODE_BRAILLE_ROW, utf8);
#  319|   
#  320|         if (utfs) {

Error: CPPCHECK_WARNING (CWE-457): [#def1094]
brltty-6.8/python3/Programs/brltty-lscmds.c:236: warning[uninitvar]: Uninitialized variables: commands.name, commands.description, commands.code, commands.isToggle, commands.isMotion, commands.isRow, commands.isVertical, commands.isHorizontal, commands.isPanning, commands.isInput, commands.isCharacter, commands.isBraille, commands.isKeyboard, commands.isRouting, commands.isColumn, commands.isOffset, commands.isRange
#  234|       commands[index] = &commandTable[index];
#  235|     }
#  236|->   qsort(commands, count, sizeof(commands[0]), compareCommands);
#  237|   
#  238|     for (int index=0; index<count; index+=1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1095]
brltty-6.8/python3/Programs/brltty-lsinc.c:51:10: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/python3/Programs/brltty-lsinc.c:49:12: acquire_memory: allocated here
brltty-6.8/python3/Programs/brltty-lsinc.c:50:8: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
brltty-6.8/python3/Programs/brltty-lsinc.c:51:10: branch_false: ...to here
brltty-6.8/python3/Programs/brltty-lsinc.c:51:10: throw: if ‘tsearch’ throws an exception...
brltty-6.8/python3/Programs/brltty-lsinc.c:51:10: danger: ‘name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   49|       name = strdup(name);
#   50|       if (!name) noMemory();
#   51|->     if (!tsearch(name, &namesTree, compareStrings)) noMemory();
#   52|       printf("%s\n", name);
#   53|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1096]
brltty-6.8/python3/Programs/brltty-lsinc.c:54:1: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/python3/Programs/brltty-lsinc.c:49:12: acquire_memory: allocated here
brltty-6.8/python3/Programs/brltty-lsinc.c:50:8: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
brltty-6.8/python3/Programs/brltty-lsinc.c:51:10: branch_false: ...to here
brltty-6.8/python3/Programs/brltty-lsinc.c:51:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/brltty-lsinc.c:52:5: branch_false: ...to here
brltty-6.8/python3/Programs/brltty-lsinc.c:54:1: danger: ‘name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   52|       printf("%s\n", name);
#   53|     }
#   54|-> }
#   55|   
#   56|   static DATA_CONDITION_TESTER(testConditionOperand) {

Error: CPPCHECK_WARNING (CWE-457): [#def1097]
brltty-6.8/python3/Programs/brltty-ttb.c:403: warning[uninitvar]: Uninitialized variables: inputCharactersBuffer.character, inputCharactersBuffer.dots
#  401|   
#  402|     qsort(
#  403|->     inputCharactersBuffer, inputCharacterCount,
#  404|       sizeof(inputCharactersBuffer[0]),
#  405|       sortInputCharacterEntries

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1098]
brltty-6.8/python3/Programs/charset.c:149:8: warning[-Wanalyzer-malloc-leak]: leak of ‘charset’
brltty-6.8/python3/Programs/charset.c:144:19: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset.c:144:6: branch_false: following ‘false’ branch (when ‘charset’ is non-NULL)...
brltty-6.8/python3/Programs/charset.c:149:8: branch_false: ...to here
brltty-6.8/python3/Programs/charset.c:149:8: throw: if ‘registerCharacterSet’ throws an exception...
brltty-6.8/python3/Programs/charset.c:149:8: danger: ‘charset’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  147|     }
#  148|   
#  149|->   if (!registerCharacterSet(charset)) {
#  150|       free(charset);
#  151|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1099]
brltty-6.8/python3/Programs/charset.c:157:5: warning[-Wanalyzer-malloc-leak]: leak of ‘charset’
brltty-6.8/python3/Programs/charset.c:144:19: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset.c:144:6: branch_false: following ‘false’ branch (when ‘charset’ is non-NULL)...
brltty-6.8/python3/Programs/charset.c:149:8: branch_false: ...to here
brltty-6.8/python3/Programs/charset.c:149:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset.c:154:7: branch_false: ...to here
brltty-6.8/python3/Programs/charset.c:154:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset.c:157:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset.c:157:5: throw: if ‘registerProgramMemory’ throws an exception...
brltty-6.8/python3/Programs/charset.c:157:5: danger: ‘charset’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  155|       free(currentCharset);
#  156|     } else {
#  157|->     registerProgramMemory("current-charset", &currentCharset);
#  158|     }
#  159|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def1100]
brltty-6.8/python3/Programs/charset_iconv.c:121:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:9: danger: out-of-bounds write from byte 88 till byte 95 but ‘convTable’ ends at byte 64
#  119|   
#  120|     while (conv < convEnd) {
#  121|->     if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|         logSystemError("iconv_open");
#  123|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1101]
brltty-6.8/python3/Programs/charset_iconv.c:121:39: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:39: danger: out-of-bounds read from byte 80 till byte 87 but ‘convTable’ ends at byte 64
#  119|   
#  120|     while (conv < convEnd) {
#  121|->     if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|         logSystemError("iconv_open");
#  123|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1102]
brltty-6.8/python3/Programs/charset_iconv.c:121:56: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(*conv.toCharset, *conv.fromCharset)’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: throw: if ‘iconv_open’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: danger: ‘iconv_open(*conv.toCharset, *conv.fromCharset)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  119|   
#  120|     while (conv < convEnd) {
#  121|->     if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|         logSystemError("iconv_open");
#  123|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1103]
brltty-6.8/python3/Programs/charset_iconv.c:121:56: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:56: danger: out-of-bounds read from byte 72 till byte 79 but ‘convTable’ ends at byte 64
#  119|   
#  120|     while (conv < convEnd) {
#  121|->     if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|         logSystemError("iconv_open");
#  123|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1104]
brltty-6.8/python3/Programs/charset_iconv.c:122:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[0].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:122:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: danger: ‘convTable[0].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  120|     while (conv < convEnd) {
#  121|       if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|->       logSystemError("iconv_open");
#  123|   
#  124|         while (conv > convTable) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1105]
brltty-6.8/python3/Programs/charset_iconv.c:122:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:122:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  120|     while (conv < convEnd) {
#  121|       if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|->       logSystemError("iconv_open");
#  123|   
#  124|         while (conv > convTable) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1106]
brltty-6.8/python3/Programs/charset_iconv.c:122:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[2].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:122:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: danger: ‘convTable[2].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  120|     while (conv < convEnd) {
#  121|       if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|->       logSystemError("iconv_open");
#  123|   
#  124|         while (conv > convTable) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1107]
brltty-6.8/python3/Programs/charset_iconv.c:122:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[3].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:122:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: danger: ‘convTable[3].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  120|     while (conv < convEnd) {
#  121|       if ((conv->newHandle = iconv_open(conv->toCharset, conv->fromCharset)) == CHARSET_ICONV_NULL) {
#  122|->       logSystemError("iconv_open");
#  123|   
#  124|         while (conv > convTable) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1108]
brltty-6.8/python3/Programs/charset_iconv.c:126:9: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:124:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:125:9: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:126:9: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:126:9: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  124|         while (conv > convTable) {
#  125|           conv -= 1;
#  126|->         iconv_close(conv->newHandle);
#  127|         }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1109]
brltty-6.8/python3/Programs/charset_iconv.c:126:9: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[2].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:124:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:125:9: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:126:9: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:126:9: danger: ‘convTable[2].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  124|         while (conv > convTable) {
#  125|           conv -= 1;
#  126|->         iconv_close(conv->newHandle);
#  127|         }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1110]
brltty-6.8/python3/Programs/charset_iconv.c:126:9: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[3].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:124:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:125:9: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:126:9: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:126:9: danger: ‘convTable[3].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  124|         while (conv > convTable) {
#  125|           conv -= 1;
#  126|->         iconv_close(conv->newHandle);
#  127|         }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1111]
brltty-6.8/python3/Programs/charset_iconv.c:126:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:124:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:125:9: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:126:9: danger: out-of-bounds read from byte 88 till byte 95 but ‘convTable’ ends at byte 64
#  124|         while (conv > convTable) {
#  125|           conv -= 1;
#  126|->         iconv_close(conv->newHandle);
#  127|         }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1112]
brltty-6.8/python3/Programs/charset_iconv.c:129:14: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[0].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:124:14: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:129:14: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:129:14: danger: ‘convTable[0].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  127|         }
#  128|   
#  129|->       return 0;
#  130|       }
#  131|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1113]
brltty-6.8/python3/Programs/charset_iconv.c:129:14: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:129:14: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  127|         }
#  128|   
#  129|->       return 0;
#  130|       }
#  131|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1114]
brltty-6.8/python3/Programs/charset_iconv.c:138:10: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:138:10: danger: out-of-bounds read from byte 64 till byte 71 but ‘convTable’ ends at byte 64
#  136|       conv -= 1;
#  137|   
#  138|->     if (*conv->handle == CHARSET_ICONV_NULL) {
#  139|         firstTime = 1;
#  140|       } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1115]
brltty-6.8/python3/Programs/charset_iconv.c:141:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:138:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:141:7: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:141:7: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:141:7: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  139|         firstTime = 1;
#  140|       } else {
#  141|->       iconv_close(*conv->handle);
#  142|       }
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1116]
brltty-6.8/python3/Programs/charset_iconv.c:141:7: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[firstTime].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:138:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:141:7: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:141:7: throw: if ‘iconv_close’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:141:7: danger: ‘convTable[firstTime].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  139|         firstTime = 1;
#  140|       } else {
#  141|->       iconv_close(*conv->handle);
#  142|       }
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1117]
brltty-6.8/python3/Programs/charset_iconv.c:144:21: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:138:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:144:21: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:144:21: danger: out-of-bounds read from byte 88 till byte 95 but ‘convTable’ ends at byte 64
#  142|       }
#  143|   
#  144|->     *conv->handle = conv->newHandle;
#  145|     }
#  146|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1118]
brltty-6.8/python3/Programs/charset_iconv.c:147:18: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[0].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:138:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:144:21: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:147:6: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:147:6: branch_true: following ‘true’ branch (when ‘firstTime != 0’)...
brltty-6.8/python3/Programs/charset_iconv.c:147:18: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:147:18: throw: if ‘onProgramExit’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:147:18: danger: ‘convTable[0].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  145|     }
#  146|   
#  147|->   if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1119]
brltty-6.8/python3/Programs/charset_iconv.c:147:18: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[1].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:138:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:144:21: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:147:6: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:147:6: branch_true: following ‘true’ branch (when ‘firstTime != 0’)...
brltty-6.8/python3/Programs/charset_iconv.c:147:18: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:147:18: throw: if ‘onProgramExit’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:147:18: danger: ‘convTable[1].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
#  145|     }
#  146|   
#  147|->   if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1120]
brltty-6.8/python3/Programs/charset_iconv.c:147:18: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[2].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:136:5: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:138:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:144:21: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:135:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:147:6: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:147:6: branch_true: following ‘true’ branch (when ‘firstTime != 0’)...
brltty-6.8/python3/Programs/charset_iconv.c:147:18: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:147:18: throw: if ‘onProgramExit’ throws an exception...
brltty-6.8/python3/Programs/charset_iconv.c:147:18: danger: ‘convTable[2].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
#  145|     }
#  146|   
#  147|->   if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1121]
brltty-6.8/python3/Programs/charset_iconv.c:149:1: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[2].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:149:1: danger: ‘convTable[2].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/2)
#  147|     if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|-> }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1122]
brltty-6.8/python3/Programs/charset_iconv.c:149:1: warning[-Wanalyzer-malloc-leak]: leak of ‘convTable[3].newHandle’
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:132:5: branch_false: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:120:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:121:56: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:121:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/charset_iconv.c:122:7: branch_true: ...to here
brltty-6.8/python3/Programs/charset_iconv.c:149:1: danger: ‘convTable[3].newHandle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
#  147|     if (firstTime) onProgramExit("charset-iconv", exitCharsetIconv, NULL);
#  148|     return 1;
#  149|-> }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1123]
brltty-6.8/python3/Programs/clipboard.c:81:32: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/clipboard.c:80:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/clipboard.c:80:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/clipboard.c:81:32: branch_true: ...to here
brltty-6.8/python3/Programs/clipboard.c:81:32: throw: if ‘allocateCharacters’ throws an exception...
brltty-6.8/python3/Programs/clipboard.c:81:32: danger: ‘entry’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   79|   
#   80|       if ((entry = malloc(sizeof(*entry)))) {
#   81|->       if ((entry->characters = allocateCharacters(length))) {
#   82|           wmemcpy(entry->characters, characters, length);
#   83|           entry->length = length;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1124]
brltty-6.8/python3/Programs/clipboard.c:85:13: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/clipboard.c:80:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/clipboard.c:80:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/clipboard.c:81:32: branch_true: ...to here
brltty-6.8/python3/Programs/clipboard.c:81:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/clipboard.c:82:9: branch_true: ...to here
brltty-6.8/python3/Programs/clipboard.c:85:13: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/python3/Programs/clipboard.c:85:13: danger: ‘entry’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   83|           entry->length = length;
#   84|   
#   85|->         if (enqueueItem(queue, entry)) {
#   86|             return 1;
#   87|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1125]
brltty-6.8/python3/Programs/clipboard.c:91:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/clipboard.c:80:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/clipboard.c:80:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/clipboard.c:81:32: branch_true: ...to here
brltty-6.8/python3/Programs/clipboard.c:81:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/clipboard.c:91:9: branch_false: ...to here
brltty-6.8/python3/Programs/clipboard.c:91:9: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/clipboard.c:91:9: danger: ‘entry’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   89|           free(entry->characters);
#   90|         } else {
#   91|->         logMallocError();
#   92|         }
#   93|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1126]
brltty-6.8/python3/Programs/clipboard.c:256:31: warning[-Wanalyzer-malloc-leak]: leak of ‘cpb’
brltty-6.8/python3/Programs/clipboard.c:249:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/clipboard.c:249:6: branch_true: following ‘true’ branch (when ‘cpb’ is non-NULL)...
brltty-6.8/python3/Programs/clipboard.c:250:5: branch_true: ...to here
brltty-6.8/python3/Programs/clipboard.c:256:31: throw: if ‘newQueue’ throws an exception...
brltty-6.8/python3/Programs/clipboard.c:256:31: danger: ‘cpb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  254|       cpb->buffer.length = 0;
#  255|   
#  256|->     if ((cpb->history.queue = newQueue(deallocateClipboardHistoryEntry, NULL))) {
#  257|         return cpb;
#  258|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1127]
brltty-6.8/python3/Programs/clipboard.c:264:1: warning[-Wanalyzer-malloc-leak]: leak of ‘cpb’
brltty-6.8/python3/Programs/clipboard.c:249:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/clipboard.c:249:6: branch_true: following ‘true’ branch (when ‘cpb’ is non-NULL)...
brltty-6.8/python3/Programs/clipboard.c:250:5: branch_true: ...to here
brltty-6.8/python3/Programs/clipboard.c:256:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/clipboard.c:256:8: branch_false: ...to here
brltty-6.8/python3/Programs/clipboard.c:264:1: danger: ‘cpb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  262|   
#  263|     return NULL;
#  264|-> }
#  265|   
#  266|   void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1128]
brltty-6.8/python3/Programs/clipboard.c:282:1: warning[-Wanalyzer-malloc-leak]: leak of ‘cpb’
brltty-6.8/python3/Programs/clipboard.c:300:1: enter_function: entry to ‘getMainClipboard’
brltty-6.8/python3/Programs/clipboard.c:304:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/clipboard.c:305:24: branch_true: ...to here
brltty-6.8/python3/Programs/clipboard.c:305:24: call_function: calling ‘newClipboard’ from ‘getMainClipboard’
#  280|   lockMainClipboard (void) {
#  281|     obtainExclusiveLock(getMainClipboardLock());
#  282|-> }
#  283|   
#  284|   void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1129]
brltty-6.8/python3/Programs/cmd_clipboard.c:713:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ccd’
brltty-6.8/python3/Programs/cmd_clipboard.c:711:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmd_clipboard.c:711:6: branch_true: following ‘true’ branch (when ‘ccd’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_clipboard.c:712:5: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_clipboard.c:713:22: throw: if ‘getMainClipboard’ throws an exception...
brltty-6.8/python3/Programs/cmd_clipboard.c:713:22: danger: ‘ccd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  711|     if ((ccd = malloc(sizeof(*ccd)))) {
#  712|       memset(ccd, 0, sizeof(*ccd));
#  713|->     ccd->clipboard = getMainClipboard();
#  714|   
#  715|       ccd->begin.column = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1130]
brltty-6.8/python3/Programs/cmd_clipboard.c:719:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ccd’
brltty-6.8/python3/Programs/cmd_clipboard.c:711:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmd_clipboard.c:711:6: branch_true: following ‘true’ branch (when ‘ccd’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_clipboard.c:712:5: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_clipboard.c:719:9: throw: if ‘pushCommandHandler’ throws an exception...
brltty-6.8/python3/Programs/cmd_clipboard.c:719:9: danger: ‘ccd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  717|       ccd->begin.offset = 0;
#  718|   
#  719|->     if (pushCommandHandler("clipboard", KTB_CTX_DEFAULT,
#  720|                              handleClipboardCommands, destroyClipboardCommandData, ccd)) {
#  721|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1131]
brltty-6.8/python3/Programs/cmd_input.c:428:31: warning[-Wanalyzer-malloc-leak]: leak of ‘icd’
brltty-6.8/python3/Programs/cmd_input.c:423:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmd_input.c:423:6: branch_true: following ‘true’ branch (when ‘icd’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_input.c:424:5: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_input.c:428:31: throw: if ‘registerReportListener’ throws an exception...
brltty-6.8/python3/Programs/cmd_input.c:428:31: danger: ‘icd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  426|       initializeModifierFlags(icd);
#  427|   
#  428|->     if ((icd->resetListener = registerReportListener(REPORT_BRAILLE_DEVICE_ONLINE, inputCommandDataResetListener, icd))) {
#  429|         if (pushCommandHandler("input", KTB_CTX_DEFAULT,
#  430|                                handleInputCommands, destroyInputCommandData, icd)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1132]
brltty-6.8/python3/Programs/cmd_keycodes.c:799:31: warning[-Wanalyzer-malloc-leak]: leak of ‘kcd’
brltty-6.8/python3/Programs/cmd_keycodes.c:795:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmd_keycodes.c:795:6: branch_true: following ‘true’ branch (when ‘kcd’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_keycodes.c:796:5: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_keycodes.c:799:31: throw: if ‘registerReportListener’ throws an exception...
brltty-6.8/python3/Programs/cmd_keycodes.c:799:31: danger: ‘kcd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  797|       resetKeycodeCommandData(kcd);
#  798|   
#  799|->     if ((kcd->resetListener = registerReportListener(REPORT_BRAILLE_DEVICE_ONLINE, keycodeCommandDataResetListener, kcd))) {
#  800|         if (pushCommandHandler("keycodes", KTB_CTX_DEFAULT,
#  801|                                handleKeycodeCommands, destroyKeycodeCommandData, kcd)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1133]
brltty-6.8/python3/Programs/cmd_learn.c:58:13: warning[-Wanalyzer-malloc-leak]: leak of ‘lmp’
brltty-6.8/python3/Programs/cmd_learn.c:54:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmd_learn.c:54:10: branch_true: following ‘true’ branch (when ‘lmp’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_learn.c:56:9: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_learn.c:58:13: throw: if ‘asyncAddTask’ throws an exception...
brltty-6.8/python3/Programs/cmd_learn.c:58:13: danger: ‘lmp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   56|           lmp->timeout = LEARN_MODE_TIMEOUT;
#   57|   
#   58|->         if (asyncAddTask(NULL, presentLearnMode, lmp)) break;
#   59|           free(lmp);
#   60|         } else {

Error: CPPCHECK_WARNING (CWE-457): [#def1134]
brltty-6.8/python3/Programs/cmd_navigation.c:233: warning[uninitvar]: Uninitialized variable: text
#  231|     }
#  232|   
#  233|->   return !!rgxMatchTextCharacters(promptPatterns, text, length, NULL, NULL);
#  234|   }
#  235|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1135]
brltty-6.8/python3/Programs/cmd_override.c:194:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ocd’
brltty-6.8/python3/Programs/cmd_override.c:189:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmd_override.c:189:6: branch_true: following ‘true’ branch (when ‘ocd’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_override.c:190:5: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_override.c:194:9: throw: if ‘pushCommandHandler’ throws an exception...
brltty-6.8/python3/Programs/cmd_override.c:194:9: danger: ‘ocd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  192|       ocd->selection.started = 0;
#  193|   
#  194|->     if (pushCommandHandler("override", KTB_CTX_DEFAULT,
#  195|                              handleOverrideCommands, destroyOverrideCommandData, ocd)) {
#  196|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1136]
brltty-6.8/python3/Programs/cmd_preferences.c:180:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pcd’
brltty-6.8/python3/Programs/cmd_preferences.c:177:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmd_preferences.c:177:6: branch_true: following ‘true’ branch (when ‘pcd’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_preferences.c:178:5: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_preferences.c:180:9: throw: if ‘pushCommandHandler’ throws an exception...
brltty-6.8/python3/Programs/cmd_preferences.c:180:9: danger: ‘pcd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  178|       memset(pcd, 0, sizeof(*pcd));
#  179|   
#  180|->     if (pushCommandHandler("preferences", KTB_CTX_DEFAULT,
#  181|                              handlePreferencesCommands, destroyPreferencesCommandData, pcd)) {
#  182|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1137]
brltty-6.8/python3/Programs/cmd_queue.c:271:13: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
brltty-6.8/python3/Programs/cmd_queue.c:260:6: branch_false: following ‘false’ branch (when ‘command != -1’)...
brltty-6.8/python3/Programs/cmd_queue.c:263:20: branch_false: ...to here
brltty-6.8/python3/Programs/cmd_queue.c:265:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/cmd_queue.c:266:32: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_queue.c:266:32: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmd_queue.c:268:10: branch_true: following ‘true’ branch (when ‘item’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_queue.c:269:9: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_queue.c:271:13: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/python3/Programs/cmd_queue.c:271:13: danger: ‘item’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  269|           item->command = command;
#  270|   
#  271|->         if (enqueueItem(queue, item)) {
#  272|             setCommandAlarm(NULL);
#  273|             return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1138]
brltty-6.8/python3/Programs/cmd_queue.c:307:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/python3/Programs/cmd_queue.c:287:1: enter_function: entry to ‘pushCommandHandler’
brltty-6.8/python3/Programs/cmd_queue.c:296:6: branch_true: following ‘true’ branch (when ‘chl’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_queue.c:297:5: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_queue.c:305:35: call_function: inlined call to ‘getCommandHandlerTop’ from ‘pushCommandHandler’
brltty-6.8/python3/Programs/cmd_queue.c:307:28: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_queue.c:307:28: danger: dereference of NULL ‘<unknown>’
#  305|         CommandHandlerLevel **top = getCommandHandlerTop();
#  306|   
#  307|->       chl->previousLevel = *top;
#  308|         *top = chl;
#  309|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1139]
brltty-6.8/python3/Programs/cmd_queue.c:323:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/python3/Programs/cmd_queue.c:321:1: enter_function: entry to ‘popCommandHandler’
brltty-6.8/python3/Programs/cmd_queue.c:322:31: call_function: inlined call to ‘getCommandHandlerTop’ from ‘popCommandHandler’
brltty-6.8/python3/Programs/cmd_queue.c:323:24: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_queue.c:323:24: danger: dereference of NULL ‘<unknown>’
#  321|   popCommandHandler (void) {
#  322|     CommandHandlerLevel **top = getCommandHandlerTop();
#  323|->   CommandHandlerLevel *chl = *top;
#  324|   
#  325|     if (!chl) return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1140]
brltty-6.8/python3/Programs/cmd_touch.c:116:54: warning[-Wanalyzer-malloc-leak]: leak of ‘tcd’
brltty-6.8/python3/Programs/cmd_touch.c:113:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmd_touch.c:113:6: branch_true: following ‘true’ branch (when ‘tcd’ is non-NULL)...
brltty-6.8/python3/Programs/cmd_touch.c:114:5: branch_true: ...to here
brltty-6.8/python3/Programs/cmd_touch.c:116:54: throw: if ‘registerReportListener’ throws an exception...
brltty-6.8/python3/Programs/cmd_touch.c:116:54: danger: ‘tcd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  114|       memset(tcd, 0, sizeof(*tcd));
#  115|   
#  116|->     if ((tcd->reportListeners.brailleWindowUpdated = registerReportListener(REPORT_BRAILLE_WINDOW_UPDATED, brailleWindowUpdatedListener, tcd))) {
#  117|         return tcd;
#  118|       }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1141]
brltty-6.8/python3/Programs/cmdline.c:451:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*indexToLetter[index]’
brltty-6.8/python3/Programs/cmdline.c:413:32: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/cmdline.c:438:5: branch_false: ...to here
brltty-6.8/python3/Programs/cmdline.c:447:32: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/cmdline.c:448:42: branch_true: ...to here
brltty-6.8/python3/Programs/cmdline.c:450:10: branch_false: following ‘false’ branch (when ‘word’ is non-NULL)...
brltty-6.8/python3/Programs/cmdline.c:451:11: branch_false: ...to here
brltty-6.8/python3/Programs/cmdline.c:451:11: danger: use of uninitialized value ‘*indexToLetter[index]’ here
#  449|         const char *word = option->word;
#  450|         if (!word) continue;
#  451|->       int letter = indexToLetter[index];
#  452|   
#  453|         opt->name = word;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1142]
brltty-6.8/python3/Programs/cmdline.c:877:17: warning[-Wanalyzer-malloc-leak]: leak of ‘newSetting’
brltty-6.8/python3/Programs/cmdline.c:865:36: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/cmdline.c:866:40: branch_true: ...to here
brltty-6.8/python3/Programs/cmdline.c:868:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/cmdline.c:869:19: branch_true: ...to here
brltty-6.8/python3/Programs/cmdline.c:874:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/cmdline.c:875:13: branch_true: ...to here
brltty-6.8/python3/Programs/cmdline.c:875:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/cmdline.c:876:29: branch_true: ...to here
brltty-6.8/python3/Programs/cmdline.c:876:29: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmdline.c:876:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/cmdline.c:877:17: branch_true: ...to here
brltty-6.8/python3/Programs/cmdline.c:877:17: throw: if the called function throws an exception...
brltty-6.8/python3/Programs/cmdline.c:877:17: danger: ‘newSetting’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  875|           if (*setting) {
#  876|             if ((newSetting = strdup(setting))) {
#  877|->             if (option->internal.adjust(&newSetting)) {
#  878|                 setting = newSetting;
#  879|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1143]
brltty-6.8/python3/Programs/cmdline.c:1068:9: warning[-Wanalyzer-malloc-leak]: leak of ‘directive’
brltty-6.8/python3/Programs/cmdline.c:1048:36: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/cmdline.c:1049:40: branch_true: ...to here
brltty-6.8/python3/Programs/cmdline.c:1051:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/cmdline.c:1057:25: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmdline.c:1057:10: branch_false: following ‘false’ branch (when ‘directive’ is non-NULL)...
brltty-6.8/python3/Programs/cmdline.c:1063:7: branch_false: ...to here
brltty-6.8/python3/Programs/cmdline.c:1068:9: throw: if ‘convertUtf8ToWchars’ throws an exception...
brltty-6.8/python3/Programs/cmdline.c:1068:9: danger: ‘directive’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1066|           const char *utf8 = keyword;
# 1067|           wchar_t *wc = directive->keyword;
# 1068|->         convertUtf8ToWchars(&utf8, &wc, length+1);
# 1069|         }
# 1070|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1144]
brltty-6.8/python3/Programs/cmdline.c:1234:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
brltty-6.8/python3/Programs/cmdline.c:1257:1: enter_function: entry to ‘processInputFile’
brltty-6.8/python3/Programs/cmdline.c:1258:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
brltty-6.8/python3/Programs/cmdline.c:1263:20: branch_false: ...to here
brltty-6.8/python3/Programs/cmdline.c:1263:20: acquire_resource: opened here
brltty-6.8/python3/Programs/cmdline.c:1265:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/cmdline.c:1270:32: branch_false: ...to here
brltty-6.8/python3/Programs/cmdline.c:1270:32: call_function: calling ‘processInputStream’ from ‘processInputFile’
# 1232|     int ok = 0;
# 1233|   
# 1234|->   if (parameters->beginStream) {
# 1235|       parameters->beginStream(name, parameters->dataFileParameters.data);
# 1236|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1145]
brltty-6.8/python3/Programs/cmdline.c:1234:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
brltty-6.8/python3/Programs/cmdline.c:1257:1: enter_function: entry to ‘processInputFile’
brltty-6.8/python3/Programs/cmdline.c:1258:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
brltty-6.8/python3/Programs/cmdline.c:1263:20: branch_false: ...to here
brltty-6.8/python3/Programs/cmdline.c:1263:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/cmdline.c:1265:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/cmdline.c:1270:32: branch_false: ...to here
brltty-6.8/python3/Programs/cmdline.c:1270:32: call_function: calling ‘processInputStream’ from ‘processInputFile’
# 1232|     int ok = 0;
# 1233|   
# 1234|->   if (parameters->beginStream) {
# 1235|       parameters->beginStream(name, parameters->dataFileParameters.data);
# 1236|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1146]
brltty-6.8/python3/Programs/config.c:2806:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/python3/Programs/config.c:2910:1: enter_function: entry to ‘background’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/python3/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2934:12: call_function: inlined call to ‘makePidFile’ from ‘background’
# 2804|   static int
# 2805|   makePidFile (ProcessIdentifier pid) {
# 2806|->   return createPidFile(opt_pidFile, pid);
# 2807|   }
# 2808|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1147]
brltty-6.8/python3/Programs/config.c:2918:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2918:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/python3/Programs/config.c:2918:3: danger: ‘fds[0]’ leaks here
# 2916|     }
# 2917|   
# 2918|->   fflush(stdout);
# 2919|     fflush(stderr);
# 2920|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1148]
brltty-6.8/python3/Programs/config.c:2918:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2918:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/python3/Programs/config.c:2918:3: danger: ‘fds[1]’ leaks here
# 2916|     }
# 2917|   
# 2918|->   fflush(stdout);
# 2919|     fflush(stderr);
# 2920|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1149]
brltty-6.8/python3/Programs/config.c:2919:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2919:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/python3/Programs/config.c:2919:3: danger: ‘fds[0]’ leaks here
# 2917|   
# 2918|     fflush(stdout);
# 2919|->   fflush(stderr);
# 2920|   
# 2921|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1150]
brltty-6.8/python3/Programs/config.c:2919:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2919:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/python3/Programs/config.c:2919:3: danger: ‘fds[1]’ leaks here
# 2917|   
# 2918|     fflush(stdout);
# 2919|->   fflush(stderr);
# 2920|   
# 2921|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1151]
brltty-6.8/python3/Programs/config.c:2925:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_true: following ‘true’ branch (when ‘child == -1’)...
brltty-6.8/python3/Programs/config.c:2925:7: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2925:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/config.c:2925:7: danger: ‘fds[0]’ leaks here
# 2923|   
# 2924|       if (child == -1) {
# 2925|->       logSystemError("fork");
# 2926|         exit(PROG_EXIT_FATAL);
# 2927|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1152]
brltty-6.8/python3/Programs/config.c:2925:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_true: following ‘true’ branch (when ‘child == -1’)...
brltty-6.8/python3/Programs/config.c:2925:7: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2925:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/config.c:2925:7: danger: ‘fds[1]’ leaks here
# 2923|   
# 2924|       if (child == -1) {
# 2925|->       logSystemError("fork");
# 2926|         exit(PROG_EXIT_FATAL);
# 2927|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1153]
brltty-6.8/python3/Programs/config.c:2932:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/python3/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2932:11: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Programs/config.c:2932:11: danger: ‘fds[0]’ leaks here
# 2930|         ProgramExitStatus exitStatus = PROG_EXIT_SUCCESS;
# 2931|   
# 2932|->       if (close(fds[0]) == -1) logSystemError("close");
# 2933|   
# 2934|         if (!makePidFile(child)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1154]
brltty-6.8/python3/Programs/config.c:2932:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/python3/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2932:11: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Programs/config.c:2932:11: danger: ‘fds[1]’ leaks here
# 2930|         ProgramExitStatus exitStatus = PROG_EXIT_SUCCESS;
# 2931|   
# 2932|->       if (close(fds[0]) == -1) logSystemError("close");
# 2933|   
# 2934|         if (!makePidFile(child)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1155]
brltty-6.8/python3/Programs/config.c:2932:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/python3/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2932:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/config.c:2932:32: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2932:32: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/config.c:2932:32: danger: ‘fds[1]’ leaks here
# 2930|         ProgramExitStatus exitStatus = PROG_EXIT_SUCCESS;
# 2931|   
# 2932|->       if (close(fds[0]) == -1) logSystemError("close");
# 2933|   
# 2934|         if (!makePidFile(child)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1156]
brltty-6.8/python3/Programs/config.c:2940:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_true: following ‘true’ branch (when ‘child != 0’)...
brltty-6.8/python3/Programs/config.c:2932:11: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2940:11: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Programs/config.c:2940:11: danger: ‘fds[1]’ leaks here
# 2938|         }
# 2939|   
# 2940|->       if (close(fds[1]) == -1) logSystemError("close");
# 2941|         _exit(exitStatus);
# 2942|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1157]
brltty-6.8/python3/Programs/config.c:2945:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/python3/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2945:7: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Programs/config.c:2945:7: danger: ‘fds[0]’ leaks here
# 2943|     }
# 2944|   
# 2945|->   if (close(fds[1]) == -1) logSystemError("close");
# 2946|   
# 2947|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1158]
brltty-6.8/python3/Programs/config.c:2945:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/python3/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2945:7: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Programs/config.c:2945:7: danger: ‘fds[1]’ leaks here
# 2943|     }
# 2944|   
# 2945|->   if (close(fds[1]) == -1) logSystemError("close");
# 2946|   
# 2947|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1159]
brltty-6.8/python3/Programs/config.c:2945:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/python3/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2945:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/config.c:2945:28: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2945:28: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/config.c:2945:28: danger: ‘fds[0]’ leaks here
# 2943|     }
# 2944|   
# 2945|->   if (close(fds[1]) == -1) logSystemError("close");
# 2946|   
# 2947|     {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1160]
brltty-6.8/python3/Programs/config.c:2950:53: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/python3/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2950:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/config.c:2950:53: branch_true: ...to here
brltty-6.8/python3/Programs/config.c:2950:53: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/config.c:2950:53: danger: ‘fds[0]’ leaks here
# 2948|       unsigned char buffer[1];
# 2949|   
# 2950|->     if (read(fds[0], buffer, sizeof(buffer)) == -1) logSystemError("read");
# 2951|       if (close(fds[0]) == -1) logSystemError("close");
# 2952|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1161]
brltty-6.8/python3/Programs/config.c:2951:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
brltty-6.8/python3/Programs/config.c:2913:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/config.c:2918:3: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2924:8: branch_false: following ‘false’ branch (when ‘child != -1’)...
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2929:8: branch_false: following ‘false’ branch (when ‘child == 0’)...
brltty-6.8/python3/Programs/config.c:2945:7: branch_false: ...to here
brltty-6.8/python3/Programs/config.c:2951:9: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Programs/config.c:2951:9: danger: ‘fds[0]’ leaks here
# 2949|   
# 2950|       if (read(fds[0], buffer, sizeof(buffer)) == -1) logSystemError("read");
# 2951|->     if (close(fds[0]) == -1) logSystemError("close");
# 2952|     }
# 2953|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1162]
brltty-6.8/python3/Programs/core.c:190:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pre’
brltty-6.8/python3/Programs/core.c:181:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/core.c:181:6: branch_true: following ‘true’ branch (when ‘pre’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:184:28: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:190:5: throw: if ‘suspendUpdates’ throws an exception...
brltty-6.8/python3/Programs/core.c:190:5: danger: ‘pre’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  188|       pre->speechRow = ses->spky;
#  189|   
#  190|->     suspendUpdates();
#  191|       return pre;
#  192|     } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1163]
brltty-6.8/python3/Programs/core.c:1042:7: warning[-Wanalyzer-malloc-leak]: leak of ‘attributes’
brltty-6.8/python3/Programs/core.c:1026:6: branch_true: following ‘true’ branch (when ‘textBuffer’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:1029:29: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1029:29: acquire_memory: allocated here
brltty-6.8/python3/Programs/core.c:1029:8: branch_true: following ‘true’ branch (when ‘attributesBuffer’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:1034:46: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1036:14: branch_false: following ‘false’ branch (when ‘character >= end’)...
brltty-6.8/python3/Programs/core.c:1042:7: branch_false: ...to here
brltty-6.8/python3/Programs/core.c:1042:7: throw: if ‘sayWideCharacters’ throws an exception...
brltty-6.8/python3/Programs/core.c:1042:7: danger: ‘attributes’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1040|         }
# 1041|   
# 1042|->       sayWideCharacters(&spk, textBuffer, attributesBuffer, count, options);
# 1043|         free(attributesBuffer);
# 1044|       } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1164]
brltty-6.8/python3/Programs/core.c:1042:7: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
brltty-6.8/python3/Programs/core.c:1026:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/core.c:1026:6: branch_true: following ‘true’ branch (when ‘textBuffer’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:1029:29: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1029:8: branch_true: following ‘true’ branch (when ‘attributesBuffer’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:1034:46: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1036:14: branch_false: following ‘false’ branch (when ‘character >= end’)...
brltty-6.8/python3/Programs/core.c:1042:7: branch_false: ...to here
brltty-6.8/python3/Programs/core.c:1042:7: throw: if ‘sayWideCharacters’ throws an exception...
brltty-6.8/python3/Programs/core.c:1042:7: danger: ‘text’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1040|         }
# 1041|   
# 1042|->       sayWideCharacters(&spk, textBuffer, attributesBuffer, count, options);
# 1043|         free(attributesBuffer);
# 1044|       } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1165]
brltty-6.8/python3/Programs/core.c:1045:7: warning[-Wanalyzer-malloc-leak]: leak of ‘textBuffer’
brltty-6.8/python3/Programs/core.c:1026:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/core.c:1026:6: branch_true: following ‘true’ branch (when ‘textBuffer’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:1029:29: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1029:8: branch_false: following ‘false’ branch (when ‘attributesBuffer’ is NULL)...
brltty-6.8/python3/Programs/core.c:1045:7: branch_false: ...to here
brltty-6.8/python3/Programs/core.c:1045:7: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/core.c:1045:7: danger: ‘textBuffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1043|         free(attributesBuffer);
# 1044|       } else {
# 1045|->       logMallocError();
# 1046|       }
# 1047|   

Error: CPPCHECK_WARNING (CWE-457): [#def1166]
brltty-6.8/python3/Programs/core.c:1134: warning[uninitvar]: Uninitialized variable: attributesBuffer
# 1132|       }
# 1133|   
# 1134|->     sayWideCharacters(&spk, textBuffer, attributesBuffer, length-1, sayOptions);
# 1135|     } else {
# 1136|       sayScreenCharacters(characters, count, sayOptions);

Error: CPPCHECK_WARNING (CWE-457): [#def1167]
brltty-6.8/python3/Programs/core.c:1134: warning[uninitvar]: Uninitialized variable: textBuffer
# 1132|       }
# 1133|   
# 1134|->     sayWideCharacters(&spk, textBuffer, attributesBuffer, length-1, sayOptions);
# 1135|     } else {
# 1136|       sayScreenCharacters(characters, count, sayOptions);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1168]
brltty-6.8/python3/Programs/core.c:1279:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iep’
brltty-6.8/python3/Programs/core.c:1272:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/core.c:1275:16: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1275:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/core.c:1275:8: branch_true: following ‘true’ branch (when ‘iep’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:1277:7: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1279:11: throw: if ‘asyncSignalEvent’ throws an exception...
brltty-6.8/python3/Programs/core.c:1279:11: danger: ‘iep’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1277|         iep->waitResult = waitResult;
# 1278|   
# 1279|->       if (asyncSignalEvent(interruptEvent, iep)) {
# 1280|           return 1;
# 1281|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1169]
brltty-6.8/python3/Programs/core.c:1470:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ctd’
brltty-6.8/python3/Programs/core.c:1512:1: enter_function: entry to ‘runCoreTask’
brltty-6.8/python3/Programs/core.c:1515:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/core.c:1518:16: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1518:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/core.c:1518:8: branch_true: following ‘true’ branch (when ‘ctd’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:1518:8: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1527:10: branch_true: following ‘true’ branch (when ‘wait == 0’)...
brltty-6.8/python3/Programs/core.c:1528:9: call_function: inlined call to ‘logCoreTaskAction’ from ‘runCoreTask’
# 1468|   static void
# 1469|   logCoreTaskAction (CoreTaskCallback *callback, const char *action) {
# 1470|->   logSymbol(LOG_DEBUG, callback, "%s core task", action);
# 1471|   }
# 1472|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1170]
brltty-6.8/python3/Programs/core.c:1527:39: warning[-Wanalyzer-malloc-leak]: leak of ‘ctd’
brltty-6.8/python3/Programs/core.c:1515:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/core.c:1518:16: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1518:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/core.c:1518:8: branch_true: following ‘true’ branch (when ‘ctd’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:1518:8: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1527:10: branch_false: following ‘false’ branch (when ‘wait != 0’)...
brltty-6.8/python3/Programs/core.c:1527:39: branch_false: ...to here
brltty-6.8/python3/Programs/core.c:1527:39: throw: if ‘asyncNewEvent’ throws an exception...
brltty-6.8/python3/Programs/core.c:1527:39: danger: ‘ctd’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 1525|         ctd->wait.finished = 0;
# 1526|   
# 1527|->       if (!wait || (ctd->wait.event = asyncNewEvent(setCoreTaskFinished, NULL))) {
# 1528|           logCoreTaskAction(callback, "scheduling");
# 1529|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1171]
brltty-6.8/python3/Programs/core.c:1530:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ctd’
brltty-6.8/python3/Programs/core.c:1512:1: enter_function: entry to ‘runCoreTask’
brltty-6.8/python3/Programs/core.c:1515:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/core.c:1518:16: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1518:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/core.c:1518:8: branch_true: following ‘true’ branch (when ‘ctd’ is non-NULL)...
brltty-6.8/python3/Programs/core.c:1518:8: branch_true: ...to here
brltty-6.8/python3/Programs/core.c:1527:10: branch_true: following ‘true’ branch (when ‘wait == 0’)...
brltty-6.8/python3/Programs/core.c:1528:9: call_function: inlined call to ‘logCoreTaskAction’ from ‘runCoreTask’
brltty-6.8/python3/Programs/core.c:1530:13: throw: if ‘asyncAddTask’ throws an exception...
brltty-6.8/python3/Programs/core.c:1530:13: danger: ‘ctd’ leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3)
# 1528|           logCoreTaskAction(callback, "scheduling");
# 1529|   
# 1530|->         if (asyncAddTask(addCoreTaskEvent, handleCoreTask, ctd)) {
# 1531|             wasScheduled = 1;
# 1532|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1172]
brltty-6.8/python3/Programs/ctb_compile.c:750:33: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ctb_compile.c:748:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/ctb_compile.c:748:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ctb_compile.c:749:5: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:750:33: throw: if ‘getContractionTableTranslationMethods_native’ throws an exception...
brltty-6.8/python3/Programs/ctb_compile.c:750:33: danger: ‘table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  748|     if ((table = malloc(sizeof(*table)))) {
#  749|       table->managementMethods = &nativeManagementMethods;
#  750|->     table->translationMethods = getContractionTableTranslationMethods_native();
#  751|       initializeCommonFields(table);
#  752|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1173]
brltty-6.8/python3/Programs/ctb_compile.c:822:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/ctb_compile.c:863:1: enter_function: entry to ‘compileContractionTable_external’
brltty-6.8/python3/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:869:41: acquire_memory: allocated here
brltty-6.8/python3/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:879:11: call_function: calling ‘startContractionCommand’ from ‘compileContractionTable_external’
#  820|       HostCommandOptions options;
#  821|   
#  822|->     initializeHostCommandOptions(&options);
#  823|       options.asynchronous = 1;
#  824|       options.standardInput = &table->data.external.standardInput;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1174]
brltty-6.8/python3/Programs/ctb_compile.c:822:5: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ctb_compile.c:863:1: enter_function: entry to ‘compileContractionTable_external’
brltty-6.8/python3/Programs/ctb_compile.c:866:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:879:11: call_function: calling ‘startContractionCommand’ from ‘compileContractionTable_external’
#  820|       HostCommandOptions options;
#  821|   
#  822|->     initializeHostCommandOptions(&options);
#  823|       options.asynchronous = 1;
#  824|       options.standardInput = &table->data.external.standardInput;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1175]
brltty-6.8/python3/Programs/ctb_compile.c:827:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/ctb_compile.c:863:1: enter_function: entry to ‘compileContractionTable_external’
brltty-6.8/python3/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:869:41: acquire_memory: allocated here
brltty-6.8/python3/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:879:11: call_function: calling ‘startContractionCommand’ from ‘compileContractionTable_external’
#  825|       options.standardOutput = &table->data.external.standardOutput;
#  826|   
#  827|->     logMessage(LOG_DEBUG, "starting external contraction table: %s", table->data.external.command);
#  828|       if (runHostCommand(command, &options) != 0) return 0;
#  829|       logMessage(LOG_DEBUG, "external contraction table started: %s", table->data.external.command);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1176]
brltty-6.8/python3/Programs/ctb_compile.c:827:5: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ctb_compile.c:863:1: enter_function: entry to ‘compileContractionTable_external’
brltty-6.8/python3/Programs/ctb_compile.c:866:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:879:11: call_function: calling ‘startContractionCommand’ from ‘compileContractionTable_external’
#  825|       options.standardOutput = &table->data.external.standardOutput;
#  826|   
#  827|->     logMessage(LOG_DEBUG, "starting external contraction table: %s", table->data.external.command);
#  828|       if (runHostCommand(command, &options) != 0) return 0;
#  829|       logMessage(LOG_DEBUG, "external contraction table started: %s", table->data.external.command);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1177]
brltty-6.8/python3/Programs/ctb_compile.c:871:35: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:869:41: acquire_memory: allocated here
brltty-6.8/python3/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:871:35: throw: if ‘getContractionTableTranslationMethods_external’ throws an exception...
brltty-6.8/python3/Programs/ctb_compile.c:871:35: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  869|       if ((table->data.external.command = strdup(name))) {
#  870|         table->managementMethods = &externalManagementMethods;
#  871|->       table->translationMethods = getContractionTableTranslationMethods_external();
#  872|         initializeCommonFields(table);
#  873|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1178]
brltty-6.8/python3/Programs/ctb_compile.c:871:35: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ctb_compile.c:866:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:869:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ctb_compile.c:870:7: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:871:35: throw: if ‘getContractionTableTranslationMethods_external’ throws an exception...
brltty-6.8/python3/Programs/ctb_compile.c:871:35: danger: ‘table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  869|       if ((table->data.external.command = strdup(name))) {
#  870|         table->managementMethods = &externalManagementMethods;
#  871|->       table->translationMethods = getContractionTableTranslationMethods_external();
#  872|         initializeCommonFields(table);
#  873|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1179]
brltty-6.8/python3/Programs/ctb_compile.c:885:7: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ctb_compile.c:866:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/ctb_compile.c:866:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ctb_compile.c:867:5: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:869:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/ctb_compile.c:885:7: branch_false: ...to here
brltty-6.8/python3/Programs/ctb_compile.c:885:7: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/ctb_compile.c:885:7: danger: ‘table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  883|         free(table->data.external.command);
#  884|       } else {
#  885|->       logMallocError();
#  886|       }
#  887|   

Error: COMPILER_WARNING (CWE-704): [#def1180]
brltty-6.8/python3/Programs/ctb_external.c: scope_hint: In function ‘handleExternalResponse_outputOffsets’
brltty-6.8/python3/Programs/ctb_external.c:240:27: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  240 |         char *delimiter = strchr(value, ',');
#      |                           ^~~~~~
#  238|   
#  239|         {
#  240|->         char *delimiter = strchr(value, ',');
#  241|   
#  242|           if (delimiter) {

Error: COMPILER_WARNING (CWE-704): [#def1181]
brltty-6.8/python3/Programs/ctb_external.c:240:27: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  238|   
#  239|         {
#  240|->         char *delimiter = strchr(value, ',');
#  241|   
#  242|           if (delimiter) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1182]
brltty-6.8/python3/Programs/ctb_native.c:521:7: warning[-Wanalyzer-malloc-leak]: leak of ‘rule’
brltty-6.8/python3/Programs/ctb_native.c:571:1: enter_function: entry to ‘setAlwaysRule’
brltty-6.8/python3/Programs/ctb_native.c:578:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/ctb_native.c:591:20: branch_false: ...to here
brltty-6.8/python3/Programs/ctb_native.c:591:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ctb_native.c:593:20: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_native.c:593:20: call_function: calling ‘makeDecomposedBraille’ from ‘setAlwaysRule’
brltty-6.8/python3/Programs/ctb_native.c:593:20: return_function: returning to ‘setAlwaysRule’ from ‘makeDecomposedBraille’
brltty-6.8/python3/Programs/ctb_native.c:603:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ctb_native.c:605:14: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_native.c:607:19: acquire_memory: allocated here
brltty-6.8/python3/Programs/ctb_native.c:607:10: branch_true: following ‘true’ branch (when ‘rule’ is non-NULL)...
brltty-6.8/python3/Programs/ctb_native.c:608:9: branch_true: ...to here
brltty-6.8/python3/Programs/ctb_native.c:614:13: call_function: calling ‘addRule’ from ‘setAlwaysRule’
#  519|   
#  520|       if (!newArray) {
#  521|->       logMallocError();
#  522|         return 0;
#  523|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def1183]
brltty-6.8/python3/Programs/datafile.c:95:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
brltty-6.8/python3/Programs/datafile.c:239:1: enter_function: entry to ‘findDataOperand’
brltty-6.8/python3/Programs/datafile.c:244:6: branch_true: following ‘true’ branch (when ‘description’ is non-NULL)...
brltty-6.8/python3/Programs/datafile.c:244:20: branch_true: ...to here
brltty-6.8/python3/Programs/datafile.c:244:20: call_function: calling ‘reportDataError’ from ‘findDataOperand’
#   93|   
#   94|       va_start(args, format);
#   95|->     formatInputError(message, sizeof(message), name, line, format, args);
#   96|       va_end(args);
#   97|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1184]
brltty-6.8/python3/Programs/file.c:134:23: warning[-Wanalyzer-malloc-leak]: leak of ‘getPathDirectory(path)’
brltty-6.8/python3/Programs/file.c:476:1: enter_function: entry to ‘ensureDirectory’
brltty-6.8/python3/Programs/file.c:479:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/file.c:481:13: branch_false: ...to here
brltty-6.8/python3/Programs/file.c:481:13: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/file.c:485:22: branch_false: ...to here
brltty-6.8/python3/Programs/file.c:485:22: call_function: calling ‘getPathDirectory’ from ‘ensureDirectory’
brltty-6.8/python3/Programs/file.c:485:22: return_function: returning to ‘ensureDirectory’ from ‘getPathDirectory’
brltty-6.8/python3/Programs/file.c:486:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/file.c:489:11: branch_false: ...to here
brltty-6.8/python3/Programs/file.c:489:10: branch_true: following ‘true’ branch (when the strings are non-equal)...
brltty-6.8/python3/Programs/file.c:490:18: branch_true: ...to here
brltty-6.8/python3/Programs/file.c:490:18: call_function: calling ‘ensureDirectory’ from ‘ensureDirectory’
#  132|     if (!length) length = strlen((path = CURRENT_DIRECTORY_NAME));
#  133|     {
#  134|->     char *directory = malloc(length + 1);
#  135|   
#  136|       if (directory) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1185]
brltty-6.8/python3/Programs/file.c:204:10: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/python3/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/python3/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  202|     }
#  203|   
#  204|->   return joinStrings(&strings[first], size-first);
#  205|   }
#  206|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1186]
brltty-6.8/python3/Programs/file.c:204:10: warning[-Wanalyzer-malloc-leak]: leak of ‘primary’
brltty-6.8/python3/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/python3/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  202|     }
#  203|   
#  204|->   return joinStrings(&strings[first], size-first);
#  205|   }
#  206|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1187]
brltty-6.8/python3/Programs/file.c:617:15: warning[-Wanalyzer-malloc-leak]: leak of ‘getHomeDirectory()’
brltty-6.8/python3/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/python3/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  615|     char *path = getenv("HOME");
#  616|   
#  617|->   if (path && *path) {
#  618|       if ((path = strdup(path))) return path;
#  619|       logMallocError();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1188]
brltty-6.8/python3/Programs/file.c:619:5: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/python3/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/python3/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  617|     if (path && *path) {
#  618|       if ((path = strdup(path))) return path;
#  619|->     logMallocError();
#  620|     }
#  621|   #endif /* get home directory */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1189]
brltty-6.8/python3/Programs/file.c:636:3: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/python3/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/python3/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  634|     if (!path) return 0;
#  635|   
#  636|->   logMessage(LOG_DEBUG, "override directory: %s", path);
#  637|     paths[(*index)++] = path;
#  638|     return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1190]
brltty-6.8/python3/Programs/file.c:636:3: warning[-Wanalyzer-malloc-leak]: leak of ‘primary’
brltty-6.8/python3/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/python3/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  634|     if (!path) return 0;
#  635|   
#  636|->   logMessage(LOG_DEBUG, "override directory: %s", path);
#  637|     paths[(*index)++] = path;
#  638|     return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1191]
brltty-6.8/python3/Programs/file.c:689:13: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/python3/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/python3/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  687|   
#  688|             if (!primary) {
#  689|->             logMallocError();
#  690|               goto done;
#  691|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1192]
brltty-6.8/python3/Programs/file.c:739:11: warning[-Wanalyzer-malloc-leak]: leak of ‘paths’
brltty-6.8/python3/Programs/file.c:755:1: enter_function: entry to ‘getPrimaryOverrideDirectory’
brltty-6.8/python3/Programs/file.c:756:36: call_function: calling ‘getAllOverrideDirectories’ from ‘getPrimaryOverrideDirectory’
#  737|             overrideDirectories = paths;
#  738|           } else {
#  739|->           deallocateStrings(paths);
#  740|           }
#  741|         } else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1193]
brltty-6.8/python3/Programs/file.c:999:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path,  mode)’
brltty-6.8/python3/Programs/file.c:996:16: acquire_resource: opened here
brltty-6.8/python3/Programs/file.c:998:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/file.c:999:5: branch_true: ...to here
brltty-6.8/python3/Programs/file.c:999:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/file.c:999:5: danger: ‘fopen(path,  mode)’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  997|   
#  998|     if (file) {
#  999|->     logMessage(LOG_DEBUG, "file opened: %s fd=%d", path, fileno(file));
# 1000|     } else {
# 1001|       logMessage((optional && (errno == ENOENT))? LOG_DEBUG: LOG_ERR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1194]
brltty-6.8/python3/Programs/file.c:999:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path,  mode)’
brltty-6.8/python3/Programs/file.c:996:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/file.c:998:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/file.c:999:5: branch_true: ...to here
brltty-6.8/python3/Programs/file.c:999:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/file.c:999:5: danger: ‘fopen(path,  mode)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  997|   
#  998|     if (file) {
#  999|->     logMessage(LOG_DEBUG, "file opened: %s fd=%d", path, fileno(file));
# 1000|     } else {
# 1001|       logMessage((optional && (errno == ENOENT))? LOG_DEBUG: LOG_ERR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1195]
brltty-6.8/python3/Programs/file.c:1033:11: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/python3/Programs/file.c:1076:1: enter_function: entry to ‘processLines’
brltty-6.8/python3/Programs/file.c:1090:10: call_function: calling ‘readLine’ from ‘processLines’
# 1031|   
# 1032|           if (!newBuffer) {
# 1033|->           logMallocError();
# 1034|             return 0;
# 1035|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1196]
brltty-6.8/python3/Programs/file.c:1044:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/python3/Programs/file.c:1076:1: enter_function: entry to ‘processLines’
brltty-6.8/python3/Programs/file.c:1090:10: call_function: calling ‘readLine’ from ‘processLines’
# 1042|         if (!(line = fgets(&(*buffer)[count], (*size -count), file))) {
# 1043|           if (!ferror(file)) goto done;
# 1044|->         logSystemError("fgets");
# 1045|           return 0;
# 1046|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1197]
brltty-6.8/python3/Programs/file.c:1063:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
brltty-6.8/python3/Programs/file.c:1076:1: enter_function: entry to ‘processLines’
brltty-6.8/python3/Programs/file.c:1090:10: call_function: calling ‘readLine’ from ‘processLines’
# 1061|       return 1;
# 1062|     } else if (ferror(file)) {
# 1063|->     logSystemError("fgets");
# 1064|     }
# 1065|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1198]
brltty-6.8/python3/Programs/gio.c:97:16: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:156:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:184:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:185:17: call_function: inlined call to ‘gioStartEndpoint’ from ‘gioConnectResource’
#   95|     {
#   96|       int delay = endpoint->options.readyDelay;
#   97|->     if (delay) asyncWait(delay);
#   98|     }
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1199]
brltty-6.8/python3/Programs/gio.c:157:30: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:156:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:157:30: throw: if the called function throws an exception...
brltty-6.8/python3/Programs/gio.c:157:30: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  155|   
#  156|         if (descriptor && properties->private->getOptions) {
#  157|->         endpoint->options = *properties->private->getOptions(descriptor);
#  158|         } else {
#  159|           gioInitializeOptions(&endpoint->options);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1200]
brltty-6.8/python3/Programs/gio.c:163:35: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:163:35: throw: if the called function throws an exception...
brltty-6.8/python3/Programs/gio.c:163:35: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  161|   
#  162|         if (properties->private->getHandleMethods) {
#  163|->         endpoint->handleMethods = properties->private->getHandleMethods();
#  164|         } else {
#  165|           endpoint->handleMethods = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1201]
brltty-6.8/python3/Programs/gio.c:169:33: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:162:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/gio.c:162:10: branch_false: ...to here
brltty-6.8/python3/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:169:33: throw: if the called function throws an exception...
brltty-6.8/python3/Programs/gio.c:169:33: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  167|   
#  168|         if (properties->private->connectResource) {
#  169|->         if ((endpoint->handle = properties->private->connectResource(identifier, descriptor))) {
#  170|             {
#  171|               GioGetChainedEndpointMethod *getChainedEndpoint = endpoint->handleMethods->getChainedEndpoint;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1202]
brltty-6.8/python3/Programs/gio.c:171:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:162:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/gio.c:162:10: branch_false: ...to here
brltty-6.8/python3/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:171:63: release_memory: using NULL here
brltty-6.8/python3/Programs/gio.c:171:42: danger: dereference of NULL ‘*endpoint.handleMethods’
#  169|           if ((endpoint->handle = properties->private->connectResource(identifier, descriptor))) {
#  170|             {
#  171|->             GioGetChainedEndpointMethod *getChainedEndpoint = endpoint->handleMethods->getChainedEndpoint;
#  172|   
#  173|               if (getChainedEndpoint) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1203]
brltty-6.8/python3/Programs/gio.c:174:46: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:173:16: branch_true: following ‘true’ branch (when ‘getChainedEndpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:174:46: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:174:46: throw: if the called function throws an exception...
brltty-6.8/python3/Programs/gio.c:174:46: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
#  172|   
#  173|               if (getChainedEndpoint) {
#  174|->               GioEndpoint *chainedEndpoint = getChainedEndpoint(endpoint->handle);
#  175|   
#  176|                 if (chainedEndpoint) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1204]
brltty-6.8/python3/Programs/gio.c:184:56: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:184:14: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/gio.c:184:56: branch_false: ...to here
brltty-6.8/python3/Programs/gio.c:184:56: throw: if the called function throws an exception...
brltty-6.8/python3/Programs/gio.c:184:56: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
#  182|             }
#  183|   
#  184|->           if (!properties->private->prepareEndpoint || properties->private->prepareEndpoint(endpoint)) {
#  185|               if (gioStartEndpoint(endpoint)) {
#  186|                 return endpoint;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1205]
brltty-6.8/python3/Programs/gio.c:199:9: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:162:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/gio.c:162:10: branch_false: ...to here
brltty-6.8/python3/Programs/gio.c:168:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/gio.c:199:9: branch_false: ...to here
brltty-6.8/python3/Programs/gio.c:199:9: throw: if ‘logUnsupportedOperation’ throws an exception...
brltty-6.8/python3/Programs/gio.c:199:9: danger: ‘endpoint’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
#  197|           }
#  198|         } else {
#  199|->         logUnsupportedOperation("connectResource");
#  200|         }
#  201|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1206]
brltty-6.8/python3/Programs/gio.c:224:5: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:173:16: branch_true: following ‘true’ branch (when ‘getChainedEndpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:174:46: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:176:18: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:177:17: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:178:17: call_function: calling ‘gioDisconnectResource’ from ‘gioConnectResource’
#  222|   
#  223|     if (!method) {
#  224|->     logUnsupportedOperation("disconnectResource");
#  225|       errno = ENOSYS;
#  226|     } else if (method(endpoint->handle)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1207]
brltty-6.8/python3/Programs/gio.c:226:14: warning[-Wanalyzer-malloc-leak]: leak of ‘endpoint’
brltty-6.8/python3/Programs/gio.c:136:1: enter_function: entry to ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: call_function: calling ‘gioGetProperties’ from ‘gioConnectResource’
brltty-6.8/python3/Programs/gio.c:140:37: return_function: returning to ‘gioConnectResource’ from ‘gioGetProperties’
brltty-6.8/python3/Programs/gio.c:142:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:145:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:145:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:145:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:146:7: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:162:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:163:35: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:168:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:169:33: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:169:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:171:63: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:173:16: branch_true: following ‘true’ branch (when ‘getChainedEndpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:174:46: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:176:18: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio.c:177:17: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:178:17: call_function: calling ‘gioDisconnectResource’ from ‘gioConnectResource’
#  224|       logUnsupportedOperation("disconnectResource");
#  225|       errno = ENOSYS;
#  226|->   } else if (method(endpoint->handle)) {
#  227|       ok = 1;
#  228|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1208]
brltty-6.8/python3/Programs/gio.c:413:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hio’
brltty-6.8/python3/Programs/gio.c:682:1: enter_function: entry to ‘gioNewHandleInputObject’
brltty-6.8/python3/Programs/gio.c:688:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:688:6: branch_true: following ‘true’ branch (when ‘hio’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:688:6: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:697:8: branch_true: following ‘true’ branch (when ‘endpoint’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:698:11: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:698:11: call_function: calling ‘gioMonitorInput’ from ‘gioNewHandleInputObject’
#  411|   
#  412|     if (method) {
#  413|->     if (method(endpoint->handle, callback, data)) {
#  414|         return 1;
#  415|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1209]
brltty-6.8/python3/Programs/gio.c:704:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hio’
brltty-6.8/python3/Programs/gio.c:688:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio.c:688:6: branch_true: following ‘true’ branch (when ‘hio’ is non-NULL)...
brltty-6.8/python3/Programs/gio.c:688:6: branch_true: ...to here
brltty-6.8/python3/Programs/gio.c:704:9: throw: if ‘asyncNewRelativeAlarm’ throws an exception...
brltty-6.8/python3/Programs/gio.c:704:9: danger: ‘hio’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  702|       }
#  703|   
#  704|->     if (asyncNewRelativeAlarm(&hio->pollAlarm, 0, handleInputAlarm, hio)) {
#  705|         if (asyncResetAlarmInterval(hio->pollAlarm, pollInterval)) {
#  706|           return hio;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1210]
brltty-6.8/python3/Programs/gio_bluetooth.c:143:3: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_bluetooth.c:150:1: enter_function: entry to ‘connectBluetoothResource’
brltty-6.8/python3/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_bluetooth.c:166:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio_bluetooth.c:167:11: call_function: inlined call to ‘gioIsHidSupported’ from ‘connectBluetoothResource’
brltty-6.8/python3/Programs/gio_bluetooth.c:167:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio_bluetooth.c:168:36: branch_true: ...to here
brltty-6.8/python3/Programs/gio_bluetooth.c:168:36: call_function: calling ‘getHidEndpoint’ from ‘connectBluetoothResource’
#  141|     STR_BEGIN(identifier, sizeof(identifier));
#  142|     STR_PRINTF("hid:address=");
#  143|->   STR_FORMAT(bthFormatAddress, address);
#  144|     STR_END;
#  145|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1211]
brltty-6.8/python3/Programs/gio_bluetooth.c:146:10: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_bluetooth.c:150:1: enter_function: entry to ‘connectBluetoothResource’
brltty-6.8/python3/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_bluetooth.c:166:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio_bluetooth.c:167:11: call_function: inlined call to ‘gioIsHidSupported’ from ‘connectBluetoothResource’
brltty-6.8/python3/Programs/gio_bluetooth.c:167:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio_bluetooth.c:168:36: branch_true: ...to here
brltty-6.8/python3/Programs/gio_bluetooth.c:168:36: call_function: calling ‘getHidEndpoint’ from ‘connectBluetoothResource’
#  144|     STR_END;
#  145|   
#  146|->   return gioConnectResource(identifier, descriptor);
#  147|   }
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1212]
brltty-6.8/python3/Programs/gio_bluetooth.c:160:5: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_bluetooth.c:160:5: throw: if ‘bthInitializeConnectionRequest’ throws an exception...
brltty-6.8/python3/Programs/gio_bluetooth.c:160:5: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  158|   
#  159|       BluetoothConnectionRequest request;
#  160|->     bthInitializeConnectionRequest(&request);
#  161|   
#  162|       request.driver = braille->definition.code;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1213]
brltty-6.8/python3/Programs/gio_bluetooth.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_bluetooth.c:166:9: throw: if ‘bthApplyParameters’ throws an exception...
brltty-6.8/python3/Programs/gio_bluetooth.c:166:9: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  164|       request.discover = descriptor->bluetooth.discoverChannel;
#  165|   
#  166|->     if (bthApplyParameters(&request, identifier)) {
#  167|         if (gioIsHidSupported(descriptor)) {
#  168|           GioEndpoint *hidEndpoint = getHidEndpoint(request.address, descriptor);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1214]
brltty-6.8/python3/Programs/gio_bluetooth.c:176:33: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_bluetooth.c:150:1: enter_function: entry to ‘connectBluetoothResource’
brltty-6.8/python3/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_bluetooth.c:166:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio_bluetooth.c:167:11: call_function: inlined call to ‘gioIsHidSupported’ from ‘connectBluetoothResource’
brltty-6.8/python3/Programs/gio_bluetooth.c:176:33: throw: if ‘bthOpenConnection’ throws an exception...
brltty-6.8/python3/Programs/gio_bluetooth.c:176:33: danger: ‘handle’ leaks here; was allocated at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  174|         }
#  175|   
#  176|->       if ((handle->connection = bthOpenConnection(&request))) {
#  177|           return handle;
#  178|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1215]
brltty-6.8/python3/Programs/gio_hid.c:245:9: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_hid.c:240:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_hid.c:242:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_hid.c:243:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_hid.c:245:9: throw: if ‘hidOpenDeviceWithParameters’ throws an exception...
brltty-6.8/python3/Programs/gio_hid.c:245:9: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  243|       memset(handle, 0, sizeof(*handle));
#  244|   
#  245|->     if (hidOpenDeviceWithParameters(&handle->device, identifier)) {
#  246|         if (handle->device) {
#  247|           handle->model = getHidModelEntry(

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1216]
brltty-6.8/python3/Programs/gio_internal.h:168:10: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_bluetooth.c:150:1: enter_function: entry to ‘connectBluetoothResource’
brltty-6.8/python3/Programs/gio_bluetooth.c:154:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_bluetooth.c:156:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_bluetooth.c:157:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_bluetooth.c:166:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio_bluetooth.c:167:11: call_function: inlined call to ‘gioIsHidSupported’ from ‘connectBluetoothResource’
#  166|   static inline int
#  167|   gioIsHidSupported (const GioDescriptor *descriptor) {
#  168|->   return gioProperties_hid.private->isSupported(descriptor);
#  169|   }
#  170|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1217]
brltty-6.8/python3/Programs/gio_serial.c:134:27: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_serial.c:129:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_serial.c:131:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_serial.c:132:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_serial.c:134:27: throw: if ‘serialOpenDevice’ throws an exception...
brltty-6.8/python3/Programs/gio_serial.c:134:27: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  132|       memset(handle, 0, sizeof(*handle));
#  133|   
#  134|->     if ((handle->device = serialOpenDevice(identifier))) {
#  135|         if (serialSetParameters(handle->device, descriptor->serial.parameters)) {
#  136|           handle->parameters = *descriptor->serial.parameters;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1218]
brltty-6.8/python3/Programs/gio_serial.c:135:11: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_serial.c:129:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_serial.c:131:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_serial.c:132:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_serial.c:134:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio_serial.c:135:47: branch_true: ...to here
brltty-6.8/python3/Programs/gio_serial.c:135:11: throw: if ‘serialSetParameters’ throws an exception...
brltty-6.8/python3/Programs/gio_serial.c:135:11: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  133|   
#  134|       if ((handle->device = serialOpenDevice(identifier))) {
#  135|->       if (serialSetParameters(handle->device, descriptor->serial.parameters)) {
#  136|           handle->parameters = *descriptor->serial.parameters;
#  137|           return handle;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1219]
brltty-6.8/python3/Programs/gio_serial.c:140:7: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_serial.c:129:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_serial.c:131:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_serial.c:132:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_serial.c:134:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio_serial.c:135:47: branch_true: ...to here
brltty-6.8/python3/Programs/gio_serial.c:135:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/gio_serial.c:140:7: branch_false: ...to here
brltty-6.8/python3/Programs/gio_serial.c:140:7: throw: if ‘serialCloseDevice’ throws an exception...
brltty-6.8/python3/Programs/gio_serial.c:140:7: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  138|         }
#  139|   
#  140|->       serialCloseDevice(handle->device);
#  141|       }
#  142|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1220]
brltty-6.8/python3/Programs/gio_usb.c:330:28: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_usb.c:325:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_usb.c:327:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_usb.c:328:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_usb.c:330:28: throw: if ‘usbOpenChannel’ throws an exception...
brltty-6.8/python3/Programs/gio_usb.c:330:28: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  328|       memset(handle, 0, sizeof(*handle));
#  329|   
#  330|->     if ((handle->channel = usbOpenChannel(descriptor->usb.channelDefinitions, identifier))) {
#  331|         const UsbChannel *channel = handle->channel;
#  332|         const UsbChannelDefinition *definition = channel->definition;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1221]
brltty-6.8/python3/Programs/gio_usb.c:345:21: warning[-Wanalyzer-malloc-leak]: leak of ‘handle’
brltty-6.8/python3/Programs/gio_usb.c:325:23: acquire_memory: allocated here
brltty-6.8/python3/Programs/gio_usb.c:327:6: branch_true: following ‘true’ branch (when ‘handle’ is non-NULL)...
brltty-6.8/python3/Programs/gio_usb.c:328:5: branch_true: ...to here
brltty-6.8/python3/Programs/gio_usb.c:330:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/gio_usb.c:332:35: branch_true: ...to here
brltty-6.8/python3/Programs/gio_usb.c:345:12: branch_true: following ‘true’ branch (when ‘method’ is non-NULL)...
brltty-6.8/python3/Programs/gio_usb.c:345:21: branch_true: ...to here
brltty-6.8/python3/Programs/gio_usb.c:345:21: throw: if the called function throws an exception...
brltty-6.8/python3/Programs/gio_usb.c:345:21: danger: ‘handle’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  343|           GioUsbSetConnectionPropertiesMethod *method = descriptor->usb.setConnectionProperties;
#  344|   
#  345|->         if (method) method(properties, definition);
#  346|         }
#  347|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1222]
brltty-6.8/python3/Programs/hid.c:236:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/python3/Programs/hid.c:211:1: enter_function: entry to ‘hidSetFilterIdentifiers’
brltty-6.8/python3/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/python3/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:237:12: call_function: calling ‘hidParseDeviceIdentifier’ from ‘hidSetFilterIdentifiers’
brltty-6.8/python3/Programs/hid.c:237:12: return_function: returning to ‘hidSetFilterIdentifiers’ from ‘hidParseDeviceIdentifier’
brltty-6.8/python3/Programs/hid.c:237:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/hid.c:243:5: branch_false: ...to here
brltty-6.8/python3/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/python3/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:237:12: call_function: calling ‘hidParseDeviceIdentifier’ from ‘hidSetFilterIdentifiers’
brltty-6.8/python3/Programs/hid.c:237:12: return_function: returning to ‘hidSetFilterIdentifiers’ from ‘hidParseDeviceIdentifier’
brltty-6.8/python3/Programs/hid.c:237:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/hid.c:243:5: branch_false: ...to here
brltty-6.8/python3/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/python3/Programs/hid.c:236:9: danger: out-of-bounds read from byte 56 till byte 63 but ‘identifierTable’ ends at byte 48
#  234|   
#  235|     while (cur < end) {
#  236|->     if (cur->operand && *cur->operand) {
#  237|         if (!hidParseDeviceIdentifier(cur->identifier, cur->operand)) {
#  238|           logMessage(LOG_ERR, "invalid %s identifier: %s", cur->name, cur->operand);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1223]
brltty-6.8/python3/Programs/hid.c:237:37: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
brltty-6.8/python3/Programs/hid.c:211:1: enter_function: entry to ‘hidSetFilterIdentifiers’
brltty-6.8/python3/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/python3/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:237:12: call_function: calling ‘hidParseDeviceIdentifier’ from ‘hidSetFilterIdentifiers’
brltty-6.8/python3/Programs/hid.c:237:12: return_function: returning to ‘hidSetFilterIdentifiers’ from ‘hidParseDeviceIdentifier’
brltty-6.8/python3/Programs/hid.c:237:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/hid.c:243:5: branch_false: ...to here
brltty-6.8/python3/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/python3/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:237:12: call_function: calling ‘hidParseDeviceIdentifier’ from ‘hidSetFilterIdentifiers’
brltty-6.8/python3/Programs/hid.c:237:12: return_function: returning to ‘hidSetFilterIdentifiers’ from ‘hidParseDeviceIdentifier’
brltty-6.8/python3/Programs/hid.c:237:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/hid.c:243:5: branch_false: ...to here
brltty-6.8/python3/Programs/hid.c:235:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:236:9: branch_true: ...to here
brltty-6.8/python3/Programs/hid.c:236:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/hid.c:237:37: danger: out-of-bounds read from byte 64 till byte 71 but ‘identifierTable’ ends at byte 48
#  235|     while (cur < end) {
#  236|       if (cur->operand && *cur->operand) {
#  237|->       if (!hidParseDeviceIdentifier(cur->identifier, cur->operand)) {
#  238|           logMessage(LOG_ERR, "invalid %s identifier: %s", cur->name, cur->operand);
#  239|           return 0;

Error: CPPCHECK_WARNING (CWE-401): [#def1224]
brltty-6.8/python3/Programs/hid_linux.c:92: error[memleak]: Memory leak: items
#   90|           items->count = size;
#   91|           memcpy(items->bytes, descriptor.value, size);
#   92|->         return (handle->hidItems = items);
#   93|         } else {
#   94|           logMallocError();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1225]
brltty-6.8/python3/Programs/ihex.c:161:8: warning[-Wanalyzer-malloc-leak]: leak of ‘ihexParseRecord(rpd)’
brltty-6.8/python3/Programs/ihex.c:300:1: enter_function: entry to ‘ihexProcessLine’
brltty-6.8/python3/Programs/ihex.c:307:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/ihex.c:308:6: branch_false: ...to here
brltty-6.8/python3/Programs/ihex.c:308:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/ihex.c:310:3: branch_false: ...to here
brltty-6.8/python3/Programs/ihex.c:311:30: call_function: calling ‘ihexParseRecord’ from ‘ihexProcessLine’
brltty-6.8/python3/Programs/ihex.c:311:30: return_function: returning to ‘ihexProcessLine’ from ‘ihexParseRecord’
brltty-6.8/python3/Programs/ihex.c:314:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ihex.c:315:9: branch_true: ...to here
brltty-6.8/python3/Programs/ihex.c:315:9: call_function: calling ‘ihexCallHandler’ from ‘ihexProcessLine’
#  159|     const char *character = rpd->record;
#  160|   
#  161|->   if (!*character || (*character != IHEX_RECORD_PREFIX)) {
#  162|       ihexReportProblem(rpd, "not an ihex record");
#  163|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1226]
brltty-6.8/python3/Programs/kbd.c:158:9: warning[-Wanalyzer-malloc-leak]: leak of ‘kio’
brltty-6.8/python3/Programs/kbd.c:145:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/kbd.c:145:6: branch_true: following ‘true’ branch (when ‘kio’ is non-NULL)...
brltty-6.8/python3/Programs/kbd.c:146:5: branch_true: ...to here
brltty-6.8/python3/Programs/kbd.c:158:9: throw: if ‘newKeyboardInstanceExtension’ throws an exception...
brltty-6.8/python3/Programs/kbd.c:158:9: danger: ‘kio’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  156|       kio->deferred.size = count;
#  157|   
#  158|->     if (newKeyboardInstanceExtension(&kio->kix)) {
#  159|         if (enqueueItem(kmo->instanceQueue, kio)) {
#  160|           return kio;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1227]
brltty-6.8/python3/Programs/kbd.c:210:9: warning[-Wanalyzer-malloc-leak]: leak of ‘kmo’
brltty-6.8/python3/Programs/kbd.c:204:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/kbd.c:204:6: branch_true: following ‘true’ branch (when ‘kmo’ is non-NULL)...
brltty-6.8/python3/Programs/kbd.c:205:5: branch_true: ...to here
brltty-6.8/python3/Programs/kbd.c:210:9: throw: if ‘newKeyboardMonitorExtension’ throws an exception...
brltty-6.8/python3/Programs/kbd.c:210:9: danger: ‘kmo’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  208|       kmo->handleKeyEvent = handleKeyEvent;
#  209|   
#  210|->     if (newKeyboardMonitorExtension(&kmo->kmx)) {
#  211|         if ((kmo->instanceQueue = newQueue(NULL, NULL))) {
#  212|           if (monitorKeyboards(kmo)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1228]
brltty-6.8/python3/Programs/kbd_linux.c:647:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*kio_94(D)->kix.device.path, 0)’
brltty-6.8/python3/Programs/kbd_linux.c:647:36: acquire_resource: opened here
brltty-6.8/python3/Programs/kbd_linux.c:647:6: danger: ‘open(*kio_94(D)->kix.device.path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  645|     const char *deviceName = locatePathName(kio->kix->device.path);
#  646|   
#  647|->   if ((kio->kix->file.descriptor = open(kio->kix->device.path, O_RDONLY)) != -1) {
#  648|       struct stat status;
#  649|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1229]
brltty-6.8/python3/Programs/kbd_linux.c:775:21: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/dev/input")’
brltty-6.8/python3/Programs/kbd_linux.c:772:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/kbd_linux.c:772:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/kbd_linux.c:772:6: branch_true: ...to here
brltty-6.8/python3/Programs/kbd_linux.c:775:21: throw: if ‘readdir’ throws an exception...
brltty-6.8/python3/Programs/kbd_linux.c:775:21: danger: ‘opendir("/dev/input")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  773|       struct dirent *entry;
#  774|   
#  775|->     while ((entry = readdir(directory))) {
#  776|         KeyboardInstanceObject *kio;
#  777|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1230]
brltty-6.8/python3/Programs/kbd_linux.c:830:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(__builtin_alloca_with_align(strlen(device) + 9, 8), 0)’
brltty-6.8/python3/Programs/kbd_linux.c:820:21: acquire_resource: opened here
brltty-6.8/python3/Programs/kbd_linux.c:820:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/kbd_linux.c:824:19: branch_true: ...to here
brltty-6.8/python3/Programs/kbd_linux.c:824:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/kbd_linux.c:824:8: branch_false: ...to here
brltty-6.8/python3/Programs/kbd_linux.c:830:5: danger: ‘open(__builtin_alloca_with_align(strlen(device) + 9, 8), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  828|       }
#  829|   
#  830|->     close(descriptor);
#  831|     } else {
#  832|       logMessage(LOG_DEBUG, "cannot open sysfs dev file: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1231]
brltty-6.8/python3/Programs/ktb_compile.c:171:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ktd.table’
brltty-6.8/python3/Programs/ktb_compile.c:1816:1: enter_function: entry to ‘compileKeyTable’
brltty-6.8/python3/Programs/ktb_compile.c:1819:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ktb_compile.c:1822:5: branch_true: ...to here
brltty-6.8/python3/Programs/ktb_compile.c:1832:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/ktb_compile.c:1832:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ktb_compile.c:1833:7: branch_true: ...to here
brltty-6.8/python3/Programs/ktb_compile.c:1866:11: call_function: calling ‘defineInitialKeyContexts’ from ‘compileKeyTable’
#  169|   
#  170|       if (!newTable) {
#  171|->       logMallocError();
#  172|         return NULL;
#  173|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1232]
brltty-6.8/python3/Programs/ktb_compile.c:203:10: warning[-Wanalyzer-malloc-leak]: leak of ‘newTable’
brltty-6.8/python3/Programs/ktb_compile.c:1115:8: enter_function: entry to ‘processContextOperands’
brltty-6.8/python3/Programs/ktb_compile.c:1121:25: call_function: inlined call to ‘getCurrentKeyContext’ from ‘processContextOperands’
#  201|     }
#  202|   
#  203|->   return &ktd->table->keyContexts.table[context];
#  204|   }
#  205|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1233]
brltty-6.8/python3/Programs/ktb_compile.c:216:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ktd.table’
brltty-6.8/python3/Programs/ktb_compile.c:1816:1: enter_function: entry to ‘compileKeyTable’
brltty-6.8/python3/Programs/ktb_compile.c:1819:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ktb_compile.c:1822:5: branch_true: ...to here
brltty-6.8/python3/Programs/ktb_compile.c:1832:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/ktb_compile.c:1832:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ktb_compile.c:1833:7: branch_true: ...to here
brltty-6.8/python3/Programs/ktb_compile.c:1866:11: call_function: calling ‘defineInitialKeyContexts’ from ‘compileKeyTable’
#  214|   
#  215|     if (!(*string = malloc(ARRAY_SIZE(*string, length+1)))) {
#  216|->     logMallocError();
#  217|       return 0;
#  218|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1234]
brltty-6.8/python3/Programs/menu.c:182:5: warning[-Wanalyzer-malloc-leak]: leak of ‘submenu’
brltty-6.8/python3/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:963:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
#  180|       return menu;
#  181|     } else {
#  182|->     logMallocError();
#  183|     }
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1235]
brltty-6.8/python3/Programs/menu.c:190:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘item’
brltty-6.8/python3/Programs/menu.c:1164:1: enter_function: entry to ‘getCurrentMenuItem’
brltty-6.8/python3/Programs/menu.c:1165:23: call_function: inlined call to ‘getSelectedMenuItem’ from ‘getCurrentMenuItem’
brltty-6.8/python3/Programs/menu.c:1165:23: call_function: inlined call to ‘getSelectedMenuItem’ from ‘getCurrentMenuItem’
brltty-6.8/python3/Programs/menu.c:1168:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:1169:8: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:1169:8: branch_true: following ‘true’ branch (when ‘oldItem’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:1169:18: call_function: inlined call to ‘endMenuItem’ from ‘getCurrentMenuItem’
brltty-6.8/python3/Programs/menu.c:1170:24: call_function: calling ‘beginMenuItem’ from ‘getCurrentMenuItem’
#  188|   static int
#  189|   beginMenuItem (MenuItem *item) {
#  190|->   return !item->methods->beginItem || item->methods->beginItem(item);
#  191|   }
#  192|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1236]
brltty-6.8/python3/Programs/menu.c:195:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/python3/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:966:26: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenu’
brltty-6.8/python3/Programs/menu.c:966:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:970:20: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:970:20: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:970:20: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenuItem’
brltty-6.8/python3/Programs/menu.c:970:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:973:21: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:973:21: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:973:21: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenuItem’
brltty-6.8/python3/Programs/menu.c:973:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/menu.c:992:7: branch_false: ...to here
brltty-6.8/python3/Programs/menu.c:992:7: call_function: calling ‘destroyMenu’ from ‘newSubmenuMenuItem’
#  193|   static void
#  194|   endMenuItem (MenuItem *item, int deallocating) {
#  195|->   if (item->methods->endItem) item->methods->endItem(item, deallocating);
#  196|   }
#  197|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1237]
brltty-6.8/python3/Programs/menu.c:288:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘item’
brltty-6.8/python3/Programs/menu.c:947:1: enter_function: entry to ‘getComment_close’
brltty-6.8/python3/Programs/menu.c:948:27: call_function: calling ‘getParentMenuItem’ from ‘getComment_close’
brltty-6.8/python3/Programs/menu.c:948:27: return_function: returning to ‘getComment_close’ from ‘getParentMenuItem’
brltty-6.8/python3/Programs/menu.c:948:10: call_function: calling ‘getMenuItemTitle’ from ‘getComment_close’
#  286|   const char *
#  287|   getMenuItemTitle (const MenuItem *item) {
#  288|->   return getLocalizedText(item->title);
#  289|   }
#  290|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1238]
brltty-6.8/python3/Programs/menu.c:313:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newMenuItem(newMenu(), 0, &closeName)’
brltty-6.8/python3/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:966:26: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenu’
brltty-6.8/python3/Programs/menu.c:966:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:970:20: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:970:20: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:970:20: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenuItem’
brltty-6.8/python3/Programs/menu.c:970:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:973:21: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:973:21: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
#  311|   static MenuItem *
#  312|   newMenuItem (Menu *menu, unsigned char *setting, const MenuString *name) {
#  313|->   if (menu->items.count == menu->items.size) {
#  314|       unsigned int newSize = menu->items.size? (menu->items.size << 1): 0X10;
#  315|       MenuItem *newArray = realloc(menu->items.array, (newSize * sizeof(*newArray)));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1239]
brltty-6.8/python3/Programs/menu.c:318:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:966:26: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenu’
brltty-6.8/python3/Programs/menu.c:966:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:970:20: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:970:20: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
#  316|   
#  317|       if (!newArray) {
#  318|->       logMallocError();
#  319|         return NULL;
#  320|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1240]
brltty-6.8/python3/Programs/menu.c:318:7: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/python3/Programs/menu.c:701:1: enter_function: entry to ‘newFilesMenuItem’
brltty-6.8/python3/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:724:14: branch_true: following ‘true’ branch (when ‘subdirectory’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:725:32: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:730:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:731:30: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:731:30: call_function: calling ‘newMenuItem’ from ‘newFilesMenuItem’
#  316|   
#  317|       if (!newArray) {
#  318|->       logMallocError();
#  319|         return NULL;
#  320|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1241]
brltty-6.8/python3/Programs/menu.c:318:7: warning[-Wanalyzer-malloc-leak]: leak of ‘submenu’
brltty-6.8/python3/Programs/menu.c:958:1: enter_function: entry to ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:963:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:963:6: branch_true: following ‘true’ branch (when ‘submenu’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:964:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:966:26: call_function: calling ‘newMenu’ from ‘newSubmenuMenuItem’
brltty-6.8/python3/Programs/menu.c:966:26: return_function: returning to ‘newSubmenuMenuItem’ from ‘newMenu’
brltty-6.8/python3/Programs/menu.c:966:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:970:20: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:970:20: call_function: calling ‘newMenuItem’ from ‘newSubmenuMenuItem’
#  316|   
#  317|       if (!newArray) {
#  318|->       logMallocError();
#  319|         return NULL;
#  320|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1242]
brltty-6.8/python3/Programs/menu.c:329:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/python3/Programs/menu.c:312:1: enter_function: entry to ‘newMenuItem’
brltty-6.8/python3/Programs/menu.c:327:22: call_function: calling ‘getMenuItem’ from ‘newMenuItem’
brltty-6.8/python3/Programs/menu.c:327:22: return_function: returning to ‘newMenuItem’ from ‘getMenuItem’
brltty-6.8/python3/Programs/menu.c:329:5: danger: dereference of NULL ‘getMenuItem(menu, *menu.items.count)’
#  327|       MenuItem *item = getMenuItem(menu, menu->items.count++);
#  328|   
#  329|->     item->menu = menu;
#  330|       item->setting = setting;
#  331|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1243]
brltty-6.8/python3/Programs/menu.c:542:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".", 0)’
brltty-6.8/python3/Programs/menu.c:533:29: acquire_resource: opened here
brltty-6.8/python3/Programs/menu.c:535:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:542:17: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:542:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/menu.c:588:88: branch_false: ...to here
brltty-6.8/python3/Programs/menu.c:587:9: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/menu.c:542:17: danger: ‘open(".", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  540|   #endif /* HAVE_FCHDIR */
#  541|       {
#  542|->       if (chdir(files->directory) != -1) {
#  543|   #if defined(HAVE_GLOB)
#  544|           memset(&files->glob, 0, sizeof(files->glob));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1244]
brltty-6.8/python3/Programs/menu.c:716:17: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/python3/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:716:17: throw: if ‘joinStrings’ throws an exception...
brltty-6.8/python3/Programs/menu.c:716:17: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  714|       {
#  715|         const char *strings[] = {"*", extension};
#  716|->       pattern = joinStrings(strings, ARRAY_COUNT(strings));
#  717|       }
#  718|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1245]
brltty-6.8/python3/Programs/menu.c:722:39: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/python3/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:722:39: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:39: throw: if ‘ensureFileExtension’ throws an exception...
brltty-6.8/python3/Programs/menu.c:722:39: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  720|         files->pattern = pattern; 
#  721|   
#  722|->       if ((files->initial = *initial? ensureFileExtension(initial, extension): strdup(""))) {
#  723|           if ((files->current = strdup(files->initial))) {
#  724|             if (subdirectory) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1246]
brltty-6.8/python3/Programs/menu.c:725:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:723:31: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:724:14: branch_true: following ‘true’ branch (when ‘subdirectory’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:725:32: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:725:32: throw: if ‘makePath’ throws an exception...
brltty-6.8/python3/Programs/menu.c:725:32: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  723|           if ((files->current = strdup(files->initial))) {
#  724|             if (subdirectory) {
#  725|->             files->directory = makePath(directory, subdirectory);
#  726|             } else if (!(files->directory = strdup(directory))) {
#  727|               logMallocError();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1247]
brltty-6.8/python3/Programs/menu.c:725:32: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/python3/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:724:14: branch_true: following ‘true’ branch (when ‘subdirectory’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:725:32: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:725:32: throw: if ‘makePath’ throws an exception...
brltty-6.8/python3/Programs/menu.c:725:32: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  723|           if ((files->current = strdup(files->initial))) {
#  724|             if (subdirectory) {
#  725|->             files->directory = makePath(directory, subdirectory);
#  726|             } else if (!(files->directory = strdup(directory))) {
#  727|               logMallocError();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1248]
brltty-6.8/python3/Programs/menu.c:727:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:723:31: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:724:14: branch_false: following ‘false’ branch (when ‘subdirectory’ is NULL)...
brltty-6.8/python3/Programs/menu.c:726:43: branch_false: ...to here
brltty-6.8/python3/Programs/menu.c:726:21: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:727:13: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:727:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/menu.c:727:13: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  725|               files->directory = makePath(directory, subdirectory);
#  726|             } else if (!(files->directory = strdup(directory))) {
#  727|->             logMallocError();
#  728|             }
#  729|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1249]
brltty-6.8/python3/Programs/menu.c:727:13: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/python3/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:723:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:724:14: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:724:14: branch_false: following ‘false’ branch (when ‘subdirectory’ is NULL)...
brltty-6.8/python3/Programs/menu.c:726:43: branch_false: ...to here
brltty-6.8/python3/Programs/menu.c:726:21: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:727:13: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:727:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/menu.c:727:13: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  725|               files->directory = makePath(directory, subdirectory);
#  726|             } else if (!(files->directory = strdup(directory))) {
#  727|->             logMallocError();
#  728|             }
#  729|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1250]
brltty-6.8/python3/Programs/menu.c:744:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:29: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/menu.c:722:80: branch_false: ...to here
brltty-6.8/python3/Programs/menu.c:722:80: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:722:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:723:31: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:723:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/menu.c:744:11: branch_false: ...to here
brltty-6.8/python3/Programs/menu.c:744:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/menu.c:744:11: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
#  742|             free(files->current);
#  743|           } else {
#  744|->           logMallocError();
#  745|           }
#  746|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1251]
brltty-6.8/python3/Programs/menu.c:744:11: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/python3/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:723:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/menu.c:744:11: branch_false: ...to here
brltty-6.8/python3/Programs/menu.c:744:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/menu.c:744:11: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  742|             free(files->current);
#  743|           } else {
#  744|->           logMallocError();
#  745|           }
#  746|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1252]
brltty-6.8/python3/Programs/menu.c:749:9: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/python3/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:720:7: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:29: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/menu.c:722:39: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:722:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/menu.c:749:9: branch_false: ...to here
brltty-6.8/python3/Programs/menu.c:749:9: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/menu.c:749:9: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  747|           free(files->initial);
#  748|         } else {
#  749|->         logMallocError();
#  750|         }
#  751|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1253]
brltty-6.8/python3/Programs/menu.c:754:7: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
brltty-6.8/python3/Programs/menu.c:708:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/menu.c:708:6: branch_true: following ‘true’ branch (when ‘files’ is non-NULL)...
brltty-6.8/python3/Programs/menu.c:709:5: branch_true: ...to here
brltty-6.8/python3/Programs/menu.c:719:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/menu.c:754:7: branch_false: ...to here
brltty-6.8/python3/Programs/menu.c:754:7: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/menu.c:754:7: danger: ‘files’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  752|         free(pattern);
#  753|       } else {
#  754|->       logMallocError();
#  755|       }
#  756|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1254]
brltty-6.8/python3/Programs/menu.c:1075:8: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/python3/Programs/menu.c:1142:1: enter_function: entry to ‘changeMenuSettingScaled’
brltty-6.8/python3/Programs/menu.c:1143:20: call_function: calling ‘getCurrentMenuItem’ from ‘changeMenuSettingScaled’
brltty-6.8/python3/Programs/menu.c:1143:20: return_function: returning to ‘changeMenuSettingScaled’ from ‘getCurrentMenuItem’
brltty-6.8/python3/Programs/menu.c:1145:7: call_function: inlined call to ‘activateMenuItem’ from ‘changeMenuSettingScaled’
# 1073|   static int
# 1074|   activateMenuItem (MenuItem *item) {
# 1075|->   if (!item->methods->activateItem) return 0;
# 1076|     item->methods->activateItem(item);
# 1077|     return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1255]
brltty-6.8/python3/Programs/menu.c:1181:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brltty-6.8/python3/Programs/menu.c:1177:1: enter_function: entry to ‘getCurrentSubmenu’
brltty-6.8/python3/Programs/menu.c:1179:22: call_function: calling ‘getCurrentMenuItem’ from ‘getCurrentSubmenu’
brltty-6.8/python3/Programs/menu.c:1179:22: return_function: returning to ‘getCurrentSubmenu’ from ‘getCurrentMenuItem’
brltty-6.8/python3/Programs/menu.c:1181:9: danger: dereference of NULL ‘getCurrentMenuItem(menu)’
# 1179|       MenuItem *item = getCurrentMenuItem(menu);
# 1180|   
# 1181|->     if (item->methods != &menuItemMethods_submenu) break;
# 1182|       if (!item->data.submenu->opened) break;
# 1183|       menu = item->data.submenu->menu;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1256]
brltty-6.8/python3/Programs/message.c:307:7: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/python3/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/python3/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/python3/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  305|   sayMessage (const char *text) {
#  306|   #ifdef ENABLE_SPEECH_SUPPORT
#  307|->   if (isAutospeakActive()) {
#  308|       if (!sayString(&spk, text, SAY_OPT_MUTE_FIRST)) {
#  309|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1257]
brltty-6.8/python3/Programs/message.c:308:10: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/python3/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/python3/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/python3/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  306|   #ifdef ENABLE_SPEECH_SUPPORT
#  307|     if (isAutospeakActive()) {
#  308|->     if (!sayString(&spk, text, SAY_OPT_MUTE_FIRST)) {
#  309|         return 0;
#  310|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1258]
brltty-6.8/python3/Programs/message.c:376:5: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/python3/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/python3/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/python3/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  374|       int cellCount = cellsSize;
#  375|   
#  376|->     contractText(
#  377|         contractionTable, NULL,
#  378|         text, &textCount,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1259]
brltty-6.8/python3/Programs/message.c:423:7: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/python3/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/python3/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/python3/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  421|     }
#  422|   
#  423|->   if (canBraille()) {
#  424|       MessageData mgd = {
#  425|         .parameters = mgp,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1260]
brltty-6.8/python3/Programs/message.c:430:17: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/python3/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/python3/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/python3/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  428|   
#  429|         .clipboard = {
#  430|->         .main = getMainClipboard(),
#  431|           .start = NULL,
#  432|           .offset = 0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1261]
brltty-6.8/python3/Programs/message.c:436:31: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/python3/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/python3/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/python3/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  434|       };
#  435|   
#  436|->     const size_t textLength = countUtf8Characters(mgp->text);
#  437|       wchar_t text[textLength + 1];
#  438|       makeWcharsFromUtf8(mgp->text, text, ARRAY_COUNT(text));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1262]
brltty-6.8/python3/Programs/message.c:438:5: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/python3/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/python3/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/python3/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  436|       const size_t textLength = countUtf8Characters(mgp->text);
#  437|       wchar_t text[textLength + 1];
#  438|->     makeWcharsFromUtf8(mgp->text, text, ARRAY_COUNT(text));
#  439|   
#  440|       mgd.braille.message = text;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1263]
brltty-6.8/python3/Programs/message.c:448:9: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/python3/Programs/message.c:525:1: enter_function: entry to ‘message’
brltty-6.8/python3/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/python3/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:539:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/message.c:540:7: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:541:7: call_function: calling ‘presentMessage’ from ‘message’
#  446|       int wordWrap = prefs.wordWrap;
#  447|   
#  448|->     if (isContracting()) {
#  449|         size_t brailleLength;
#  450|         int *offsetMap;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1264]
brltty-6.8/python3/Programs/message.c:466:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*mgd.segments.first.start’
brltty-6.8/python3/Programs/message.c:416:1: enter_function: entry to ‘presentMessage’
brltty-6.8/python3/Programs/message.c:423:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/message.c:423:21: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:448:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/message.c:463:20: branch_false: ...to here
brltty-6.8/python3/Programs/message.c:465:25: call_function: calling ‘makeSegments’ from ‘presentMessage’
brltty-6.8/python3/Programs/message.c:465:25: return_function: returning to ‘presentMessage’ from ‘makeSegments’
brltty-6.8/python3/Programs/message.c:466:27: danger: use of uninitialized value ‘*mgd.segments.first.start’ here
#  464|       mgd.segments.current = mgd.segments.first = messageSegments;
#  465|       mgd.segments.last = makeSegments(messageSegments, characters, characterCount, wordWrap);
#  466|->     mgd.clipboard.start = mgd.segments.first->start;
#  467|   
#  468|       int apiWasLinked = api.isServerLinked();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1265]
brltty-6.8/python3/Programs/message.c:545:11: warning[-Wanalyzer-malloc-leak]: leak of ‘mgp’
brltty-6.8/python3/Programs/message.c:532:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/message.c:532:6: branch_true: following ‘true’ branch (when ‘mgp’ is non-NULL)...
brltty-6.8/python3/Programs/message.c:533:5: branch_true: ...to here
brltty-6.8/python3/Programs/message.c:539:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/message.c:544:7: branch_false: ...to here
brltty-6.8/python3/Programs/message.c:545:11: throw: if ‘asyncAddTask’ throws an exception...
brltty-6.8/python3/Programs/message.c:545:11: danger: ‘mgp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  543|       } else {
#  544|         mgp->deallocate = 1;
#  545|->       if (asyncAddTask(NULL, presentMessage, mgp)) return 1;
#  546|       }
#  547|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1266]
brltty-6.8/python3/Programs/messages.c:545:3: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
brltty-6.8/python3/Programs/messages.c:610:1: enter_function: entry to ‘setMessagesDirectory’
brltty-6.8/python3/Programs/messages.c:611:10: call_function: calling ‘updateProperty’ from ‘setMessagesDirectory’
#  543|   setDirectory (const char *directory) {
#  544|     if (bindtextdomain(domainName, directory)) return 1;
#  545|->   logSystemError("bindtextdomain");
#  546|     return 0;
#  547|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1267]
brltty-6.8/python3/Programs/messages.c:552:5: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
brltty-6.8/python3/Programs/messages.c:620:1: enter_function: entry to ‘setMessagesDomain’
brltty-6.8/python3/Programs/messages.c:621:10: call_function: calling ‘updateProperty’ from ‘setMessagesDomain’
#  550|   setDomain (const char *domain) {
#  551|     if (!textdomain(domain)) {
#  552|->     logSystemError("textdomain");
#  553|       return 0;
#  554|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1268]
brltty-6.8/python3/Programs/messages.c:557:5: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
brltty-6.8/python3/Programs/messages.c:620:1: enter_function: entry to ‘setMessagesDomain’
brltty-6.8/python3/Programs/messages.c:621:10: call_function: calling ‘updateProperty’ from ‘setMessagesDomain’
#  555|   
#  556|     if (!bind_textdomain_codeset(domain, "UTF-8")) {
#  557|->     logSystemError("bind_textdomain_codeset");
#  558|     }
#  559|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1269]
brltty-6.8/python3/Programs/messages.c:595:20: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
brltty-6.8/python3/Programs/messages.c:592:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/messages.c:594:6: branch_true: following ‘true’ branch (when ‘copy’ is non-NULL)...
brltty-6.8/python3/Programs/messages.c:595:8: branch_true: ...to here
brltty-6.8/python3/Programs/messages.c:595:8: branch_false: following ‘false’ branch (when ‘setter’ is non-NULL)...
brltty-6.8/python3/Programs/messages.c:595:20: branch_false: ...to here
brltty-6.8/python3/Programs/messages.c:595:20: throw: if the called function throws an exception...
brltty-6.8/python3/Programs/messages.c:595:20: danger: ‘copy’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  593|   
#  594|     if (copy) {
#  595|->     if (!setter || setter(value)) {
#  596|         if (*property) free(*property);
#  597|         *property = copy;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1270]
brltty-6.8/python3/Programs/midi_alsa.c:44:5: warning[-Wanalyzer-malloc-leak]: leak of ‘clientInformation’
brltty-6.8/python3/Programs/midi_alsa.c:41:46: acquire_memory: allocated here
brltty-6.8/python3/Programs/midi_alsa.c:43:6: branch_true: following ‘true’ branch (when ‘clientInformation’ is non-NULL)...
brltty-6.8/python3/Programs/midi_alsa.c:44:5: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:44:5: throw: if ‘snd_seq_client_info_sizeof’ throws an exception...
brltty-6.8/python3/Programs/midi_alsa.c:44:5: danger: ‘clientInformation’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   42|   
#   43|     if (clientInformation) {
#   44|->     memset(clientInformation, 0, snd_seq_client_info_sizeof());
#   45|       snd_seq_client_info_set_client(clientInformation, -1);
#   46|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1271]
brltty-6.8/python3/Programs/midi_alsa.c:45:5: warning[-Wanalyzer-malloc-leak]: leak of ‘clientInformation’
brltty-6.8/python3/Programs/midi_alsa.c:41:46: acquire_memory: allocated here
brltty-6.8/python3/Programs/midi_alsa.c:43:6: branch_true: following ‘true’ branch (when ‘clientInformation’ is non-NULL)...
brltty-6.8/python3/Programs/midi_alsa.c:44:5: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:45:5: throw: if ‘snd_seq_client_info_set_client’ throws an exception...
brltty-6.8/python3/Programs/midi_alsa.c:45:5: danger: ‘clientInformation’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   43|     if (clientInformation) {
#   44|       memset(clientInformation, 0, snd_seq_client_info_sizeof());
#   45|->     snd_seq_client_info_set_client(clientInformation, -1);
#   46|   
#   47|       while (snd_seq_query_next_client(midi->sequencer, clientInformation) >= 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1272]
brltty-6.8/python3/Programs/midi_alsa.c:52:9: warning[-Wanalyzer-malloc-leak]: leak of ‘portInformation’
brltty-6.8/python3/Programs/midi_alsa.c:43:6: branch_true: following ‘true’ branch (when ‘clientInformation’ is non-NULL)...
brltty-6.8/python3/Programs/midi_alsa.c:44:5: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:47:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:48:30: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:49:46: acquire_memory: allocated here
brltty-6.8/python3/Programs/midi_alsa.c:52:9: throw: if ‘snd_seq_port_info_sizeof’ throws an exception...
brltty-6.8/python3/Programs/midi_alsa.c:52:9: danger: ‘portInformation’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   50|   
#   51|         if (portInformation) {
#   52|->         memset(portInformation, 0, snd_seq_port_info_sizeof());
#   53|           snd_seq_port_info_set_client(portInformation, clientIdentifier);
#   54|           snd_seq_port_info_set_port(portInformation, -1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1273]
brltty-6.8/python3/Programs/midi_alsa.c:53:9: warning[-Wanalyzer-malloc-leak]: leak of ‘portInformation’
brltty-6.8/python3/Programs/midi_alsa.c:43:6: branch_true: following ‘true’ branch (when ‘clientInformation’ is non-NULL)...
brltty-6.8/python3/Programs/midi_alsa.c:44:5: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:47:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:48:30: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:49:46: acquire_memory: allocated here
brltty-6.8/python3/Programs/midi_alsa.c:53:9: throw: if ‘snd_seq_port_info_set_client’ throws an exception...
brltty-6.8/python3/Programs/midi_alsa.c:53:9: danger: ‘portInformation’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#   51|         if (portInformation) {
#   52|           memset(portInformation, 0, snd_seq_port_info_sizeof());
#   53|->         snd_seq_port_info_set_client(portInformation, clientIdentifier);
#   54|           snd_seq_port_info_set_port(portInformation, -1);
#   55|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1274]
brltty-6.8/python3/Programs/midi_alsa.c:113:15: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
brltty-6.8/python3/Programs/midi_alsa.c:94:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:97:9: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:97:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:100:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:103:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:107:15: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:107:14: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:110:43: branch_false: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:110:43: acquire_memory: allocated here
brltty-6.8/python3/Programs/midi_alsa.c:112:16: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
brltty-6.8/python3/Programs/midi_alsa.c:113:15: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:113:15: throw: if ‘snd_seq_client_info_sizeof’ throws an exception...
brltty-6.8/python3/Programs/midi_alsa.c:113:15: danger: ‘info’ leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  111|   
#  112|               if (info) {
#  113|->               memset(info, 0, snd_seq_client_info_sizeof());
#  114|                 snd_seq_client_info_set_client(info, -1);
#  115|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1275]
brltty-6.8/python3/Programs/midi_alsa.c:114:15: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
brltty-6.8/python3/Programs/midi_alsa.c:94:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:97:9: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:97:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:100:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:103:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:107:15: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:107:14: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:110:43: branch_false: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:110:43: acquire_memory: allocated here
brltty-6.8/python3/Programs/midi_alsa.c:112:16: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
brltty-6.8/python3/Programs/midi_alsa.c:113:15: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:114:15: throw: if ‘snd_seq_client_info_set_client’ throws an exception...
brltty-6.8/python3/Programs/midi_alsa.c:114:15: danger: ‘info’ leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  112|               if (info) {
#  113|                 memset(info, 0, snd_seq_client_info_sizeof());
#  114|->               snd_seq_client_info_set_client(info, -1);
#  115|   
#  116|                 while (snd_seq_query_next_client(midi->sequencer, info) >= 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1276]
brltty-6.8/python3/Programs/midi_alsa.c:144:17: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
brltty-6.8/python3/Programs/midi_alsa.c:94:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:97:9: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:97:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:100:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:103:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:107:15: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:108:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:138:17: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:138:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:141:43: branch_false: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:141:43: acquire_memory: allocated here
brltty-6.8/python3/Programs/midi_alsa.c:143:18: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
brltty-6.8/python3/Programs/midi_alsa.c:144:17: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:144:17: throw: if ‘snd_seq_port_info_sizeof’ throws an exception...
brltty-6.8/python3/Programs/midi_alsa.c:144:17: danger: ‘info’ leaks here; was allocated at [(13)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/12)
#  142|   
#  143|                 if (info) {
#  144|->                 memset(info, 0, snd_seq_port_info_sizeof());
#  145|                   snd_seq_port_info_set_client(info, clientIdentifier);
#  146|                   snd_seq_port_info_set_port(info, -1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1277]
brltty-6.8/python3/Programs/midi_alsa.c:145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
brltty-6.8/python3/Programs/midi_alsa.c:94:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:97:9: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:97:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:100:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:103:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:107:15: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:108:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:138:17: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:138:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/midi_alsa.c:141:43: branch_false: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:141:43: acquire_memory: allocated here
brltty-6.8/python3/Programs/midi_alsa.c:143:18: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
brltty-6.8/python3/Programs/midi_alsa.c:144:17: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:145:17: throw: if ‘snd_seq_port_info_set_client’ throws an exception...
brltty-6.8/python3/Programs/midi_alsa.c:145:17: danger: ‘info’ leaks here; was allocated at [(13)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/12)
#  143|                 if (info) {
#  144|                   memset(info, 0, snd_seq_port_info_sizeof());
#  145|->                 snd_seq_port_info_set_client(info, clientIdentifier);
#  146|                   snd_seq_port_info_set_port(info, -1);
#  147|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1278]
brltty-6.8/python3/Programs/midi_alsa.c:223:19: warning[-Wanalyzer-malloc-leak]: leak of ‘midi’
brltty-6.8/python3/Programs/midi_alsa.c:219:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/midi_alsa.c:219:6: branch_true: following ‘true’ branch (when ‘midi’ is non-NULL)...
brltty-6.8/python3/Programs/midi_alsa.c:223:19: branch_true: ...to here
brltty-6.8/python3/Programs/midi_alsa.c:223:19: throw: if ‘snd_seq_open’ throws an exception...
brltty-6.8/python3/Programs/midi_alsa.c:223:19: danger: ‘midi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  221|       int result;
#  222|   
#  223|->     if ((result = snd_seq_open(&midi->sequencer, sequencerName, SND_SEQ_OPEN_OUTPUT, 0)) >= 0) {
#  224|         snd_seq_set_client_name(midi->sequencer, PACKAGE_NAME);
#  225|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1279]
brltty-6.8/python3/Programs/mntpt.c:65:5: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
brltty-6.8/python3/Programs/mntpt.c:55:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:55:6: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:58:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:59:34: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:60:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:60:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:65:5: branch_false: ...to here
brltty-6.8/python3/Programs/mntpt.c:65:5: throw: if ‘closeMountsTable’ throws an exception...
brltty-6.8/python3/Programs/mntpt.c:65:5: danger: ‘path’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   63|       }
#   64|   
#   65|->     closeMountsTable(table);
#   66|     }
#   67|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1280]
brltty-6.8/python3/Programs/mntpt.c:85:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   83|       FILE *table;
#   84|   
#   85|->     if ((table = openMountsTable(1))) {
#   86|         addMountEntry(table, entry);
#   87|         closeMountsTable(table);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1281]
brltty-6.8/python3/Programs/mntpt.c:85:18: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   83|       FILE *table;
#   84|   
#   85|->     if ((table = openMountsTable(1))) {
#   86|         addMountEntry(table, entry);
#   87|         closeMountsTable(table);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1282]
brltty-6.8/python3/Programs/mntpt.c:86:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   84|   
#   85|       if ((table = openMountsTable(1))) {
#   86|->       addMountEntry(table, entry);
#   87|         closeMountsTable(table);
#   88|       } else if ((errno == EROFS) || (errno == EACCES)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1283]
brltty-6.8/python3/Programs/mntpt.c:86:7: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   84|   
#   85|       if ((table = openMountsTable(1))) {
#   86|->       addMountEntry(table, entry);
#   87|         closeMountsTable(table);
#   88|       } else if ((errno == EROFS) || (errno == EACCES)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1284]
brltty-6.8/python3/Programs/mntpt.c:94:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   92|   
#   93|     if (retry) {
#   94|->     asyncNewRelativeAlarm(NULL, MOUNT_TABLE_UPDATE_RETRY_INTERVAL, retryMountsTableUpdate, entry);
#   95|     } else {
#   96|       if (entry->mountPath) free(entry->mountPath);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1285]
brltty-6.8/python3/Programs/mntpt.c:94:5: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/mntpt.c:105:1: enter_function: entry to ‘makeMountPoint’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:118:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:119:15: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:119:15: call_function: calling ‘updateMountsTable’ from ‘makeMountPoint’
#   92|   
#   93|     if (retry) {
#   94|->     asyncNewRelativeAlarm(NULL, MOUNT_TABLE_UPDATE_RETRY_INTERVAL, retryMountsTableUpdate, entry);
#   95|     } else {
#   96|       if (entry->mountPath) free(entry->mountPath);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1286]
brltty-6.8/python3/Programs/mntpt.c:122:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:118:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/mntpt.c:122:15: branch_false: ...to here
brltty-6.8/python3/Programs/mntpt.c:122:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/mntpt.c:122:15: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  120|                 return 1;
#  121|               } else {
#  122|->               logMallocError();
#  123|               }
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1287]
brltty-6.8/python3/Programs/mntpt.c:122:15: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:118:40: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:118:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/mntpt.c:122:15: branch_false: ...to here
brltty-6.8/python3/Programs/mntpt.c:122:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/mntpt.c:122:15: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  120|                 return 1;
#  121|               } else {
#  122|->               logMallocError();
#  123|               }
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1288]
brltty-6.8/python3/Programs/mntpt.c:127:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/mntpt.c:127:13: branch_false: ...to here
brltty-6.8/python3/Programs/mntpt.c:127:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/mntpt.c:127:13: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  125|               free(entry->mountType);
#  126|             } else {
#  127|->             logMallocError();
#  128|             }
#  129|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1289]
brltty-6.8/python3/Programs/mntpt.c:127:13: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:117:35: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:117:14: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/mntpt.c:127:13: branch_false: ...to here
brltty-6.8/python3/Programs/mntpt.c:127:13: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/mntpt.c:127:13: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  125|               free(entry->mountType);
#  126|             } else {
#  127|->             logMallocError();
#  128|             }
#  129|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1290]
brltty-6.8/python3/Programs/mntpt.c:132:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:31: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/mntpt.c:132:11: branch_false: ...to here
brltty-6.8/python3/Programs/mntpt.c:132:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/mntpt.c:132:11: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  130|             free(entry->mountReference);
#  131|           } else {
#  132|->           logMallocError();
#  133|           }
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1291]
brltty-6.8/python3/Programs/mntpt.c:132:11: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:116:38: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:116:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/mntpt.c:132:11: branch_false: ...to here
brltty-6.8/python3/Programs/mntpt.c:132:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/mntpt.c:132:11: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  130|             free(entry->mountReference);
#  131|           } else {
#  132|->           logMallocError();
#  133|           }
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1292]
brltty-6.8/python3/Programs/mntpt.c:137:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/mntpt.c:106:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/mntpt.c:109:5: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:112:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/mntpt.c:112:8: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/mntpt.c:113:7: branch_true: ...to here
brltty-6.8/python3/Programs/mntpt.c:115:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/mntpt.c:137:9: branch_false: ...to here
brltty-6.8/python3/Programs/mntpt.c:137:9: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/mntpt.c:137:9: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  135|           free(entry->mountPath);
#  136|         } else {
#  137|->         logMallocError();
#  138|         }
#  139|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1293]
brltty-6.8/python3/Programs/msg_queue.c:121:13: warning[-Wanalyzer-malloc-leak]: leak of ‘mhp’
brltty-6.8/python3/Programs/msg_queue.c:101:1: enter_function: entry to ‘messageReceiverThread’
brltty-6.8/python3/Programs/msg_queue.c:107:22: call_function: calling ‘receiveMessage’ from ‘messageReceiverThread’
brltty-6.8/python3/Programs/msg_queue.c:107:22: return_function: returning to ‘messageReceiverThread’ from ‘receiveMessage’
brltty-6.8/python3/Programs/msg_queue.c:109:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/msg_queue.c:112:18: branch_true: ...to here
brltty-6.8/python3/Programs/msg_queue.c:112:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/msg_queue.c:112:10: branch_true: following ‘true’ branch (when ‘mhp’ is non-NULL)...
brltty-6.8/python3/Programs/msg_queue.c:115:21: branch_true: ...to here
brltty-6.8/python3/Programs/msg_queue.c:121:13: throw: if ‘asyncSignalEvent’ throws an exception...
brltty-6.8/python3/Programs/msg_queue.c:121:13: danger: ‘mhp’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  119|           memcpy(mhp->content, buffer, mhp->length);
#  120|   
#  121|->         if (asyncSignalEvent(mra->event, mhp)) continue;
#  122|           free(mhp);
#  123|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1294]
brltty-6.8/python3/Programs/msg_queue.c:149:23: warning[-Wanalyzer-malloc-leak]: leak of ‘mra’
brltty-6.8/python3/Programs/msg_queue.c:139:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/msg_queue.c:139:6: branch_true: following ‘true’ branch (when ‘mra’ is non-NULL)...
brltty-6.8/python3/Programs/msg_queue.c:140:5: branch_true: ...to here
brltty-6.8/python3/Programs/msg_queue.c:149:23: throw: if ‘asyncNewEvent’ throws an exception...
brltty-6.8/python3/Programs/msg_queue.c:149:23: danger: ‘mra’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  147|       mra->size = size;
#  148|   
#  149|->     if ((mra->event = asyncNewEvent(handleReceivedMessage, mra))) {
#  150|         int threadCreationError = createThread(name, &mra->thread, NULL, messageReceiverThread, mra);
#  151|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1295]
brltty-6.8/python3/Programs/notes_beep.c:35:9: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/notes_beep.c:34:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/notes_beep.c:34:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/notes_beep.c:35:9: branch_true: ...to here
brltty-6.8/python3/Programs/notes_beep.c:35:9: throw: if ‘canBeep’ throws an exception...
brltty-6.8/python3/Programs/notes_beep.c:35:9: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   33|   
#   34|     if ((device = malloc(sizeof(*device)))) {
#   35|->     if (canBeep()) {
#   36|         logMessage(LOG_DEBUG, "beeper enabled");
#   37|         return device;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1296]
brltty-6.8/python3/Programs/notes_beep.c:36:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/notes_beep.c:34:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/notes_beep.c:34:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/notes_beep.c:35:9: branch_true: ...to here
brltty-6.8/python3/Programs/notes_beep.c:35:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/notes_beep.c:36:7: branch_true: ...to here
brltty-6.8/python3/Programs/notes_beep.c:36:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/notes_beep.c:36:7: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   34|     if ((device = malloc(sizeof(*device)))) {
#   35|       if (canBeep()) {
#   36|->       logMessage(LOG_DEBUG, "beeper enabled");
#   37|         return device;
#   38|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1297]
brltty-6.8/python3/Programs/notes_fm.c:36:9: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/notes_fm.c:35:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/notes_fm.c:35:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/notes_fm.c:36:9: branch_true: ...to here
brltty-6.8/python3/Programs/notes_fm.c:36:9: throw: if ‘fmEnablePorts’ throws an exception...
brltty-6.8/python3/Programs/notes_fm.c:36:9: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   34|   
#   35|     if ((device = malloc(sizeof(*device)))) {
#   36|->     if (fmEnablePorts(errorLevel)) {
#   37|         if (fmTestCard(errorLevel)) {
#   38|           device->channelNumber = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1298]
brltty-6.8/python3/Programs/notes_fm.c:37:11: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/notes_fm.c:35:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/notes_fm.c:35:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/notes_fm.c:36:9: branch_true: ...to here
brltty-6.8/python3/Programs/notes_fm.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/notes_fm.c:37:11: branch_true: ...to here
brltty-6.8/python3/Programs/notes_fm.c:37:11: throw: if ‘fmTestCard’ throws an exception...
brltty-6.8/python3/Programs/notes_fm.c:37:11: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   35|     if ((device = malloc(sizeof(*device)))) {
#   36|       if (fmEnablePorts(errorLevel)) {
#   37|->       if (fmTestCard(errorLevel)) {
#   38|           device->channelNumber = 0;
#   39|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1299]
brltty-6.8/python3/Programs/notes_fm.c:40:9: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/notes_fm.c:35:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/notes_fm.c:35:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/notes_fm.c:36:9: branch_true: ...to here
brltty-6.8/python3/Programs/notes_fm.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/notes_fm.c:37:11: branch_true: ...to here
brltty-6.8/python3/Programs/notes_fm.c:37:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/notes_fm.c:38:9: branch_true: ...to here
brltty-6.8/python3/Programs/notes_fm.c:40:9: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/notes_fm.c:40:9: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   38|           device->channelNumber = 0;
#   39|   
#   40|->         logMessage(LOG_DEBUG, "FM enabled");
#   41|           return device;
#   42|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1300]
brltty-6.8/python3/Programs/notes_fm.c:44:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/notes_fm.c:35:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/notes_fm.c:35:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/notes_fm.c:36:9: branch_true: ...to here
brltty-6.8/python3/Programs/notes_fm.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/notes_fm.c:37:11: branch_true: ...to here
brltty-6.8/python3/Programs/notes_fm.c:37:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/notes_fm.c:44:7: branch_false: ...to here
brltty-6.8/python3/Programs/notes_fm.c:44:7: throw: if ‘fmDisablePorts’ throws an exception...
brltty-6.8/python3/Programs/notes_fm.c:44:7: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   42|         }
#   43|   
#   44|->       fmDisablePorts();
#   45|       }
#   46|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1301]
brltty-6.8/python3/Programs/notes_midi.c:42:25: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/notes_midi.c:41:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/notes_midi.c:41:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/notes_midi.c:42:25: branch_true: ...to here
brltty-6.8/python3/Programs/notes_midi.c:42:25: throw: if ‘openMidiDevice’ throws an exception...
brltty-6.8/python3/Programs/notes_midi.c:42:25: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   40|   
#   41|     if ((device = malloc(sizeof(*device)))) {
#   42|->     if ((device->midi = openMidiDevice(errorLevel, opt_midiDevice))) {
#   43|         device->channelNumber = 0;
#   44|         setMidiInstrument(device->midi, device->channelNumber, prefs.midiInstrument);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1302]
brltty-6.8/python3/Programs/notes_midi.c:44:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/notes_midi.c:41:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/notes_midi.c:41:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/notes_midi.c:42:25: branch_true: ...to here
brltty-6.8/python3/Programs/notes_midi.c:42:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/notes_midi.c:43:7: branch_true: ...to here
brltty-6.8/python3/Programs/notes_midi.c:44:7: throw: if ‘setMidiInstrument’ throws an exception...
brltty-6.8/python3/Programs/notes_midi.c:44:7: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   42|       if ((device->midi = openMidiDevice(errorLevel, opt_midiDevice))) {
#   43|         device->channelNumber = 0;
#   44|->       setMidiInstrument(device->midi, device->channelNumber, prefs.midiInstrument);
#   45|   
#   46|         logMessage(LOG_DEBUG, "MIDI enabled");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1303]
brltty-6.8/python3/Programs/notes_midi.c:46:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/notes_midi.c:41:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/notes_midi.c:41:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/notes_midi.c:42:25: branch_true: ...to here
brltty-6.8/python3/Programs/notes_midi.c:42:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/notes_midi.c:43:7: branch_true: ...to here
brltty-6.8/python3/Programs/notes_midi.c:46:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/notes_midi.c:46:7: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   44|         setMidiInstrument(device->midi, device->channelNumber, prefs.midiInstrument);
#   45|   
#   46|->       logMessage(LOG_DEBUG, "MIDI enabled");
#   47|         return device;
#   48|       }

Error: CPPCHECK_WARNING (CWE-758): [#def1304]
brltty-6.8/python3/Programs/notes_pcm.c:219: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  217|          * high-order (sign) bit is set.
#  218|          */
#  219|->       int32_t amplitude = currentValue ^ (currentValue >> 31);
#  220|   
#  221|         /* Convert the 31-bit amplitude from unsigned to signed. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1305]
brltty-6.8/python3/Programs/params_linux.c:47:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/cmdline", "r")’
brltty-6.8/python3/Programs/params_linux.c:32:6: branch_true: following ‘true’ branch (when ‘parameters’ is non-NULL)...
brltty-6.8/python3/Programs/params_linux.c:36:17: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:36:17: acquire_resource: opened here
brltty-6.8/python3/Programs/params_linux.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:38:20: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:40:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:40:10: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:43:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
brltty-6.8/python3/Programs/params_linux.c:46:16: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:46:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:47:21: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:46:15: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:48:61: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:50:16: branch_false: following ‘false’ branch (when ‘newParameters’ is NULL)...
brltty-6.8/python3/Programs/params_linux.c:54:15: branch_false: ...to here
brltty-6.8/python3/Programs/params_linux.c:54:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/params_linux.c:47:21: danger: ‘fopen("/proc/cmdline", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   45|   
#   46|             if ((strncmp(token, name, nameLength) == 0) &&
#   47|->               (token[nameLength] == '=')) {
#   48|               char *newParameters = strdup(token + nameLength + 1);
#   49|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1306]
brltty-6.8/python3/Programs/params_linux.c:47:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/cmdline", "r")’
brltty-6.8/python3/Programs/params_linux.c:32:6: branch_true: following ‘true’ branch (when ‘parameters’ is non-NULL)...
brltty-6.8/python3/Programs/params_linux.c:36:17: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:36:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/params_linux.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:38:20: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:40:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:40:10: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:43:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
brltty-6.8/python3/Programs/params_linux.c:46:16: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:46:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:47:21: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:46:15: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:48:61: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:50:16: branch_false: following ‘false’ branch (when ‘newParameters’ is NULL)...
brltty-6.8/python3/Programs/params_linux.c:54:15: branch_false: ...to here
brltty-6.8/python3/Programs/params_linux.c:54:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/params_linux.c:47:21: danger: ‘fopen("/proc/cmdline", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   45|   
#   46|             if ((strncmp(token, name, nameLength) == 0) &&
#   47|->               (token[nameLength] == '=')) {
#   48|               char *newParameters = strdup(token + nameLength + 1);
#   49|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1307]
brltty-6.8/python3/Programs/params_linux.c:54:15: warning[-Wanalyzer-malloc-leak]: leak of ‘parameters’
brltty-6.8/python3/Programs/params_linux.c:32:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/params_linux.c:32:6: branch_true: following ‘true’ branch (when ‘parameters’ is non-NULL)...
brltty-6.8/python3/Programs/params_linux.c:36:17: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:36:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:38:20: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:40:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:40:10: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:43:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
brltty-6.8/python3/Programs/params_linux.c:46:16: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:46:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:47:21: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:46:15: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/params_linux.c:48:61: branch_true: ...to here
brltty-6.8/python3/Programs/params_linux.c:50:16: branch_false: following ‘false’ branch (when ‘newParameters’ is NULL)...
brltty-6.8/python3/Programs/params_linux.c:54:15: branch_false: ...to here
brltty-6.8/python3/Programs/params_linux.c:54:15: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/params_linux.c:54:15: danger: ‘parameters’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   52|                 parameters = newParameters;
#   53|               } else {
#   54|->               logMallocError();
#   55|               }
#   56|             }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1308]
brltty-6.8/python3/Programs/parse.c:97:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*element’
brltty-6.8/python3/Programs/parse.c:579:1: enter_function: entry to ‘getParameters’
brltty-6.8/python3/Programs/parse.c:590:8: branch_true: following ‘true’ branch (when ‘values’ is non-NULL)...
brltty-6.8/python3/Programs/parse.c:590:8: branch_true: ...to here
brltty-6.8/python3/Programs/parse.c:593:14: branch_false: following ‘false’ branch (when ‘count <= index’)...
brltty-6.8/python3/Programs/parse.c:602:10: branch_false: ...to here
brltty-6.8/python3/Programs/parse.c:602:10: branch_false: following ‘false’ branch (when ‘count != index’)...
brltty-6.8/python3/Programs/parse.c:607:7: branch_false: ...to here
brltty-6.8/python3/Programs/parse.c:607:7: call_function: calling ‘deallocateStrings’ from ‘getParameters’
#   95|   deallocateStrings (char **array) {
#   96|     char **element = array;
#   97|->   while (*element) free(*element++);
#   98|     free(array);
#   99|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1309]
brltty-6.8/python3/Programs/parse.c:112:11: warning[-Wanalyzer-malloc-leak]: leak of ‘splitString(value, 44, 0)’
brltty-6.8/python3/Programs/parse.c:156:1: enter_function: entry to ‘changeListSetting’
brltty-6.8/python3/Programs/parse.c:157:20: call_function: calling ‘splitString’ from ‘changeListSetting’
brltty-6.8/python3/Programs/parse.c:157:20: return_function: returning to ‘changeListSetting’ from ‘splitString’
brltty-6.8/python3/Programs/parse.c:159:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/parse.c:160:9: branch_true: ...to here
brltty-6.8/python3/Programs/parse.c:160:9: call_function: calling ‘changeStringSetting’ from ‘changeListSetting’
#  110|         int index = 0;
#  111|   
#  112|->       if (*start) {
#  113|           while (1) {
#  114|             const char *end = strchr(start, delimiter);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1310]
brltty-6.8/python3/Programs/parse.c:595:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/parse.c:590:8: branch_true: following ‘true’ branch (when ‘values’ is non-NULL)...
brltty-6.8/python3/Programs/parse.c:590:8: branch_true: ...to here
brltty-6.8/python3/Programs/parse.c:593:14: branch_true: following ‘true’ branch (when ‘count > index’)...
brltty-6.8/python3/Programs/parse.c:594:21: branch_true: ...to here
brltty-6.8/python3/Programs/parse.c:594:31: acquire_memory: allocated here
brltty-6.8/python3/Programs/parse.c:594:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/parse.c:599:9: branch_false: ...to here
brltty-6.8/python3/Programs/parse.c:593:14: branch_true: following ‘true’ branch (when ‘count > index’)...
brltty-6.8/python3/Programs/parse.c:594:21: branch_true: ...to here
brltty-6.8/python3/Programs/parse.c:594:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/parse.c:595:11: branch_true: ...to here
brltty-6.8/python3/Programs/parse.c:595:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/parse.c:595:11: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  593|         while (index < count) {
#  594|           if (!(values[index] = strdup(""))) {
#  595|->           logMallocError();
#  596|             break;
#  597|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1311]
brltty-6.8/python3/Programs/parse.c:595:11: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
brltty-6.8/python3/Programs/parse.c:590:19: acquire_memory: allocated here
brltty-6.8/python3/Programs/parse.c:590:8: branch_true: following ‘true’ branch (when ‘values’ is non-NULL)...
brltty-6.8/python3/Programs/parse.c:590:8: branch_true: ...to here
brltty-6.8/python3/Programs/parse.c:593:14: branch_true: following ‘true’ branch (when ‘count > index’)...
brltty-6.8/python3/Programs/parse.c:594:21: branch_true: ...to here
brltty-6.8/python3/Programs/parse.c:594:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/parse.c:595:11: branch_true: ...to here
brltty-6.8/python3/Programs/parse.c:595:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/parse.c:595:11: danger: ‘values’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  593|         while (index < count) {
#  594|           if (!(values[index] = strdup(""))) {
#  595|->           logMallocError();
#  596|             break;
#  597|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1312]
brltty-6.8/python3/Programs/pcm_alsa.c:136:19: warning[-Wanalyzer-malloc-leak]: leak of ‘pcm’
brltty-6.8/python3/Programs/pcm_alsa.c:132:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pcm_alsa.c:132:6: branch_true: following ‘true’ branch (when ‘pcm’ is non-NULL)...
brltty-6.8/python3/Programs/pcm_alsa.c:135:10: branch_true: ...to here
brltty-6.8/python3/Programs/pcm_alsa.c:136:19: throw: if ‘snd_pcm_open’ throws an exception...
brltty-6.8/python3/Programs/pcm_alsa.c:136:19: danger: ‘pcm’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  134|   
#  135|       if (!*device) device = "default";
#  136|->     if ((result = snd_pcm_open(&pcm->handle, device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) >= 0) {
#  137|         snd_pcm_nonblock(pcm->handle, 0);
#  138|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1313]
brltty-6.8/python3/Programs/pgmprivs_linux.c:1104:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/python3/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1102|   
# 1103|       if (!(newArray = realloc(scf->argument.array, ARRAY_SIZE(newArray, newSize)))) {
# 1104|->       logMallocError();
# 1105|         return 0;
# 1106|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1314]
brltty-6.8/python3/Programs/pgmprivs_linux.c:1144:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/python3/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1142|         free(eqValue);
# 1143|       } else {
# 1144|->       logMallocError();
# 1145|       }
# 1146|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1315]
brltty-6.8/python3/Programs/pgmprivs_linux.c:1190:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/python3/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1188|   static void
# 1189|   scfSortValues (SCFValueDescriptor *values, size_t count) {
# 1190|->   qsort(values, count, sizeof(*values), scfValueSorter);
# 1191|   }
# 1192|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1316]
brltty-6.8/python3/Programs/pgmprivs_linux.c:1202:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/python3/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1200|       while (from < end) {
# 1201|         if (from->value == to->value) {
# 1202|->         logMessage(LOG_WARNING,
# 1203|             "%s: duplicate value: %s: 0X%08"PRIX32,
# 1204|             scfLogLabel, name, from->value

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1317]
brltty-6.8/python3/Programs/pgmprivs_linux.c:1229:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1686:1: enter_function: entry to ‘scfInstallFilter’
brltty-6.8/python3/Programs/pgmprivs_linux.c:1688:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pgmprivs_linux.c:1692:7: branch_false: ...to here
brltty-6.8/python3/Programs/pgmprivs_linux.c:1697:14: call_function: calling ‘scfMakeFilter’ from ‘scfInstallFilter’
# 1227|       scfRemoveDuplicateValues(descriptors, &count, name);
# 1228|   
# 1229|->     logMessage(SCF_LOG_LEVEL,
# 1230|         "%s: value group size: %s: %zu", scfLogLabel, name, count
# 1231|       );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1318]
brltty-6.8/python3/Programs/pipe.c:243:3: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/python3/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  241|   static int
#  242|   createFifo (NamedPipeObject *obj) {
#  243|->   lockUmask();
#  244|     int result = mkfifo(obj->host.path, 0);
#  245|     unlockUmask();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1319]
brltty-6.8/python3/Programs/pipe.c:245:3: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/python3/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  243|     lockUmask();
#  244|     int result = mkfifo(obj->host.path, 0);
#  245|->   unlockUmask();
#  246|   
#  247|     if ((result == -1) && (errno == EEXIST)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1320]
brltty-6.8/python3/Programs/pipe.c:251:7: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/python3/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  249|   
#  250|       if (lstat(obj->host.path, &fifo) == -1) {
#  251|->       logMessage(LOG_ERR, "cannot stat FIFO: %s: %s",
#  252|                    obj->host.path, strerror(errno));
#  253|       } else if (S_ISFIFO(fifo.st_mode)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1321]
brltty-6.8/python3/Programs/pipe.c:259:5: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/python3/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  257|   
#  258|     if (result != -1) {
#  259|->     lockUmask();
#  260|       int changed = chmod(obj->host.path, S_IRUSR|S_IWUSR|S_IWGRP|S_IWOTH) != -1;
#  261|       unlockUmask();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1322]
brltty-6.8/python3/Programs/pipe.c:261:5: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/python3/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  259|       lockUmask();
#  260|       int changed = chmod(obj->host.path, S_IRUSR|S_IWUSR|S_IWGRP|S_IWOTH) != -1;
#  261|->     unlockUmask();
#  262|   
#  263|       if (changed) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1323]
brltty-6.8/python3/Programs/pipe.c:265:36: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/python3/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  263|       if (changed) {
#  264|         // open read-write even though we only read to prevent an end-of-file condition
#  265|->       if ((obj->input.descriptor = open(obj->host.path, O_RDWR|O_NONBLOCK)) != -1) {
#  266|           logMessage(LOG_DEBUG, "FIFO created: %s: fd=%d",
#  267|                      obj->host.path, obj->input.descriptor);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1324]
brltty-6.8/python3/Programs/pipe.c:266:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
brltty-6.8/python3/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/python3/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  264|         // open read-write even though we only read to prevent an end-of-file condition
#  265|         if ((obj->input.descriptor = open(obj->host.path, O_RDWR|O_NONBLOCK)) != -1) {
#  266|->         logMessage(LOG_DEBUG, "FIFO created: %s: fd=%d",
#  267|                      obj->host.path, obj->input.descriptor);
#  268|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1325]
brltty-6.8/python3/Programs/pipe.c:266:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/python3/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  264|         // open read-write even though we only read to prevent an end-of-file condition
#  265|         if ((obj->input.descriptor = open(obj->host.path, O_RDWR|O_NONBLOCK)) != -1) {
#  266|->         logMessage(LOG_DEBUG, "FIFO created: %s: fd=%d",
#  267|                      obj->host.path, obj->input.descriptor);
#  268|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1326]
brltty-6.8/python3/Programs/pipe.c:282:5: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:303:1: enter_function: entry to ‘newNamedPipeObject’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:328:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:329:12: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:329:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/pipe.c:331:18: branch_false: ...to here
brltty-6.8/python3/Programs/pipe.c:331:18: call_function: calling ‘createFifo’ from ‘newNamedPipeObject’
#  280|       removePipe(obj);
#  281|     } else {
#  282|->     logMessage(LOG_ERR, "cannot create FIFO: %s: %s",
#  283|                  obj->host.path, strerror(errno));
#  284|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1327]
brltty-6.8/python3/Programs/pipe.c:323:31: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:323:31: throw: if ‘getNamedPipeDirectory’ throws an exception...
brltty-6.8/python3/Programs/pipe.c:323:31: danger: ‘obj’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  321|   
#  322|       {
#  323|->       const char *directory = getNamedPipeDirectory();
#  324|   
#  325|         obj->host.path = directory? makePath(directory, name): NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1328]
brltty-6.8/python3/Programs/pipe.c:325:35: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/pipe.c:306:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/pipe.c:306:6: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:24: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/pipe.c:325:35: branch_true: ...to here
brltty-6.8/python3/Programs/pipe.c:325:35: throw: if ‘makePath’ throws an exception...
brltty-6.8/python3/Programs/pipe.c:325:35: danger: ‘obj’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  323|         const char *directory = getNamedPipeDirectory();
#  324|   
#  325|->       obj->host.path = directory? makePath(directory, name): NULL;
#  326|       }
#  327|   

Error: GCC_ANALYZER_WARNING (CWE-129): [#def1329]
brltty-6.8/python3/Programs/prefs.c:96:26: warning[-Wanalyzer-tainted-array-index]: use of attacker-controlled value ‘newPreferences.expandCurrentWord’ in array lookup without checking for negative
brltty-6.8/python3/Programs/prefs.c:351:1: enter_function: entry to ‘loadPreferencesFile’
brltty-6.8/python3/Programs/prefs.c:357:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/prefs.c:359:21: branch_true: ...to here
brltty-6.8/python3/Programs/prefs.c:361:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/prefs.c:364:15: branch_false: ...to here
brltty-6.8/python3/Programs/prefs.c:364:15: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/prefs.c:365:17: branch_false: ...to here
brltty-6.8/python3/Programs/prefs.c:364:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/prefs.c:366:17: branch_false: ...to here
brltty-6.8/python3/Programs/prefs.c:364:16: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/prefs.c:374:7: branch_false: ...to here
brltty-6.8/python3/Programs/prefs.c:396:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/prefs.c:397:9: branch_true: ...to here
brltty-6.8/python3/Programs/prefs.c:397:9: call_function: calling ‘setStatusStyle’ from ‘loadPreferencesFile’
#   94|   
#   95|     if (style < styleCount) {
#   96|->     const unsigned char *fields = styleTable[style];
#   97|       if (*fields != sfEnd) setStatusFields(fields);
#   98|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1330]
brltty-6.8/python3/Programs/prefs.c:557:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "w")’
brltty-6.8/python3/Programs/prefs.c:565:16: acquire_resource: opened here
brltty-6.8/python3/Programs/prefs.c:567:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/prefs.c:568:9: branch_true: ...to here
brltty-6.8/python3/Programs/prefs.c:576:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/prefs.c:557:10: danger: ‘fopen(path, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  555|     );
#  556|   
#  557|->   return !ferror(file);
#  558|   }
#  559|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1331]
brltty-6.8/python3/Programs/prefs.c:557:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "w")’
brltty-6.8/python3/Programs/prefs.c:565:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/prefs.c:567:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/prefs.c:568:9: branch_true: ...to here
brltty-6.8/python3/Programs/prefs.c:576:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/prefs.c:557:10: danger: ‘fopen(path, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  555|     );
#  556|   
#  557|->   return !ferror(file);
#  558|   }
#  559|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1332]
brltty-6.8/python3/Programs/profile.c:168:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pad.values’
brltty-6.8/python3/Programs/profile.c:147:1: enter_function: entry to ‘activateProfile’
brltty-6.8/python3/Programs/profile.c:150:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/profile.c:153:17: branch_true: ...to here
brltty-6.8/python3/Programs/profile.c:153:17: call_function: calling ‘makeProfilePath’ from ‘activateProfile’
brltty-6.8/python3/Programs/profile.c:153:17: return_function: returning to ‘activateProfile’ from ‘makeProfilePath’
brltty-6.8/python3/Programs/profile.c:153:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/profile.c:154:29: branch_true: ...to here
brltty-6.8/python3/Programs/profile.c:158:25: acquire_memory: allocated here
brltty-6.8/python3/Programs/profile.c:158:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/profile.c:158:10: branch_true: ...to here
brltty-6.8/python3/Programs/profile.c:168:13: throw: if ‘processDataFile’ throws an exception...
brltty-6.8/python3/Programs/profile.c:168:13: danger: ‘pad.values’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  166|           };
#  167|   
#  168|->         if (processDataFile(path, &parameters)) {
#  169|             if (changeProperties(profile, pad.values)) {
#  170|               ok = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1333]
brltty-6.8/python3/Programs/program.c:294:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pidFile, "r")’
brltty-6.8/python3/Programs/program.c:286:15: acquire_resource: opened here
brltty-6.8/python3/Programs/program.c:286:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/program.c:290:17: branch_true: ...to here
brltty-6.8/python3/Programs/program.c:290:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/program.c:292:22: branch_true: ...to here
brltty-6.8/python3/Programs/program.c:295:13: throw: if ‘cancelProcess’ throws an exception...
brltty-6.8/python3/Programs/program.c:294:12: danger: ‘fopen(pidFile, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  292|         long int pid = strtol(line, &end, 10);
#  293|   
#  294|->       if (!*end || isspace((unsigned char)*end)) {
#  295|           if (cancelProcess(pid)) cancelled = 1;
#  296|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1334]
brltty-6.8/python3/Programs/program.c:294:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pidFile, "r")’
brltty-6.8/python3/Programs/program.c:286:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/program.c:286:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/program.c:290:17: branch_true: ...to here
brltty-6.8/python3/Programs/program.c:290:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/program.c:292:22: branch_true: ...to here
brltty-6.8/python3/Programs/program.c:295:13: throw: if ‘cancelProcess’ throws an exception...
brltty-6.8/python3/Programs/program.c:294:12: danger: ‘fopen(pidFile, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  292|         long int pid = strtol(line, &end, 10);
#  293|   
#  294|->       if (!*end || isspace((unsigned char)*end)) {
#  295|           if (cancelProcess(pid)) cancelled = 1;
#  296|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1335]
brltty-6.8/python3/Programs/queue.c:65:27: warning[-Wanalyzer-malloc-leak]: leak of ‘newElement(queue,  item)’
brltty-6.8/python3/Programs/queue.c:208:1: enter_function: entry to ‘enqueueItem’
brltty-6.8/python3/Programs/queue.c:209:22: call_function: calling ‘newElement’ from ‘enqueueItem’
brltty-6.8/python3/Programs/queue.c:209:22: return_function: returning to ‘enqueueItem’ from ‘newElement’
brltty-6.8/python3/Programs/queue.c:211:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/queue.c:211:16: branch_true: ...to here
brltty-6.8/python3/Programs/queue.c:211:16: call_function: calling ‘linkElement’ from ‘enqueueItem’
#   63|     {
#   64|       static int identifier = 0;
#   65|->     element->identifier = ++identifier;
#   66|     }
#   67|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1336]
brltty-6.8/python3/Programs/report.c:191:29: warning[-Wanalyzer-malloc-leak]: leak of ‘rli’
brltty-6.8/python3/Programs/report.c:172:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/report.c:173:10: branch_true: ...to here
brltty-6.8/python3/Programs/report.c:181:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/report.c:186:18: branch_false: ...to here
brltty-6.8/python3/Programs/report.c:186:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/report.c:186:10: branch_true: following ‘true’ branch (when ‘rli’ is non-NULL)...
brltty-6.8/python3/Programs/report.c:187:9: branch_true: ...to here
brltty-6.8/python3/Programs/report.c:191:29: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/python3/Programs/report.c:191:29: danger: ‘rli’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  189|           rli->data = data;
#  190|   
#  191|->         if ((rli->element = enqueueItem(report->listeners, rli))) {
#  192|             logSymbol(LOG_DEBUG, listener, "report listener registered: %u", identifier);
#  193|             return rli;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1337]
brltty-6.8/python3/Programs/rgx.c:81:5: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/python3/Programs/rgx.c:106:1: enter_function: entry to ‘rgxAddPatternCharacters’
brltty-6.8/python3/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:136:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/rgx.c:151:9: branch_false: ...to here
brltty-6.8/python3/Programs/rgx.c:151:9: call_function: calling ‘rgxLogError’ from ‘rgxAddPatternCharacters’
#   79|     {
#   80|       size_t oldLength = STR_LENGTH;
#   81|->     STR_FORMAT(rgxFormatErrorMessage, error);
#   82|       if (STR_LENGTH == oldLength) STR_PRINTF("unrecognized error %d", error);
#   83|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1338]
brltty-6.8/python3/Programs/rgx.c:92:3: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/python3/Programs/rgx.c:106:1: enter_function: entry to ‘rgxAddPatternCharacters’
brltty-6.8/python3/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:136:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/rgx.c:151:9: branch_false: ...to here
brltty-6.8/python3/Programs/rgx.c:151:9: call_function: calling ‘rgxLogError’ from ‘rgxAddPatternCharacters’
#   90|   
#   91|     STR_END;
#   92|->   logMessage(LOG_WARNING, "%s", log);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1339]
brltty-6.8/python3/Programs/rgx.c:132:32: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/python3/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:132:32: throw: if ‘rgxCompilePattern’ throws an exception...
brltty-6.8/python3/Programs/rgx.c:132:32: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  130|         RGX_OffsetType offset;
#  131|   
#  132|->       matcher->compiled.code = rgxCompilePattern(
#  133|           internal, length, rgx->options, &offset, &error
#  134|         );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1340]
brltty-6.8/python3/Programs/rgx.c:137:34: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/python3/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:136:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:137:34: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:137:34: throw: if ‘rgxAllocateData’ throws an exception...
brltty-6.8/python3/Programs/rgx.c:137:34: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  135|   
#  136|         if (matcher->compiled.code) {
#  137|->         matcher->compiled.data = rgxAllocateData(matcher->compiled.code);
#  138|   
#  139|           if (matcher->compiled.data) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1341]
brltty-6.8/python3/Programs/rgx.c:140:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/python3/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:136:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:137:34: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:139:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:140:15: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:140:15: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/python3/Programs/rgx.c:140:15: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  138|   
#  139|           if (matcher->compiled.data) {
#  140|->           if (enqueueItem(rgx->matchers, matcher)) {
#  141|               return matcher;
#  142|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1342]
brltty-6.8/python3/Programs/rgx.c:146:11: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/python3/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:136:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:137:34: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:139:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/rgx.c:146:11: branch_false: ...to here
brltty-6.8/python3/Programs/rgx.c:146:11: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/rgx.c:146:11: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  144|             rgxDeallocateData(matcher->compiled.data);
#  145|           } else {
#  146|->           logMallocError();
#  147|           }
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1343]
brltty-6.8/python3/Programs/rgx.c:149:9: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/python3/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:124:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:124:38: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:136:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/rgx.c:137:34: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:139:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/rgx.c:146:11: branch_false: ...to here
brltty-6.8/python3/Programs/rgx.c:149:9: throw: if ‘rgxDeallocateCode’ throws an exception...
brltty-6.8/python3/Programs/rgx.c:149:9: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  147|           }
#  148|   
#  149|->         rgxDeallocateCode(matcher->compiled.code);
#  150|         } else {
#  151|           rgxLogError(error, matcher, &offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1344]
brltty-6.8/python3/Programs/rgx.c:156:7: warning[-Wanalyzer-malloc-leak]: leak of ‘matcher’
brltty-6.8/python3/Programs/rgx.c:113:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: following ‘true’ branch (when ‘matcher’ is non-NULL)...
brltty-6.8/python3/Programs/rgx.c:113:6: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:124:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/rgx.c:156:7: branch_false: ...to here
brltty-6.8/python3/Programs/rgx.c:156:7: throw: if ‘logMallocError’ throws an exception...
brltty-6.8/python3/Programs/rgx.c:156:7: danger: ‘matcher’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  154|         free(matcher->pattern.characters);
#  155|       } else {
#  156|->       logMallocError();
#  157|       }
#  158|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1345]
brltty-6.8/python3/Programs/rgx.c:356:26: warning[-Wanalyzer-malloc-leak]: leak of ‘rgx’
brltty-6.8/python3/Programs/rgx.c:351:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/rgx.c:351:6: branch_true: following ‘true’ branch (when ‘rgx’ is non-NULL)...
brltty-6.8/python3/Programs/rgx.c:351:6: branch_true: ...to here
brltty-6.8/python3/Programs/rgx.c:356:26: throw: if ‘newQueue’ throws an exception...
brltty-6.8/python3/Programs/rgx.c:356:26: danger: ‘rgx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  354|       rgx->options = 0;
#  355|   
#  356|->     if ((rgx->matchers = newQueue(rgxDeallocateMatcher, NULL))) {
#  357|         return rgx;
#  358|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1346]
brltty-6.8/python3/Programs/routing.c:156:5: warning[-Wanalyzer-malloc-leak]: leak of ‘crd.vertical.buffer’
brltty-6.8/python3/Programs/routing.c:478:1: enter_function: entry to ‘startRoutingProcess’
brltty-6.8/python3/Programs/routing.c:496:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/routing.c:497:18: branch_true: ...to here
brltty-6.8/python3/Programs/routing.c:497:18: call_function: calling ‘routeCursor’ from ‘startRoutingProcess’
#  154|       }
#  155|   
#  156|->     logRouting("screen: num=%d cols=%d rows=%d",
#  157|                  crd->screen.number,
#  158|                  crd->screen.width, crd->screen.height);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1347]
brltty-6.8/python3/Programs/serial.c:716:30: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
brltty-6.8/python3/Programs/serial.c:707:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/serial.c:710:19: branch_true: ...to here
brltty-6.8/python3/Programs/serial.c:710:19: acquire_memory: allocated here
brltty-6.8/python3/Programs/serial.c:710:8: branch_true: following ‘true’ branch (when ‘serial’ is non-NULL)...
brltty-6.8/python3/Programs/serial.c:711:7: branch_true: ...to here
brltty-6.8/python3/Programs/serial.c:716:30: throw: if ‘getDevicePath’ throws an exception...
brltty-6.8/python3/Programs/serial.c:716:30: danger: ‘serial’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  714|           const char *name = parameters[SERIAL_PARM_NAME];
#  715|           if (!*name) name = SERIAL_FIRST_DEVICE;
#  716|->         serial->devicePath = getDevicePath(name);
#  717|         }
#  718|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1348]
brltty-6.8/python3/Programs/serial.c:723:13: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
brltty-6.8/python3/Programs/serial.c:707:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/serial.c:710:19: branch_true: ...to here
brltty-6.8/python3/Programs/serial.c:710:19: acquire_memory: allocated here
brltty-6.8/python3/Programs/serial.c:710:8: branch_true: following ‘true’ branch (when ‘serial’ is non-NULL)...
brltty-6.8/python3/Programs/serial.c:711:7: branch_true: ...to here
brltty-6.8/python3/Programs/serial.c:719:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/serial.c:720:9: branch_true: ...to here
brltty-6.8/python3/Programs/serial.c:723:13: throw: if ‘serialConnectDevice’ throws an exception...
brltty-6.8/python3/Programs/serial.c:723:13: danger: ‘serial’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  721|           serial->stream = NULL;
#  722|   
#  723|->         if (serialConnectDevice(serial, serial->devicePath)) {
#  724|             int ok = 1;
#  725|   

Error: CPPCHECK_WARNING (CWE-457): [#def1349]
brltty-6.8/python3/Programs/serial_termios.c:222: error[uninitvar]: Uninitialized variable: size
#  220|   
#  221|     attributes->c_cflag &= ~CSIZE;
#  222|->   attributes->c_cflag |= size;
#  223|     return 1;
#  224|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1350]
brltty-6.8/python3/Programs/spk_input.c:156:22: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
brltty-6.8/python3/Programs/spk_input.c:153:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/spk_input.c:153:6: branch_true: following ‘true’ branch (when ‘obj’ is non-NULL)...
brltty-6.8/python3/Programs/spk_input.c:154:5: branch_true: ...to here
brltty-6.8/python3/Programs/spk_input.c:156:22: throw: if ‘newNamedPipeObject’ throws an exception...
brltty-6.8/python3/Programs/spk_input.c:156:22: danger: ‘obj’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  154|       memset(obj, 0, sizeof(*obj));
#  155|   
#  156|->     if ((obj->pipe = newNamedPipeObject(name, handleSpeechInput, obj))) {
#  157|         return obj;
#  158|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1351]
brltty-6.8/python3/Programs/spk_thread.c:271:3: warning[-Wanalyzer-malloc-leak]: leak of ‘sdt’
brltty-6.8/python3/Programs/spk_thread.c:867:1: enter_function: entry to ‘constructSpeechDriverThread’
brltty-6.8/python3/Programs/spk_thread.c:873:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/spk_thread.c:873:6: branch_true: following ‘true’ branch (when ‘sdt’ is non-NULL)...
brltty-6.8/python3/Programs/spk_thread.c:874:5: branch_true: ...to here
brltty-6.8/python3/Programs/spk_thread.c:875:5: call_function: calling ‘setThreadState’ from ‘constructSpeechDriverThread’
#  269|   
#  270|     if (!name) name = "?";
#  271|->   logMessage(LOG_CATEGORY(SPEECH_EVENTS), "driver thread %s", name);
#  272|     sdt->threadState = state;
#  273|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1352]
brltty-6.8/python3/Programs/spk_thread.c:881:30: warning[-Wanalyzer-malloc-leak]: leak of ‘sdt’
brltty-6.8/python3/Programs/spk_thread.c:867:1: enter_function: entry to ‘constructSpeechDriverThread’
brltty-6.8/python3/Programs/spk_thread.c:873:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/spk_thread.c:873:6: branch_true: following ‘true’ branch (when ‘sdt’ is non-NULL)...
brltty-6.8/python3/Programs/spk_thread.c:874:5: branch_true: ...to here
brltty-6.8/python3/Programs/spk_thread.c:875:5: call_function: calling ‘setThreadState’ from ‘constructSpeechDriverThread’
brltty-6.8/python3/Programs/spk_thread.c:875:5: return_function: returning to ‘constructSpeechDriverThread’ from ‘setThreadState’
brltty-6.8/python3/Programs/spk_thread.c:881:30: throw: if ‘newQueue’ throws an exception...
brltty-6.8/python3/Programs/spk_thread.c:881:30: danger: ‘sdt’ leaks here; was allocated at [(2)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/1)
#  879|       sdt->driverParameters = parameters;
#  880|   
#  881|->     if ((sdt->requestQueue = newQueue(deallocateSpeechRequest, NULL))) {
#  882|         spk->driver.thread = sdt;
#  883|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1353]
brltty-6.8/python3/Programs/system_linux.c:939:9: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/python3/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/python3/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
#  937|           fclose(stream);
#  938|         } else {
#  939|->         logMessage(LOG_WARNING, "cannot open %s: %s", path, strerror(errno));
#  940|         }
#  941|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1354]
brltty-6.8/python3/Programs/system_linux.c:939:9: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
#  937|           fclose(stream);
#  938|         } else {
#  939|->         logMessage(LOG_WARNING, "cannot open %s: %s", path, strerror(errno));
#  940|         }
#  941|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1355]
brltty-6.8/python3/Programs/system_linux.c:945:16: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/python3/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/python3/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
#  943|       {
#  944|         const char *const arguments[] = {command, "-q", name, NULL};
#  945|->       int ok = executeHostCommand(arguments) == 0;
#  946|   
#  947|         if (!ok) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1356]
brltty-6.8/python3/Programs/system_linux.c:945:16: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
#  943|       {
#  944|         const char *const arguments[] = {command, "-q", name, NULL};
#  945|->       int ok = executeHostCommand(arguments) == 0;
#  946|   
#  947|         if (!ok) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1357]
brltty-6.8/python3/Programs/system_linux.c:948:9: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/python3/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/python3/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
#  946|   
#  947|         if (!ok) {
#  948|->         logMessage(LOG_WARNING, "kernel module not installed: %s", name);
#  949|           return 0;
#  950|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1358]
brltty-6.8/python3/Programs/system_linux.c:948:9: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
#  946|   
#  947|         if (!ok) {
#  948|->         logMessage(LOG_WARNING, "kernel module not installed: %s", name);
#  949|           return 0;
#  950|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1359]
brltty-6.8/python3/Programs/system_linux.c:972:13: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/python3/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/python3/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
#  970|   
#  971|     if (!installed) wait = 0;
#  972|->   if (wait) asyncWait(500);
#  973|     return installed;
#  974|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1360]
brltty-6.8/python3/Programs/system_linux.c:972:13: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
#  970|   
#  971|     if (!installed) wait = 0;
#  972|->   if (wait) asyncWait(500);
#  973|     return installed;
#  974|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1361]
brltty-6.8/python3/Programs/system_linux.c:984:21: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/python3/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
#  982|     #endif /* O_CLOEXEC */
#  983|   
#  984|->   if ((descriptor = open(path, flags)) != -1) goto opened;
#  985|     if (!allowModeSubset) goto failed;
#  986|     if ((flags & O_ACCMODE) != O_RDWR) goto failed;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1362]
brltty-6.8/python3/Programs/system_linux.c:997:23: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/python3/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
#  995|   
#  996|     tryWriteOnly:
#  997|->     if ((descriptor = open(path, (flags | O_WRONLY))) != -1) goto opened;
#  998|   
#  999|     tryReadOnly:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1363]
brltty-6.8/python3/Programs/system_linux.c:1000:23: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/python3/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
#  998|   
#  999|     tryReadOnly:
# 1000|->     if ((descriptor = open(path, (flags | O_RDONLY))) != -1) goto opened;
# 1001|   
# 1002|       errno = error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1364]
brltty-6.8/python3/Programs/system_linux.c:1006:3: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/python3/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
# 1004|   
# 1005|   failed:
# 1006|->   logMessage(LOG_DEBUG, "cannot open device: %s: %s", path, strerror(errno));
# 1007|     return -1;
# 1008|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1365]
brltty-6.8/python3/Programs/system_linux.c:1010:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘descriptor’
brltty-6.8/python3/Programs/system_linux.c:984:21: acquire_resource: opened here
brltty-6.8/python3/Programs/system_linux.c:984:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/system_linux.c:984:3: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1010:3: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/system_linux.c:1010:3: danger: ‘descriptor’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1008|   
# 1009|   opened:
# 1010|->   logMessage(LOG_DEBUG, "device opened: %s: fd=%d", path, descriptor);
# 1011|     return descriptor;
# 1012|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1366]
brltty-6.8/python3/Programs/system_linux.c:1010:3: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/python3/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
# 1008|   
# 1009|   opened:
# 1010|->   logMessage(LOG_DEBUG, "device opened: %s: fd=%d", path, descriptor);
# 1011|     return descriptor;
# 1012|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1367]
brltty-6.8/python3/Programs/system_linux.c:1075:16: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/python3/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
# 1073|   int
# 1074|   openCharacterDevice (const char *name, int flags, int major, int minor) {
# 1075|->   char *path = getDevicePath(name);
# 1076|     int descriptor;
# 1077|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1368]
brltty-6.8/python3/Programs/system_linux.c:1084:19: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/python3/Programs/system_linux.c:1129:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/system_linux.c:1130:37: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1130:37: call_function: calling ‘openCharacterDevice’ from ‘newUinputObject’
# 1082|         free(path);
# 1083|   
# 1084|->       if ((path = makeWritablePath(locatePathName(name)))) {
# 1085|           descriptor = createCharacterDevice(path, flags, major, minor);
# 1086|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1369]
brltty-6.8/python3/Programs/system_linux.c:1126:16: warning[-Wanalyzer-malloc-leak]: leak of ‘monitor’
brltty-6.8/python3/Programs/system_linux.c:1421:1: enter_function: entry to ‘newInputEventMonitor’
brltty-6.8/python3/Programs/system_linux.c:1428:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1428:6: branch_true: following ‘true’ branch (when ‘monitor’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1429:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1433:34: call_function: calling ‘newUinputObject’ from ‘newInputEventMonitor’
# 1124|       {
# 1125|         static const char *const names[] = {"uinput", "input/uinput", NULL};
# 1126|->       device = resolveDeviceName(names, 0, "uinput");
# 1127|       }
# 1128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1370]
brltty-6.8/python3/Programs/system_linux.c:1126:16: warning[-Wanalyzer-malloc-leak]: leak of ‘uinput’
brltty-6.8/python3/Programs/system_linux.c:1115:1: enter_function: entry to ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1119:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/system_linux.c:1119:6: branch_true: following ‘true’ branch (when ‘uinput’ is non-NULL)...
brltty-6.8/python3/Programs/system_linux.c:1120:5: branch_true: ...to here
brltty-6.8/python3/Programs/system_linux.c:1121:5: call_function: calling ‘installUinputModule’ from ‘newUinputObject’
brltty-6.8/python3/Programs/system_linux.c:1121:5: return_function: returning to ‘newUinputObject’ from ‘installUinputModule’
brltty-6.8/python3/Programs/system_linux.c:1126:16: throw: if ‘resolveDeviceName’ throws an exception...
brltty-6.8/python3/Programs/system_linux.c:1126:16: danger: ‘uinput’ leaks here; was allocated at [(2)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/1)
# 1124|       {
# 1125|         static const char *const names[] = {"uinput", "input/uinput", NULL};
# 1126|->       device = resolveDeviceName(names, 0, "uinput");
# 1127|       }
# 1128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1371]
brltty-6.8/python3/Programs/thread.c:74:5: warning[-Wanalyzer-malloc-leak]: leak of ‘run’
brltty-6.8/python3/Programs/thread.c:68:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/thread.c:68:6: branch_true: following ‘true’ branch (when ‘run’ is non-NULL)...
brltty-6.8/python3/Programs/thread.c:70:21: branch_true: ...to here
brltty-6.8/python3/Programs/thread.c:74:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/thread.c:74:5: danger: ‘run’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   72|       strcpy(run->name, create->name);
#   73|   
#   74|->     logMessage(LOG_CATEGORY(ASYNC_EVENTS), "creating thread: %s", create->name);
#   75|       create->error = pthread_create(create->thread, create->attributes, runThread, run);
#   76|       if (!create->error) return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1372]
brltty-6.8/python3/Programs/ttb_compile.c:44:10: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/python3/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:353:28: call_function: calling ‘getTextTableHeader’ from ‘makeTextTable’
#   42|   void *
#   43|   getTextTableItem (TextTableData *ttd, TextTableOffset offset) {
#   44|->   return getDataItem(ttd->area, offset);
#   45|   }
#   46|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1373]
brltty-6.8/python3/Programs/ttb_compile.c:76:32: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/python3/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:360:15: call_function: calling ‘getUnicodeCell’ from ‘makeTextTable’
#   74|   
#   75|     {
#   76|->     UnicodeGroupEntry *group = getDataItem(ttd->area, groupOffset);
#   77|       unsigned int planeNumber = UNICODE_PLANE_NUMBER(character);
#   78|       DataOffset planeOffset = group->planes[planeNumber];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1374]
brltty-6.8/python3/Programs/ttb_compile.c:101:32: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/python3/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:360:15: call_function: calling ‘getUnicodeCell’ from ‘makeTextTable’
#   99|   
#  100|     {
#  101|->     UnicodePlaneEntry *plane = getDataItem(ttd->area, planeOffset);
#  102|       unsigned int rowNumber = UNICODE_ROW_NUMBER(character);
#  103|       DataOffset rowOffset = plane->rows[rowNumber];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1375]
brltty-6.8/python3/Programs/ttb_compile.c:124:10: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/python3/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:360:15: call_function: calling ‘getUnicodeCell’ from ‘makeTextTable’
#  122|     DataOffset rowOffset = getUnicodeRowOffset(ttd, character, allocate);
#  123|     if (!rowOffset) return NULL;
#  124|->   return getDataItem(ttd->area, rowOffset);
#  125|   }
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1376]
brltty-6.8/python3/Programs/ttb_compile.c:264:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ttd’
brltty-6.8/python3/Programs/ttb_compile.c:257:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/ttb_compile.c:257:6: branch_true: following ‘true’ branch (when ‘ttd’ is non-NULL)...
brltty-6.8/python3/Programs/ttb_compile.c:258:5: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:264:22: throw: if ‘newDataArea’ throws an exception...
brltty-6.8/python3/Programs/ttb_compile.c:264:22: danger: ‘ttd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  262|       ttd->alias.count = 0;
#  263|   
#  264|->     if ((ttd->area = newDataArea())) {
#  265|         if (allocateDataItem(ttd->area, NULL, sizeof(TextTableHeader), __alignof__(TextTableHeader))) {
#  266|           return ttd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1377]
brltty-6.8/python3/Programs/ttb_compile.c:265:11: warning[-Wanalyzer-malloc-leak]: leak of ‘ttd’
brltty-6.8/python3/Programs/ttb_compile.c:257:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/ttb_compile.c:257:6: branch_true: following ‘true’ branch (when ‘ttd’ is non-NULL)...
brltty-6.8/python3/Programs/ttb_compile.c:258:5: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:264:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ttb_compile.c:265:11: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:265:11: throw: if ‘allocateDataItem’ throws an exception...
brltty-6.8/python3/Programs/ttb_compile.c:265:11: danger: ‘ttd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  263|   
#  264|       if ((ttd->area = newDataArea())) {
#  265|->       if (allocateDataItem(ttd->area, NULL, sizeof(TextTableHeader), __alignof__(TextTableHeader))) {
#  266|           return ttd;
#  267|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1378]
brltty-6.8/python3/Programs/ttb_compile.c:269:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ttd’
brltty-6.8/python3/Programs/ttb_compile.c:257:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/ttb_compile.c:257:6: branch_true: following ‘true’ branch (when ‘ttd’ is non-NULL)...
brltty-6.8/python3/Programs/ttb_compile.c:258:5: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:264:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ttb_compile.c:265:11: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:265:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/ttb_compile.c:269:7: branch_false: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:269:7: throw: if ‘destroyDataArea’ throws an exception...
brltty-6.8/python3/Programs/ttb_compile.c:269:7: danger: ‘ttd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  267|         }
#  268|   
#  269|->       destroyDataArea(ttd->area);
#  270|       }
#  271|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1379]
brltty-6.8/python3/Programs/ttb_compile.c:333:11: warning[-Wanalyzer-malloc-leak]: leak of ‘parameters.data’
brltty-6.8/python3/Programs/ttb_compile.c:323:1: enter_function: entry to ‘processTextTableLines’
brltty-6.8/python3/Programs/ttb_compile.c:324:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ttb_compile.c:327:16: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:327:16: call_function: calling ‘newTextTableData’ from ‘processTextTableLines’
brltty-6.8/python3/Programs/ttb_compile.c:327:16: return_function: returning to ‘processTextTableLines’ from ‘newTextTableData’
brltty-6.8/python3/Programs/ttb_compile.c:327:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/ttb_compile.c:328:32: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:333:11: throw: if ‘processDataStream’ throws an exception...
brltty-6.8/python3/Programs/ttb_compile.c:333:11: danger: ‘parameters.data’ leaks here; was allocated at [(6)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/5)
#  331|         };
#  332|   
#  333|->       if (processDataStream(NULL, stream, name, &parameters)) {
#  334|           if (finishTextTableData(ttd)) {
#  335|             return ttd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1380]
brltty-6.8/python3/Programs/ttb_compile.c:354:19: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:354:19: throw: if ‘getDataSize’ throws an exception...
brltty-6.8/python3/Programs/ttb_compile.c:354:19: danger: ‘table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  352|   
#  353|       table->header.fields = getTextTableHeader(ttd);
#  354|->     table->size = getDataSize(ttd->area);
#  355|   
#  356|       table->options.tryBaseCharacter = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1381]
brltty-6.8/python3/Programs/ttb_compile.c:364:5: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
brltty-6.8/python3/Programs/ttb_compile.c:347:1: enter_function: entry to ‘makeTextTable’
brltty-6.8/python3/Programs/ttb_compile.c:348:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: following ‘true’ branch (when ‘table’ is non-NULL)...
brltty-6.8/python3/Programs/ttb_compile.c:350:6: branch_true: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:360:15: call_function: calling ‘getUnicodeCell’ from ‘makeTextTable’
brltty-6.8/python3/Programs/ttb_compile.c:360:15: return_function: returning to ‘makeTextTable’ from ‘getUnicodeCell’
brltty-6.8/python3/Programs/ttb_compile.c:361:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/ttb_compile.c:364:5: branch_false: ...to here
brltty-6.8/python3/Programs/ttb_compile.c:364:5: throw: if ‘resetDataArea’ throws an exception...
brltty-6.8/python3/Programs/ttb_compile.c:364:5: danger: ‘table’ leaks here; was allocated at [(2)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/1)
#  362|       }
#  363|   
#  364|->     resetDataArea(ttd->area);
#  365|     }
#  366|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1382]
brltty-6.8/python3/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(0)’
brltty-6.8/python3/Programs/tune.c:431:1: enter_function: entry to ‘tuneSetDevice’
brltty-6.8/python3/Programs/tune.c:466:16: call_function: calling ‘newTuneRequest’ from ‘tuneSetDevice’
brltty-6.8/python3/Programs/tune.c:466:16: return_function: returning to ‘tuneSetDevice’ from ‘newTuneRequest’
brltty-6.8/python3/Programs/tune.c:466:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/tune.c:467:7: branch_true: ...to here
brltty-6.8/python3/Programs/tune.c:468:12: call_function: calling ‘sendTuneRequest’ from ‘tuneSetDevice’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1383]
brltty-6.8/python3/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(1)’
brltty-6.8/python3/Programs/tune.c:476:1: enter_function: entry to ‘tunePlayNotes’
brltty-6.8/python3/Programs/tune.c:477:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/tune.c:480:16: branch_true: ...to here
brltty-6.8/python3/Programs/tune.c:480:16: call_function: calling ‘newTuneRequest’ from ‘tunePlayNotes’
brltty-6.8/python3/Programs/tune.c:480:16: return_function: returning to ‘tunePlayNotes’ from ‘newTuneRequest’
brltty-6.8/python3/Programs/tune.c:480:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/tune.c:481:7: branch_true: ...to here
brltty-6.8/python3/Programs/tune.c:483:12: call_function: calling ‘sendTuneRequest’ from ‘tunePlayNotes’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1384]
brltty-6.8/python3/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(2)’
brltty-6.8/python3/Programs/tune.c:489:1: enter_function: entry to ‘tunePlayTones’
brltty-6.8/python3/Programs/tune.c:490:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/tune.c:493:16: branch_true: ...to here
brltty-6.8/python3/Programs/tune.c:493:16: call_function: calling ‘newTuneRequest’ from ‘tunePlayTones’
brltty-6.8/python3/Programs/tune.c:493:16: return_function: returning to ‘tunePlayTones’ from ‘newTuneRequest’
brltty-6.8/python3/Programs/tune.c:493:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/tune.c:494:7: branch_true: ...to here
brltty-6.8/python3/Programs/tune.c:496:12: call_function: calling ‘sendTuneRequest’ from ‘tunePlayTones’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1385]
brltty-6.8/python3/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(3)’
brltty-6.8/python3/Programs/tune.c:502:1: enter_function: entry to ‘tuneWait’
brltty-6.8/python3/Programs/tune.c:505:14: call_function: calling ‘newTuneRequest’ from ‘tuneWait’
brltty-6.8/python3/Programs/tune.c:505:14: return_function: returning to ‘tuneWait’ from ‘newTuneRequest’
brltty-6.8/python3/Programs/tune.c:505:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/tune.c:506:5: branch_true: ...to here
brltty-6.8/python3/Programs/tune.c:507:10: call_function: calling ‘sendTuneRequest’ from ‘tuneWait’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1386]
brltty-6.8/python3/Programs/tune.c:414:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newTuneRequest(4)’
brltty-6.8/python3/Programs/tune.c:518:1: enter_function: entry to ‘tuneSynchronize’
brltty-6.8/python3/Programs/tune.c:521:14: call_function: calling ‘newTuneRequest’ from ‘tuneSynchronize’
brltty-6.8/python3/Programs/tune.c:521:14: return_function: returning to ‘tuneSynchronize’ from ‘newTuneRequest’
brltty-6.8/python3/Programs/tune.c:521:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/tune.c:522:32: branch_true: ...to here
brltty-6.8/python3/Programs/tune.c:525:9: call_function: calling ‘sendTuneRequest’ from ‘tuneSynchronize’
#  412|     TuneRequest *req;
#  413|   
#  414|->   if (!tuneInitialized) {
#  415|       tuneInitialized = 1;
#  416|       onProgramExit("tunes", exitTunes, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1387]
brltty-6.8/python3/Programs/tune_builder.c:643:47: warning[-Wanalyzer-malloc-leak]: leak of ‘tb’
brltty-6.8/python3/Programs/tune_builder.c:660:1: enter_function: entry to ‘newTuneBuilder’
brltty-6.8/python3/Programs/tune_builder.c:663:13: acquire_memory: allocated here
brltty-6.8/python3/Programs/tune_builder.c:663:6: branch_true: following ‘true’ branch (when ‘tb’ is non-NULL)...
brltty-6.8/python3/Programs/tune_builder.c:664:5: branch_true: ...to here
brltty-6.8/python3/Programs/tune_builder.c:669:5: call_function: calling ‘resetTuneBuilder’ from ‘newTuneBuilder’
#  641|   
#  642|     setParameter(&tb->duration, "note duration", 1, UINT16_MAX, 0);
#  643|->   setParameter(&tb->note, "MIDI note number", getLowestNote(), getHighestNote(), NOTE_MIDDLE_C+noteOffsets[2]);
#  644|     setParameter(&tb->octave, "octave number", 0, 9, 0);
#  645|     setParameter(&tb->percentage, "percentage", 1, 100, 80);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1388]
brltty-6.8/python3/Programs/tune_builder.c:643:64: warning[-Wanalyzer-malloc-leak]: leak of ‘tb’
brltty-6.8/python3/Programs/tune_builder.c:660:1: enter_function: entry to ‘newTuneBuilder’
brltty-6.8/python3/Programs/tune_builder.c:663:13: acquire_memory: allocated here
brltty-6.8/python3/Programs/tune_builder.c:663:6: branch_true: following ‘true’ branch (when ‘tb’ is non-NULL)...
brltty-6.8/python3/Programs/tune_builder.c:664:5: branch_true: ...to here
brltty-6.8/python3/Programs/tune_builder.c:669:5: call_function: calling ‘resetTuneBuilder’ from ‘newTuneBuilder’
#  641|   
#  642|     setParameter(&tb->duration, "note duration", 1, UINT16_MAX, 0);
#  643|->   setParameter(&tb->note, "MIDI note number", getLowestNote(), getHighestNote(), NOTE_MIDDLE_C+noteOffsets[2]);
#  644|     setParameter(&tb->octave, "octave number", 0, 9, 0);
#  645|     setParameter(&tb->percentage, "percentage", 1, 100, 80);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1389]
brltty-6.8/python3/Programs/unicode.c:64:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘**current_9(D)’
brltty-6.8/python3/Programs/unicode.c:210:1: enter_function: entry to ‘composeCharacters’
brltty-6.8/python3/Programs/unicode.c:215:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/unicode.c:217:9: branch_false: ...to here
brltty-6.8/python3/Programs/unicode.c:253:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/unicode.c:284:1: branch_false: ...to here
brltty-6.8/python3/Programs/unicode.c:269:12: branch_true: following ‘true’ branch (when ‘trg < trgEnd’)...
brltty-6.8/python3/Programs/unicode.c:270:12: branch_true: ...to here
brltty-6.8/python3/Programs/unicode.c:270:12: call_function: calling ‘nextBaseCharacter’ from ‘composeCharacters’
#   62|     do {
#   63|       if (*current == end) return 0;
#   64|->   } while (u_getCombiningClass(*(*current)++));
#   65|   
#   66|     return 1;

Error: CPPCHECK_WARNING (CWE-457): [#def1390]
brltty-6.8/python3/Programs/update.c:301: warning[uninitvar]: Uninitialized variable: inputText
#  299|     contractText(
#  300|       contractionTable, &brd->contracted.cache,
#  301|->     inputText, &inputLength,
#  302|       cells, &outputLength,
#  303|       offsetsArray, getCursorOffsetForContracting()

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1391]
brltty-6.8/python3/Programs/update.c:714:43: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*compactCells[i]’
brltty-6.8/python3/Programs/update.c:634:1: enter_function: entry to ‘renderInfoLine’
brltty-6.8/python3/Programs/update.c:638:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/update.c:644:23: branch_false: ...to here
brltty-6.8/python3/Programs/update.c:659:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/update.c:668:5: branch_false: ...to here
brltty-6.8/python3/Programs/update.c:675:3: call_function: calling ‘getBrailleVariantCharacter’ from ‘renderInfoLine’
brltty-6.8/python3/Programs/update.c:675:3: return_function: returning to ‘renderInfoLine’ from ‘getBrailleVariantCharacter’
brltty-6.8/python3/Programs/update.c:687:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/update.c:701:12: branch_false: ...to here
brltty-6.8/python3/Programs/update.c:708:30: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/update.c:710:5: branch_false: ...to here
brltty-6.8/python3/Programs/update.c:710:28: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/update.c:713:10: branch_true: ...to here
brltty-6.8/python3/Programs/update.c:713:10: branch_false: following ‘false’ branch (when ‘threshold <= i’)...
brltty-6.8/python3/Programs/update.c:716:21: branch_false: ...to here
brltty-6.8/python3/Programs/update.c:710:28: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/update.c:713:10: branch_true: ...to here
brltty-6.8/python3/Programs/update.c:713:10: branch_false: following ‘false’ branch (when ‘threshold <= i’)...
brltty-6.8/python3/Programs/update.c:716:21: branch_false: ...to here
brltty-6.8/python3/Programs/update.c:710:28: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/update.c:713:10: branch_true: ...to here
brltty-6.8/python3/Programs/update.c:714:43: danger: use of uninitialized value ‘*compactCells[i]’ here
#  712|   
#  713|         if (i < threshold) {
#  714|->         character = UNICODE_BRAILLE_ROW | compactCells[i];
#  715|         } else {
#  716|           character = convertCharToWchar(text[i]);

Error: CPPCHECK_WARNING (CWE-457): [#def1392]
brltty-6.8/python3/Programs/update.c:724: warning[uninitvar]: Uninitialized variable: characters
#  722|     }
#  723|   
#  724|->   return writeBrailleCharacters(mode, characters, length);
#  725|   }
#  726|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1393]
brltty-6.8/python3/Programs/usb.c:62:10: warning[-Wanalyzer-malloc-leak]: leak of ‘descriptors’
brltty-6.8/python3/Programs/usb.c:494:1: enter_function: entry to ‘usbConfigureDevice’
brltty-6.8/python3/Programs/usb.c:506:52: call_function: calling ‘usbConfigurationDescriptor’ from ‘usbConfigureDevice’
#   60|     int timeout
#   61|   ) {
#   62|->   return usbControlTransfer(device, UsbControlDirection_Input, recipient, type,
#   63|                               request, value, index, buffer, length, timeout);
#   64|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1394]
brltty-6.8/python3/Programs/usb.c:461:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘descriptor.configuration.wTotalLength’
brltty-6.8/python3/Programs/usb.c:760:1: enter_function: entry to ‘usbGetEndpoint’
brltty-6.8/python3/Programs/usb.c:762:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/usb.c:763:45: branch_false: ...to here
brltty-6.8/python3/Programs/usb.c:763:45: call_function: calling ‘usbEndpointDescriptor’ from ‘usbGetEndpoint’
#  459|   
#  460|         if (number < device->descriptor.bNumConfigurations) {
#  461|->         int length = getLittleEndian16(descriptor.configuration.wTotalLength);
#  462|           UsbDescriptor *descriptors;
#  463|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1395]
brltty-6.8/python3/Programs/usb.c:490:10: warning[-Wanalyzer-malloc-leak]: leak of ‘descriptors’
brltty-6.8/python3/Programs/usb.c:494:1: enter_function: entry to ‘usbConfigureDevice’
brltty-6.8/python3/Programs/usb.c:506:52: call_function: calling ‘usbConfigurationDescriptor’ from ‘usbConfigureDevice’
#  488|     }
#  489|   
#  490|->   return device->configuration;
#  491|   }
#  492|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1396]
brltty-6.8/python3/Programs/usb.c:874:5: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/usb.c:1028:1: enter_function: entry to ‘usbOpenDevice’
brltty-6.8/python3/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1040:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/usb.c:1052:7: branch_false: ...to here
brltty-6.8/python3/Programs/usb.c:1052:7: call_function: calling ‘usbRemoveEndpoints’ from ‘usbOpenDevice’
#  872|   usbRemoveEndpoints (UsbDevice *device, int final) {
#  873|     if (device->endpoints) {
#  874|->     processQueue(device->endpoints, usbFinishEndpoint, NULL);
#  875|       deleteElements(device->endpoints);
#  876|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1397]
brltty-6.8/python3/Programs/usb.c:875:5: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/usb.c:1028:1: enter_function: entry to ‘usbOpenDevice’
brltty-6.8/python3/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1040:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/usb.c:1052:7: branch_false: ...to here
brltty-6.8/python3/Programs/usb.c:1052:7: call_function: calling ‘usbRemoveEndpoints’ from ‘usbOpenDevice’
#  873|     if (device->endpoints) {
#  874|       processQueue(device->endpoints, usbFinishEndpoint, NULL);
#  875|->     deleteElements(device->endpoints);
#  876|   
#  877|       if (final) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1398]
brltty-6.8/python3/Programs/usb.c:878:7: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/usb.c:1028:1: enter_function: entry to ‘usbOpenDevice’
brltty-6.8/python3/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1040:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/usb.c:1052:7: branch_false: ...to here
brltty-6.8/python3/Programs/usb.c:1052:7: call_function: calling ‘usbRemoveEndpoints’ from ‘usbOpenDevice’
#  876|   
#  877|       if (final) {
#  878|->       deallocateQueue(device->endpoints);
#  879|         device->endpoints = NULL;
#  880|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1399]
brltty-6.8/python3/Programs/usb.c:898:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
brltty-6.8/python3/Programs/usb.c:894:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb.c:894:6: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
brltty-6.8/python3/Programs/usb.c:896:5: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:898:9: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/python3/Programs/usb.c:898:9: danger: ‘entry’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  896|       entry->filter = filter;
#  897|   
#  898|->     if (enqueueItem(device->inputFilters, entry)) return 1;
#  899|   
#  900|       free(entry);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1400]
brltty-6.8/python3/Programs/usb.c:1039:30: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1039:30: throw: if ‘newQueue’ throws an exception...
brltty-6.8/python3/Programs/usb.c:1039:30: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1037|       device->disableEndpointReset = 0;
# 1038|   
# 1039|->     if ((device->endpoints = newQueue(usbDeallocateEndpoint, NULL))) {
# 1040|         if ((device->inputFilters = newQueue(usbDeallocateInputFilter, NULL))) {
# 1041|           if (usbReadDeviceDescriptor(device)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1401]
brltty-6.8/python3/Programs/usb.c:1040:35: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1040:35: throw: if ‘newQueue’ throws an exception...
brltty-6.8/python3/Programs/usb.c:1040:35: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 1038|   
# 1039|       if ((device->endpoints = newQueue(usbDeallocateEndpoint, NULL))) {
# 1040|->       if ((device->inputFilters = newQueue(usbDeallocateInputFilter, NULL))) {
# 1041|           if (usbReadDeviceDescriptor(device)) {
# 1042|             if (device->descriptor.bDescriptorType == UsbDescriptorType_Device) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1402]
brltty-6.8/python3/Programs/usb.c:1041:13: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
brltty-6.8/python3/Programs/usb.c:1031:17: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb.c:1031:6: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
brltty-6.8/python3/Programs/usb.c:1032:5: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1039:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb.c:1040:35: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1040:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb.c:1041:13: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1041:13: throw: if ‘usbReadDeviceDescriptor’ throws an exception...
brltty-6.8/python3/Programs/usb.c:1041:13: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 1039|       if ((device->endpoints = newQueue(usbDeallocateEndpoint, NULL))) {
# 1040|         if ((device->inputFilters = newQueue(usbDeallocateInputFilter, NULL))) {
# 1041|->         if (usbReadDeviceDescriptor(device)) {
# 1042|             if (device->descriptor.bDescriptorType == UsbDescriptorType_Device) {
# 1043|               if (device->descriptor.bLength == UsbDescriptorSize_Device) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1403]
brltty-6.8/python3/Programs/usb.c:1641:28: warning[-Wanalyzer-malloc-leak]: leak of ‘channel’
brltty-6.8/python3/Programs/usb.c:1638:18: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb.c:1638:6: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
brltty-6.8/python3/Programs/usb.c:1641:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb.c:1641:28: throw: if ‘usbFindDevice’ throws an exception...
brltty-6.8/python3/Programs/usb.c:1641:28: danger: ‘channel’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 1639|       memset(channel, 0, sizeof(*channel));
# 1640|   
# 1641|->     if ((channel->device = usbFindDevice(usbChooseChannel, data))) {
# 1642|         channel->definition = data->definition;
# 1643|         return channel;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1404]
brltty-6.8/python3/Programs/usb_cdc_acm.c:235:10: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/python3/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
#  233|     const UsbDescriptor *descriptor = NULL;
#  234|   
#  235|->   while (usbNextDescriptor(device, &descriptor)) {
#  236|       if (descriptor->header.bDescriptorType == UsbDescriptorType_Interface) {
#  237|         if (descriptor->interface.bInterfaceClass == 0X02) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1405]
brltty-6.8/python3/Programs/usb_cdc_acm.c:243:3: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/python3/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
#  241|     }
#  242|   
#  243|->   logMessage(LOG_WARNING, "USB: communication interface descriptor not found");
#  244|     errno = ENOENT;
#  245|     return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1406]
brltty-6.8/python3/Programs/usb_cdc_acm.c:252:10: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/python3/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:282:32: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:282:32: call_function: calling ‘usbFindInterruptInputEndpoint’ from ‘usbMakeData_CDC_ACM’
#  250|     const UsbDescriptor *descriptor = (const UsbDescriptor *)interface;
#  251|   
#  252|->   while (usbNextDescriptor(device, &descriptor)) {
#  253|       if (descriptor->header.bDescriptorType == UsbDescriptorType_Interface) break;
#  254|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1407]
brltty-6.8/python3/Programs/usb_cdc_acm.c:264:3: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/python3/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:282:32: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:282:32: call_function: calling ‘usbFindInterruptInputEndpoint’ from ‘usbMakeData_CDC_ACM’
#  262|     }
#  263|   
#  264|->   logMessage(LOG_WARNING, "USB: interrupt input endpoint descriptor not found");
#  265|     errno = ENOENT;
#  266|     return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1408]
brltty-6.8/python3/Programs/usb_cdc_acm.c:280:11: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/python3/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:280:11: throw: if ‘usbClaimInterface’ throws an exception...
brltty-6.8/python3/Programs/usb_cdc_acm.c:280:11: danger: ‘usd’ leaks here; was allocated at [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1)
#  278|         unsigned char interfaceNumber = usd->interface->bInterfaceNumber;
#  279|   
#  280|->       if (usbClaimInterface(device, interfaceNumber)) {
#  281|           if (usbSetAlternative(device, usd->interface->bInterfaceNumber, usd->interface->bAlternateSetting)) {
#  282|             if ((usd->endpoint = usbFindInterruptInputEndpoint(device, usd->interface))) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1409]
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:13: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/python3/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:13: throw: if ‘usbSetAlternative’ throws an exception...
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:13: danger: ‘usd’ leaks here; was allocated at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  279|   
#  280|         if (usbClaimInterface(device, interfaceNumber)) {
#  281|->         if (usbSetAlternative(device, usd->interface->bInterfaceNumber, usd->interface->bAlternateSetting)) {
#  282|             if ((usd->endpoint = usbFindInterruptInputEndpoint(device, usd->interface))) {
#  283|               usbBeginInput(device, USB_ENDPOINT_NUMBER(usd->endpoint));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1410]
brltty-6.8/python3/Programs/usb_cdc_acm.c:283:13: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/python3/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:282:32: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:282:32: call_function: calling ‘usbFindInterruptInputEndpoint’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:282:32: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindInterruptInputEndpoint’
brltty-6.8/python3/Programs/usb_cdc_acm.c:282:14: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:283:35: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:283:13: throw: if ‘usbBeginInput’ throws an exception...
brltty-6.8/python3/Programs/usb_cdc_acm.c:283:13: danger: ‘usd’ leaks here; was allocated at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
#  281|           if (usbSetAlternative(device, usd->interface->bInterfaceNumber, usd->interface->bAlternateSetting)) {
#  282|             if ((usd->endpoint = usbFindInterruptInputEndpoint(device, usd->interface))) {
#  283|->             usbBeginInput(device, USB_ENDPOINT_NUMBER(usd->endpoint));
#  284|               *serialData = usd;
#  285|               return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1411]
brltty-6.8/python3/Programs/usb_cdc_acm.c:289:9: warning[-Wanalyzer-malloc-leak]: leak of ‘usd’
brltty-6.8/python3/Programs/usb_cdc_acm.c:270:1: enter_function: entry to ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:14: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: following ‘true’ branch (when ‘usd’ is non-NULL)...
brltty-6.8/python3/Programs/usb_cdc_acm.c:273:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: call_function: calling ‘usbFindCommunicationInterface’ from ‘usbMakeData_CDC_ACM’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:27: return_function: returning to ‘usbMakeData_CDC_ACM’ from ‘usbFindCommunicationInterface’
brltty-6.8/python3/Programs/usb_cdc_acm.c:277:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:278:21: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:280:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:73: branch_true: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:281:12: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/usb_cdc_acm.c:289:9: branch_false: ...to here
brltty-6.8/python3/Programs/usb_cdc_acm.c:289:9: throw: if ‘usbReleaseInterface’ throws an exception...
brltty-6.8/python3/Programs/usb_cdc_acm.c:289:9: danger: ‘usd’ leaks here; was allocated at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
#  287|           }
#  288|   
#  289|->         usbReleaseInterface(device, interfaceNumber);
#  290|         }
#  291|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1412]
brltty-6.8/python3/Programs/usb_hid.c:63:26: warning[-Wanalyzer-malloc-leak]: leak of ‘items’
brltty-6.8/python3/Programs/usb_hid.c:45:1: enter_function: entry to ‘usbHidGetItems’
brltty-6.8/python3/Programs/usb_hid.c:51:33: call_function: calling ‘usbHidDescriptor’ from ‘usbHidGetItems’
brltty-6.8/python3/Programs/usb_hid.c:51:33: return_function: returning to ‘usbHidGetItems’ from ‘usbHidDescriptor’
brltty-6.8/python3/Programs/usb_hid.c:53:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_hid.c:54:18: branch_true: ...to here
brltty-6.8/python3/Programs/usb_hid.c:54:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_hid.c:55:47: branch_true: ...to here
brltty-6.8/python3/Programs/usb_hid.c:62:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_hid.c:62:10: branch_true: following ‘true’ branch (when ‘items’ is non-NULL)...
brltty-6.8/python3/Programs/usb_hid.c:67:22: branch_true: ...to here
brltty-6.8/python3/Programs/usb_hid.c:63:26: throw: if ‘usbControlRead’ throws an exception...
brltty-6.8/python3/Programs/usb_hid.c:63:26: danger: ‘items’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#   61|   
#   62|         if ((items = malloc(size))) {
#   63|->         ssize_t result = usbControlRead(
#   64|             device, UsbControlRecipient_Interface, UsbControlType_Standard,
#   65|             UsbStandardRequest_GetDescriptor,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1413]
brltty-6.8/python3/Programs/usb_linux.c:83:7: warning[-Wanalyzer-malloc-leak]: leak of ‘usbGetDriver(device,  interface)’
brltty-6.8/python3/Programs/usb_linux.c:222:1: enter_function: entry to ‘usbDisconnectInterface’
brltty-6.8/python3/Programs/usb_linux.c:223:18: call_function: calling ‘usbGetDriver’ from ‘usbDisconnectInterface’
brltty-6.8/python3/Programs/usb_linux.c:223:18: return_function: returning to ‘usbDisconnectInterface’ from ‘usbGetDriver’
brltty-6.8/python3/Programs/usb_linux.c:225:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:226:19: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:228:5: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:83:7: danger: ‘usbGetDriver(device,  interface)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   81|   static int
#   82|   usbOpenUsbfsFile (UsbDeviceExtension *devx) {
#   83|->   if (devx->usbfsFile == -1) {
#   84|       int openFlags = O_RDWR;
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1414]
brltty-6.8/python3/Programs/usb_linux.c:96:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*devx.usbfsFile’
brltty-6.8/python3/Programs/usb_linux.c:329:1: enter_function: entry to ‘usbResetDevice’
brltty-6.8/python3/Programs/usb_linux.c:334:7: call_function: calling ‘usbOpenUsbfsFile’ from ‘usbResetDevice’
#   94|       }
#   95|   
#   96|->     logMessage(LOG_CATEGORY(USB_IO), "usbfs file opened: %s fd=%d",
#   97|                  devx->host->usbfsPath, devx->usbfsFile);
#   98|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1415]
brltty-6.8/python3/Programs/usb_linux.c:97:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*devx_11(D)->host.usbfsPath, 524290)’
brltty-6.8/python3/Programs/usb_linux.c:209:1: enter_function: entry to ‘usbDisconnectDriver’
brltty-6.8/python3/Programs/usb_linux.c:212:7: call_function: calling ‘usbControlDriver’ from ‘usbDisconnectDriver’
#   95|   
#   96|       logMessage(LOG_CATEGORY(USB_IO), "usbfs file opened: %s fd=%d",
#   97|->                devx->host->usbfsPath, devx->usbfsFile);
#   98|     }
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1416]
brltty-6.8/python3/Programs/usb_linux.c:132:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(makePath(*devx_22->host.sysfsPath, "power/autosuspend"), 524289)’
brltty-6.8/python3/Programs/usb_linux.c:116:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:117:18: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:119:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:126:18: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:126:18: acquire_resource: opened here
brltty-6.8/python3/Programs/usb_linux.c:128:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:128:10: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:132:16: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:133:27: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:134:28: throw: if ‘write’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:132:16: danger: ‘open(makePath(*devx_22->host.sysfsPath, "power/autosuspend"), 524289)’ leaks here; was opened at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  130|           const char *const *value = values;
#  131|   
#  132|->         while (*value) {
#  133|             size_t length = strlen(*value);
#  134|             ssize_t result = write(file, *value, length);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1417]
brltty-6.8/python3/Programs/usb_linux.c:584:21: warning[-Wanalyzer-malloc-leak]: leak of ‘usbMakeURB(*<unknown>.descriptor,  buffer,  length,  context)’
brltty-6.8/python3/Programs/usb_linux.c:657:1: enter_function: entry to ‘usbSubmitRequest’
brltty-6.8/python3/Programs/usb_linux.c:669:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:670:29: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:673:18: call_function: calling ‘usbMakeURB’ from ‘usbSubmitRequest’
brltty-6.8/python3/Programs/usb_linux.c:673:18: return_function: returning to ‘usbSubmitRequest’ from ‘usbMakeURB’
brltty-6.8/python3/Programs/usb_linux.c:673:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:674:9: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:677:13: call_function: calling ‘usbSubmitURB’ from ‘usbSubmitRequest’
#  582|     struct usbdevfs_urb *urb;
#  583|   
#  584|->   if ((urb = malloc(sizeof(*urb) + length))) {
#  585|       memset(urb, 0, sizeof(*urb));
#  586|       urb->endpoint = endpoint->bEndpointAddress;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1418]
brltty-6.8/python3/Programs/usb_linux.c:1187:36: warning[-Wanalyzer-malloc-leak]: leak of ‘eptx’
brltty-6.8/python3/Programs/usb_linux.c:1183:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1183:6: branch_true: following ‘true’ branch (when ‘eptx’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1184:5: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1187:36: throw: if ‘newQueue’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:1187:36: danger: ‘eptx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1185|       usbInitializeSignalMonitor(eptx);
# 1186|   
# 1187|->     if ((eptx->completedRequests = newQueue(NULL, NULL))) {
# 1188|         switch (USB_ENDPOINT_DIRECTION(endpoint->descriptor)) {
# 1189|           case UsbEndpointDirection_Input:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1419]
brltty-6.8/python3/Programs/usb_linux.c:1197:7: warning[-Wanalyzer-malloc-leak]: leak of ‘eptx’
brltty-6.8/python3/Programs/usb_linux.c:1183:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1183:6: branch_true: following ‘true’ branch (when ‘eptx’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1184:5: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1187:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1197:7: branch_false: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1197:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:1197:7: danger: ‘eptx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 1195|         return 1;
# 1196|       } else {
# 1197|->       logSystemError("USB endpoint completed request queue allocate");
# 1198|       }
# 1199|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1420]
brltty-6.8/python3/Programs/usb_linux.c:1254:25: warning[-Wanalyzer-malloc-leak]: leak of ‘devx’
brltty-6.8/python3/Programs/usb_linux.c:1248:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1248:6: branch_true: following ‘true’ branch (when ‘devx’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1248:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1254:25: throw: if ‘usbTestDevice’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:1254:25: danger: ‘devx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1252|       usbInitializeUsbfsMonitor(devx);
# 1253|   
# 1254|->     if ((test->device = usbTestDevice(devx, test->chooser, test->data))) return 1;
# 1255|   
# 1256|       usbDeallocateDeviceExtension(devx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1421]
brltty-6.8/python3/Programs/usb_linux.c:1272:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
# 1270|       while (1) {
# 1271|         if (tail == usbfsPath) return 0;
# 1272|->       if (!isPathSeparator(*--tail)) continue;
# 1273|         if (++count == 2) break;
# 1274|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1422]
brltty-6.8/python3/Programs/usb_linux.c:1272:12: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
# 1270|       while (1) {
# 1271|         if (tail == usbfsPath) return 0;
# 1272|->       if (!isPathSeparator(*--tail)) continue;
# 1273|         if (++count == 2) break;
# 1274|       }

Error: CPPCHECK_WARNING (CWE-457): [#def1423]
brltty-6.8/python3/Programs/usb_linux.c:1298: error[uninitvar]: Uninitialized variable: &length
# 1296|           char path[strlen(*format) + (2 * 0X10) + 1];
# 1297|   
# 1298|->         snprintf(path, sizeof(path), *format, &length, bus, device, minor);
# 1299|           path[length] = 0;
# 1300|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1424]
brltty-6.8/python3/Programs/usb_linux.c:1303:27: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
# 1301|           if (access(path, F_OK) != -1) {
# 1302|             char *sysfsPath = strdup(path);
# 1303|->           if (!sysfsPath) logSystemError("strdup");
# 1304|             return sysfsPath;
# 1305|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1425]
brltty-6.8/python3/Programs/usb_linux.c:1303:27: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
# 1301|           if (access(path, F_OK) != -1) {
# 1302|             char *sysfsPath = strdup(path);
# 1303|->           if (!sysfsPath) logSystemError("strdup");
# 1304|             return sysfsPath;
# 1305|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1426]
brltty-6.8/python3/Programs/usb_linux.c:1325:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1382:25: return_function: returning to ‘usbAddHostDevice’ from ‘usbMakeSysfsPath’
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1323|         char *path;
# 1324|   
# 1325|->       if ((path = makePath(host->sysfsPath, "descriptors"))) {
# 1326|           int openFlags = O_RDONLY;
# 1327|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1427]
brltty-6.8/python3/Programs/usb_linux.c:1325:19: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1382:25: return_function: returning to ‘usbAddHostDevice’ from ‘usbMakeSysfsPath’
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1323|         char *path;
# 1324|   
# 1325|->       if ((path = makePath(host->sysfsPath, "descriptors"))) {
# 1326|           int openFlags = O_RDONLY;
# 1327|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1428]
brltty-6.8/python3/Programs/usb_linux.c:1332:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1382:25: return_function: returning to ‘usbAddHostDevice’ from ‘usbMakeSysfsPath’
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1330|           #endif /* O_CLOEXEC */
# 1331|   
# 1332|->         if ((file = open(path, openFlags)) != -1) {
# 1333|             sysfs = 1;
# 1334|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1429]
brltty-6.8/python3/Programs/usb_linux.c:1332:21: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1382:25: call_function: calling ‘usbMakeSysfsPath’ from ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1382:25: return_function: returning to ‘usbAddHostDevice’ from ‘usbMakeSysfsPath’
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1330|           #endif /* O_CLOEXEC */
# 1331|   
# 1332|->         if ((file = open(path, openFlags)) != -1) {
# 1333|             sysfs = 1;
# 1334|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1430]
brltty-6.8/python3/Programs/usb_linux.c:1348:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1346|       #endif /* O_CLOEXEC */
# 1347|   
# 1348|->     file = open(host->usbfsPath, openFlags);
# 1349|     }
# 1350|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1431]
brltty-6.8/python3/Programs/usb_linux.c:1348:12: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1346|       #endif /* O_CLOEXEC */
# 1347|   
# 1348|->     file = open(host->usbfsPath, openFlags);
# 1349|     }
# 1350|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1432]
brltty-6.8/python3/Programs/usb_linux.c:1352:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:28: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1350|   
# 1351|     if (file != -1) {
# 1352|->     int count = read(file, &host->usbDescriptor, UsbDescriptorSize_Device);
# 1353|   
# 1354|       if (count == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1433]
brltty-6.8/python3/Programs/usb_linux.c:1355:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘file’
brltty-6.8/python3/Programs/usb_linux.c:1348:12: acquire_resource: opened here
brltty-6.8/python3/Programs/usb_linux.c:1351:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1352:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1354:8: branch_true: following ‘true’ branch (when ‘count == -1’)...
brltty-6.8/python3/Programs/usb_linux.c:1355:7: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1355:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:1355:7: danger: ‘file’ leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 1353|   
# 1354|       if (count == -1) {
# 1355|->       logSystemError("USB device descriptor read");
# 1356|       } else if (count != UsbDescriptorSize_Device) {
# 1357|         logMessage(LOG_ERR, "USB short device descriptor: %d", count);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1434]
brltty-6.8/python3/Programs/usb_linux.c:1355:7: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1353|   
# 1354|       if (count == -1) {
# 1355|->       logSystemError("USB device descriptor read");
# 1356|       } else if (count != UsbDescriptorSize_Device) {
# 1357|         logMessage(LOG_ERR, "USB short device descriptor: %d", count);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1435]
brltty-6.8/python3/Programs/usb_linux.c:1357:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘file’
brltty-6.8/python3/Programs/usb_linux.c:1348:12: acquire_resource: opened here
brltty-6.8/python3/Programs/usb_linux.c:1351:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1352:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1354:8: branch_false: following ‘false’ branch (when ‘count != -1’)...
brltty-6.8/python3/Programs/usb_linux.c:1356:15: branch_false: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1356:15: branch_true: following ‘true’ branch (when ‘count != 18’)...
brltty-6.8/python3/Programs/usb_linux.c:1357:7: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1357:7: throw: if ‘logMessage’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:1357:7: danger: ‘file’ leaks here; was opened at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
# 1355|         logSystemError("USB device descriptor read");
# 1356|       } else if (count != UsbDescriptorSize_Device) {
# 1357|->       logMessage(LOG_ERR, "USB short device descriptor: %d", count);
# 1358|       } else {
# 1359|         ok = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1436]
brltty-6.8/python3/Programs/usb_linux.c:1357:7: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1355|         logSystemError("USB device descriptor read");
# 1356|       } else if (count != UsbDescriptorSize_Device) {
# 1357|->       logMessage(LOG_ERR, "USB short device descriptor: %d", count);
# 1358|       } else {
# 1359|         ok = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1437]
brltty-6.8/python3/Programs/usb_linux.c:1369:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘file’
brltty-6.8/python3/Programs/usb_linux.c:1348:12: acquire_resource: opened here
brltty-6.8/python3/Programs/usb_linux.c:1351:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1352:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1369:5: throw: if ‘close’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:1369:5: danger: ‘file’ leaks here; was opened at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
# 1367|       }
# 1368|   
# 1369|->     close(file);
# 1370|     }
# 1371|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1438]
brltty-6.8/python3/Programs/usb_linux.c:1369:5: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
# 1367|       }
# 1368|   
# 1369|->     close(file);
# 1370|     }
# 1371|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1439]
brltty-6.8/python3/Programs/usb_linux.c:1386:18: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1376:1: enter_function: entry to ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1382:25: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1384:12: call_function: calling ‘usbReadHostDeviceDescriptor’ from ‘usbAddHostDevice’
brltty-6.8/python3/Programs/usb_linux.c:1384:12: return_function: returning to ‘usbAddHostDevice’ from ‘usbReadHostDeviceDescriptor’
brltty-6.8/python3/Programs/usb_linux.c:1384:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1386:18: branch_false: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1386:18: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:1386:18: danger: ‘host’ leaks here; was allocated at [(2)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/1)
# 1384|         if (!usbReadHostDeviceDescriptor(host)) {
# 1385|           ok = 1;
# 1386|->       } else if (enqueueItem(usbHostDevices, host)) {
# 1387|           return 1;
# 1388|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1440]
brltty-6.8/python3/Programs/usb_linux.c:1393:7: warning[-Wanalyzer-malloc-leak]: leak of ‘host’
brltty-6.8/python3/Programs/usb_linux.c:1380:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1380:6: branch_true: following ‘true’ branch (when ‘host’ is non-NULL)...
brltty-6.8/python3/Programs/usb_linux.c:1381:28: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1381:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1393:7: branch_false: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1393:7: throw: if ‘logSystemError’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:1393:7: danger: ‘host’ leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
# 1391|         free(host->usbfsPath);
# 1392|       } else {
# 1393|->       logSystemError("strdup");
# 1394|       }
# 1395|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1441]
brltty-6.8/python3/Programs/usb_linux.c:1414:21: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(root)’
brltty-6.8/python3/Programs/usb_linux.c:1410:20: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_linux.c:1410:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_linux.c:1410:6: branch_true: ...to here
brltty-6.8/python3/Programs/usb_linux.c:1414:21: throw: if ‘readdir’ throws an exception...
brltty-6.8/python3/Programs/usb_linux.c:1414:21: danger: ‘opendir(root)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
# 1412|   
# 1413|       ok = 1;
# 1414|->     while ((entry = readdir(directory))) {
# 1415|         size_t nameLength = strlen(entry->d_name);
# 1416|         struct stat status;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1442]
brltty-6.8/python3/Programs/usb_serial.c:109:7: warning[-Wanalyzer-malloc-leak]: leak of ‘target’
brltty-6.8/python3/Programs/usb_serial.c:95:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/usb_serial.c:98:22: branch_true: ...to here
brltty-6.8/python3/Programs/usb_serial.c:98:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/usb_serial.c:98:8: branch_false: following ‘false’ branch (when ‘adapters’ is non-NULL)...
brltty-6.8/python3/Programs/usb_serial.c:105:44: branch_false: ...to here
brltty-6.8/python3/Programs/usb_serial.c:108:14: branch_false: following ‘false’ branch (when ‘source >= end’)...
brltty-6.8/python3/Programs/usb_serial.c:109:7: branch_false: ...to here
brltty-6.8/python3/Programs/usb_serial.c:109:7: throw: if ‘qsort’ throws an exception...
brltty-6.8/python3/Programs/usb_serial.c:109:7: danger: ‘target’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  107|   
#  108|         while (source < end) *target++ = source++;
#  109|->       qsort(adapters, usbSerialAdapterCount, sizeof(*adapters), usbSortSerialAdapters);
#  110|       }
#  111|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1443]
brltty-6.8/python3/Programs/variables.c:54:7: warning[-Wanalyzer-malloc-leak]: leak of ‘variable’
brltty-6.8/python3/Programs/variables.c:208:1: enter_function: entry to ‘findVariable’
brltty-6.8/python3/Programs/variables.c:221:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/variables.c:221:8: branch_true: following ‘true’ branch (when ‘variable’ is non-NULL)...
brltty-6.8/python3/Programs/variables.c:221:8: branch_true: ...to here
brltty-6.8/python3/Programs/variables.c:226:11: call_function: calling ‘setCharacterString’ from ‘findVariable’
#   52|   
#   53|       if (!(newCharacters = malloc(ARRAY_SIZE(newCharacters, (length + 1))))) {
#   54|->       logMallocError();
#   55|         return 0;
#   56|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1444]
brltty-6.8/python3/Programs/variables.c:111:27: warning[-Wanalyzer-malloc-leak]: leak of ‘vnl’
brltty-6.8/python3/Programs/variables.c:325:1: enter_function: entry to ‘getGlobalVariables’
brltty-6.8/python3/Programs/variables.c:328:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/variables.c:331:17: branch_true: ...to here
brltty-6.8/python3/Programs/variables.c:331:17: call_function: calling ‘newVariableNestingLevel’ from ‘getGlobalVariables’
#  109|       vnl->references = 0;
#  110|   
#  111|->     if ((vnl->variables = newQueue(deallocateVariable, NULL))) {
#  112|         if ((vnl->previous = previous)) claimVariableNestingLevel(previous);
#  113|         return vnl;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1445]
brltty-6.8/python3/Programs/variables.c:227:13: warning[-Wanalyzer-malloc-leak]: leak of ‘variable’
brltty-6.8/python3/Programs/variables.c:208:1: enter_function: entry to ‘findVariable’
brltty-6.8/python3/Programs/variables.c:221:21: acquire_memory: allocated here
brltty-6.8/python3/Programs/variables.c:221:8: branch_true: following ‘true’ branch (when ‘variable’ is non-NULL)...
brltty-6.8/python3/Programs/variables.c:221:8: branch_true: ...to here
brltty-6.8/python3/Programs/variables.c:226:11: call_function: calling ‘setCharacterString’ from ‘findVariable’
brltty-6.8/python3/Programs/variables.c:226:11: return_function: returning to ‘findVariable’ from ‘setCharacterString’
brltty-6.8/python3/Programs/variables.c:226:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/variables.c:227:13: branch_true: ...to here
brltty-6.8/python3/Programs/variables.c:227:13: throw: if ‘enqueueItem’ throws an exception...
brltty-6.8/python3/Programs/variables.c:227:13: danger: ‘variable’ leaks here; was allocated at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  225|   
#  226|         if (setCharacterString(&variable->name, name, length)) {
#  227|->         if (enqueueItem(vnl->variables, variable)) {
#  228|             return variable;
#  229|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1446]
brltty-6.8/python3/Programs/xbrlapi.c:415:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/python3/Programs/xbrlapi.c:525:13: enter_function: entry to ‘add_window’
brltty-6.8/python3/Programs/xbrlapi.c:528:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:528:6: branch_false: following ‘false’ branch (when ‘cur’ is non-NULL)...
brltty-6.8/python3/Programs/xbrlapi.c:532:3: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:536:18: call_function: inlined call to ‘getWindowName’ from ‘add_window’
#  413|   
#  414|     if (netProperty != None) do {
#  415|->     Status result = XGetWindowProperty(
#  416|         dpy, win, netProperty, offset_0, value_length, dont_delete,
#  417|         /*XA_STRING*/AnyPropertyType,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1447]
brltty-6.8/python3/Programs/xbrlapi.c:429:10: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/python3/Programs/xbrlapi.c:525:13: enter_function: entry to ‘add_window’
brltty-6.8/python3/Programs/xbrlapi.c:528:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:528:6: branch_false: following ‘false’ branch (when ‘cur’ is non-NULL)...
brltty-6.8/python3/Programs/xbrlapi.c:532:3: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:536:18: call_function: inlined call to ‘getWindowName’ from ‘add_window’
#  427|       value_length += bytes_after;
#  428|       if (!bytes_after) break;
#  429|->     if (!XFree(value)) fatal("tempo_XFree(value)");
#  430|     } while (1);
#  431|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1448]
brltty-6.8/python3/Programs/xbrlapi.c:433:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/python3/Programs/xbrlapi.c:525:13: enter_function: entry to ‘add_window’
brltty-6.8/python3/Programs/xbrlapi.c:528:15: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:528:6: branch_false: following ‘false’ branch (when ‘cur’ is non-NULL)...
brltty-6.8/python3/Programs/xbrlapi.c:532:3: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:536:18: call_function: inlined call to ‘getWindowName’ from ‘add_window’
#  431|   
#  432|     if (!value) do {
#  433|->     Status result = XGetWindowProperty(
#  434|         dpy, win, xaProperty, offset_0, value_length, dont_delete,
#  435|         /*XA_STRING*/AnyPropertyType,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1449]
brltty-6.8/python3/Programs/xbrlapi.c:446:10: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/python3/Programs/xbrlapi.c:780:13: enter_function: entry to ‘toX_f’
brltty-6.8/python3/Programs/xbrlapi.c:802:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:804:8: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:804:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:807:15: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:812:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:814:10: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:814:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:816:10: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:816:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:1175:1: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:828:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:835:19: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:842:8: branch_false: following ‘false’ branch (when the strings are equal)...
brltty-6.8/python3/Programs/xbrlapi.c:851:3: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:851:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:852:10: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:853:10: call_function: calling ‘grabWindows’ from ‘toX_f’
#  444|       if (value_length >= (item_count + 1)) break;
#  445|       value_length += bytes_after + 1;
#  446|->     if (!XFree(value)) fatal("tempo_XFree(value)");
#  447|     } while (1);
#  448|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1450]
brltty-6.8/python3/Programs/xbrlapi.c:450:5: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/python3/Programs/xbrlapi.c:780:13: enter_function: entry to ‘toX_f’
brltty-6.8/python3/Programs/xbrlapi.c:802:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:804:8: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:804:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:807:15: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:812:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:814:10: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:814:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:816:10: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:816:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:1175:1: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:828:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:835:19: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:842:8: branch_false: following ‘false’ branch (when the strings are equal)...
brltty-6.8/python3/Programs/xbrlapi.c:851:3: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:851:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:852:10: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:853:10: call_function: calling ‘grabWindows’ from ‘toX_f’
#  448|   
#  449|     if (actual_type == None) {
#  450|->     XFree(value);
#  451|       return NULL;
#  452|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1451]
brltty-6.8/python3/Programs/xbrlapi.c:456:3: warning[-Wanalyzer-malloc-leak]: leak of ‘cur’
brltty-6.8/python3/Programs/xbrlapi.c:780:13: enter_function: entry to ‘toX_f’
brltty-6.8/python3/Programs/xbrlapi.c:802:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:804:8: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:804:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:807:15: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:812:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:814:10: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:814:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:816:10: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:816:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:1175:1: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:828:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:835:19: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:842:8: branch_false: following ‘false’ branch (when the strings are equal)...
brltty-6.8/python3/Programs/xbrlapi.c:851:3: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:851:12: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:852:10: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:853:10: call_function: calling ‘grabWindows’ from ‘toX_f’
#  454|     value[item_count++] = 0;
#  455|     ret = strdup((char *)value);
#  456|->   XFree(value);
#  457|     debugf("window property: type %ld, len %ld, value \"%s\"\n", actual_type, item_count, ret);
#  458|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1452]
brltty-6.8/python3/Programs/xbrlapi.c:456:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:455:9: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:456:3: throw: if ‘XFree’ throws an exception...
brltty-6.8/python3/Programs/xbrlapi.c:456:3: danger: ‘ret’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  454|     value[item_count++] = 0;
#  455|     ret = strdup((char *)value);
#  456|->   XFree(value);
#  457|     debugf("window property: type %ld, len %ld, value \"%s\"\n", actual_type, item_count, ret);
#  458|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1453]
brltty-6.8/python3/Programs/xbrlapi.c:457:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:455:9: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:457:3: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:457:3: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:457:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/python3/Programs/xbrlapi.c:457:3: danger: ‘ret’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  455|     ret = strdup((char *)value);
#  456|     XFree(value);
#  457|->   debugf("window property: type %ld, len %ld, value \"%s\"\n", actual_type, item_count, ret);
#  458|   
#  459|   #ifdef HAVE_ICONV_H

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1454]
brltty-6.8/python3/Programs/xbrlapi.c:468:11: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:455:9: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:461:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:468:11: throw: if ‘iconv’ throws an exception...
brltty-6.8/python3/Programs/xbrlapi.c:468:11: danger: ‘input’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  466|         char *ret2 = output;
#  467|   
#  468|->       if (iconv(utf8Conv, &input, &input_size, &output, &output_size) == -1) {
#  469|   	free(ret2);
#  470|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1455]
brltty-6.8/python3/Programs/xbrlapi.c:468:11: warning[-Wanalyzer-malloc-leak]: leak of ‘output’
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:461:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:465:22: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:468:11: throw: if ‘iconv’ throws an exception...
brltty-6.8/python3/Programs/xbrlapi.c:468:11: danger: ‘output’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
#  466|         char *ret2 = output;
#  467|   
#  468|->       if (iconv(utf8Conv, &input, &input_size, &output, &output_size) == -1) {
#  469|   	free(ret2);
#  470|         } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1456]
brltty-6.8/python3/Programs/xbrlapi.c:473:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:432:6: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:440:8: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:444:25: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:449:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:454:8: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:455:9: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:461:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:468:10: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:471:9: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:473:9: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:473:9: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:473:9: throw: if ‘fflush’ throws an exception...
brltty-6.8/python3/Programs/xbrlapi.c:473:9: danger: ‘ret’ leaks here; was allocated at [(12)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/11)
#  471|   	free(ret);
#  472|   	ret = realloc(ret2, item_count * MB_CUR_MAX - output_size);
#  473|-> 	debugf("-> %s\n",ret);
#  474|         }
#  475|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1457]
brltty-6.8/python3/Programs/xbrlapi.c:500:9: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/python3/Programs/xbrlapi.c:494:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:495:9: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:495:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:496:11: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:498:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:499:16: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:499:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:500:9: throw: if ‘XFree’ throws an exception...
brltty-6.8/python3/Programs/xbrlapi.c:500:9: danger: ‘name’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  498|         if (hint->res_name) {
#  499|           name = strdup(hint->res_name);
#  500|->         XFree(hint->res_name);
#  501|         }
#  502|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1458]
brltty-6.8/python3/Programs/xbrlapi.c:504:5: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
brltty-6.8/python3/Programs/xbrlapi.c:494:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:495:9: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:495:8: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:496:11: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:498:10: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:499:16: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:499:16: acquire_memory: allocated here
brltty-6.8/python3/Programs/xbrlapi.c:504:5: throw: if ‘XFree’ throws an exception...
brltty-6.8/python3/Programs/xbrlapi.c:504:5: danger: ‘name’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  502|       }
#  503|   
#  504|->     XFree(hint);
#  505|     }
#  506|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1459]
brltty-6.8/python3/Programs/xbrlapi.c:702:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘state’ where non-null expected
brltty-6.8/python3/Programs/xbrlapi.c:708:13: enter_function: entry to ‘setFocus’
brltty-6.8/python3/Programs/xbrlapi.c:716:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:720:21: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:730:6: branch_true: following ‘true’ branch (when ‘commandName’ is NULL)...
brltty-6.8/python3/Programs/xbrlapi.c:730:35: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:730:35: acquire_memory: this call could return NULL
brltty-6.8/python3/Programs/xbrlapi.c:732:3: call_function: inlined call to ‘writeStateToFile’ from ‘setFocus’
#  700|   
#  701|       if (stream) {
#  702|->       fputs(state, stream);
#  703|         fclose(stream);
#  704|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1460]
brltty-6.8/python3/Programs/xbrlapi.c:726:3: warning[-Wanalyzer-malloc-leak]: leak of ‘commandName’
brltty-6.8/python3/Programs/xbrlapi.c:708:13: enter_function: entry to ‘setFocus’
brltty-6.8/python3/Programs/xbrlapi.c:712:27: call_function: calling ‘window_of_Window’ from ‘setFocus’
brltty-6.8/python3/Programs/xbrlapi.c:712:27: return_function: returning to ‘setFocus’ from ‘window_of_Window’
brltty-6.8/python3/Programs/xbrlapi.c:716:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:717:5: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:718:19: call_function: calling ‘getWindowApplicationName’ from ‘setFocus’
brltty-6.8/python3/Programs/xbrlapi.c:718:19: return_function: returning to ‘setFocus’ from ‘getWindowApplicationName’
brltty-6.8/python3/Programs/xbrlapi.c:726:3: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:726:3: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:726:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/python3/Programs/xbrlapi.c:726:3: danger: ‘commandName’ leaks here; was allocated at [(17)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/16)
#  724|     if (!windowName) windowName = "";
#  725|     if (!*windowName) windowName = "unnamed window";
#  726|->   debugf("focused window: %s\n", windowName);
#  727|     writeStateToFile(windowNameFile, windowName);
#  728|     if (!quiet) api_setName(windowName);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1461]
brltty-6.8/python3/Programs/xbrlapi.c:731:3: warning[-Wanalyzer-malloc-leak]: leak of ‘commandName’
brltty-6.8/python3/Programs/xbrlapi.c:708:13: enter_function: entry to ‘setFocus’
brltty-6.8/python3/Programs/xbrlapi.c:712:27: call_function: calling ‘window_of_Window’ from ‘setFocus’
brltty-6.8/python3/Programs/xbrlapi.c:712:27: return_function: returning to ‘setFocus’ from ‘window_of_Window’
brltty-6.8/python3/Programs/xbrlapi.c:716:6: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:717:5: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:718:19: call_function: calling ‘getWindowApplicationName’ from ‘setFocus’
brltty-6.8/python3/Programs/xbrlapi.c:718:19: return_function: returning to ‘setFocus’ from ‘getWindowApplicationName’
brltty-6.8/python3/Programs/xbrlapi.c:728:6: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:730:6: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:730:6: branch_false: following ‘false’ branch (when ‘commandName’ is non-NULL)...
brltty-6.8/python3/Programs/xbrlapi.c:731:3: branch_false: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:731:3: branch_true: following ‘true’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:731:3: branch_true: ...to here
brltty-6.8/python3/Programs/xbrlapi.c:731:3: throw: if ‘fflush’ throws an exception...
brltty-6.8/python3/Programs/xbrlapi.c:731:3: danger: ‘commandName’ leaks here; was allocated at [(17)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/16)
#  729|   
#  730|     if (!commandName) commandName = strdup("");
#  731|->   debugf("focused command: %s\n", commandName);
#  732|     writeStateToFile(commandNameFile, commandName);
#  733|     free(commandName);

Error: GCC_ANALYZER_WARNING (CWE-479): [#def1462]
brltty-6.8/python3/Programs/xbrlapi.c:1183:3: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
brltty-6.8/python3/Programs/xbrlapi.c:1187:1: enter_function: entry to ‘main’
brltty-6.8/python3/Programs/xbrlapi.c:1198:5: branch_false: following ‘false’ branch...
brltty-6.8/python3/Programs/xbrlapi.c:1183:3: danger: call to ‘exit’ from within signal handler
# 1181|   static void term_handler(int foo) {
# 1182|     api_cleanExit();
# 1183|->   exit(PROG_EXIT_SUCCESS);
# 1184|   }
# 1185|   

Scan Properties

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