libguestfs-1.58.0-1.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-758): [#def1]
/etc/profile.d/guestfish.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
#    1|-> # Guestfish colour prompts.  See PROMPT in guestfish(1).
#    2|   GUESTFISH_PS1='\[\e[1;32m\]><fs>\[\e[0;31m\] '
#    3|   GUESTFISH_OUTPUT='\e[0m'

Error: SHELLCHECK_WARNING (CWE-88): [#def2]
/usr/bin/virt-copy-in:19:12: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   17|   # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#   18|   
#   19|-> for arg in $@; do
#   20|       case $arg in
#   21|           "--help")

Error: SHELLCHECK_WARNING (CWE-156): [#def3]
/usr/bin/virt-copy-in:22:22: warning[SC2046]: Quote this to prevent word splitting.
#   20|       case $arg in
#   21|           "--help")
#   22|->             exec man $(basename "$0")
#   23|               ;;
#   24|       esac

Error: SHELLCHECK_WARNING (CWE-88): [#def4]
/usr/bin/virt-copy-out:19:12: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   17|   # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#   18|   
#   19|-> for arg in $@; do
#   20|       case $arg in
#   21|           "--help")

Error: SHELLCHECK_WARNING (CWE-156): [#def5]
/usr/bin/virt-copy-out:22:22: warning[SC2046]: Quote this to prevent word splitting.
#   20|       case $arg in
#   21|           "--help")
#   22|->             exec man $(basename "$0")
#   23|               ;;
#   24|       esac

Error: SHELLCHECK_WARNING (CWE-88): [#def6]
/usr/bin/virt-tar-in:19:12: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   17|   # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#   18|   
#   19|-> for arg in $@; do
#   20|       case $arg in
#   21|           "--help")

Error: SHELLCHECK_WARNING (CWE-156): [#def7]
/usr/bin/virt-tar-in:22:22: warning[SC2046]: Quote this to prevent word splitting.
#   20|       case $arg in
#   21|           "--help")
#   22|->             exec man $(basename "$0")
#   23|               ;;
#   24|       esac

Error: SHELLCHECK_WARNING (CWE-88): [#def8]
/usr/bin/virt-tar-out:19:12: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   17|   # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#   18|   
#   19|-> for arg in $@; do
#   20|       case $arg in
#   21|           "--help")

Error: SHELLCHECK_WARNING (CWE-156): [#def9]
/usr/bin/virt-tar-out:22:22: warning[SC2046]: Quote this to prevent word splitting.
#   20|       case $arg in
#   21|           "--help")
#   22|->             exec man $(basename "$0")
#   23|               ;;
#   24|       esac

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
libguestfs-1.58.0/common/edit/file-edit.c:326:7: warning[-Wanalyzer-malloc-leak]: leak of 'ret'
libguestfs-1.58.0/common/edit/file-edit.c:311:9: acquire_memory: allocated here
libguestfs-1.58.0/common/edit/file-edit.c:312:6: branch_false: following 'false' branch (when 'ret' is non-NULL)...
libguestfs-1.58.0/common/edit/file-edit.c:316:3: branch_false: ...to here
libguestfs-1.58.0/common/edit/file-edit.c:319:3: branch_true: following 'true' branch (when 'p' is non-NULL)...
libguestfs-1.58.0/common/edit/file-edit.c:320:3: branch_true: ...to here
libguestfs-1.58.0/common/edit/file-edit.c:326:7: throw: if 'guestfs_int_random_string' throws an exception...
libguestfs-1.58.0/common/edit/file-edit.c:326:7: danger: 'ret' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  324|      * trailing \0.
#  325|      */
#  326|->   if (guestfs_int_random_string (p, 8) == -1) {
#  327|       perror ("guestfs_int_random_string");
#  328|       free (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
libguestfs-1.58.0/common/edit/file-edit.c:327:5: warning[-Wanalyzer-malloc-leak]: leak of 'ret'
libguestfs-1.58.0/common/edit/file-edit.c:311:9: acquire_memory: allocated here
libguestfs-1.58.0/common/edit/file-edit.c:312:6: branch_false: following 'false' branch (when 'ret' is non-NULL)...
libguestfs-1.58.0/common/edit/file-edit.c:316:3: branch_false: ...to here
libguestfs-1.58.0/common/edit/file-edit.c:319:3: branch_true: following 'true' branch (when 'p' is non-NULL)...
libguestfs-1.58.0/common/edit/file-edit.c:320:3: branch_true: ...to here
libguestfs-1.58.0/common/edit/file-edit.c:326:6: branch_true: following 'true' branch...
libguestfs-1.58.0/common/edit/file-edit.c:327:5: branch_true: ...to here
libguestfs-1.58.0/common/edit/file-edit.c:327:5: throw: if 'perror' throws an exception...
libguestfs-1.58.0/common/edit/file-edit.c:327:5: danger: 'ret' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  325|      */
#  326|     if (guestfs_int_random_string (p, 8) == -1) {
#  327|->     perror ("guestfs_int_random_string");
#  328|       free (ret);
#  329|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libguestfs-1.58.0/common/mlpcre/pcre-c.c:247:3: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
libguestfs-1.58.0/common/mlpcre/pcre-c.c:190:1: enter_function: entry to ‘guestfs_int_pcre_matches’
libguestfs-1.58.0/common/mlpcre/pcre-c.c:192:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/common/mlpcre/pcre-c.c:192:3: branch_false: ...to here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:198:7: acquire_memory: allocated here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:199:6: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
libguestfs-1.58.0/common/mlpcre/pcre-c.c:205:16: branch_false: ...to here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:206:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/common/mlpcre/pcre-c.c:210:3: branch_false: ...to here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:214:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/common/mlpcre/pcre-c.c:220:23: branch_false: ...to here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:222:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/common/mlpcre/pcre-c.c:232:3: branch_false: ...to here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:232:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/common/mlpcre/pcre-c.c:239:6: branch_true: ...to here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:239:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/common/mlpcre/pcre-c.c:240:12: branch_true: ...to here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:241:5: call_function: inlined call to ‘free_last_match’ from ‘guestfs_int_pcre_matches’
libguestfs-1.58.0/common/mlpcre/pcre-c.c:242:5: branch_false: ...to here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:247:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/common/mlpcre/pcre-c.c:247:3: branch_true: ...to here
libguestfs-1.58.0/common/mlpcre/pcre-c.c:247:3: danger: ‘m’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  245|       free_last_match (m);
#  246|   
#  247|->   CAMLreturn (r ? Val_true : Val_false);
#  248|   }
#  249|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
libguestfs-1.58.0/common/mlutils/unix_utils-c.c:185:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 2)’
libguestfs-1.58.0/common/mlutils/unix_utils-c.c:176:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/common/mlutils/unix_utils-c.c:176:3: branch_false: ...to here
libguestfs-1.58.0/common/mlutils/unix_utils-c.c:181:8: acquire_resource: opened here
libguestfs-1.58.0/common/mlutils/unix_utils-c.c:182:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/common/mlutils/unix_utils-c.c:185:7: branch_false: ...to here
libguestfs-1.58.0/common/mlutils/unix_utils-c.c:185:7: throw: if ‘fsync’ throws an exception...
libguestfs-1.58.0/common/mlutils/unix_utils-c.c:185:7: danger: ‘open(filename, 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  183|       unix_error (errno, (char *) "open", filenamev);
#  184|   
#  185|->   if (fsync (fd) == -1) {
#  186|       err = errno;
#  187|       close (fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
libguestfs-1.58.0/common/options/config.c:62:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
libguestfs-1.58.0/common/options/config.c:58:8: acquire_resource: opened here
libguestfs-1.58.0/common/options/config.c:59:6: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/config.c:62:5: branch_true: ...to here
libguestfs-1.58.0/common/options/config.c:62:5: throw: if 'config_init' throws an exception...
libguestfs-1.58.0/common/options/config.c:62:5: danger: 'fopen(filename, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   60|       config_t conf;
#   61|   
#   62|->     config_init (&conf);
#   63|   
#   64|       /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libguestfs-1.58.0/common/options/config.c:62:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
libguestfs-1.58.0/common/options/config.c:58:8: acquire_memory: allocated here
libguestfs-1.58.0/common/options/config.c:59:6: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/config.c:62:5: branch_true: ...to here
libguestfs-1.58.0/common/options/config.c:62:5: throw: if 'config_init' throws an exception...
libguestfs-1.58.0/common/options/config.c:62:5: danger: 'fopen(filename, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   60|       config_t conf;
#   61|   
#   62|->     config_init (&conf);
#   63|   
#   64|       /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
libguestfs-1.58.0/common/options/config.c:70:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
libguestfs-1.58.0/common/options/config.c:58:8: acquire_resource: opened here
libguestfs-1.58.0/common/options/config.c:59:6: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/config.c:62:5: branch_true: ...to here
libguestfs-1.58.0/common/options/config.c:70:9: throw: if 'config_read' throws an exception...
libguestfs-1.58.0/common/options/config.c:70:9: danger: 'fopen(filename, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   68|       */
#   69|   
#   70|->     if (config_read (&conf, fp) == CONFIG_FALSE)
#   71|         error (EXIT_FAILURE, 0,
#   72|                _("%s: line %d: error parsing configuration file: %s"),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libguestfs-1.58.0/common/options/config.c:70:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
libguestfs-1.58.0/common/options/config.c:58:8: acquire_memory: allocated here
libguestfs-1.58.0/common/options/config.c:59:6: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/config.c:62:5: branch_true: ...to here
libguestfs-1.58.0/common/options/config.c:70:9: throw: if 'config_read' throws an exception...
libguestfs-1.58.0/common/options/config.c:70:9: danger: 'fopen(filename, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   68|       */
#   69|   
#   70|->     if (config_read (&conf, fp) == CONFIG_FALSE)
#   71|         error (EXIT_FAILURE, 0,
#   72|                _("%s: line %d: error parsing configuration file: %s"),

Error: CPPCHECK_WARNING (CWE-476): [#def18]
libguestfs-1.58.0/common/options/decrypt.c:113: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mapname
#  111|   
#  112|         /* populate the output prefix -- note: not NUL-terminated yet */
#  113|->       memcpy (mapname, oprefix, oprefixlen);
#  114|       }
#  115|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
libguestfs-1.58.0/common/options/keys.c:67:9: warning[-Wanalyzer-file-leak]: leak of FILE 'infp'
libguestfs-1.58.0/common/options/keys.c:54:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:55:23: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:55:23: acquire_resource: opened here
libguestfs-1.58.0/common/options/keys.c:54:7: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:61:9: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:62:6: branch_true: following 'true' branch (when 'tty != 0')...
libguestfs-1.58.0/common/options/keys.c:63:21: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:65:8: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/keys.c:66:11: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:66:10: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/keys.c:67:9: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:67:9: throw: if 'perror' throws an exception...
libguestfs-1.58.0/common/options/keys.c:67:9: danger: 'infp' leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   65|       if (!echo_keys) {
#   66|         if (tcgetattr (fileno (infp), &orig) == -1) {
#   67|->         perror ("tcgetattr");
#   68|           goto error;
#   69|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
libguestfs-1.58.0/common/options/keys.c:67:9: warning[-Wanalyzer-malloc-leak]: leak of 'infp'
libguestfs-1.58.0/common/options/keys.c:54:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:55:23: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:55:23: acquire_memory: allocated here
libguestfs-1.58.0/common/options/keys.c:54:7: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:61:9: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:62:6: branch_true: following 'true' branch (when 'tty != 0')...
libguestfs-1.58.0/common/options/keys.c:63:21: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:65:8: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/keys.c:66:11: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:66:10: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/keys.c:67:9: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:67:9: throw: if 'perror' throws an exception...
libguestfs-1.58.0/common/options/keys.c:67:9: danger: 'infp' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   65|       if (!echo_keys) {
#   66|         if (tcgetattr (fileno (infp), &orig) == -1) {
#   67|->         perror ("tcgetattr");
#   68|           goto error;
#   69|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
libguestfs-1.58.0/common/options/keys.c:99:10: warning[-Wanalyzer-file-leak]: leak of FILE 'infp'
libguestfs-1.58.0/common/options/keys.c:130:1: enter_function: entry to 'get_keys'
libguestfs-1.58.0/common/options/keys.c:148:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libguestfs-1.58.0/common/options/keys.c:153:6: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:188:6: branch_true: following 'true' branch (when 'match == r')...
libguestfs-1.58.0/common/options/keys.c:190:9: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:190:9: call_function: calling 'read_key' from 'get_keys'
#   97|       fclose (infp); /* outfp == infp, so this is closed also */
#   98|   
#   99|->   return ret;
#  100|   }
#  101|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libguestfs-1.58.0/common/options/keys.c:99:10: warning[-Wanalyzer-malloc-leak]: leak of 'infp'
libguestfs-1.58.0/common/options/keys.c:130:1: enter_function: entry to 'get_keys'
libguestfs-1.58.0/common/options/keys.c:148:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libguestfs-1.58.0/common/options/keys.c:153:6: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:188:6: branch_true: following 'true' branch (when 'match == r')...
libguestfs-1.58.0/common/options/keys.c:190:9: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:190:9: call_function: calling 'read_key' from 'get_keys'
#   97|       fclose (infp); /* outfp == infp, so this is closed also */
#   98|   
#   99|->   return ret;
#  100|   }
#  101|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
libguestfs-1.58.0/common/options/keys.c:105:24: warning[-Wanalyzer-file-leak]: leak of FILE 'fp'
libguestfs-1.58.0/common/options/keys.c:103:1: enter_function: entry to 'read_first_line_from_file'
libguestfs-1.58.0/common/options/keys.c:110:8: acquire_resource: opened here
libguestfs-1.58.0/common/options/keys.c:111:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:114:9: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:114:9: call_function: inlined call to 'getline' from 'read_first_line_from_file'
libguestfs-1.58.0/common/options/keys.c:105:24: throw: if 'guestfs_int_cleanup_fclose' throws an exception...
libguestfs-1.58.0/common/options/keys.c:105:24: danger: 'fp' leaks here; was opened at [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1)
#  103|   read_first_line_from_file (const char *filename)
#  104|   {
#  105|->   CLEANUP_FCLOSE FILE *fp = NULL;
#  106|     char *ret = NULL;
#  107|     size_t allocsize = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libguestfs-1.58.0/common/options/keys.c:105:24: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
libguestfs-1.58.0/common/options/keys.c:103:1: enter_function: entry to 'read_first_line_from_file'
libguestfs-1.58.0/common/options/keys.c:110:8: acquire_memory: allocated here
libguestfs-1.58.0/common/options/keys.c:111:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:114:9: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:114:9: call_function: inlined call to 'getline' from 'read_first_line_from_file'
libguestfs-1.58.0/common/options/keys.c:105:24: throw: if 'guestfs_int_cleanup_fclose' throws an exception...
libguestfs-1.58.0/common/options/keys.c:105:24: danger: 'fp' leaks here; was allocated at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
#  103|   read_first_line_from_file (const char *filename)
#  104|   {
#  105|->   CLEANUP_FCLOSE FILE *fp = NULL;
#  106|     char *ret = NULL;
#  107|     size_t allocsize = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libguestfs-1.58.0/common/options/keys.c:105:24: warning[-Wanalyzer-malloc-leak]: leak of 'match'
libguestfs-1.58.0/common/options/keys.c:130:1: enter_function: entry to 'get_keys'
libguestfs-1.58.0/common/options/keys.c:147:7: acquire_memory: allocated here
libguestfs-1.58.0/common/options/keys.c:148:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libguestfs-1.58.0/common/options/keys.c:153:6: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:153:6: branch_true: following 'true' branch (when 'ks' is non-NULL)...
libguestfs-1.58.0/common/options/keys.c:153:6: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:154:17: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/keys.c:155:36: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:174:13: call_function: calling 'read_first_line_from_file' from 'get_keys'
#  103|   read_first_line_from_file (const char *filename)
#  104|   {
#  105|->   CLEANUP_FCLOSE FILE *fp = NULL;
#  106|     char *ret = NULL;
#  107|     size_t allocsize = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libguestfs-1.58.0/common/options/keys.c:220:35: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libguestfs-1.58.0/common/options/keys.c:218:1: enter_function: entry to 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:225:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:227:17: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:230:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:232:12: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:233:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:240:7: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:240:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/common/options/keys.c:249:14: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:249:13: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/common/options/keys.c:258:14: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:258:13: branch_true: following 'true' branch (when the strings are equal)...
libguestfs-1.58.0/common/options/keys.c:259:5: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:260:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:265:10: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:265:10: call_function: calling 'key_store_import_key' from 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:265:10: return_function: returning to 'key_store_add_from_selector' from 'key_store_import_key'
libguestfs-1.58.0/common/options/keys.c:220:35: throw: if 'guestfs_int_cleanup_free_string_list' throws an exception...
libguestfs-1.58.0/common/options/keys.c:220:35: danger: '<unknown>' leaks here; was allocated at [(24)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/23)
#  218|   key_store_add_from_selector (struct key_store *ks, const char *selector)
#  219|   {
#  220|->   CLEANUP_FREE_STRING_LIST char **fields = NULL;
#  221|     size_t field_count;
#  222|     struct key_store_key key;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libguestfs-1.58.0/common/options/keys.c:220:35: warning[-Wanalyzer-malloc-leak]: leak of 'key.<Ufdc0>.string.s'
libguestfs-1.58.0/common/options/keys.c:218:1: enter_function: entry to 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:225:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:227:17: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:230:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:232:12: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:233:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:240:7: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:242:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:246:34: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:246:20: acquire_memory: allocated here
libguestfs-1.58.0/common/options/keys.c:247:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:265:10: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:265:10: call_function: calling 'key_store_import_key' from 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:265:10: return_function: returning to 'key_store_add_from_selector' from 'key_store_import_key'
libguestfs-1.58.0/common/options/keys.c:220:35: throw: if 'guestfs_int_cleanup_free_string_list' throws an exception...
libguestfs-1.58.0/common/options/keys.c:220:35: danger: 'key.<Ufdc0>.string.s' leaks here; was allocated at [(12)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/11)
#  218|   key_store_add_from_selector (struct key_store *ks, const char *selector)
#  219|   {
#  220|->   CLEANUP_FREE_STRING_LIST char **fields = NULL;
#  221|     size_t field_count;
#  222|     struct key_store_key key;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libguestfs-1.58.0/common/options/keys.c:220:35: warning[-Wanalyzer-malloc-leak]: leak of 'key.id'
libguestfs-1.58.0/common/options/keys.c:218:1: enter_function: entry to 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:225:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:227:17: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:230:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:232:12: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:232:12: acquire_memory: allocated here
libguestfs-1.58.0/common/options/keys.c:233:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:240:7: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:240:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/common/options/keys.c:249:14: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:249:13: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/common/options/keys.c:258:14: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:258:13: branch_true: following 'true' branch (when the strings are equal)...
libguestfs-1.58.0/common/options/keys.c:259:5: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:260:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:265:10: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:265:10: call_function: calling 'key_store_import_key' from 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:265:10: return_function: returning to 'key_store_add_from_selector' from 'key_store_import_key'
libguestfs-1.58.0/common/options/keys.c:220:35: throw: if 'guestfs_int_cleanup_free_string_list' throws an exception...
libguestfs-1.58.0/common/options/keys.c:220:35: danger: 'key.id' leaks here; was allocated at [(6)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/5)
#  218|   key_store_add_from_selector (struct key_store *ks, const char *selector)
#  219|   {
#  220|->   CLEANUP_FREE_STRING_LIST char **fields = NULL;
#  221|     size_t field_count;
#  222|     struct key_store_key key;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libguestfs-1.58.0/common/options/keys.c:266:1: warning[-Wanalyzer-malloc-leak]: leak of 'key.<Ufdc0>.string.s'
libguestfs-1.58.0/common/options/keys.c:218:1: enter_function: entry to 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:225:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:227:17: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:230:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:232:12: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:233:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:240:7: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:242:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:246:34: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:246:20: acquire_memory: allocated here
libguestfs-1.58.0/common/options/keys.c:247:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:265:10: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:265:10: call_function: calling 'key_store_import_key' from 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:265:10: return_function: returning to 'key_store_add_from_selector' from 'key_store_import_key'
libguestfs-1.58.0/common/options/keys.c:266:1: danger: 'key.<Ufdc0>.string.s' leaks here; was allocated at [(12)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/11)
#  264|   
#  265|     return key_store_import_key (ks, &key);
#  266|-> }
#  267|   
#  268|   /* Turn /dev/mapper/VG-LV into /dev/VG/LV, in-place. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libguestfs-1.58.0/common/options/keys.c:266:1: warning[-Wanalyzer-malloc-leak]: leak of 'key.id'
libguestfs-1.58.0/common/options/keys.c:218:1: enter_function: entry to 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:225:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:227:17: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:230:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:232:12: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:232:12: acquire_memory: allocated here
libguestfs-1.58.0/common/options/keys.c:233:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:240:7: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:240:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/common/options/keys.c:249:14: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:249:13: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/common/options/keys.c:258:14: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:258:13: branch_true: following 'true' branch (when the strings are equal)...
libguestfs-1.58.0/common/options/keys.c:259:5: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:260:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:265:10: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:265:10: call_function: calling 'key_store_import_key' from 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:265:10: return_function: returning to 'key_store_add_from_selector' from 'key_store_import_key'
libguestfs-1.58.0/common/options/keys.c:266:1: danger: 'key.id' leaks here; was allocated at [(6)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/5)
#  264|   
#  265|     return key_store_import_key (ks, &key);
#  266|-> }
#  267|   
#  268|   /* Turn /dev/mapper/VG-LV into /dev/VG/LV, in-place. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libguestfs-1.58.0/common/options/keys.c:380:24: warning[-Wanalyzer-malloc-leak]: leak of 'key_store_import_key(ks, & key)'
libguestfs-1.58.0/common/options/keys.c:218:1: enter_function: entry to 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:225:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:227:17: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:230:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:232:12: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:233:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:237:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:240:7: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:240:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/common/options/keys.c:249:14: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:249:13: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/common/options/keys.c:258:14: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:258:13: branch_true: following 'true' branch (when the strings are equal)...
libguestfs-1.58.0/common/options/keys.c:259:5: branch_true: ...to here
libguestfs-1.58.0/common/options/keys.c:260:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/keys.c:265:10: branch_false: ...to here
libguestfs-1.58.0/common/options/keys.c:265:10: call_function: calling 'key_store_import_key' from 'key_store_add_from_selector'
libguestfs-1.58.0/common/options/keys.c:265:10: return_function: returning to 'key_store_add_from_selector' from 'key_store_import_key'
libguestfs-1.58.0/common/options/keys.c:220:35: throw: if 'guestfs_int_cleanup_free_string_list' throws an exception...
libguestfs-1.58.0/common/options/keys.c:380:24: danger: 'key_store_import_key(ks, & key)' leaks here; was allocated at [(22)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/21)
#  378|   
#  379|     new_keys = realloc (ks->keys,
#  380|->                       (ks->nr_keys + 1) * sizeof (struct key_store_key));
#  381|     if (!new_keys)
#  382|       error (EXIT_FAILURE, errno, "realloc");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libguestfs-1.58.0/common/options/options.c:62:7: warning[-Wanalyzer-malloc-leak]: leak of 'drv'
libguestfs-1.58.0/common/options/options.c:58:9: acquire_memory: allocated here
libguestfs-1.58.0/common/options/options.c:59:6: branch_false: following 'false' branch (when 'drv' is non-NULL)...
libguestfs-1.58.0/common/options/options.c:62:7: branch_false: ...to here
libguestfs-1.58.0/common/options/options.c:62:7: throw: if 'parse_uri' throws an exception...
libguestfs-1.58.0/common/options/options.c:62:7: danger: 'drv' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   60|       error (EXIT_FAILURE, errno, "calloc");
#   61|   
#   62|->   if (parse_uri (arg, &uri) == -1)
#   63|       exit (EXIT_FAILURE);
#   64|   

Error: CPPCHECK_WARNING (CWE-476): [#def33]
libguestfs-1.58.0/common/options/options.c:106: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  104|       error (EXIT_FAILURE, errno, "calloc");
#  105|   
#  106|->   drv->type = drv_d;
#  107|     drv->d.guest = optarg;
#  108|   

Error: CPPCHECK_WARNING (CWE-476): [#def34]
libguestfs-1.58.0/common/options/options.c:107: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  105|   
#  106|     drv->type = drv_d;
#  107|->   drv->d.guest = optarg;
#  108|   
#  109|     drv->next = *drvsp;

Error: CPPCHECK_WARNING (CWE-476): [#def35]
libguestfs-1.58.0/common/options/options.c:109: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  107|     drv->d.guest = optarg;
#  108|   
#  109|->   drv->next = *drvsp;
#  110|     *drvsp = drv;
#  111|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
libguestfs-1.58.0/common/options/uri.c:232:24: warning[-Wanalyzer-malloc-leak]: leak of 'value'
libguestfs-1.58.0/common/options/uri.c:228:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/uri.c:231:10: branch_true: following 'true' branch...
libguestfs-1.58.0/common/options/uri.c:232:24: branch_true: ...to here
libguestfs-1.58.0/common/options/uri.c:237:8: branch_false: following 'false' branch (when 'end' is non-NULL)...
libguestfs-1.58.0/common/options/uri.c:243:10: branch_false: ...to here
libguestfs-1.58.0/common/options/uri.c:244:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/uri.c:247:8: branch_false: ...to here
libguestfs-1.58.0/common/options/uri.c:253:13: branch_true: following 'true' branch (when 'eq' is NULL)...
libguestfs-1.58.0/common/options/uri.c:254:43: branch_true: ...to here
libguestfs-1.58.0/common/options/uri.c:255:10: branch_false: following 'false' branch...
libguestfs-1.58.0/common/options/uri.c:282:9: branch_false: ...to here
libguestfs-1.58.0/common/options/uri.c:283:10: branch_true: following 'true' branch (when 'value' is NULL)...
libguestfs-1.58.0/common/options/uri.c:284:17: branch_true: ...to here
libguestfs-1.58.0/common/options/uri.c:284:17: acquire_memory: allocated here
libguestfs-1.58.0/common/options/uri.c:285:12: branch_false: following 'false' branch (when 'value' is non-NULL)...
libguestfs-1.58.0/common/options/uri.c:232:24: branch_false: ...to here
libguestfs-1.58.0/common/options/uri.c:232:24: throw: if 'guestfs_int_cleanup_free' throws an exception...
libguestfs-1.58.0/common/options/uri.c:232:24: danger: 'value' leaks here; was allocated at [(17)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/16)
#  230|   
#  231|     while (*query) {
#  232|->     CLEANUP_FREE char *name = NULL;
#  233|       char *value = NULL;
#  234|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
libguestfs-1.58.0/common/parallel/parallel.c:118:36: warning[-Wanalyzer-malloc-leak]: leak of 'thread_data'
libguestfs-1.58.0/common/parallel/parallel.c:121:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/parallel/parallel.c:125:6: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:133:17: acquire_memory: allocated here
libguestfs-1.58.0/common/parallel/parallel.c:135:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/parallel/parallel.c:146:15: branch_false: following 'false' branch (when 'i >= nr_threads')...
libguestfs-1.58.0/common/parallel/parallel.c:146:15: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:154:15: branch_false: following 'false' branch (when 'i >= nr_threads')...
libguestfs-1.58.0/common/parallel/parallel.c:164:10: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:164:10: branch_true: following 'true' branch (when 'errors == 0')...
libguestfs-1.58.0/common/parallel/parallel.c:164:10: branch_true: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:118:36: throw: if 'guestfs_int_cleanup_free' throws an exception...
libguestfs-1.58.0/common/parallel/parallel.c:118:36: danger: 'thread_data' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  116|     int err, errors;
#  117|     void *status;
#  118|->   CLEANUP_FREE struct thread_data *thread_data = NULL;
#  119|     CLEANUP_FREE pthread_t *threads = NULL;
#  120|   

Error: CPPCHECK_WARNING (CWE-476): [#def38]
libguestfs-1.58.0/common/parallel/parallel.c:139: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: thread_data
#  137|   
#  138|     for (i = 0; i < nr_threads; ++i) {
#  139|->     thread_data[i].thread_num = i;
#  140|       thread_data[i].trace = trace;
#  141|       thread_data[i].verbose = verbose;

Error: CPPCHECK_WARNING (CWE-476): [#def39]
libguestfs-1.58.0/common/parallel/parallel.c:140: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: thread_data
#  138|     for (i = 0; i < nr_threads; ++i) {
#  139|       thread_data[i].thread_num = i;
#  140|->     thread_data[i].trace = trace;
#  141|       thread_data[i].verbose = verbose;
#  142|       thread_data[i].work = work;

Error: CPPCHECK_WARNING (CWE-476): [#def40]
libguestfs-1.58.0/common/parallel/parallel.c:141: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: thread_data
#  139|       thread_data[i].thread_num = i;
#  140|       thread_data[i].trace = trace;
#  141|->     thread_data[i].verbose = verbose;
#  142|       thread_data[i].work = work;
#  143|     }

Error: CPPCHECK_WARNING (CWE-476): [#def41]
libguestfs-1.58.0/common/parallel/parallel.c:142: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: thread_data
#  140|       thread_data[i].trace = trace;
#  141|       thread_data[i].verbose = verbose;
#  142|->     thread_data[i].work = work;
#  143|     }
#  144|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
libguestfs-1.58.0/common/parallel/parallel.c:181:24: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
libguestfs-1.58.0/common/parallel/parallel.c:193:8: branch_false: following 'false' branch (when 'err == 0')...
libguestfs-1.58.0/common/parallel/parallel.c:198:9: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:200:8: branch_false: following 'false' branch (when 'err == 0')...
libguestfs-1.58.0/common/parallel/parallel.c:206:9: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:206:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/parallel/parallel.c:209:9: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:213:10: acquire_memory: allocated here
libguestfs-1.58.0/common/parallel/parallel.c:214:8: branch_false: following 'false' branch (when 'fp' is non-NULL)...
libguestfs-1.58.0/common/parallel/parallel.c:221:9: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:221:9: throw: if 'guestfs_create' throws an exception...
libguestfs-1.58.0/common/parallel/parallel.c:181:24: throw: if 'guestfs_int_cleanup_free' throws an exception...
libguestfs-1.58.0/common/parallel/parallel.c:181:24: danger: 'fp' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  179|       size_t i;               /* The current domain we're working on. */
#  180|       FILE *fp;
#  181|->     CLEANUP_FREE char *output = NULL;
#  182|       size_t output_len = 0;
#  183|       guestfs_h *g;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
libguestfs-1.58.0/common/parallel/parallel.c:225:14: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
libguestfs-1.58.0/common/parallel/parallel.c:193:8: branch_false: following 'false' branch (when 'err == 0')...
libguestfs-1.58.0/common/parallel/parallel.c:198:9: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:200:8: branch_false: following 'false' branch (when 'err == 0')...
libguestfs-1.58.0/common/parallel/parallel.c:206:9: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:206:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/parallel/parallel.c:209:9: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:213:10: acquire_memory: allocated here
libguestfs-1.58.0/common/parallel/parallel.c:214:8: branch_false: following 'false' branch (when 'fp' is non-NULL)...
libguestfs-1.58.0/common/parallel/parallel.c:221:9: branch_false: ...to here
libguestfs-1.58.0/common/parallel/parallel.c:225:14: danger: 'fp' leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  223|         perror ("guestfs_create");
#  224|         thread_data->r = -1;
#  225|->       return &thread_data->r;
#  226|       }
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
libguestfs-1.58.0/common/progress/progress.c:136:11: warning[-Wanalyzer-malloc-leak]: leak of 'bar'
libguestfs-1.58.0/common/progress/progress.c:118:9: acquire_memory: allocated here
libguestfs-1.58.0/common/progress/progress.c:119:6: branch_false: following 'false' branch (when 'bar' is non-NULL)...
libguestfs-1.58.0/common/progress/progress.c:122:7: branch_false: ...to here
libguestfs-1.58.0/common/progress/progress.c:122:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/progress/progress.c:128:5: branch_false: ...to here
libguestfs-1.58.0/common/progress/progress.c:135:8: branch_true: following 'true' branch (when 'term' is non-NULL)...
libguestfs-1.58.0/common/progress/progress.c:136:11: branch_true: ...to here
libguestfs-1.58.0/common/progress/progress.c:136:11: throw: if 'tgetent' throws an exception...
libguestfs-1.58.0/common/progress/progress.c:136:11: danger: 'bar' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  134|       term = getenv ("TERM");
#  135|       if (term) {
#  136|->       if (tgetent (NULL, term) == 1)
#  137|           bar->have_terminfo = 1;
#  138|       }

Error: GCC_ANALYZER_WARNING (CWE-122): [#def45]
libguestfs-1.58.0/common/qemuopts/qemuopts.c:852:9: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
libguestfs-1.58.0/common/qemuopts/qemuopts.c:780:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/qemuopts/qemuopts.c:780:6: branch_false: ...to here
libguestfs-1.58.0/common/qemuopts/qemuopts.c:810:6: branch_false: following 'false' branch (when 'ret' is non-NULL)...
libguestfs-1.58.0/common/qemuopts/qemuopts.c:814:12: branch_false: ...to here
libguestfs-1.58.0/common/qemuopts/qemuopts.c:815:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/qemuopts/qemuopts.c:815:6: branch_false: ...to here
libguestfs-1.58.0/common/qemuopts/qemuopts.c:824:15: branch_true: following 'true' branch...
libguestfs-1.58.0/common/qemuopts/qemuopts.c:825:22: branch_true: ...to here
libguestfs-1.58.0/common/qemuopts/qemuopts.c:826:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/qemuopts/qemuopts.c:827:5: branch_false: ...to here
libguestfs-1.58.0/common/qemuopts/qemuopts.c:843:19: branch_false: following 'false' branch...
libguestfs-1.58.0/common/qemuopts/qemuopts.c:847:16: branch_false: ...to here
libguestfs-1.58.0/common/qemuopts/qemuopts.c:848:10: branch_false: following 'false' branch...
libguestfs-1.58.0/common/qemuopts/qemuopts.c:848:10: branch_false: ...to here
libguestfs-1.58.0/common/qemuopts/qemuopts.c:850:19: branch_true: following 'true' branch...
libguestfs-1.58.0/common/qemuopts/qemuopts.c:851:36: branch_true: ...to here
libguestfs-1.58.0/common/qemuopts/qemuopts.c:851:12: branch_true: following 'true' branch...
libguestfs-1.58.0/common/qemuopts/qemuopts.c:851:55: branch_true: ...to here
libguestfs-1.58.0/common/qemuopts/qemuopts.c:852:9: danger: out-of-bounds write at byte 1 but region ends at byte 1
#  850|         for (k = 0; k < strlen (qopts->options[i].value); ++k) {
#  851|           if (qopts->options[i].value[k] == ',') ret[n][len++] = ',';
#  852|->         ret[n][len++] = qopts->options[i].value[k];
#  853|         }
#  854|         ret[n][len] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
libguestfs-1.58.0/common/utils/utils.c:163:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/urandom", 524288)'
libguestfs-1.58.0/common/utils/utils.c:156:8: acquire_resource: opened here
libguestfs-1.58.0/common/utils/utils.c:157:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/utils/utils.c:157:6: branch_false: ...to here
libguestfs-1.58.0/common/utils/utils.c:160:15: branch_true: following 'true' branch (when 'i < len')...
libguestfs-1.58.0/common/utils/utils.c:161:9: branch_true: ...to here
libguestfs-1.58.0/common/utils/utils.c:163:7: danger: 'open("/dev/urandom", 524288)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  161|       if (read (fd, &c, 1) != 1) {
#  162|         saved_errno = errno;
#  163|->       close (fd);
#  164|         errno = saved_errno;
#  165|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
libguestfs-1.58.0/common/utils/utils.c:170:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/urandom", 524288)'
libguestfs-1.58.0/common/utils/utils.c:156:8: acquire_resource: opened here
libguestfs-1.58.0/common/utils/utils.c:157:6: branch_false: following 'false' branch...
libguestfs-1.58.0/common/utils/utils.c:157:6: branch_false: ...to here
libguestfs-1.58.0/common/utils/utils.c:170:6: danger: 'open("/dev/urandom", 524288)' leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  168|       ret[i] = "0123456789abcdefghijklmnopqrstuvwxyz"[c % 36];
#  169|     }
#  170|->   ret[len] = '\0';
#  171|   
#  172|     if (close (fd) == -1)

Error: CPPCHECK_WARNING (CWE-476): [#def48]
libguestfs-1.58.0/common/windows/windows.c:115: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  113|   
#  114|     /* Blindly convert any backslashes into forward slashes.  Is this good? */
#  115|->   for (i = 0; i < strlen (ret); ++i)
#  116|       if (ret[i] == '\\')
#  117|         ret[i] = '/';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
libguestfs-1.58.0/common/windows/windows.c:120:13: warning[-Wanalyzer-malloc-leak]: leak of 'ret'
libguestfs-1.58.0/common/windows/windows.c:103:11: branch_true: following 'true' branch...
libguestfs-1.58.0/common/windows/windows.c:104:11: branch_true: ...to here
libguestfs-1.58.0/common/windows/windows.c:104:11: acquire_memory: allocated here
libguestfs-1.58.0/common/windows/windows.c:105:8: branch_false: following 'false' branch (when 'ret' is non-NULL)...
libguestfs-1.58.0/common/windows/windows.c:115:3: branch_false: ...to here
libguestfs-1.58.0/common/windows/windows.c:115:15: branch_true: following 'true' branch...
libguestfs-1.58.0/common/windows/windows.c:116:12: branch_true: ...to here
libguestfs-1.58.0/common/windows/windows.c:116:8: branch_false: following 'false' branch...
libguestfs-1.58.0/common/windows/windows.c:115:33: branch_false: ...to here
libguestfs-1.58.0/common/windows/windows.c:115:15: branch_false: following 'false' branch...
libguestfs-1.58.0/common/windows/windows.c:120:13: branch_false: ...to here
libguestfs-1.58.0/common/windows/windows.c:120:13: throw: if 'guestfs_case_sensitive_path' throws an exception...
libguestfs-1.58.0/common/windows/windows.c:120:13: danger: 'ret' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  118|   
#  119|     /* If this fails, we want to return NULL. */
#  120|->   char *t = guestfs_case_sensitive_path (g, ret);
#  121|     free (ret);
#  122|     ret = t;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
libguestfs-1.58.0/daemon/acl.c:86:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/acl.c:61:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/acl.c:66:7: branch_false: ...to here
libguestfs-1.58.0/daemon/acl.c:67:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/acl.c:73:3: branch_false: ...to here
libguestfs-1.58.0/daemon/acl.c:80:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/acl.c:81:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/acl.c:86:3: branch_false: ...to here
libguestfs-1.58.0/daemon/acl.c:86:3: throw: if ‘acl_free’ throws an exception...
libguestfs-1.58.0/daemon/acl.c:86:3: danger: ‘ret’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   84|       return NULL;
#   85|     }
#   86|->   acl_free (r);
#   87|   
#   88|     return ret;                   /* caller frees */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
libguestfs-1.58.0/daemon/base64.c:81:7: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/base64.c:51:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/base64.c:59:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:61:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:64:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:67:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:68:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:79:8: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:81:7: throw: if ‘receive_file’ throws an exception...
libguestfs-1.58.0/daemon/base64.c:81:7: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   79|     fd = fileno (fp);
#   80|   
#   81|->   r = receive_file (write_cb, &fd);
#   82|     if (r == -1) {		/* write error */
#   83|       cancel_receive ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
libguestfs-1.58.0/daemon/base64.c:83:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/base64.c:51:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/base64.c:59:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:61:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:64:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:67:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:68:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:79:8: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:82:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/base64.c:83:5: branch_true: ...to here
libguestfs-1.58.0/daemon/base64.c:83:5: throw: if ‘cancel_receive’ throws an exception...
libguestfs-1.58.0/daemon/base64.c:83:5: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   81|     r = receive_file (write_cb, &fd);
#   82|     if (r == -1) {		/* write error */
#   83|->     cancel_receive ();
#   84|       reply_with_error ("write error on file: %s", file);
#   85|       pclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
libguestfs-1.58.0/daemon/base64.c:84:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/base64.c:51:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/base64.c:59:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:61:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:64:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:67:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:68:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:79:8: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:82:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/base64.c:83:5: branch_true: ...to here
libguestfs-1.58.0/daemon/base64.c:84:5: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/base64.c:84:5: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   82|     if (r == -1) {		/* write error */
#   83|       cancel_receive ();
#   84|->     reply_with_error ("write error on file: %s", file);
#   85|       pclose (fp);
#   86|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
libguestfs-1.58.0/daemon/base64.c:85:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/base64.c:51:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/base64.c:59:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:61:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:64:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:67:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:68:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:79:8: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:82:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/base64.c:83:5: branch_true: ...to here
libguestfs-1.58.0/daemon/base64.c:85:5: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#   83|       cancel_receive ();
#   84|       reply_with_error ("write error on file: %s", file);
#   85|->     pclose (fp);
#   86|       return -1;
#   87|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
libguestfs-1.58.0/daemon/base64.c:92:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/base64.c:51:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/base64.c:59:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:61:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:64:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:67:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:68:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:79:8: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:82:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:88:6: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:88:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/base64.c:92:5: branch_true: ...to here
libguestfs-1.58.0/daemon/base64.c:92:5: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/base64.c:92:5: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#   90|        * cancel.  Nevertheless we must send an error reply here.
#   91|        */
#   92|->     reply_with_error ("file upload cancelled");
#   93|       pclose (fp);
#   94|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
libguestfs-1.58.0/daemon/base64.c:93:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/base64.c:51:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/base64.c:59:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:61:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:64:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:67:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:68:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:79:8: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:82:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:88:6: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:88:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/base64.c:92:5: branch_true: ...to here
libguestfs-1.58.0/daemon/base64.c:93:5: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#   91|        */
#   92|       reply_with_error ("file upload cancelled");
#   93|->     pclose (fp);
#   94|       return -1;
#   95|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
libguestfs-1.58.0/daemon/base64.c:97:7: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/base64.c:51:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/base64.c:59:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:61:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:64:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:67:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:68:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:79:8: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:82:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:88:6: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:88:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:97:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:97:7: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#   95|     }
#   96|   
#   97|->   if (pclose (fp) != 0) {
#   98|       reply_with_error ("base64 subcommand failed on file: %s", file);
#   99|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
libguestfs-1.58.0/daemon/base64.c:109:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
libguestfs-1.58.0/daemon/base64.c:117:12: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:118:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:124:9: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:115:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/base64.c:113:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/base64.c:109:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/base64.c:109:22: danger: ‘buffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  107|   do_base64_out (const char *file)
#  108|   {
#  109|->   CLEANUP_FREE char *buf = NULL;
#  110|     struct stat statbuf;
#  111|     int r;

Error: CPPCHECK_WARNING (CWE-401): [#def59]
libguestfs-1.58.0/daemon/base64.c:127: error[memleak]: Memory leak: buffer
#  125|     if (buf == NULL) {
#  126|       reply_with_perror ("malloc");
#  127|->     return -1;
#  128|     }
#  129|   

Error: CPPCHECK_WARNING (CWE-401): [#def60]
libguestfs-1.58.0/daemon/base64.c:132: error[memleak]: Memory leak: buffer
#  130|     if (stat (buf, &statbuf) == -1) {
#  131|       reply_with_perror ("stat: %s", file);
#  132|->     return -1;
#  133|     }
#  134|   

Error: CPPCHECK_WARNING (CWE-401): [#def61]
libguestfs-1.58.0/daemon/base64.c:137: error[memleak]: Memory leak: buffer
#  135|     if (S_ISDIR (statbuf.st_mode)) {
#  136|       reply_with_error ("%s: is a directory", file);
#  137|->     return -1;
#  138|     }
#  139|   

Error: CPPCHECK_WARNING (CWE-401): [#def62]
libguestfs-1.58.0/daemon/base64.c:145: error[memleak]: Memory leak: buffer
#  143|     cmd_error:
#  144|       reply_with_perror ("open_memstream");
#  145|->     return -1;
#  146|     }
#  147|     fprintf (fp, "base64 ");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
libguestfs-1.58.0/daemon/base64.c:165:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/base64.c:118:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:124:9: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:125:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:130:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:130:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:135:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:135:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:141:8: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:142:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/base64.c:147:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:149:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:152:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:155:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:156:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:165:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:165:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/base64.c:165:3: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/12)
#  163|      * message back.  Instead we can only cancel the transfer.
#  164|      */
#  165|->   reply (NULL, NULL);
#  166|   
#  167|     while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
libguestfs-1.58.0/daemon/base64.c:167:15: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/base64.c:118:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:124:9: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:125:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:130:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:130:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:135:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:135:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:141:8: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:142:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/base64.c:147:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:149:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:152:7: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:155:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/base64.c:156:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/base64.c:165:3: branch_false: ...to here
libguestfs-1.58.0/daemon/base64.c:167:10: branch_true: following ‘true’ branch (when ‘r > 0’)...
libguestfs-1.58.0/daemon/base64.c:168:9: branch_true: ...to here
libguestfs-1.58.0/daemon/base64.c:168:9: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/base64.c:167:15: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/12)
#  165|     reply (NULL, NULL);
#  166|   
#  167|->   while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#  168|       if (send_file_write (buffer, r) < 0) {
#  169|         pclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
libguestfs-1.58.0/daemon/blkid.c:35:22: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
libguestfs-1.58.0/daemon/blkid.c:44:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/blkid.c:53:6: branch_false: ...to here
libguestfs-1.58.0/daemon/blkid.c:53:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/blkid.c:54:5: branch_true: ...to here
libguestfs-1.58.0/daemon/blkid.c:55:11: acquire_memory: allocated here
libguestfs-1.58.0/daemon/blkid.c:56:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/blkid.c:58:12: branch_false: ...to here
libguestfs-1.58.0/daemon/blkid.c:35:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/blkid.c:35:22: danger: ‘out’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   33|   {
#   34|     char *out;
#   35|->   CLEANUP_FREE char *err = NULL;
#   36|     int r;
#   37|     size_t len;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
libguestfs-1.58.0/daemon/btrfs.c:1206:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/btrfs.c:1213:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1218:3: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1227:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1232:11: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1233:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1243:29: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1246:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/btrfs.c:1251:3: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1253:5: acquire_memory: allocated here
libguestfs-1.58.0/daemon/btrfs.c:1254:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1254:6: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1259:15: branch_false: following ‘false’ branch (when ‘i >= nr_qgroups’)...
libguestfs-1.58.0/daemon/btrfs.c:1210:35: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1206:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/btrfs.c:1206:22: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
# 1204|     size_t i = 0;
# 1205|     const int has_raw_opt = test_btrfs_qgroup_show_raw_opt ();
# 1206|->   CLEANUP_FREE char *path_buf = NULL;
# 1207|     CLEANUP_FREE char *err = NULL;
# 1208|     CLEANUP_FREE char *out = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
libguestfs-1.58.0/daemon/btrfs.c:1206:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/btrfs.c:1213:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1218:3: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1227:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1232:11: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1233:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1243:29: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1245:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/btrfs.c:1246:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/btrfs.c:1251:3: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1254:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1254:6: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1259:15: branch_false: following ‘false’ branch (when ‘i >= nr_qgroups’)...
libguestfs-1.58.0/daemon/btrfs.c:1210:35: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1206:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/btrfs.c:1206:22: danger: ‘ret’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 1204|     size_t i = 0;
# 1205|     const int has_raw_opt = test_btrfs_qgroup_show_raw_opt ();
# 1206|->   CLEANUP_FREE char *path_buf = NULL;
# 1207|     CLEANUP_FREE char *err = NULL;
# 1208|     CLEANUP_FREE char *out = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
libguestfs-1.58.0/daemon/btrfs.c:1800:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/btrfs.c:1808:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1813:3: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1821:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1826:7: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1830:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1833:7: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1833:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/btrfs.c:1838:9: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1838:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/btrfs.c:1839:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/btrfs.c:1839:6: branch_false: ...to here
libguestfs-1.58.0/daemon/btrfs.c:1800:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/btrfs.c:1800:22: danger: ‘ret’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
# 1798|     const char *argv[MAX_ARGS];
# 1799|     size_t i = 0;
# 1800|->   CLEANUP_FREE char *path_buf = NULL;
# 1801|     CLEANUP_FREE char *err = NULL;
# 1802|     CLEANUP_FREE_STRING_LIST char **lines = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
libguestfs-1.58.0/daemon/caml-stubs.c:48:43: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:53:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:58:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:59:18: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:60:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:61:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:62:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:63:3: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:66:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:48:43: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:48:43: throw: if ‘cleanup_free_int_lvm_lv’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:48:43: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   46|   return_lvm_lv (value retv)
#   47|   {
#   48|->   CLEANUP_FREE_LVM_LV guestfs_int_lvm_lv *ret = NULL;
#   49|     guestfs_int_lvm_lv *real_ret;
#   50|     value v;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
libguestfs-1.58.0/daemon/caml-stubs.c:48:43: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:52:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:53:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:58:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:60:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:48:43: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:48:43: throw: if ‘cleanup_free_int_lvm_lv’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:48:43: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   46|   return_lvm_lv (value retv)
#   47|   {
#   48|->   CLEANUP_FREE_LVM_LV guestfs_int_lvm_lv *ret = NULL;
#   49|     guestfs_int_lvm_lv *real_ret;
#   50|     value v;

Error: CPPCHECK_WARNING (CWE-401): [#def71]
libguestfs-1.58.0/daemon/caml-stubs.c:60: error[memleak]: Memory leak: ret
#   58|     v = Field (retv, 0);
#   59|     ret->lv_name = strdup (String_val (v));
#   60|->   if (ret->lv_name == NULL) return NULL;
#   61|     v = Field (retv, 1);
#   62|     assert (caml_string_length (v) == sizeof ret->lv_uuid);

Error: CPPCHECK_WARNING (CWE-401): [#def72]
libguestfs-1.58.0/daemon/caml-stubs.c:66: error[memleak]: Memory leak: ret
#   64|     v = Field (retv, 2);
#   65|     ret->lv_attr = strdup (String_val (v));
#   66|->   if (ret->lv_attr == NULL) return NULL;
#   67|     v = Field (retv, 3);
#   68|     ret->lv_major = Int64_val (v);

Error: CPPCHECK_WARNING (CWE-401): [#def73]
libguestfs-1.58.0/daemon/caml-stubs.c:81: error[memleak]: Memory leak: ret
#   79|     v = Field (retv, 9);
#   80|     ret->origin = strdup (String_val (v));
#   81|->   if (ret->origin == NULL) return NULL;
#   82|     v = Field (retv, 10);
#   83|     if (v == Val_int (0)) /* None */

Error: CPPCHECK_WARNING (CWE-401): [#def74]
libguestfs-1.58.0/daemon/caml-stubs.c:98: error[memleak]: Memory leak: ret
#   96|     v = Field (retv, 12);
#   97|     ret->move_pv = strdup (String_val (v));
#   98|->   if (ret->move_pv == NULL) return NULL;
#   99|     v = Field (retv, 13);
#  100|     ret->lv_tags = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def75]
libguestfs-1.58.0/daemon/caml-stubs.c:101: error[memleak]: Memory leak: ret
#   99|     v = Field (retv, 13);
#  100|     ret->lv_tags = strdup (String_val (v));
#  101|->   if (ret->lv_tags == NULL) return NULL;
#  102|     v = Field (retv, 14);
#  103|     ret->mirror_log = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def76]
libguestfs-1.58.0/daemon/caml-stubs.c:104: error[memleak]: Memory leak: ret
#  102|     v = Field (retv, 14);
#  103|     ret->mirror_log = strdup (String_val (v));
#  104|->   if (ret->mirror_log == NULL) return NULL;
#  105|     v = Field (retv, 15);
#  106|     ret->modules = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def77]
libguestfs-1.58.0/daemon/caml-stubs.c:107: error[memleak]: Memory leak: ret
#  105|     v = Field (retv, 15);
#  106|     ret->modules = strdup (String_val (v));
#  107|->   if (ret->modules == NULL) return NULL;
#  108|   
#  109|     real_ret = ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
libguestfs-1.58.0/daemon/caml-stubs.c:118:53: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:133:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:137:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:137:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:139:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:139:7: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:140:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:144:5: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:148:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:158:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:118:53: throw: if ‘cleanup_free_int_lvm_lv_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:118:53: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  116|   return_lvm_lv_list (value retv)
#  117|   {
#  118|->   CLEANUP_FREE_LVM_LV_LIST guestfs_int_lvm_lv_list *ret = NULL;
#  119|     guestfs_int_lvm_lv_list *real_ret;
#  120|     guestfs_int_lvm_lv *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
libguestfs-1.58.0/daemon/caml-stubs.c:118:53: warning[-Wanalyzer-malloc-leak]: leak of ‘real_ret’
libguestfs-1.58.0/daemon/caml-stubs.c:132:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:133:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:137:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:137:6: branch_false: following ‘false’ branch (when ‘len == 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:148:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:148:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:158:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:118:53: throw: if ‘cleanup_free_int_lvm_lv_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:118:53: danger: ‘real_ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  116|   return_lvm_lv_list (value retv)
#  117|   {
#  118|->   CLEANUP_FREE_LVM_LV_LIST guestfs_int_lvm_lv_list *ret = NULL;
#  119|     guestfs_int_lvm_lv_list *real_ret;
#  120|     guestfs_int_lvm_lv *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
libguestfs-1.58.0/daemon/caml-stubs.c:118:53: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:132:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:133:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:137:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:137:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:139:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:140:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:141:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:118:53: throw: if ‘cleanup_free_int_lvm_lv_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:118:53: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  116|   return_lvm_lv_list (value retv)
#  117|   {
#  118|->   CLEANUP_FREE_LVM_LV_LIST guestfs_int_lvm_lv_list *ret = NULL;
#  119|     guestfs_int_lvm_lv_list *real_ret;
#  120|     guestfs_int_lvm_lv *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
libguestfs-1.58.0/daemon/caml-stubs.c:177:7: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 32)’
libguestfs-1.58.0/daemon/caml-stubs.c:171:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:172:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:177:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:167:49: throw: if ‘cleanup_free_int_partition’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:177:7: danger: ‘calloc(1, 32)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  175|     }
#  176|   
#  177|->   v = Field (retv, 0);
#  178|     ret->part_num = Int32_val (v);
#  179|     v = Field (retv, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
libguestfs-1.58.0/daemon/caml-stubs.c:195:59: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:210:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:214:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:214:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:216:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:216:7: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:217:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:221:5: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:225:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:235:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:195:59: throw: if ‘cleanup_free_int_partition_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:195:59: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  193|   return_partition_list (value retv)
#  194|   {
#  195|->   CLEANUP_FREE_PARTITION_LIST guestfs_int_partition_list *ret = NULL;
#  196|     guestfs_int_partition_list *real_ret;
#  197|     guestfs_int_partition *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
libguestfs-1.58.0/daemon/caml-stubs.c:195:59: warning[-Wanalyzer-malloc-leak]: leak of ‘real_ret’
libguestfs-1.58.0/daemon/caml-stubs.c:209:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:210:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:214:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:214:6: branch_false: following ‘false’ branch (when ‘len == 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:225:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:225:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:235:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:195:59: throw: if ‘cleanup_free_int_partition_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:195:59: danger: ‘real_ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  193|   return_partition_list (value retv)
#  194|   {
#  195|->   CLEANUP_FREE_PARTITION_LIST guestfs_int_partition_list *ret = NULL;
#  196|     guestfs_int_partition_list *real_ret;
#  197|     guestfs_int_partition *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
libguestfs-1.58.0/daemon/caml-stubs.c:195:59: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:209:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:210:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:214:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:214:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:216:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:217:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:218:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:195:59: throw: if ‘cleanup_free_int_partition_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:195:59: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  193|   return_partition_list (value retv)
#  194|   {
#  195|->   CLEANUP_FREE_PARTITION_LIST guestfs_int_partition_list *ret = NULL;
#  196|     guestfs_int_partition_list *real_ret;
#  197|     guestfs_int_partition *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
libguestfs-1.58.0/daemon/caml-stubs.c:244:55: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:249:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:254:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:255:20: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:256:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:257:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:259:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:244:55: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:244:55: throw: if ‘cleanup_free_int_application2’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:244:55: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  242|   return_application2 (value retv)
#  243|   {
#  244|->   CLEANUP_FREE_APPLICATION2 guestfs_int_application2 *ret = NULL;
#  245|     guestfs_int_application2 *real_ret;
#  246|     value v;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
libguestfs-1.58.0/daemon/caml-stubs.c:244:55: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:248:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:249:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:254:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:256:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:244:55: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:244:55: throw: if ‘cleanup_free_int_application2’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:244:55: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  242|   return_application2 (value retv)
#  243|   {
#  244|->   CLEANUP_FREE_APPLICATION2 guestfs_int_application2 *ret = NULL;
#  245|     guestfs_int_application2 *real_ret;
#  246|     value v;

Error: CPPCHECK_WARNING (CWE-401): [#def87]
libguestfs-1.58.0/daemon/caml-stubs.c:256: error[memleak]: Memory leak: ret
#  254|     v = Field (retv, 0);
#  255|     ret->app2_name = strdup (String_val (v));
#  256|->   if (ret->app2_name == NULL) return NULL;
#  257|     v = Field (retv, 1);
#  258|     ret->app2_display_name = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def88]
libguestfs-1.58.0/daemon/caml-stubs.c:259: error[memleak]: Memory leak: ret
#  257|     v = Field (retv, 1);
#  258|     ret->app2_display_name = strdup (String_val (v));
#  259|->   if (ret->app2_display_name == NULL) return NULL;
#  260|     v = Field (retv, 2);
#  261|     ret->app2_epoch = Int32_val (v);

Error: CPPCHECK_WARNING (CWE-401): [#def89]
libguestfs-1.58.0/daemon/caml-stubs.c:264: error[memleak]: Memory leak: ret
#  262|     v = Field (retv, 3);
#  263|     ret->app2_version = strdup (String_val (v));
#  264|->   if (ret->app2_version == NULL) return NULL;
#  265|     v = Field (retv, 4);
#  266|     ret->app2_release = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def90]
libguestfs-1.58.0/daemon/caml-stubs.c:267: error[memleak]: Memory leak: ret
#  265|     v = Field (retv, 4);
#  266|     ret->app2_release = strdup (String_val (v));
#  267|->   if (ret->app2_release == NULL) return NULL;
#  268|     v = Field (retv, 5);
#  269|     ret->app2_arch = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def91]
libguestfs-1.58.0/daemon/caml-stubs.c:270: error[memleak]: Memory leak: ret
#  268|     v = Field (retv, 5);
#  269|     ret->app2_arch = strdup (String_val (v));
#  270|->   if (ret->app2_arch == NULL) return NULL;
#  271|     v = Field (retv, 6);
#  272|     ret->app2_install_path = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def92]
libguestfs-1.58.0/daemon/caml-stubs.c:273: error[memleak]: Memory leak: ret
#  271|     v = Field (retv, 6);
#  272|     ret->app2_install_path = strdup (String_val (v));
#  273|->   if (ret->app2_install_path == NULL) return NULL;
#  274|     v = Field (retv, 7);
#  275|     ret->app2_trans_path = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def93]
libguestfs-1.58.0/daemon/caml-stubs.c:276: error[memleak]: Memory leak: ret
#  274|     v = Field (retv, 7);
#  275|     ret->app2_trans_path = strdup (String_val (v));
#  276|->   if (ret->app2_trans_path == NULL) return NULL;
#  277|     v = Field (retv, 8);
#  278|     ret->app2_publisher = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def94]
libguestfs-1.58.0/daemon/caml-stubs.c:279: error[memleak]: Memory leak: ret
#  277|     v = Field (retv, 8);
#  278|     ret->app2_publisher = strdup (String_val (v));
#  279|->   if (ret->app2_publisher == NULL) return NULL;
#  280|     v = Field (retv, 9);
#  281|     ret->app2_url = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def95]
libguestfs-1.58.0/daemon/caml-stubs.c:282: error[memleak]: Memory leak: ret
#  280|     v = Field (retv, 9);
#  281|     ret->app2_url = strdup (String_val (v));
#  282|->   if (ret->app2_url == NULL) return NULL;
#  283|     v = Field (retv, 10);
#  284|     ret->app2_source_package = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def96]
libguestfs-1.58.0/daemon/caml-stubs.c:285: error[memleak]: Memory leak: ret
#  283|     v = Field (retv, 10);
#  284|     ret->app2_source_package = strdup (String_val (v));
#  285|->   if (ret->app2_source_package == NULL) return NULL;
#  286|     v = Field (retv, 11);
#  287|     ret->app2_summary = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def97]
libguestfs-1.58.0/daemon/caml-stubs.c:288: error[memleak]: Memory leak: ret
#  286|     v = Field (retv, 11);
#  287|     ret->app2_summary = strdup (String_val (v));
#  288|->   if (ret->app2_summary == NULL) return NULL;
#  289|     v = Field (retv, 12);
#  290|     ret->app2_description = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def98]
libguestfs-1.58.0/daemon/caml-stubs.c:291: error[memleak]: Memory leak: ret
#  289|     v = Field (retv, 12);
#  290|     ret->app2_description = strdup (String_val (v));
#  291|->   if (ret->app2_description == NULL) return NULL;
#  292|     v = Field (retv, 13);
#  293|     ret->app2_class = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def99]
libguestfs-1.58.0/daemon/caml-stubs.c:294: error[memleak]: Memory leak: ret
#  292|     v = Field (retv, 13);
#  293|     ret->app2_class = strdup (String_val (v));
#  294|->   if (ret->app2_class == NULL) return NULL;
#  295|     v = Field (retv, 14);
#  296|     ret->app2_spare2 = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def100]
libguestfs-1.58.0/daemon/caml-stubs.c:297: error[memleak]: Memory leak: ret
#  295|     v = Field (retv, 14);
#  296|     ret->app2_spare2 = strdup (String_val (v));
#  297|->   if (ret->app2_spare2 == NULL) return NULL;
#  298|     v = Field (retv, 15);
#  299|     ret->app2_spare3 = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def101]
libguestfs-1.58.0/daemon/caml-stubs.c:300: error[memleak]: Memory leak: ret
#  298|     v = Field (retv, 15);
#  299|     ret->app2_spare3 = strdup (String_val (v));
#  300|->   if (ret->app2_spare3 == NULL) return NULL;
#  301|     v = Field (retv, 16);
#  302|     ret->app2_spare4 = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def102]
libguestfs-1.58.0/daemon/caml-stubs.c:303: error[memleak]: Memory leak: ret
#  301|     v = Field (retv, 16);
#  302|     ret->app2_spare4 = strdup (String_val (v));
#  303|->   if (ret->app2_spare4 == NULL) return NULL;
#  304|   
#  305|     real_ret = ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
libguestfs-1.58.0/daemon/caml-stubs.c:314:65: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:329:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:333:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:333:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:335:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:335:7: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:336:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:340:5: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:344:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:354:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:314:65: throw: if ‘cleanup_free_int_application2_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:314:65: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
#  312|   return_application2_list (value retv)
#  313|   {
#  314|->   CLEANUP_FREE_APPLICATION2_LIST guestfs_int_application2_list *ret = NULL;
#  315|     guestfs_int_application2_list *real_ret;
#  316|     guestfs_int_application2 *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
libguestfs-1.58.0/daemon/caml-stubs.c:314:65: warning[-Wanalyzer-malloc-leak]: leak of ‘real_ret’
libguestfs-1.58.0/daemon/caml-stubs.c:328:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:329:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:333:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:333:6: branch_false: following ‘false’ branch (when ‘len == 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:344:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:344:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:354:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:314:65: throw: if ‘cleanup_free_int_application2_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:314:65: danger: ‘real_ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  312|   return_application2_list (value retv)
#  313|   {
#  314|->   CLEANUP_FREE_APPLICATION2_LIST guestfs_int_application2_list *ret = NULL;
#  315|     guestfs_int_application2_list *real_ret;
#  316|     guestfs_int_application2 *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
libguestfs-1.58.0/daemon/caml-stubs.c:314:65: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:328:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:329:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:333:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:333:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:335:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:336:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:337:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:314:65: throw: if ‘cleanup_free_int_application2_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:314:65: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  312|   return_application2_list (value retv)
#  313|   {
#  314|->   CLEANUP_FREE_APPLICATION2_LIST guestfs_int_application2_list *ret = NULL;
#  315|     guestfs_int_application2_list *real_ret;
#  316|     guestfs_int_application2 *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
libguestfs-1.58.0/daemon/caml-stubs.c:363:45: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:368:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:373:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:374:24: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:375:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:376:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:378:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:363:45: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:363:45: throw: if ‘cleanup_free_int_isoinfo’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:363:45: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  361|   return_isoinfo (value retv)
#  362|   {
#  363|->   CLEANUP_FREE_ISOINFO guestfs_int_isoinfo *ret = NULL;
#  364|     guestfs_int_isoinfo *real_ret;
#  365|     value v;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
libguestfs-1.58.0/daemon/caml-stubs.c:363:45: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:367:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:368:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:373:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:375:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:363:45: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:363:45: throw: if ‘cleanup_free_int_isoinfo’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:363:45: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  361|   return_isoinfo (value retv)
#  362|   {
#  363|->   CLEANUP_FREE_ISOINFO guestfs_int_isoinfo *ret = NULL;
#  364|     guestfs_int_isoinfo *real_ret;
#  365|     value v;

Error: CPPCHECK_WARNING (CWE-401): [#def108]
libguestfs-1.58.0/daemon/caml-stubs.c:375: error[memleak]: Memory leak: ret
#  373|     v = Field (retv, 0);
#  374|     ret->iso_system_id = strdup (String_val (v));
#  375|->   if (ret->iso_system_id == NULL) return NULL;
#  376|     v = Field (retv, 1);
#  377|     ret->iso_volume_id = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def109]
libguestfs-1.58.0/daemon/caml-stubs.c:378: error[memleak]: Memory leak: ret
#  376|     v = Field (retv, 1);
#  377|     ret->iso_volume_id = strdup (String_val (v));
#  378|->   if (ret->iso_volume_id == NULL) return NULL;
#  379|     v = Field (retv, 2);
#  380|     ret->iso_volume_space_size = Int32_val (v);

Error: CPPCHECK_WARNING (CWE-401): [#def110]
libguestfs-1.58.0/daemon/caml-stubs.c:389: error[memleak]: Memory leak: ret
#  387|     v = Field (retv, 6);
#  388|     ret->iso_volume_set_id = strdup (String_val (v));
#  389|->   if (ret->iso_volume_set_id == NULL) return NULL;
#  390|     v = Field (retv, 7);
#  391|     ret->iso_publisher_id = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def111]
libguestfs-1.58.0/daemon/caml-stubs.c:392: error[memleak]: Memory leak: ret
#  390|     v = Field (retv, 7);
#  391|     ret->iso_publisher_id = strdup (String_val (v));
#  392|->   if (ret->iso_publisher_id == NULL) return NULL;
#  393|     v = Field (retv, 8);
#  394|     ret->iso_data_preparer_id = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def112]
libguestfs-1.58.0/daemon/caml-stubs.c:395: error[memleak]: Memory leak: ret
#  393|     v = Field (retv, 8);
#  394|     ret->iso_data_preparer_id = strdup (String_val (v));
#  395|->   if (ret->iso_data_preparer_id == NULL) return NULL;
#  396|     v = Field (retv, 9);
#  397|     ret->iso_application_id = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def113]
libguestfs-1.58.0/daemon/caml-stubs.c:398: error[memleak]: Memory leak: ret
#  396|     v = Field (retv, 9);
#  397|     ret->iso_application_id = strdup (String_val (v));
#  398|->   if (ret->iso_application_id == NULL) return NULL;
#  399|     v = Field (retv, 10);
#  400|     ret->iso_copyright_file_id = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def114]
libguestfs-1.58.0/daemon/caml-stubs.c:401: error[memleak]: Memory leak: ret
#  399|     v = Field (retv, 10);
#  400|     ret->iso_copyright_file_id = strdup (String_val (v));
#  401|->   if (ret->iso_copyright_file_id == NULL) return NULL;
#  402|     v = Field (retv, 11);
#  403|     ret->iso_abstract_file_id = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def115]
libguestfs-1.58.0/daemon/caml-stubs.c:404: error[memleak]: Memory leak: ret
#  402|     v = Field (retv, 11);
#  403|     ret->iso_abstract_file_id = strdup (String_val (v));
#  404|->   if (ret->iso_abstract_file_id == NULL) return NULL;
#  405|     v = Field (retv, 12);
#  406|     ret->iso_bibliographic_file_id = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def116]
libguestfs-1.58.0/daemon/caml-stubs.c:407: error[memleak]: Memory leak: ret
#  405|     v = Field (retv, 12);
#  406|     ret->iso_bibliographic_file_id = strdup (String_val (v));
#  407|->   if (ret->iso_bibliographic_file_id == NULL) return NULL;
#  408|     v = Field (retv, 13);
#  409|     ret->iso_volume_creation_t = Int64_val (v);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
libguestfs-1.58.0/daemon/caml-stubs.c:426:43: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:431:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:436:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:437:18: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:438:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:439:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:440:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:441:3: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:444:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:426:43: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:426:43: throw: if ‘cleanup_free_int_lvm_pv’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:426:43: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  424|   return_lvm_pv (value retv)
#  425|   {
#  426|->   CLEANUP_FREE_LVM_PV guestfs_int_lvm_pv *ret = NULL;
#  427|     guestfs_int_lvm_pv *real_ret;
#  428|     value v;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
libguestfs-1.58.0/daemon/caml-stubs.c:426:43: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:430:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:431:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:436:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:438:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:426:43: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:426:43: throw: if ‘cleanup_free_int_lvm_pv’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:426:43: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  424|   return_lvm_pv (value retv)
#  425|   {
#  426|->   CLEANUP_FREE_LVM_PV guestfs_int_lvm_pv *ret = NULL;
#  427|     guestfs_int_lvm_pv *real_ret;
#  428|     value v;

Error: CPPCHECK_WARNING (CWE-401): [#def119]
libguestfs-1.58.0/daemon/caml-stubs.c:438: error[memleak]: Memory leak: ret
#  436|     v = Field (retv, 0);
#  437|     ret->pv_name = strdup (String_val (v));
#  438|->   if (ret->pv_name == NULL) return NULL;
#  439|     v = Field (retv, 1);
#  440|     assert (caml_string_length (v) == sizeof ret->pv_uuid);

Error: CPPCHECK_WARNING (CWE-401): [#def120]
libguestfs-1.58.0/daemon/caml-stubs.c:444: error[memleak]: Memory leak: ret
#  442|     v = Field (retv, 2);
#  443|     ret->pv_fmt = strdup (String_val (v));
#  444|->   if (ret->pv_fmt == NULL) return NULL;
#  445|     v = Field (retv, 3);
#  446|     ret->pv_size = Int64_val (v);

Error: CPPCHECK_WARNING (CWE-401): [#def121]
libguestfs-1.58.0/daemon/caml-stubs.c:455: error[memleak]: Memory leak: ret
#  453|     v = Field (retv, 7);
#  454|     ret->pv_attr = strdup (String_val (v));
#  455|->   if (ret->pv_attr == NULL) return NULL;
#  456|     v = Field (retv, 8);
#  457|     ret->pv_pe_count = Int64_val (v);

Error: CPPCHECK_WARNING (CWE-401): [#def122]
libguestfs-1.58.0/daemon/caml-stubs.c:462: error[memleak]: Memory leak: ret
#  460|     v = Field (retv, 10);
#  461|     ret->pv_tags = strdup (String_val (v));
#  462|->   if (ret->pv_tags == NULL) return NULL;
#  463|     v = Field (retv, 11);
#  464|     ret->pe_start = Int64_val (v);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
libguestfs-1.58.0/daemon/caml-stubs.c:479:53: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:494:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:498:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:498:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:500:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:500:7: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:501:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:505:5: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:509:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:519:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:479:53: throw: if ‘cleanup_free_int_lvm_pv_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:479:53: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
#  477|   return_lvm_pv_list (value retv)
#  478|   {
#  479|->   CLEANUP_FREE_LVM_PV_LIST guestfs_int_lvm_pv_list *ret = NULL;
#  480|     guestfs_int_lvm_pv_list *real_ret;
#  481|     guestfs_int_lvm_pv *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
libguestfs-1.58.0/daemon/caml-stubs.c:479:53: warning[-Wanalyzer-malloc-leak]: leak of ‘real_ret’
libguestfs-1.58.0/daemon/caml-stubs.c:493:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:494:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:498:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:498:6: branch_false: following ‘false’ branch (when ‘len == 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:509:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:509:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:519:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:479:53: throw: if ‘cleanup_free_int_lvm_pv_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:479:53: danger: ‘real_ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  477|   return_lvm_pv_list (value retv)
#  478|   {
#  479|->   CLEANUP_FREE_LVM_PV_LIST guestfs_int_lvm_pv_list *ret = NULL;
#  480|     guestfs_int_lvm_pv_list *real_ret;
#  481|     guestfs_int_lvm_pv *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
libguestfs-1.58.0/daemon/caml-stubs.c:479:53: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:493:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:494:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:498:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:498:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:500:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:501:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:502:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:479:53: throw: if ‘cleanup_free_int_lvm_pv_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:479:53: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  477|   return_lvm_pv_list (value retv)
#  478|   {
#  479|->   CLEANUP_FREE_LVM_PV_LIST guestfs_int_lvm_pv_list *ret = NULL;
#  480|     guestfs_int_lvm_pv_list *real_ret;
#  481|     guestfs_int_lvm_pv *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
libguestfs-1.58.0/daemon/caml-stubs.c:528:43: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:533:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:538:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:539:18: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:540:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:541:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:542:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:543:3: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:546:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:528:43: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:528:43: throw: if ‘cleanup_free_int_lvm_vg’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:528:43: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  526|   return_lvm_vg (value retv)
#  527|   {
#  528|->   CLEANUP_FREE_LVM_VG guestfs_int_lvm_vg *ret = NULL;
#  529|     guestfs_int_lvm_vg *real_ret;
#  530|     value v;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
libguestfs-1.58.0/daemon/caml-stubs.c:528:43: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:532:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:533:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:538:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:540:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:528:43: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:528:43: throw: if ‘cleanup_free_int_lvm_vg’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:528:43: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#  526|   return_lvm_vg (value retv)
#  527|   {
#  528|->   CLEANUP_FREE_LVM_VG guestfs_int_lvm_vg *ret = NULL;
#  529|     guestfs_int_lvm_vg *real_ret;
#  530|     value v;

Error: CPPCHECK_WARNING (CWE-401): [#def128]
libguestfs-1.58.0/daemon/caml-stubs.c:540: error[memleak]: Memory leak: ret
#  538|     v = Field (retv, 0);
#  539|     ret->vg_name = strdup (String_val (v));
#  540|->   if (ret->vg_name == NULL) return NULL;
#  541|     v = Field (retv, 1);
#  542|     assert (caml_string_length (v) == sizeof ret->vg_uuid);

Error: CPPCHECK_WARNING (CWE-401): [#def129]
libguestfs-1.58.0/daemon/caml-stubs.c:546: error[memleak]: Memory leak: ret
#  544|     v = Field (retv, 2);
#  545|     ret->vg_fmt = strdup (String_val (v));
#  546|->   if (ret->vg_fmt == NULL) return NULL;
#  547|     v = Field (retv, 3);
#  548|     ret->vg_attr = strdup (String_val (v));

Error: CPPCHECK_WARNING (CWE-401): [#def130]
libguestfs-1.58.0/daemon/caml-stubs.c:549: error[memleak]: Memory leak: ret
#  547|     v = Field (retv, 3);
#  548|     ret->vg_attr = strdup (String_val (v));
#  549|->   if (ret->vg_attr == NULL) return NULL;
#  550|     v = Field (retv, 4);
#  551|     ret->vg_size = Int64_val (v);

Error: CPPCHECK_WARNING (CWE-401): [#def131]
libguestfs-1.58.0/daemon/caml-stubs.c:556: error[memleak]: Memory leak: ret
#  554|     v = Field (retv, 6);
#  555|     ret->vg_sysid = strdup (String_val (v));
#  556|->   if (ret->vg_sysid == NULL) return NULL;
#  557|     v = Field (retv, 7);
#  558|     ret->vg_extent_size = Int64_val (v);

Error: CPPCHECK_WARNING (CWE-401): [#def132]
libguestfs-1.58.0/daemon/caml-stubs.c:577: error[memleak]: Memory leak: ret
#  575|     v = Field (retv, 16);
#  576|     ret->vg_tags = strdup (String_val (v));
#  577|->   if (ret->vg_tags == NULL) return NULL;
#  578|     v = Field (retv, 17);
#  579|     ret->vg_mda_count = Int64_val (v);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
libguestfs-1.58.0/daemon/caml-stubs.c:592:53: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:607:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:611:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:611:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:613:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:613:7: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:614:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:618:5: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:622:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:632:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:592:53: throw: if ‘cleanup_free_int_lvm_vg_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:592:53: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/4)
#  590|   return_lvm_vg_list (value retv)
#  591|   {
#  592|->   CLEANUP_FREE_LVM_VG_LIST guestfs_int_lvm_vg_list *ret = NULL;
#  593|     guestfs_int_lvm_vg_list *real_ret;
#  594|     guestfs_int_lvm_vg *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
libguestfs-1.58.0/daemon/caml-stubs.c:592:53: warning[-Wanalyzer-malloc-leak]: leak of ‘real_ret’
libguestfs-1.58.0/daemon/caml-stubs.c:606:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:607:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:611:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:611:6: branch_false: following ‘false’ branch (when ‘len == 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:622:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:622:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:632:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:592:53: throw: if ‘cleanup_free_int_lvm_vg_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:592:53: danger: ‘real_ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
#  590|   return_lvm_vg_list (value retv)
#  591|   {
#  592|->   CLEANUP_FREE_LVM_VG_LIST guestfs_int_lvm_vg_list *ret = NULL;
#  593|     guestfs_int_lvm_vg_list *real_ret;
#  594|     guestfs_int_lvm_vg *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
libguestfs-1.58.0/daemon/caml-stubs.c:592:53: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:606:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:607:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:611:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:611:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:613:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:614:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:615:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:592:53: throw: if ‘cleanup_free_int_lvm_vg_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:592:53: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
#  590|   return_lvm_vg_list (value retv)
#  591|   {
#  592|->   CLEANUP_FREE_LVM_VG_LIST guestfs_int_lvm_vg_list *ret = NULL;
#  593|     guestfs_int_lvm_vg_list *real_ret;
#  594|     guestfs_int_lvm_vg *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
libguestfs-1.58.0/daemon/caml-stubs.c:641:59: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:645:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:646:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:651:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:657:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:660:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:641:59: throw: if ‘cleanup_free_int_btrfssubvolume’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:641:59: danger: ‘<unknown>’ leaks here; was allocated at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
#  639|   return_btrfssubvolume (value retv)
#  640|   {
#  641|->   CLEANUP_FREE_BTRFSSUBVOLUME guestfs_int_btrfssubvolume *ret = NULL;
#  642|     guestfs_int_btrfssubvolume *real_ret;
#  643|     value v;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
libguestfs-1.58.0/daemon/caml-stubs.c:641:59: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:645:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:646:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:651:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:657:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:641:59: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:641:59: throw: if ‘cleanup_free_int_btrfssubvolume’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:641:59: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/0)
#  639|   return_btrfssubvolume (value retv)
#  640|   {
#  641|->   CLEANUP_FREE_BTRFSSUBVOLUME guestfs_int_btrfssubvolume *ret = NULL;
#  642|     guestfs_int_btrfssubvolume *real_ret;
#  643|     value v;

Error: CPPCHECK_WARNING (CWE-401): [#def138]
libguestfs-1.58.0/daemon/caml-stubs.c:657: error[memleak]: Memory leak: ret
#  655|     v = Field (retv, 2);
#  656|     ret->btrfssubvolume_path = strdup (String_val (v));
#  657|->   if (ret->btrfssubvolume_path == NULL) return NULL;
#  658|   
#  659|     real_ret = ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
libguestfs-1.58.0/daemon/caml-stubs.c:668:69: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/caml-stubs.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:687:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:687:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:689:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:689:7: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:690:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:694:5: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:698:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:708:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:668:69: throw: if ‘cleanup_free_int_btrfssubvolume_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:668:69: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/4)
#  666|   return_btrfssubvolume_list (value retv)
#  667|   {
#  668|->   CLEANUP_FREE_BTRFSSUBVOLUME_LIST guestfs_int_btrfssubvolume_list *ret = NULL;
#  669|     guestfs_int_btrfssubvolume_list *real_ret;
#  670|     guestfs_int_btrfssubvolume *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
libguestfs-1.58.0/daemon/caml-stubs.c:668:69: warning[-Wanalyzer-malloc-leak]: leak of ‘real_ret’
libguestfs-1.58.0/daemon/caml-stubs.c:682:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:687:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:687:6: branch_false: following ‘false’ branch (when ‘len == 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:698:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:698:15: branch_false: following ‘false’ branch (when ‘i >= len’)...
libguestfs-1.58.0/daemon/caml-stubs.c:708:3: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:668:69: throw: if ‘cleanup_free_int_btrfssubvolume_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:668:69: danger: ‘real_ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/0)
#  666|   return_btrfssubvolume_list (value retv)
#  667|   {
#  668|->   CLEANUP_FREE_BTRFSSUBVOLUME_LIST guestfs_int_btrfssubvolume_list *ret = NULL;
#  669|     guestfs_int_btrfssubvolume_list *real_ret;
#  670|     guestfs_int_btrfssubvolume *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
libguestfs-1.58.0/daemon/caml-stubs.c:668:69: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/caml-stubs.c:682:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:687:6: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:687:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libguestfs-1.58.0/daemon/caml-stubs.c:689:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:690:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:691:7: branch_true: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:668:69: throw: if ‘cleanup_free_int_btrfssubvolume_list’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:668:69: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/0)
#  666|   return_btrfssubvolume_list (value retv)
#  667|   {
#  668|->   CLEANUP_FREE_BTRFSSUBVOLUME_LIST guestfs_int_btrfssubvolume_list *ret = NULL;
#  669|     guestfs_int_btrfssubvolume_list *real_ret;
#  670|     guestfs_int_btrfssubvolume *r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
libguestfs-1.58.0/daemon/caml-stubs.c:727:7: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 88)’
libguestfs-1.58.0/daemon/caml-stubs.c:721:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/caml-stubs.c:722:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/caml-stubs.c:727:7: branch_false: ...to here
libguestfs-1.58.0/daemon/caml-stubs.c:717:45: throw: if ‘cleanup_free_int_statvfs’ throws an exception...
libguestfs-1.58.0/daemon/caml-stubs.c:727:7: danger: ‘calloc(1, 88)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/0)
#  725|     }
#  726|   
#  727|->   v = Field (retv, 0);
#  728|     ret->bsize = Int64_val (v);
#  729|     v = Field (retv, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
libguestfs-1.58.0/daemon/cap.c:87:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/cap.c:50:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cap.c:67:7: branch_false: ...to here
libguestfs-1.58.0/daemon/cap.c:68:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cap.c:74:3: branch_false: ...to here
libguestfs-1.58.0/daemon/cap.c:81:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/cap.c:82:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/cap.c:87:3: branch_false: ...to here
libguestfs-1.58.0/daemon/cap.c:87:3: throw: if ‘cap_free’ throws an exception...
libguestfs-1.58.0/daemon/cap.c:87:3: danger: ‘ret’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   85|       return NULL;
#   86|     }
#   87|->   cap_free (r);
#   88|   
#   89|     return ret;                   /* caller frees */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def144]
libguestfs-1.58.0/daemon/checksum.c:95:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libguestfs-1.58.0/daemon/checksum.c:93:1: enter_function: entry to ‘do_checksum’
libguestfs-1.58.0/daemon/checksum.c:98:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/checksum.c:101:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:106:10: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:106:10: call_function: calling ‘checksum’ from ‘do_checksum’
libguestfs-1.58.0/daemon/checksum.c:106:10: return_function: returning to ‘do_checksum’ from ‘checksum’
libguestfs-1.58.0/daemon/checksum.c:95:21: throw: if ‘guestfs_int_cleanup_close’ throws an exception...
libguestfs-1.58.0/daemon/checksum.c:95:21: danger: ‘fd’ leaks here; was opened at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#   93|   do_checksum (const char *csumtype, const char *path)
#   94|   {
#   95|->   CLEANUP_CLOSE int fd = -1;
#   96|   
#   97|     CHROOT_IN;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def145]
libguestfs-1.58.0/daemon/checksum.c:112:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libguestfs-1.58.0/daemon/checksum.c:110:1: enter_function: entry to ‘do_checksum_device’
libguestfs-1.58.0/daemon/checksum.c:114:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/checksum.c:115:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:120:10: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:120:10: call_function: calling ‘checksum’ from ‘do_checksum_device’
libguestfs-1.58.0/daemon/checksum.c:112:21: throw: if ‘guestfs_int_cleanup_close’ throws an exception...
libguestfs-1.58.0/daemon/checksum.c:112:21: danger: ‘fd’ leaks here; was opened at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
#  110|   do_checksum_device (const char *csumtype, const char *device)
#  111|   {
#  112|->   CLEANUP_CLOSE int fd = -1;
#  113|   
#  114|     fd = open (device, O_RDONLY|O_CLOEXEC);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
libguestfs-1.58.0/daemon/checksum.c:130:22: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
libguestfs-1.58.0/daemon/checksum.c:125:1: enter_function: entry to ‘do_checksums_out’
libguestfs-1.58.0/daemon/checksum.c:136:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/checksum.c:137:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:142:13: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:142:13: call_function: calling ‘program_of_csum’ from ‘do_checksums_out’
libguestfs-1.58.0/daemon/checksum.c:142:13: return_function: returning to ‘do_checksums_out’ from ‘program_of_csum’
libguestfs-1.58.0/daemon/checksum.c:143:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/checksum.c:132:22: branch_true: ...to here
libguestfs-1.58.0/daemon/checksum.c:130:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/checksum.c:130:22: danger: ‘str’ leaks here; was allocated at [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1)
#  128|     int r;
#  129|     const char *program;
#  130|->   CLEANUP_FREE char *str = NULL;
#  131|     CLEANUP_FREE char *sysrootdir = NULL;
#  132|     CLEANUP_FREE char *cmd = NULL;

Error: CPPCHECK_WARNING (CWE-401): [#def147]
libguestfs-1.58.0/daemon/checksum.c:144: error[memleak]: Memory leak: str
#  142|     program = program_of_csum (csumtype);
#  143|     if (program == NULL)
#  144|->     return -1;
#  145|   
#  146|     sysrootdir = sysroot_path (dir);

Error: CPPCHECK_WARNING (CWE-401): [#def148]
libguestfs-1.58.0/daemon/checksum.c:149: error[memleak]: Memory leak: str
#  147|     if (!sysrootdir) {
#  148|       reply_with_perror ("malloc");
#  149|->     return -1;
#  150|     }
#  151|   

Error: CPPCHECK_WARNING (CWE-401): [#def149]
libguestfs-1.58.0/daemon/checksum.c:155: error[memleak]: Memory leak: str
#  153|     if (r == -1) {
#  154|       reply_with_perror ("%s", dir);
#  155|->     return -1;
#  156|     }
#  157|     if (!S_ISDIR (statbuf.st_mode)) {

Error: CPPCHECK_WARNING (CWE-401): [#def150]
libguestfs-1.58.0/daemon/checksum.c:159: error[memleak]: Memory leak: str
#  157|     if (!S_ISDIR (statbuf.st_mode)) {
#  158|       reply_with_error ("%s: not a directory", dir);
#  159|->     return -1;
#  160|     }
#  161|   

Error: CPPCHECK_WARNING (CWE-401): [#def151]
libguestfs-1.58.0/daemon/checksum.c:166: error[memleak]: Memory leak: str
#  164|     cmd_error:
#  165|       reply_with_perror ("open_memstream");
#  166|->     return -1;
#  167|     }
#  168|     fprintf (fp, "cd ");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
libguestfs-1.58.0/daemon/checksum.c:188:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/checksum.c:125:1: enter_function: entry to ‘do_checksums_out’
libguestfs-1.58.0/daemon/checksum.c:137:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:142:13: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:142:13: call_function: calling ‘program_of_csum’ from ‘do_checksums_out’
libguestfs-1.58.0/daemon/checksum.c:142:13: return_function: returning to ‘do_checksums_out’ from ‘program_of_csum’
libguestfs-1.58.0/daemon/checksum.c:143:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:146:16: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:147:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:152:7: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:153:6: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/checksum.c:157:8: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:157:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:162:8: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:163:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/checksum.c:168:3: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:172:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:175:7: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:178:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/checksum.c:179:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:188:3: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:188:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/checksum.c:188:3: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(21)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/20)
#  186|      * message back.  Instead we can only cancel the transfer.
#  187|      */
#  188|->   reply (NULL, NULL);
#  189|   
#  190|     while ((r = fread (str, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
libguestfs-1.58.0/daemon/checksum.c:190:15: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/checksum.c:125:1: enter_function: entry to ‘do_checksums_out’
libguestfs-1.58.0/daemon/checksum.c:137:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:142:13: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:142:13: call_function: calling ‘program_of_csum’ from ‘do_checksums_out’
libguestfs-1.58.0/daemon/checksum.c:142:13: return_function: returning to ‘do_checksums_out’ from ‘program_of_csum’
libguestfs-1.58.0/daemon/checksum.c:143:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:146:16: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:147:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:152:7: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:153:6: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/checksum.c:157:8: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:157:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:162:8: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:163:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/checksum.c:168:3: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:172:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:175:7: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:178:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/checksum.c:179:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/checksum.c:188:3: branch_false: ...to here
libguestfs-1.58.0/daemon/checksum.c:190:10: branch_true: following ‘true’ branch (when ‘r > 0’)...
libguestfs-1.58.0/daemon/checksum.c:191:9: branch_true: ...to here
libguestfs-1.58.0/daemon/checksum.c:191:9: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/checksum.c:190:15: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(21)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/20)
#  188|     reply (NULL, NULL);
#  189|   
#  190|->   while ((r = fread (str, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#  191|       if (send_file_write (str, r) < 0) {
#  192|         pclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def154]
libguestfs-1.58.0/daemon/command.c:287:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:287:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:287:5: danger: ‘se_fd[0]’ leaks here
#  285|       signal (SIGALRM, SIG_DFL);
#  286|       signal (SIGPIPE, SIG_DFL);
#  287|->     close (0);
#  288|       if (flag_copy_stdin) {
#  289|         if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def155]
libguestfs-1.58.0/daemon/command.c:287:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:287:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:287:5: danger: ‘se_fd[1]’ leaks here
#  285|       signal (SIGALRM, SIG_DFL);
#  286|       signal (SIGPIPE, SIG_DFL);
#  287|->     close (0);
#  288|       if (flag_copy_stdin) {
#  289|         if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
libguestfs-1.58.0/daemon/command.c:287:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:287:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:287:5: danger: ‘so_fd[0]’ leaks here
#  285|       signal (SIGALRM, SIG_DFL);
#  286|       signal (SIGPIPE, SIG_DFL);
#  287|->     close (0);
#  288|       if (flag_copy_stdin) {
#  289|         if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def157]
libguestfs-1.58.0/daemon/command.c:287:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:287:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:287:5: danger: ‘so_fd[1]’ leaks here
#  285|       signal (SIGALRM, SIG_DFL);
#  286|       signal (SIGPIPE, SIG_DFL);
#  287|->     close (0);
#  288|       if (flag_copy_stdin) {
#  289|         if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {

Error: GCC_ANALYZER_WARNING: [#def158]
libguestfs-1.58.0/daemon/command.c:289:11: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘0’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:287:5: release_resource: closed here
libguestfs-1.58.0/daemon/command.c:288:8: branch_true: following ‘true’ branch (when ‘flag_copy_stdin != 0’)...
libguestfs-1.58.0/daemon/command.c:289:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:11: danger: ‘0’ could be invalid
#  287|       close (0);
#  288|       if (flag_copy_stdin) {
#  289|->       if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {
#  290|           perror ("dup2/flag_copy_fd");
#  291|           _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def159]
libguestfs-1.58.0/daemon/command.c:290:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_true: following ‘true’ branch (when ‘flag_copy_stdin != 0’)...
libguestfs-1.58.0/daemon/command.c:289:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:290:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:290:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:290:9: danger: ‘se_fd[0]’ leaks here
#  288|       if (flag_copy_stdin) {
#  289|         if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {
#  290|->         perror ("dup2/flag_copy_fd");
#  291|           _exit (EXIT_FAILURE);
#  292|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def160]
libguestfs-1.58.0/daemon/command.c:290:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_true: following ‘true’ branch (when ‘flag_copy_stdin != 0’)...
libguestfs-1.58.0/daemon/command.c:289:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:290:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:290:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:290:9: danger: ‘se_fd[1]’ leaks here
#  288|       if (flag_copy_stdin) {
#  289|         if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {
#  290|->         perror ("dup2/flag_copy_fd");
#  291|           _exit (EXIT_FAILURE);
#  292|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def161]
libguestfs-1.58.0/daemon/command.c:290:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_true: following ‘true’ branch (when ‘flag_copy_stdin != 0’)...
libguestfs-1.58.0/daemon/command.c:289:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:290:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:290:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:290:9: danger: ‘so_fd[0]’ leaks here
#  288|       if (flag_copy_stdin) {
#  289|         if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {
#  290|->         perror ("dup2/flag_copy_fd");
#  291|           _exit (EXIT_FAILURE);
#  292|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def162]
libguestfs-1.58.0/daemon/command.c:290:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_true: following ‘true’ branch (when ‘flag_copy_stdin != 0’)...
libguestfs-1.58.0/daemon/command.c:289:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:290:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:290:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:290:9: danger: ‘so_fd[1]’ leaks here
#  288|       if (flag_copy_stdin) {
#  289|         if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {
#  290|->         perror ("dup2/flag_copy_fd");
#  291|           _exit (EXIT_FAILURE);
#  292|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def163]
libguestfs-1.58.0/daemon/command.c:295:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_false: following ‘false’ branch (when ‘flag_copy_stdin == 0’)...
libguestfs-1.58.0/daemon/command.c:295:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:295:11: acquire_resource: opened here
libguestfs-1.58.0/daemon/command.c:295:10: danger: ‘open("/dev/null", 0)’ leaks here; was opened at [(17)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/16)
#  293|       } else {
#  294|         /* Set stdin to /dev/null. */
#  295|->       if (open ("/dev/null", O_RDONLY) == -1) {
#  296|           perror ("open: /dev/null");
#  297|           _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def164]
libguestfs-1.58.0/daemon/command.c:295:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_false: following ‘false’ branch (when ‘flag_copy_stdin == 0’)...
libguestfs-1.58.0/daemon/command.c:295:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:295:11: throw: if ‘open’ throws an exception...
libguestfs-1.58.0/daemon/command.c:295:11: danger: ‘se_fd[0]’ leaks here
#  293|       } else {
#  294|         /* Set stdin to /dev/null. */
#  295|->       if (open ("/dev/null", O_RDONLY) == -1) {
#  296|           perror ("open: /dev/null");
#  297|           _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def165]
libguestfs-1.58.0/daemon/command.c:295:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_false: following ‘false’ branch (when ‘flag_copy_stdin == 0’)...
libguestfs-1.58.0/daemon/command.c:295:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:295:11: throw: if ‘open’ throws an exception...
libguestfs-1.58.0/daemon/command.c:295:11: danger: ‘se_fd[1]’ leaks here
#  293|       } else {
#  294|         /* Set stdin to /dev/null. */
#  295|->       if (open ("/dev/null", O_RDONLY) == -1) {
#  296|           perror ("open: /dev/null");
#  297|           _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
libguestfs-1.58.0/daemon/command.c:295:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_false: following ‘false’ branch (when ‘flag_copy_stdin == 0’)...
libguestfs-1.58.0/daemon/command.c:295:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:295:11: throw: if ‘open’ throws an exception...
libguestfs-1.58.0/daemon/command.c:295:11: danger: ‘so_fd[0]’ leaks here
#  293|       } else {
#  294|         /* Set stdin to /dev/null. */
#  295|->       if (open ("/dev/null", O_RDONLY) == -1) {
#  296|           perror ("open: /dev/null");
#  297|           _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def167]
libguestfs-1.58.0/daemon/command.c:295:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_false: following ‘false’ branch (when ‘flag_copy_stdin == 0’)...
libguestfs-1.58.0/daemon/command.c:295:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:295:11: throw: if ‘open’ throws an exception...
libguestfs-1.58.0/daemon/command.c:295:11: danger: ‘so_fd[1]’ leaks here
#  293|       } else {
#  294|         /* Set stdin to /dev/null. */
#  295|->       if (open ("/dev/null", O_RDONLY) == -1) {
#  296|           perror ("open: /dev/null");
#  297|           _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def168]
libguestfs-1.58.0/daemon/command.c:296:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_false: following ‘false’ branch (when ‘flag_copy_stdin == 0’)...
libguestfs-1.58.0/daemon/command.c:295:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:295:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:296:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:296:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:296:9: danger: ‘se_fd[0]’ leaks here
#  294|         /* Set stdin to /dev/null. */
#  295|         if (open ("/dev/null", O_RDONLY) == -1) {
#  296|->         perror ("open: /dev/null");
#  297|           _exit (EXIT_FAILURE);
#  298|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def169]
libguestfs-1.58.0/daemon/command.c:296:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_false: following ‘false’ branch (when ‘flag_copy_stdin == 0’)...
libguestfs-1.58.0/daemon/command.c:295:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:295:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:296:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:296:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:296:9: danger: ‘se_fd[1]’ leaks here
#  294|         /* Set stdin to /dev/null. */
#  295|         if (open ("/dev/null", O_RDONLY) == -1) {
#  296|->         perror ("open: /dev/null");
#  297|           _exit (EXIT_FAILURE);
#  298|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def170]
libguestfs-1.58.0/daemon/command.c:296:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_false: following ‘false’ branch (when ‘flag_copy_stdin == 0’)...
libguestfs-1.58.0/daemon/command.c:295:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:295:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:296:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:296:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:296:9: danger: ‘so_fd[0]’ leaks here
#  294|         /* Set stdin to /dev/null. */
#  295|         if (open ("/dev/null", O_RDONLY) == -1) {
#  296|->         perror ("open: /dev/null");
#  297|           _exit (EXIT_FAILURE);
#  298|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def171]
libguestfs-1.58.0/daemon/command.c:296:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:288:8: branch_false: following ‘false’ branch (when ‘flag_copy_stdin == 0’)...
libguestfs-1.58.0/daemon/command.c:295:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:295:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:296:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:296:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:296:9: danger: ‘so_fd[1]’ leaks here
#  294|         /* Set stdin to /dev/null. */
#  295|         if (open ("/dev/null", O_RDONLY) == -1) {
#  296|->         perror ("open: /dev/null");
#  297|           _exit (EXIT_FAILURE);
#  298|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
libguestfs-1.58.0/daemon/command.c:300:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:300:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:300:5: danger: ‘se_fd[0]’ leaks here
#  298|         }
#  299|       }
#  300|->     close (so_fd[PIPE_READ]);
#  301|       close (se_fd[PIPE_READ]);
#  302|       if (!flag_out_on_err) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def173]
libguestfs-1.58.0/daemon/command.c:300:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:300:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:300:5: danger: ‘se_fd[1]’ leaks here
#  298|         }
#  299|       }
#  300|->     close (so_fd[PIPE_READ]);
#  301|       close (se_fd[PIPE_READ]);
#  302|       if (!flag_out_on_err) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
libguestfs-1.58.0/daemon/command.c:300:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:300:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:300:5: danger: ‘so_fd[0]’ leaks here
#  298|         }
#  299|       }
#  300|->     close (so_fd[PIPE_READ]);
#  301|       close (se_fd[PIPE_READ]);
#  302|       if (!flag_out_on_err) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def175]
libguestfs-1.58.0/daemon/command.c:300:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:300:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:300:5: danger: ‘so_fd[1]’ leaks here
#  298|         }
#  299|       }
#  300|->     close (so_fd[PIPE_READ]);
#  301|       close (se_fd[PIPE_READ]);
#  302|       if (!flag_out_on_err) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def176]
libguestfs-1.58.0/daemon/command.c:301:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:301:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:301:5: danger: ‘se_fd[0]’ leaks here
#  299|       }
#  300|       close (so_fd[PIPE_READ]);
#  301|->     close (se_fd[PIPE_READ]);
#  302|       if (!flag_out_on_err) {
#  303|         if (dup2 (so_fd[PIPE_WRITE], STDOUT_FILENO) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def177]
libguestfs-1.58.0/daemon/command.c:301:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:301:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:301:5: danger: ‘se_fd[1]’ leaks here
#  299|       }
#  300|       close (so_fd[PIPE_READ]);
#  301|->     close (se_fd[PIPE_READ]);
#  302|       if (!flag_out_on_err) {
#  303|         if (dup2 (so_fd[PIPE_WRITE], STDOUT_FILENO) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
libguestfs-1.58.0/daemon/command.c:301:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:301:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:301:5: danger: ‘so_fd[1]’ leaks here
#  299|       }
#  300|       close (so_fd[PIPE_READ]);
#  301|->     close (se_fd[PIPE_READ]);
#  302|       if (!flag_out_on_err) {
#  303|         if (dup2 (so_fd[PIPE_WRITE], STDOUT_FILENO) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def179]
libguestfs-1.58.0/daemon/command.c:303:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(so_fd[1], 1)’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:302:8: branch_true: following ‘true’ branch (when ‘flag_out_on_err == 0’)...
libguestfs-1.58.0/daemon/command.c:303:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:303:11: acquire_resource: opened here
libguestfs-1.58.0/daemon/command.c:303:10: danger: ‘dup2(so_fd[1], 1)’ leaks here; was opened at [(19)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/18)
#  301|       close (se_fd[PIPE_READ]);
#  302|       if (!flag_out_on_err) {
#  303|->       if (dup2 (so_fd[PIPE_WRITE], STDOUT_FILENO) == -1) {
#  304|           perror ("dup2/so_fd[PIPE_WRITE]");
#  305|           _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def180]
libguestfs-1.58.0/daemon/command.c:304:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:302:8: branch_true: following ‘true’ branch (when ‘flag_out_on_err == 0’)...
libguestfs-1.58.0/daemon/command.c:303:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:303:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:304:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:304:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:304:9: danger: ‘se_fd[1]’ leaks here
#  302|       if (!flag_out_on_err) {
#  303|         if (dup2 (so_fd[PIPE_WRITE], STDOUT_FILENO) == -1) {
#  304|->         perror ("dup2/so_fd[PIPE_WRITE]");
#  305|           _exit (EXIT_FAILURE);
#  306|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def181]
libguestfs-1.58.0/daemon/command.c:304:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:302:8: branch_true: following ‘true’ branch (when ‘flag_out_on_err == 0’)...
libguestfs-1.58.0/daemon/command.c:303:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:303:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:304:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:304:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:304:9: danger: ‘so_fd[1]’ leaks here
#  302|       if (!flag_out_on_err) {
#  303|         if (dup2 (so_fd[PIPE_WRITE], STDOUT_FILENO) == -1) {
#  304|->         perror ("dup2/so_fd[PIPE_WRITE]");
#  305|           _exit (EXIT_FAILURE);
#  306|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def182]
libguestfs-1.58.0/daemon/command.c:308:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(se_fd[1], 1)’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:302:8: branch_false: following ‘false’ branch (when ‘flag_out_on_err != 0’)...
libguestfs-1.58.0/daemon/command.c:308:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:308:11: acquire_resource: opened here
libguestfs-1.58.0/daemon/command.c:308:10: danger: ‘dup2(se_fd[1], 1)’ leaks here; was opened at [(19)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/18)
#  306|         }
#  307|       } else {
#  308|->       if (dup2 (se_fd[PIPE_WRITE], STDOUT_FILENO) == -1) {
#  309|           perror ("dup2/se_fd[PIPE_WRITE]");
#  310|           _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def183]
libguestfs-1.58.0/daemon/command.c:309:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:302:8: branch_false: following ‘false’ branch (when ‘flag_out_on_err != 0’)...
libguestfs-1.58.0/daemon/command.c:308:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:308:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:309:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:309:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:309:9: danger: ‘se_fd[1]’ leaks here
#  307|       } else {
#  308|         if (dup2 (se_fd[PIPE_WRITE], STDOUT_FILENO) == -1) {
#  309|->         perror ("dup2/se_fd[PIPE_WRITE]");
#  310|           _exit (EXIT_FAILURE);
#  311|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def184]
libguestfs-1.58.0/daemon/command.c:309:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:302:8: branch_false: following ‘false’ branch (when ‘flag_out_on_err != 0’)...
libguestfs-1.58.0/daemon/command.c:308:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:308:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:309:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:309:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:309:9: danger: ‘so_fd[1]’ leaks here
#  307|       } else {
#  308|         if (dup2 (se_fd[PIPE_WRITE], STDOUT_FILENO) == -1) {
#  309|->         perror ("dup2/se_fd[PIPE_WRITE]");
#  310|           _exit (EXIT_FAILURE);
#  311|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def185]
libguestfs-1.58.0/daemon/command.c:313:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(se_fd[1], 2)’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:308:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:313:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:313:9: acquire_resource: opened here
libguestfs-1.58.0/daemon/command.c:313:8: danger: ‘dup2(se_fd[1], 2)’ leaks here; was opened at [(19)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/18)
#  311|         }
#  312|       }
#  313|->     if (dup2 (se_fd[PIPE_WRITE], STDERR_FILENO) == -1) {
#  314|         perror ("dup2/se_fd[PIPE_WRITE]");
#  315|         _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def186]
libguestfs-1.58.0/daemon/command.c:314:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:308:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:313:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:313:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:314:7: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:314:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:314:7: danger: ‘se_fd[1]’ leaks here
#  312|       }
#  313|       if (dup2 (se_fd[PIPE_WRITE], STDERR_FILENO) == -1) {
#  314|->       perror ("dup2/se_fd[PIPE_WRITE]");
#  315|         _exit (EXIT_FAILURE);
#  316|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def187]
libguestfs-1.58.0/daemon/command.c:314:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:308:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:313:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:313:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:314:7: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:314:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:314:7: danger: ‘so_fd[1]’ leaks here
#  312|       }
#  313|       if (dup2 (se_fd[PIPE_WRITE], STDERR_FILENO) == -1) {
#  314|->       perror ("dup2/se_fd[PIPE_WRITE]");
#  315|         _exit (EXIT_FAILURE);
#  316|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def188]
libguestfs-1.58.0/daemon/command.c:317:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:308:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:313:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:313:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:317:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:317:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:317:5: danger: ‘se_fd[1]’ leaks here
#  315|         _exit (EXIT_FAILURE);
#  316|       }
#  317|->     close (so_fd[PIPE_WRITE]);
#  318|       close (se_fd[PIPE_WRITE]);
#  319|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def189]
libguestfs-1.58.0/daemon/command.c:317:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:308:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:313:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:313:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:317:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:317:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:317:5: danger: ‘so_fd[1]’ leaks here
#  315|         _exit (EXIT_FAILURE);
#  316|       }
#  317|->     close (so_fd[PIPE_WRITE]);
#  318|       close (se_fd[PIPE_WRITE]);
#  319|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def190]
libguestfs-1.58.0/daemon/command.c:318:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/daemon/command.c:285:5: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:289:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:300:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:308:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:313:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:313:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:317:5: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:318:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:318:5: danger: ‘se_fd[1]’ leaks here
#  316|       }
#  317|       close (so_fd[PIPE_WRITE]);
#  318|->     close (se_fd[PIPE_WRITE]);
#  319|   
#  320|       if (flags & COMMAND_FLAG_DO_CHROOT && sysroot_len > 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
libguestfs-1.58.0/daemon/command.c:338:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:338:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:338:3: danger: ‘se_fd[0]’ leaks here
#  336|   
#  337|     /* Parent process. */
#  338|->   close (so_fd[PIPE_WRITE]);
#  339|     close (se_fd[PIPE_WRITE]);
#  340|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def192]
libguestfs-1.58.0/daemon/command.c:338:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:338:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:338:3: danger: ‘se_fd[1]’ leaks here
#  336|   
#  337|     /* Parent process. */
#  338|->   close (so_fd[PIPE_WRITE]);
#  339|     close (se_fd[PIPE_WRITE]);
#  340|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def193]
libguestfs-1.58.0/daemon/command.c:338:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:338:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:338:3: danger: ‘so_fd[0]’ leaks here
#  336|   
#  337|     /* Parent process. */
#  338|->   close (so_fd[PIPE_WRITE]);
#  339|     close (se_fd[PIPE_WRITE]);
#  340|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def194]
libguestfs-1.58.0/daemon/command.c:338:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:338:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:338:3: danger: ‘so_fd[1]’ leaks here
#  336|   
#  337|     /* Parent process. */
#  338|->   close (so_fd[PIPE_WRITE]);
#  339|     close (se_fd[PIPE_WRITE]);
#  340|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def195]
libguestfs-1.58.0/daemon/command.c:339:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:339:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:339:3: danger: ‘se_fd[0]’ leaks here
#  337|     /* Parent process. */
#  338|     close (so_fd[PIPE_WRITE]);
#  339|->   close (se_fd[PIPE_WRITE]);
#  340|   
#  341|     FD_ZERO (&rset);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def196]
libguestfs-1.58.0/daemon/command.c:339:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[1]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:339:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:339:3: danger: ‘se_fd[1]’ leaks here
#  337|     /* Parent process. */
#  338|     close (so_fd[PIPE_WRITE]);
#  339|->   close (se_fd[PIPE_WRITE]);
#  340|   
#  341|     FD_ZERO (&rset);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def197]
libguestfs-1.58.0/daemon/command.c:339:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:339:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:339:3: danger: ‘so_fd[0]’ leaks here
#  337|     /* Parent process. */
#  338|     close (so_fd[PIPE_WRITE]);
#  339|->   close (se_fd[PIPE_WRITE]);
#  340|   
#  341|     FD_ZERO (&rset);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def198]
libguestfs-1.58.0/daemon/command.c:349:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[quit]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:349:9: throw: if ‘select’ throws an exception...
libguestfs-1.58.0/daemon/command.c:349:9: danger: ‘se_fd[quit]’ leaks here
#  347|     again:
#  348|       rset2 = rset;
#  349|->     r = select (MAX (so_fd[PIPE_READ], se_fd[PIPE_READ]) + 1, &rset2,
#  350|                   NULL, NULL, NULL);
#  351|       if (r == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def199]
libguestfs-1.58.0/daemon/command.c:349:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[quit]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:349:9: throw: if ‘select’ throws an exception...
libguestfs-1.58.0/daemon/command.c:349:9: danger: ‘so_fd[quit]’ leaks here
#  347|     again:
#  348|       rset2 = rset;
#  349|->     r = select (MAX (so_fd[PIPE_READ], se_fd[PIPE_READ]) + 1, &rset2,
#  350|                   NULL, NULL, NULL);
#  351|       if (r == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def200]
libguestfs-1.58.0/daemon/command.c:355:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:351:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:352:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:355:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:355:7: danger: ‘se_fd[0]’ leaks here
#  353|           goto again;
#  354|   
#  355|->       perror ("select");
#  356|       quit:
#  357|         if (stdoutput) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def201]
libguestfs-1.58.0/daemon/command.c:355:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:351:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:352:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:355:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:355:7: danger: ‘so_fd[0]’ leaks here
#  353|           goto again;
#  354|   
#  355|->       perror ("select");
#  356|       quit:
#  357|         if (stdoutput) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def202]
libguestfs-1.58.0/daemon/command.c:371:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:357:10: branch_false: following ‘false’ branch (when ‘stdoutput’ is NULL)...
libguestfs-1.58.0/daemon/command.c:361:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:361:10: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:371:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:371:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:371:7: danger: ‘se_fd[0]’ leaks here
#  369|                               "see debug output for details");
#  370|         }
#  371|->       close (so_fd[PIPE_READ]);
#  372|         close (se_fd[PIPE_READ]);
#  373|         if (flag_copy_stdin) close (flag_copy_fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def203]
libguestfs-1.58.0/daemon/command.c:371:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:357:10: branch_false: following ‘false’ branch (when ‘stdoutput’ is NULL)...
libguestfs-1.58.0/daemon/command.c:361:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:361:10: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:371:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:371:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:371:7: danger: ‘so_fd[0]’ leaks here
#  369|                               "see debug output for details");
#  370|         }
#  371|->       close (so_fd[PIPE_READ]);
#  372|         close (se_fd[PIPE_READ]);
#  373|         if (flag_copy_stdin) close (flag_copy_fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def204]
libguestfs-1.58.0/daemon/command.c:372:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:357:10: branch_false: following ‘false’ branch (when ‘stdoutput’ is NULL)...
libguestfs-1.58.0/daemon/command.c:361:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:361:10: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:371:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:372:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/command.c:372:7: danger: ‘se_fd[0]’ leaks here
#  370|         }
#  371|         close (so_fd[PIPE_READ]);
#  372|->       close (se_fd[PIPE_READ]);
#  373|         if (flag_copy_stdin) close (flag_copy_fd);
#  374|         waitpid (pid, NULL, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def205]
libguestfs-1.58.0/daemon/command.c:381:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:378:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:379:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:380:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:381:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:381:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:381:9: danger: ‘se_fd[0]’ leaks here
#  379|         r = read (so_fd[PIPE_READ], buf, sizeof buf);
#  380|         if (r == -1) {
#  381|->         perror ("read");
#  382|           goto quit;
#  383|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def206]
libguestfs-1.58.0/daemon/command.c:381:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:378:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:379:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:380:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:381:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:381:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:381:9: danger: ‘so_fd[0]’ leaks here
#  379|         r = read (so_fd[PIPE_READ], buf, sizeof buf);
#  380|         if (r == -1) {
#  381|->         perror ("read");
#  382|           goto quit;
#  383|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def207]
libguestfs-1.58.0/daemon/command.c:390:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:378:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:379:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:380:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:384:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:384:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:386:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:386:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:387:17: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:389:12: branch_true: following ‘true’ branch (when ‘p’ is NULL)...
libguestfs-1.58.0/daemon/command.c:390:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:390:11: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:390:11: danger: ‘se_fd[0]’ leaks here
#  388|           p = realloc (*stdoutput, so_size);
#  389|           if (p == NULL) {
#  390|->           perror ("realloc");
#  391|             goto quit;
#  392|           }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def208]
libguestfs-1.58.0/daemon/command.c:390:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:378:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:379:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:380:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:384:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:384:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:386:11: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:386:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:387:17: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:389:12: branch_true: following ‘true’ branch (when ‘p’ is NULL)...
libguestfs-1.58.0/daemon/command.c:390:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:390:11: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:390:11: danger: ‘so_fd[0]’ leaks here
#  388|           p = realloc (*stdoutput, so_size);
#  389|           if (p == NULL) {
#  390|->           perror ("realloc");
#  391|             goto quit;
#  392|           }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def209]
libguestfs-1.58.0/daemon/command.c:401:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:398:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:399:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:400:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:401:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:401:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:401:9: danger: ‘se_fd[0]’ leaks here
#  399|         r = read (se_fd[PIPE_READ], buf, sizeof buf);
#  400|         if (r == -1) {
#  401|->         perror ("read");
#  402|           goto quit;
#  403|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def210]
libguestfs-1.58.0/daemon/command.c:401:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:398:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:399:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:400:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:401:9: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:401:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:401:9: danger: ‘so_fd[0]’ leaks here
#  399|         r = read (se_fd[PIPE_READ], buf, sizeof buf);
#  400|         if (r == -1) {
#  401|->         perror ("read");
#  402|           goto quit;
#  403|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def211]
libguestfs-1.58.0/daemon/command.c:408:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:398:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:399:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:400:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:404:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:404:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:406:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:406:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:407:13: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:407:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:408:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:408:11: throw: if ‘write’ throws an exception...
libguestfs-1.58.0/daemon/command.c:408:11: danger: ‘se_fd[0]’ leaks here
#  406|         if (r > 0) {
#  407|           if (verbose)
#  408|->           ignore_value (write (STDERR_FILENO, buf, r));
#  409|   
#  410|           if (stderror) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def212]
libguestfs-1.58.0/daemon/command.c:408:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:232:6: branch_false: following ‘false’ branch (when ‘stderror’ is NULL)...
libguestfs-1.58.0/daemon/command.c:234:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:234:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:398:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:399:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:400:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:404:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:404:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:406:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:406:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:407:13: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:407:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:408:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:408:11: throw: if ‘write’ throws an exception...
libguestfs-1.58.0/daemon/command.c:408:11: danger: ‘so_fd[0]’ leaks here
#  406|         if (r > 0) {
#  407|           if (verbose)
#  408|->           ignore_value (write (STDERR_FILENO, buf, r));
#  409|   
#  410|           if (stderror) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def213]
libguestfs-1.58.0/daemon/command.c:414:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘se_fd[0]’
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:398:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:399:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:400:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:404:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:404:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:406:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:406:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:407:13: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:410:12: branch_true: following ‘true’ branch (when ‘stderror’ is non-NULL)...
libguestfs-1.58.0/daemon/command.c:411:19: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:413:14: branch_true: following ‘true’ branch (when ‘p’ is NULL)...
libguestfs-1.58.0/daemon/command.c:414:13: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:414:13: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:414:13: danger: ‘se_fd[0]’ leaks here
#  412|             p = realloc (*stderror, se_size);
#  413|             if (p == NULL) {
#  414|->             perror ("realloc");
#  415|               goto quit;
#  416|             }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def214]
libguestfs-1.58.0/daemon/command.c:414:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so_fd[0]’
libguestfs-1.58.0/daemon/command.c:273:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:273:29: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:273:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:278:9: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:279:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:284:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/daemon/command.c:338:3: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
libguestfs-1.58.0/daemon/command.c:341:3: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: following ‘true’ branch (when ‘quit <= 1’)...
libguestfs-1.58.0/daemon/command.c:346:10: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:398:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:399:11: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:400:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:404:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:404:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/command.c:406:10: branch_false: ...to here
libguestfs-1.58.0/daemon/command.c:406:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/command.c:407:13: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:410:12: branch_true: following ‘true’ branch (when ‘stderror’ is non-NULL)...
libguestfs-1.58.0/daemon/command.c:411:19: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:413:14: branch_true: following ‘true’ branch (when ‘p’ is NULL)...
libguestfs-1.58.0/daemon/command.c:414:13: branch_true: ...to here
libguestfs-1.58.0/daemon/command.c:414:13: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/command.c:414:13: danger: ‘so_fd[0]’ leaks here
#  412|             p = realloc (*stderror, se_size);
#  413|             if (p == NULL) {
#  414|->             perror ("realloc");
#  415|               goto quit;
#  416|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
libguestfs-1.58.0/daemon/compress.c:36:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/compress.c:40:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/compress.c:41:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/compress.c:57:8: branch_false: ...to here
libguestfs-1.58.0/daemon/compress.c:38:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/compress.c:36:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/compress.c:36:22: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   34|     int r;
#   35|     FILE *fp;
#   36|->   CLEANUP_FREE char *cmd = NULL;
#   37|     size_t cmd_size;
#   38|     CLEANUP_FREE char *buf = NULL;

Error: CPPCHECK_WARNING (CWE-401): [#def216]
libguestfs-1.58.0/daemon/compress.c:61: error[memleak]: Memory leak: buf
#   59|     cmd_error:
#   60|       reply_with_perror ("open_memstream");
#   61|->     return -1;
#   62|     }
#   63|     fprintf (fp, "%s ", filter);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
libguestfs-1.58.0/daemon/compress.c:86:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/compress.c:41:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/compress.c:57:8: branch_false: ...to here
libguestfs-1.58.0/daemon/compress.c:58:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/compress.c:63:3: branch_false: ...to here
libguestfs-1.58.0/daemon/compress.c:70:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/compress.c:73:7: branch_false: ...to here
libguestfs-1.58.0/daemon/compress.c:76:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/compress.c:77:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/compress.c:86:3: branch_false: ...to here
libguestfs-1.58.0/daemon/compress.c:86:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/compress.c:86:3: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#   84|      * message back.  Instead we can only cancel the transfer.
#   85|      */
#   86|->   reply (NULL, NULL);
#   87|   
#   88|     while ((r = fread (buf, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
libguestfs-1.58.0/daemon/compress.c:88:15: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/compress.c:41:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/compress.c:57:8: branch_false: ...to here
libguestfs-1.58.0/daemon/compress.c:58:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/compress.c:63:3: branch_false: ...to here
libguestfs-1.58.0/daemon/compress.c:70:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/compress.c:73:7: branch_false: ...to here
libguestfs-1.58.0/daemon/compress.c:76:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/compress.c:77:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/compress.c:86:3: branch_false: ...to here
libguestfs-1.58.0/daemon/compress.c:88:10: branch_true: following ‘true’ branch (when ‘r > 0’)...
libguestfs-1.58.0/daemon/compress.c:89:9: branch_true: ...to here
libguestfs-1.58.0/daemon/compress.c:89:9: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/compress.c:88:15: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#   86|     reply (NULL, NULL);
#   87|   
#   88|->   while ((r = fread (buf, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#   89|       if (send_file_write (buf, r) < 0) {
#   90|         pclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
libguestfs-1.58.0/daemon/copy.c:53:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/copy.c:253:1: enter_function: entry to ‘do_copy_file_to_device’
libguestfs-1.58.0/daemon/copy.c:259:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/copy.c:264:7: branch_false: ...to here
libguestfs-1.58.0/daemon/copy.c:270:10: call_function: calling ‘copy’ from ‘do_copy_file_to_device’
#   51|     const int64_t saved_size = size;
#   52|     int src_fd, dest_fd;
#   53|->   CLEANUP_FREE char *buf = NULL;
#   54|     size_t n;
#   55|     ssize_t r;

Error: CPPCHECK_WARNING (CWE-401): [#def220]
libguestfs-1.58.0/daemon/copy.c:67: error[memleak]: Memory leak: buf
#   65|       if (srcoffset < 0) {
#   66|         reply_with_error ("srcoffset is negative");
#   67|->       return -1;
#   68|       }
#   69|     }

Error: CPPCHECK_WARNING (CWE-401): [#def221]
libguestfs-1.58.0/daemon/copy.c:76: error[memleak]: Memory leak: buf
#   74|       if (destoffset < 0) {
#   75|         reply_with_error ("destoffset is negative");
#   76|->       return -1;
#   77|       }
#   78|     }

Error: CPPCHECK_WARNING (CWE-401): [#def222]
libguestfs-1.58.0/daemon/copy.c:85: error[memleak]: Memory leak: buf
#   83|       if (size < 0) {
#   84|         reply_with_error ("size is negative");
#   85|->       return -1;
#   86|       }
#   87|     }

Error: CPPCHECK_WARNING (CWE-401): [#def223]
libguestfs-1.58.0/daemon/copy.c:98: error[memleak]: Memory leak: buf
#   96|     if (src_fd == -1) {
#   97|       reply_with_perror ("%s", src_display);
#   98|->     return -1;
#   99|     }
#  100|   

Error: CPPCHECK_WARNING (CWE-401): [#def224]
libguestfs-1.58.0/daemon/copy.c:104: error[memleak]: Memory leak: buf
#  102|       reply_with_perror ("lseek: %s", src_display);
#  103|       close (src_fd);
#  104|->     return -1;
#  105|     }
#  106|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def225]
libguestfs-1.58.0/daemon/copy.c:107:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 524288)’
libguestfs-1.58.0/daemon/copy.c:216:1: enter_function: entry to ‘do_copy_device_to_device’
libguestfs-1.58.0/daemon/copy.c:225:10: call_function: calling ‘copy’ from ‘do_copy_device_to_device’
#  105|     }
#  106|   
#  107|->   dest_fd = open (dest, wrflags, wrmode);
#  108|     if (dest_fd == -1) {
#  109|       reply_with_perror ("%s", dest_display);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def226]
libguestfs-1.58.0/daemon/copy.c:109:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 524288)’
libguestfs-1.58.0/daemon/copy.c:216:1: enter_function: entry to ‘do_copy_device_to_device’
libguestfs-1.58.0/daemon/copy.c:225:10: call_function: calling ‘copy’ from ‘do_copy_device_to_device’
#  107|     dest_fd = open (dest, wrflags, wrmode);
#  108|     if (dest_fd == -1) {
#  109|->     reply_with_perror ("%s", dest_display);
#  110|       close (src_fd);
#  111|       return -1;

Error: CPPCHECK_WARNING (CWE-401): [#def227]
libguestfs-1.58.0/daemon/copy.c:111: error[memleak]: Memory leak: buf
#  109|       reply_with_perror ("%s", dest_display);
#  110|       close (src_fd);
#  111|->     return -1;
#  112|     }
#  113|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def228]
libguestfs-1.58.0/daemon/copy.c:115:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 524288)’
libguestfs-1.58.0/daemon/copy.c:253:1: enter_function: entry to ‘do_copy_file_to_device’
libguestfs-1.58.0/daemon/copy.c:259:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/copy.c:264:7: branch_false: ...to here
libguestfs-1.58.0/daemon/copy.c:270:10: call_function: calling ‘copy’ from ‘do_copy_file_to_device’
#  113|   
#  114|     if (destoffset > 0 && lseek (dest_fd, destoffset, SEEK_SET) == (off_t) -1) {
#  115|->     reply_with_perror ("lseek: %s", dest_display);
#  116|       close (src_fd);
#  117|       close (dest_fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def229]
libguestfs-1.58.0/daemon/copy.c:124:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 524288)’
libguestfs-1.58.0/daemon/copy.c:253:1: enter_function: entry to ‘do_copy_file_to_device’
libguestfs-1.58.0/daemon/copy.c:259:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/copy.c:264:7: branch_false: ...to here
libguestfs-1.58.0/daemon/copy.c:270:10: call_function: calling ‘copy’ from ‘do_copy_file_to_device’
#  122|   
#  123|     if (size == -1)
#  124|->     pulse_mode_start ();
#  125|   
#  126|     while (size != 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def230]
libguestfs-1.58.0/daemon/copy.c:128:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 524288)’
libguestfs-1.58.0/daemon/copy.c:253:1: enter_function: entry to ‘do_copy_file_to_device’
libguestfs-1.58.0/daemon/copy.c:259:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/copy.c:264:7: branch_false: ...to here
libguestfs-1.58.0/daemon/copy.c:270:10: call_function: calling ‘copy’ from ‘do_copy_file_to_device’
#  126|     while (size != 0) {
#  127|       /* Calculate bytes to copy. */
#  128|->     if (size == -1 || size > BUFSIZ)
#  129|         n = BUFSIZ;
#  130|       else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def231]
libguestfs-1.58.0/daemon/copy.c:197:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 524288)’
libguestfs-1.58.0/daemon/copy.c:253:1: enter_function: entry to ‘do_copy_file_to_device’
libguestfs-1.58.0/daemon/copy.c:259:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/copy.c:264:7: branch_false: ...to here
libguestfs-1.58.0/daemon/copy.c:270:10: call_function: calling ‘copy’ from ‘do_copy_file_to_device’
#  195|       pulse_mode_end ();
#  196|   
#  197|->   if (close (src_fd) == -1) {
#  198|       reply_with_perror ("close: %s", src_display);
#  199|       close (dest_fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
libguestfs-1.58.0/daemon/cpio.c:39:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
libguestfs-1.58.0/daemon/cpio.c:47:12: acquire_memory: allocated here
libguestfs-1.58.0/daemon/cpio.c:48:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:54:9: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:45:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/cpio.c:43:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/cpio.c:39:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/cpio.c:39:22: danger: ‘buffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   37|   do_cpio_out (const char *dir, const char *format)
#   38|   {
#   39|->   CLEANUP_FREE char *buf = NULL;
#   40|     struct stat statbuf;
#   41|     int r;

Error: CPPCHECK_WARNING (CWE-401): [#def233]
libguestfs-1.58.0/daemon/cpio.c:57: error[memleak]: Memory leak: buffer
#   55|     if (buf == NULL) {
#   56|       reply_with_perror ("malloc");
#   57|->     return -1;
#   58|     }
#   59|   

Error: CPPCHECK_WARNING (CWE-401): [#def234]
libguestfs-1.58.0/daemon/cpio.c:62: error[memleak]: Memory leak: buffer
#   60|     if (stat (buf, &statbuf) == -1) {
#   61|       reply_with_perror ("stat: %s", dir);
#   62|->     return -1;
#   63|     }
#   64|   

Error: CPPCHECK_WARNING (CWE-401): [#def235]
libguestfs-1.58.0/daemon/cpio.c:67: error[memleak]: Memory leak: buffer
#   65|     if (! S_ISDIR (statbuf.st_mode)) {
#   66|       reply_with_error ("%s: not a directory", dir);
#   67|->     return -1;
#   68|     }
#   69|   

Error: CPPCHECK_WARNING (CWE-401): [#def236]
libguestfs-1.58.0/daemon/cpio.c:74: error[memleak]: Memory leak: buffer
#   72|       if (STRNEQ (format, "newc") && STRNEQ (format, "crc")) {
#   73|         reply_with_error ("%s: format must be 'newc' or 'crc'", format);
#   74|->       return -1;
#   75|       }
#   76|     }

Error: CPPCHECK_WARNING (CWE-401): [#def237]
libguestfs-1.58.0/daemon/cpio.c:84: error[memleak]: Memory leak: buffer
#   82|     cmd_error:
#   83|       reply_with_perror ("open_memstream");
#   84|->     return -1;
#   85|     }
#   86|     fprintf (fp, "cd ");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
libguestfs-1.58.0/daemon/cpio.c:105:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/cpio.c:48:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:54:9: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:55:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:60:7: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:60:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:65:9: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:65:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:71:7: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:81:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/cpio.c:86:3: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:89:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:92:7: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:95:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/cpio.c:96:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:105:3: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:105:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/cpio.c:105:3: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
#  103|      * message back.  Instead we can only cancel the transfer.
#  104|      */
#  105|->   reply (NULL, NULL);
#  106|   
#  107|     while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
libguestfs-1.58.0/daemon/cpio.c:107:15: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/cpio.c:48:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:54:9: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:55:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:60:7: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:60:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:65:9: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:65:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:71:7: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:81:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/cpio.c:86:3: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:89:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:92:7: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:95:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/cpio.c:96:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/cpio.c:105:3: branch_false: ...to here
libguestfs-1.58.0/daemon/cpio.c:107:10: branch_true: following ‘true’ branch (when ‘r > 0’)...
libguestfs-1.58.0/daemon/cpio.c:108:9: branch_true: ...to here
libguestfs-1.58.0/daemon/cpio.c:108:9: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/cpio.c:107:15: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  105|     reply (NULL, NULL);
#  106|   
#  107|->   while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#  108|       if (send_file_write (buffer, r) < 0) {
#  109|         pclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
libguestfs-1.58.0/daemon/daemon-c.c:165:17: warning[-Wanalyzer-malloc-leak]: leak of ‘guestfs_int_daemon_return_string_mountable(mv)’
libguestfs-1.58.0/daemon/daemon-c.c:235:1: enter_function: entry to ‘guestfs_int_daemon_return_hashtable_mountable_string’
libguestfs-1.58.0/daemon/daemon-c.c:241:10: branch_true: following ‘true’ branch (when ‘retv != 1’)...
libguestfs-1.58.0/daemon/daemon-c.c:242:9: branch_true: ...to here
libguestfs-1.58.0/daemon/daemon-c.c:244:9: call_function: calling ‘guestfs_int_daemon_return_string_mountable’ from ‘guestfs_int_daemon_return_hashtable_mountable_string’
libguestfs-1.58.0/daemon/daemon-c.c:244:9: return_function: returning to ‘guestfs_int_daemon_return_hashtable_mountable_string’ from ‘guestfs_int_daemon_return_string_mountable’
libguestfs-1.58.0/daemon/daemon-c.c:245:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/daemon-c.c:247:9: branch_false: ...to here
libguestfs-1.58.0/daemon/daemon-c.c:165:17: danger: ‘guestfs_int_daemon_return_string_mountable(mv)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  163|   guestfs_int_daemon_return_string_mountable (value retv)
#  164|   {
#  165|->   value typev = Field (retv, 0);
#  166|     value devicev = Field (retv, 1);
#  167|     value subvolv;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
libguestfs-1.58.0/daemon/daemon-c.c:165:17: warning[-Wanalyzer-malloc-leak]: leak of ‘guestfs_int_daemon_return_string_mountable(v)’
libguestfs-1.58.0/daemon/daemon-c.c:187:1: enter_function: entry to ‘guestfs_int_daemon_return_string_mountable_list’
libguestfs-1.58.0/daemon/daemon-c.c:193:10: branch_true: following ‘true’ branch (when ‘retv != 1’)...
libguestfs-1.58.0/daemon/daemon-c.c:194:9: branch_true: ...to here
libguestfs-1.58.0/daemon/daemon-c.c:195:9: call_function: calling ‘guestfs_int_daemon_return_string_mountable’ from ‘guestfs_int_daemon_return_string_mountable_list’
libguestfs-1.58.0/daemon/daemon-c.c:195:9: return_function: returning to ‘guestfs_int_daemon_return_string_mountable_list’ from ‘guestfs_int_daemon_return_string_mountable’
libguestfs-1.58.0/daemon/daemon-c.c:196:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/daemon-c.c:198:9: branch_false: ...to here
libguestfs-1.58.0/daemon/daemon-c.c:165:17: danger: ‘guestfs_int_daemon_return_string_mountable(v)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  163|   guestfs_int_daemon_return_string_mountable (value retv)
#  164|   {
#  165|->   value typev = Field (retv, 0);
#  166|     value devicev = Field (retv, 1);
#  167|     value subvolv;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def242]
libguestfs-1.58.0/daemon/dd.c:77:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(sysroot_path(src), 524288)’
libguestfs-1.58.0/daemon/dd.c:74:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/dd.c:77:30: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:78:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/dd.c:82:14: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:82:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/dd.c:77:24: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:77:24: danger: ‘open(sysroot_path(src), 524288)’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   75|       src_fd = open (src, O_RDONLY | O_CLOEXEC);
#   76|     else {
#   77|->     CLEANUP_FREE char *buf = sysroot_path (src);
#   78|       if (!buf) {
#   79|         reply_with_perror ("malloc");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def243]
libguestfs-1.58.0/daemon/dd.c:89:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘src_fd’
libguestfs-1.58.0/daemon/dd.c:74:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/dd.c:75:14: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:75:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/dd.c:84:6: branch_false: following ‘false’ branch (when ‘src_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:89:7: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:89:7: throw: if ‘is_device_parameter’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:89:7: danger: ‘src_fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   87|     }
#   88|   
#   89|->   if (is_device_parameter (dest))
#   90|       dest_fd = open (dest, O_WRONLY | O_CLOEXEC);
#   91|     else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def244]
libguestfs-1.58.0/daemon/dd.c:90:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘src_fd’
libguestfs-1.58.0/daemon/dd.c:74:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/dd.c:75:14: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:75:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/dd.c:84:6: branch_false: following ‘false’ branch (when ‘src_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:89:7: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:89:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/dd.c:90:15: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:90:15: throw: if ‘open’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:90:15: danger: ‘src_fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   88|   
#   89|     if (is_device_parameter (dest))
#   90|->     dest_fd = open (dest, O_WRONLY | O_CLOEXEC);
#   91|     else {
#   92|       CLEANUP_FREE char *buf = sysroot_path (dest);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def245]
libguestfs-1.58.0/daemon/dd.c:92:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘src_fd’
libguestfs-1.58.0/daemon/dd.c:74:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/dd.c:75:14: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:75:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/dd.c:84:6: branch_false: following ‘false’ branch (when ‘src_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:89:7: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:89:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/dd.c:92:30: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:93:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/dd.c:98:15: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:92:24: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:92:24: danger: ‘src_fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   90|       dest_fd = open (dest, O_WRONLY | O_CLOEXEC);
#   91|     else {
#   92|->     CLEANUP_FREE char *buf = sysroot_path (dest);
#   93|       if (!buf) {
#   94|         reply_with_perror ("malloc");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def246]
libguestfs-1.58.0/daemon/dd.c:92:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘src_fd’
libguestfs-1.58.0/daemon/dd.c:74:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/dd.c:75:14: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:75:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/dd.c:84:6: branch_false: following ‘false’ branch (when ‘src_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:89:7: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:89:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/dd.c:92:30: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:92:30: throw: if ‘sysroot_path’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:92:30: danger: ‘src_fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#   90|       dest_fd = open (dest, O_WRONLY | O_CLOEXEC);
#   91|     else {
#   92|->     CLEANUP_FREE char *buf = sysroot_path (dest);
#   93|       if (!buf) {
#   94|         reply_with_perror ("malloc");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def247]
libguestfs-1.58.0/daemon/dd.c:101:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘src_fd’
libguestfs-1.58.0/daemon/dd.c:74:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/dd.c:75:14: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:75:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/dd.c:84:6: branch_false: following ‘false’ branch (when ‘src_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:89:7: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:100:6: branch_true: following ‘true’ branch (when ‘dest_fd == -1’)...
libguestfs-1.58.0/daemon/dd.c:101:5: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:101:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:101:5: danger: ‘src_fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#   99|     }
#  100|     if (dest_fd == -1) {
#  101|->     reply_with_perror ("%s", dest);
#  102|       close (src_fd);
#  103|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def248]
libguestfs-1.58.0/daemon/dd.c:102:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘src_fd’
libguestfs-1.58.0/daemon/dd.c:74:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/dd.c:75:14: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:75:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/dd.c:84:6: branch_false: following ‘false’ branch (when ‘src_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:89:7: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:100:6: branch_true: following ‘true’ branch (when ‘dest_fd == -1’)...
libguestfs-1.58.0/daemon/dd.c:101:5: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:102:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:102:5: danger: ‘src_fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  100|     if (dest_fd == -1) {
#  101|       reply_with_perror ("%s", dest);
#  102|->     close (src_fd);
#  103|       return -1;
#  104|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def249]
libguestfs-1.58.0/daemon/dd.c:107:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘src_fd’
libguestfs-1.58.0/daemon/dd.c:74:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/dd.c:75:14: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:75:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/dd.c:84:6: branch_false: following ‘false’ branch (when ‘src_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:89:7: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:89:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/dd.c:92:30: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:93:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/dd.c:98:15: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:100:6: branch_false: following ‘false’ branch (when ‘dest_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:106:26: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:109:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/dd.c:110:5: branch_true: ...to here
libguestfs-1.58.0/daemon/dd.c:110:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:107:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:107:22: danger: ‘src_fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  105|   
#  106|     uint64_t position = 0, size = (uint64_t) ssize;
#  107|->   CLEANUP_FREE char *buf = NULL;
#  108|     buf = malloc (BUFSIZ);
#  109|     if (buf == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
libguestfs-1.58.0/daemon/dd.c:107:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/dd.c:84:6: branch_false: following ‘false’ branch (when ‘src_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:89:7: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:93:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/dd.c:98:15: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:100:6: branch_false: following ‘false’ branch (when ‘dest_fd != -1’)...
libguestfs-1.58.0/daemon/dd.c:106:26: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:108:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/dd.c:109:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/dd.c:109:6: branch_false: ...to here
libguestfs-1.58.0/daemon/dd.c:107:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/dd.c:107:22: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  105|   
#  106|     uint64_t position = 0, size = (uint64_t) ssize;
#  107|->   CLEANUP_FREE char *buf = NULL;
#  108|     buf = malloc (BUFSIZ);
#  109|     if (buf == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
libguestfs-1.58.0/daemon/debug.c:131:7: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libguestfs-1.58.0/daemon/debug.c:120:7: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:121:6: branch_false: following ‘false’ branch (when ‘r’ is non-NULL)...
libguestfs-1.58.0/daemon/debug.c:126:9: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:127:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/debug.c:128:12: branch_true: ...to here
libguestfs-1.58.0/daemon/debug.c:130:8: branch_true: following ‘true’ branch (when ‘p’ is NULL)...
libguestfs-1.58.0/daemon/debug.c:131:7: branch_true: ...to here
libguestfs-1.58.0/daemon/debug.c:131:7: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:131:7: danger: ‘r’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  129|       p = realloc (r, len + 1);	     /* +1 for the final NUL */
#  130|       if (p == NULL) {
#  131|->       reply_with_perror ("realloc");
#  132|         free (r);
#  133|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
libguestfs-1.58.0/daemon/debug.c:163:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libguestfs-1.58.0/daemon/debug.c:157:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:158:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/debug.c:163:9: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:163:9: throw: if ‘opendir’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:163:9: danger: ‘fp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  161|     }
#  162|   
#  163|->   dir = opendir ("/proc/self/fd");
#  164|     if (!dir) {
#  165|       reply_with_perror ("opendir: /proc/self/fd");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
libguestfs-1.58.0/daemon/debug.c:165:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libguestfs-1.58.0/daemon/debug.c:157:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:158:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/debug.c:163:9: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:164:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/debug.c:165:5: branch_true: ...to here
libguestfs-1.58.0/daemon/debug.c:165:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:165:5: danger: ‘fp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  163|     dir = opendir ("/proc/self/fd");
#  164|     if (!dir) {
#  165|->     reply_with_perror ("opendir: /proc/self/fd");
#  166|       fclose (fp);
#  167|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
libguestfs-1.58.0/daemon/debug.c:170:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libguestfs-1.58.0/daemon/debug.c:157:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:158:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/debug.c:163:9: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:164:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:164:6: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:170:15: throw: if ‘readdir’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:170:15: danger: ‘fp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  168|     }
#  169|   
#  170|->   while ((d = readdir (dir)) != NULL) {
#  171|       CLEANUP_FREE char *fname = NULL;
#  172|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
libguestfs-1.58.0/daemon/debug.c:170:15: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc/self/fd")’
libguestfs-1.58.0/daemon/debug.c:158:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/debug.c:163:9: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:163:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:164:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:164:6: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:170:15: throw: if ‘readdir’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:170:15: danger: ‘opendir("/proc/self/fd")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  168|     }
#  169|   
#  170|->   while ((d = readdir (dir)) != NULL) {
#  171|       CLEANUP_FREE char *fname = NULL;
#  172|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
libguestfs-1.58.0/daemon/debug.c:171:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libguestfs-1.58.0/daemon/debug.c:157:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:158:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/debug.c:163:9: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:164:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:164:6: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:170:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/debug.c:171:24: branch_true: ...to here
libguestfs-1.58.0/daemon/debug.c:173:8: branch_true: following ‘true’ branch (when the strings are equal)...
libguestfs-1.58.0/daemon/debug.c:173:8: branch_true: ...to here
libguestfs-1.58.0/daemon/debug.c:171:24: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:171:24: danger: ‘fp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  169|   
#  170|     while ((d = readdir (dir)) != NULL) {
#  171|->     CLEANUP_FREE char *fname = NULL;
#  172|   
#  173|       if (STREQ (d->d_name, ".") || STREQ (d->d_name, ".."))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
libguestfs-1.58.0/daemon/debug.c:331:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/debug.c:333:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libguestfs-1.58.0/daemon/debug.c:339:7: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:339:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:342:7: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:342:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:347:17: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:347:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:348:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:353:3: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:360:3: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:331:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:331:22: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  329|   {
#  330|     unsigned len;
#  331|->   CLEANUP_FREE char *buf = NULL;
#  332|   
#  333|     if (argc != 1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
libguestfs-1.58.0/daemon/debug.c:435:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cargv’
libguestfs-1.58.0/daemon/debug.c:441:11: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:442:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:447:3: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:454:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:460:10: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:435:29: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:435:29: danger: ‘cargv’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  433|   {
#  434|     const size_t len = guestfs_int_count_strings (argv);
#  435|->   CLEANUP_FREE const char **cargv = NULL;
#  436|     size_t i;
#  437|     int r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
libguestfs-1.58.0/daemon/debug.c:468:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cargv’
libguestfs-1.58.0/daemon/debug.c:474:11: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:475:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:480:3: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:487:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:493:10: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:468:29: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:468:29: danger: ‘cargv’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  466|   {
#  467|     const size_t len = guestfs_int_count_strings (argv);
#  468|->   CLEANUP_FREE const char **cargv = NULL;
#  469|     size_t i;
#  470|     int r;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def260]
libguestfs-1.58.0/daemon/debug.c:606:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/sys/kernel/core_pattern", 524289)’
libguestfs-1.58.0/daemon/debug.c:592:6: branch_false: following ‘false’ branch (when ‘argc != 0’)...
libguestfs-1.58.0/daemon/debug.c:597:15: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:601:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/debug.c:602:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:606:7: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:606:7: throw: if ‘write’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:606:7: danger: ‘open("/proc/sys/kernel/core_pattern", 524289)’ leaks here; was opened at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  604|       return NULL;
#  605|     }
#  606|->   if (write (fd, pattern, pattern_len) < (ssize_t) pattern_len) {
#  607|       reply_with_perror ("write: " CORE_PATTERN);
#  608|       close (fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def261]
libguestfs-1.58.0/daemon/debug.c:606:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/sys/kernel/core_pattern", 524289)’
libguestfs-1.58.0/daemon/debug.c:592:6: branch_false: following ‘false’ branch (when ‘argc != 0’)...
libguestfs-1.58.0/daemon/debug.c:597:15: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:601:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/debug.c:602:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:606:7: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:606:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:611:7: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:606:7: danger: ‘open("/proc/sys/kernel/core_pattern", 524289)’ leaks here; was opened at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  604|       return NULL;
#  605|     }
#  606|->   if (write (fd, pattern, pattern_len) < (ssize_t) pattern_len) {
#  607|       reply_with_perror ("write: " CORE_PATTERN);
#  608|       close (fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
libguestfs-1.58.0/daemon/debug.c:721:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/debug.c:685:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libguestfs-1.58.0/daemon/debug.c:691:7: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:699:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:703:12: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:704:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:717:13: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:728:11: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/debug.c:728:11: branch_true: ...to here
libguestfs-1.58.0/daemon/debug.c:729:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:729:6: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:736:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:742:9: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:742:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:735:41: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:736:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:742:9: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:742:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:735:41: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:752:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:755:15: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:755:15: acquire_memory: allocated here
libguestfs-1.58.0/daemon/debug.c:756:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/debug.c:721:22: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:721:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:721:22: danger: ‘ret’ leaks here; was allocated at [(21)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/20)
#  719|       { 2, 21, 15, 2, -1 }  /* enable trace */
#  720|     };
#  721|->   CLEANUP_FREE void *buf = NULL;
#  722|     size_t i;
#  723|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def263]
libguestfs-1.58.0/daemon/debug.c:730:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*argv, 540672)’
libguestfs-1.58.0/daemon/debug.c:685:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libguestfs-1.58.0/daemon/debug.c:691:7: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:699:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:703:12: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:703:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/debug.c:704:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:717:13: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:728:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:728:3: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:729:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/debug.c:730:5: branch_true: ...to here
libguestfs-1.58.0/daemon/debug.c:730:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/debug.c:730:5: danger: ‘open(*argv, 540672)’ leaks here; was opened at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
#  728|     errno = posix_memalign (&buf, QTRACE_SIZE, QTRACE_SIZE);
#  729|     if (errno != 0) {
#  730|->     reply_with_perror ("posix_memalign");
#  731|       close (fd);
#  732|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def264]
libguestfs-1.58.0/daemon/debug.c:731:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*argv, 540672)’
libguestfs-1.58.0/daemon/debug.c:685:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libguestfs-1.58.0/daemon/debug.c:691:7: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:699:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:703:12: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:703:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/debug.c:704:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:717:13: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:728:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:728:3: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:729:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/debug.c:730:5: branch_true: ...to here
libguestfs-1.58.0/daemon/debug.c:731:5: danger: ‘open(*argv, 540672)’ leaks here; was opened at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
#  729|     if (errno != 0) {
#  730|       reply_with_perror ("posix_memalign");
#  731|->     close (fd);
#  732|       return NULL;
#  733|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def265]
libguestfs-1.58.0/daemon/debug.c:825:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device,  <unknown>)’
libguestfs-1.58.0/daemon/debug.c:778:6: branch_false: following ‘false’ branch (when ‘argc == 3’)...
libguestfs-1.58.0/daemon/debug.c:784:3: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:791:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:795:10: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:796:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:799:6: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:799:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:805:9: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:805:9: branch_true: following ‘true’ branch (when ‘err == 0’)...
libguestfs-1.58.0/daemon/debug.c:805:9: branch_true: ...to here
libguestfs-1.58.0/daemon/debug.c:814:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/debug.c:815:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/debug.c:824:3: branch_false: ...to here
libguestfs-1.58.0/daemon/debug.c:825:3: danger: ‘open(device,  <unknown>)’ leaks here; was opened at [(11)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/10)
#  823|      */
#  824|     gettimeofday (&end, NULL);
#  825|->   end.tv_sec += secs;
#  826|   
#  827|     position = copied = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
libguestfs-1.58.0/daemon/device-name-translation.c:302:22: warning[-Wanalyzer-malloc-leak]: leak of ‘device_name’
libguestfs-1.58.0/daemon/device-name-translation.c:298:1: enter_function: entry to ‘reverse_btrfsvol’
libguestfs-1.58.0/daemon/device-name-translation.c:308:17: acquire_memory: allocated here
libguestfs-1.58.0/daemon/device-name-translation.c:309:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/device-name-translation.c:314:21: branch_false: ...to here
libguestfs-1.58.0/daemon/device-name-translation.c:314:21: call_function: calling ‘reverse_device_name_translation’ from ‘reverse_btrfsvol’
libguestfs-1.58.0/daemon/device-name-translation.c:303:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/device-name-translation.c:302:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/device-name-translation.c:302:22: danger: ‘device_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  300|     const char prefix[] = "btrfsvol:";
#  301|     const char *device_start, *device_end;
#  302|->   CLEANUP_FREE char *device_name = NULL;
#  303|     CLEANUP_FREE char *reversed_device = NULL;
#  304|     char *ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
libguestfs-1.58.0/daemon/devsparts.c:58:26: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/dev/disk/guestfs")’
libguestfs-1.58.0/daemon/devsparts.c:45:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/devsparts.c:46:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/devsparts.c:46:6: branch_false: ...to here
libguestfs-1.58.0/daemon/devsparts.c:58:26: throw: if ‘readdir’ throws an exception...
libguestfs-1.58.0/daemon/devsparts.c:58:26: danger: ‘opendir("/dev/disk/guestfs")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   56|     }
#   57|   
#   58|->   while (errno = 0, (d = readdir (dir)) != NULL) {
#   59|       CLEANUP_FREE char *path = NULL;
#   60|       char *rawdev;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def268]
libguestfs-1.58.0/daemon/file.c:297:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 524288)’
libguestfs-1.58.0/daemon/file.c:364:1: enter_function: entry to ‘do_pread_device’
libguestfs-1.58.0/daemon/file.c:366:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/file.c:367:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:372:10: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:372:10: call_function: calling ‘pread_fd’ from ‘do_pread_device’
#  295|     if (count < 0) {
#  296|       reply_with_error ("count is negative");
#  297|->     close (fd);
#  298|       return NULL;
#  299|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def269]
libguestfs-1.58.0/daemon/file.c:303:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 524288)’
libguestfs-1.58.0/daemon/file.c:364:1: enter_function: entry to ‘do_pread_device’
libguestfs-1.58.0/daemon/file.c:366:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/file.c:367:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:372:10: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:372:10: call_function: calling ‘pread_fd’ from ‘do_pread_device’
#  301|     if (offset < 0) {
#  302|       reply_with_error ("offset is negative");
#  303|->     close (fd);
#  304|       return NULL;
#  305|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def270]
libguestfs-1.58.0/daemon/file.c:314:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 524288)’
libguestfs-1.58.0/daemon/file.c:364:1: enter_function: entry to ‘do_pread_device’
libguestfs-1.58.0/daemon/file.c:366:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/file.c:367:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:372:10: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:372:10: call_function: calling ‘pread_fd’ from ‘do_pread_device’
#  312|     if (count >= GUESTFS_MESSAGE_MAX) {
#  313|       reply_with_error ("%s: count is too large for the protocol, use smaller reads", display_path);
#  314|->     close (fd);
#  315|       return NULL;
#  316|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def271]
libguestfs-1.58.0/daemon/file.c:318:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 524288)’
libguestfs-1.58.0/daemon/file.c:364:1: enter_function: entry to ‘do_pread_device’
libguestfs-1.58.0/daemon/file.c:366:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/file.c:367:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:372:10: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:372:10: call_function: calling ‘pread_fd’ from ‘do_pread_device’
#  316|     }
#  317|   
#  318|->   buf = malloc (count);
#  319|     if (buf == NULL) {
#  320|       reply_with_perror ("malloc");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
libguestfs-1.58.0/daemon/file.c:325:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/file.c:295:6: branch_false: following ‘false’ branch (when ‘count >= 0’)...
libguestfs-1.58.0/daemon/file.c:301:6: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:301:6: branch_false: following ‘false’ branch (when ‘offset >= 0’)...
libguestfs-1.58.0/daemon/file.c:312:6: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:312:6: branch_false: following ‘false’ branch (when ‘count <= 4194303’)...
libguestfs-1.58.0/daemon/file.c:318:9: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:318:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/file.c:319:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/daemon/file.c:325:7: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:325:7: throw: if ‘pread’ throws an exception...
libguestfs-1.58.0/daemon/file.c:325:7: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  323|     }
#  324|   
#  325|->   r = pread (fd, buf, count, offset);
#  326|     if (r == -1) {
#  327|       reply_with_perror ("pread: %s", display_path);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def273]
libguestfs-1.58.0/daemon/file.c:353:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
libguestfs-1.58.0/daemon/file.c:352:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/file.c:353:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/file.c:353:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/file.c:353:3: danger: ‘open(path, 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  351|     CHROOT_IN;
#  352|     fd = open (path, O_RDONLY|O_CLOEXEC);
#  353|->   CHROOT_OUT;
#  354|   
#  355|     if (fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def274]
libguestfs-1.58.0/daemon/file.c:382:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 524289)’
libguestfs-1.58.0/daemon/file.c:431:1: enter_function: entry to ‘do_pwrite_device’
libguestfs-1.58.0/daemon/file.c:434:6: branch_false: following ‘false’ branch (when ‘offset >= 0’)...
libguestfs-1.58.0/daemon/file.c:439:12: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:439:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/file.c:440:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:445:10: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:445:10: call_function: calling ‘pwrite_fd’ from ‘do_pwrite_device’
#  380|   
#  381|     r = pwrite (fd, content, size, offset);
#  382|->   if (r == -1) {
#  383|       reply_with_perror ("pwrite: %s", display_path);
#  384|       close (fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def275]
libguestfs-1.58.0/daemon/file.c:420:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524289)’
libguestfs-1.58.0/daemon/file.c:413:6: branch_false: following ‘false’ branch (when ‘offset >= 0’)...
libguestfs-1.58.0/daemon/file.c:418:3: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:419:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/file.c:420:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/file.c:420:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/file.c:420:3: danger: ‘open(path, 524289)’ leaks here; was opened at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  418|     CHROOT_IN;
#  419|     fd = open (path, O_WRONLY|O_CLOEXEC);
#  420|->   CHROOT_OUT;
#  421|   
#  422|     if (fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
libguestfs-1.58.0/daemon/file.c:490:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/file.c:469:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/file.c:474:3: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:477:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:480:7: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:483:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/file.c:484:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:489:7: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:489:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/file.c:490:5: branch_true: ...to here
libguestfs-1.58.0/daemon/file.c:490:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/file.c:490:5: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
#  488|   
#  489|     if (fgets (line, sizeof line, fp) == NULL) {
#  490|->     reply_with_perror ("fgets");
#  491|       pclose (fp);
#  492|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
libguestfs-1.58.0/daemon/file.c:495:7: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/file.c:469:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/file.c:474:3: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:477:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:480:7: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:483:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/file.c:484:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:489:7: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:489:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/file.c:495:7: branch_false: ...to here
libguestfs-1.58.0/daemon/file.c:495:7: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/4)
#  493|     }
#  494|   
#  495|->   if (pclose (fp) == -1) {
#  496|       reply_with_perror ("pclose");
#  497|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
libguestfs-1.58.0/daemon/fill.c:38:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/fill.c:40:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/fill.c:45:9: branch_false: ...to here
libguestfs-1.58.0/daemon/fill.c:45:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/fill.c:46:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/fill.c:50:3: branch_false: ...to here
libguestfs-1.58.0/daemon/fill.c:51:6: branch_true: following ‘true’ branch (when ‘len < 0’)...
libguestfs-1.58.0/daemon/fill.c:52:5: branch_true: ...to here
libguestfs-1.58.0/daemon/fill.c:52:5: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/fill.c:38:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/fill.c:38:22: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   36|     size_t len_sz;
#   37|     size_t n;
#   38|->   CLEANUP_FREE char *buf = NULL;
#   39|   
#   40|     if (c < 0 || c > 255) {

Error: CPPCHECK_WARNING (CWE-401): [#def279]
libguestfs-1.58.0/daemon/fill.c:53: error[memleak]: Memory leak: buf
#   51|     if (len < 0) {
#   52|       reply_with_error ("%d: length is < 0", len);
#   53|->     return -1;
#   54|     }
#   55|     len_sz = (size_t) len;

Error: CPPCHECK_WARNING (CWE-401): [#def280]
libguestfs-1.58.0/daemon/find.c:74: error[memleak]: Memory leak: str
#   72|     if (!sysrootdir) {
#   73|       reply_with_perror ("malloc");
#   74|->     return -1;
#   75|     }
#   76|   

Error: CPPCHECK_WARNING (CWE-401): [#def281]
libguestfs-1.58.0/daemon/find.c:80: error[memleak]: Memory leak: str
#   78|     if (r == -1) {
#   79|       reply_with_perror ("%s", dir);
#   80|->     return -1;
#   81|     }
#   82|     if (!S_ISDIR (statbuf.st_mode)) {

Error: CPPCHECK_WARNING (CWE-401): [#def282]
libguestfs-1.58.0/daemon/find.c:84: error[memleak]: Memory leak: str
#   82|     if (!S_ISDIR (statbuf.st_mode)) {
#   83|       reply_with_error ("%s: not a directory", dir);
#   84|->     return -1;
#   85|     }
#   86|   

Error: CPPCHECK_WARNING (CWE-401): [#def283]
libguestfs-1.58.0/daemon/find.c:93: error[memleak]: Memory leak: str
#   91|     cmd_error:
#   92|       reply_with_perror ("open_memstream");
#   93|->     return -1;
#   94|     }
#   95|     fprintf (fp, "find ");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
libguestfs-1.58.0/daemon/find.c:114:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/find.c:66:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:71:16: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:72:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:77:7: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:78:6: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/find.c:82:8: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:82:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:87:19: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:90:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/find.c:95:3: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:101:7: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:104:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/find.c:105:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:114:3: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:114:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/find.c:114:3: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  112|      * message back.  Instead we can only cancel the transfer.
#  113|      */
#  114|->   reply (NULL, NULL);
#  115|   
#  116|     /* The code below assumes each path returned can fit into a protocol

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
libguestfs-1.58.0/daemon/find.c:121:15: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/find.c:54:1: enter_function: entry to ‘do_find0’
libguestfs-1.58.0/daemon/find.c:66:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:71:16: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:72:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:77:7: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:78:6: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/find.c:82:8: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:82:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:87:19: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:90:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/find.c:95:3: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:101:7: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:104:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/find.c:105:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/find.c:114:3: branch_false: ...to here
libguestfs-1.58.0/daemon/find.c:121:15: call_function: calling ‘input_to_nul’ from ‘do_find0’
libguestfs-1.58.0/daemon/find.c:121:15: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(14)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/13)
#  119|      * we'll need to modify the code to handle it.  XXX
#  120|      */
#  121|->   while ((r = input_to_nul (fp, str, GUESTFS_MAX_CHUNK_SIZE)) > 0) {
#  122|       const size_t len = strlen (str);
#  123|       if (len <= sysrootdirlen)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
libguestfs-1.58.0/daemon/fs-min-size.c:31:35: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
libguestfs-1.58.0/daemon/fs-min-size.c:35:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/fs-min-size.c:35:6: branch_false: ...to here
libguestfs-1.58.0/daemon/fs-min-size.c:40:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/fs-min-size.c:41:9: branch_true: ...to here
libguestfs-1.58.0/daemon/fs-min-size.c:42:14: acquire_memory: allocated here
libguestfs-1.58.0/daemon/fs-min-size.c:43:10: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
libguestfs-1.58.0/daemon/fs-min-size.c:31:35: branch_false: ...to here
libguestfs-1.58.0/daemon/fs-min-size.c:31:35: throw: if ‘guestfs_int_cleanup_free_string_list’ throws an exception...
libguestfs-1.58.0/daemon/fs-min-size.c:31:35: danger: ‘path’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   29|   get_mount_point (const char *device)
#   30|   {
#   31|->   CLEANUP_FREE_STRING_LIST char **mountpoints = do_mountpoints();
#   32|     size_t i;
#   33|     char *path;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def287]
libguestfs-1.58.0/daemon/grep.c:67:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
libguestfs-1.58.0/daemon/grep.c:144:1: enter_function: entry to ‘do_zegrep’
libguestfs-1.58.0/daemon/grep.c:146:10: call_function: calling ‘grep’ from ‘do_zegrep’
#   65|     CHROOT_IN;
#   66|     fd = open (path, O_RDONLY|O_CLOEXEC);
#   67|->   CHROOT_OUT;
#   68|   
#   69|     if (fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def288]
libguestfs-1.58.0/daemon/guestfsd.c:272:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/daemon/guestfsd.c:156:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:165:3: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:201:6: branch_true: following ‘true’ branch (when ‘channel’ is NULL)...
libguestfs-1.58.0/daemon/guestfsd.c:201:6: branch_true: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:208:6: branch_true: following ‘true’ branch (when ‘listen_mode == 0’)...
libguestfs-1.58.0/daemon/guestfsd.c:209:9: branch_true: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:209:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:214:14: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:214:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/guestfsd.c:215:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:260:7: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:272:3: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:272:3: throw: if ‘udev_settle’ throws an exception...
libguestfs-1.58.0/daemon/guestfsd.c:272:3: danger: ‘sock’ leaks here; was opened at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  270|      * that we'll have to do any waiting here.
#  271|      */
#  272|->   udev_settle ();
#  273|   
#  274|     /* Send the magic length message which indicates that

Error: GCC_ANALYZER_WARNING (CWE-775): [#def289]
libguestfs-1.58.0/daemon/guestfsd.c:280:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/daemon/guestfsd.c:156:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:165:3: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:201:6: branch_true: following ‘true’ branch (when ‘channel’ is NULL)...
libguestfs-1.58.0/daemon/guestfsd.c:201:6: branch_true: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:208:6: branch_true: following ‘true’ branch (when ‘listen_mode == 0’)...
libguestfs-1.58.0/daemon/guestfsd.c:209:9: branch_true: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:209:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:214:14: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:214:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/guestfsd.c:215:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:260:7: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:272:3: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:280:3: throw: if ‘xdrmem_create’ throws an exception...
libguestfs-1.58.0/daemon/guestfsd.c:280:3: danger: ‘sock’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  278|     XDR xdr;
#  279|     uint32_t len = GUESTFS_LAUNCH_FLAG;
#  280|->   xdrmem_create (&xdr, lenbuf, sizeof lenbuf, XDR_ENCODE);
#  281|     xdr_u_int (&xdr, &len);
#  282|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def290]
libguestfs-1.58.0/daemon/guestfsd.c:281:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/daemon/guestfsd.c:156:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:165:3: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:201:6: branch_true: following ‘true’ branch (when ‘channel’ is NULL)...
libguestfs-1.58.0/daemon/guestfsd.c:201:6: branch_true: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:208:6: branch_true: following ‘true’ branch (when ‘listen_mode == 0’)...
libguestfs-1.58.0/daemon/guestfsd.c:209:9: branch_true: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:209:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:214:14: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:214:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/guestfsd.c:215:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:260:7: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:272:3: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:281:3: throw: if ‘xdr_u_int’ throws an exception...
libguestfs-1.58.0/daemon/guestfsd.c:281:3: danger: ‘sock’ leaks here; was opened at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  279|     uint32_t len = GUESTFS_LAUNCH_FLAG;
#  280|     xdrmem_create (&xdr, lenbuf, sizeof lenbuf, XDR_ENCODE);
#  281|->   xdr_u_int (&xdr, &len);
#  282|   
#  283|     if (xwrite (sock, lenbuf, sizeof lenbuf) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def291]
libguestfs-1.58.0/daemon/guestfsd.c:283:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/daemon/guestfsd.c:156:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:165:3: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:201:6: branch_true: following ‘true’ branch (when ‘channel’ is NULL)...
libguestfs-1.58.0/daemon/guestfsd.c:201:6: branch_true: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:208:6: branch_true: following ‘true’ branch (when ‘listen_mode == 0’)...
libguestfs-1.58.0/daemon/guestfsd.c:209:9: branch_true: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:209:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:214:14: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:214:14: acquire_resource: opened here
libguestfs-1.58.0/daemon/guestfsd.c:215:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:260:7: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/guestfsd.c:272:3: branch_false: ...to here
libguestfs-1.58.0/daemon/guestfsd.c:283:7: throw: if ‘xwrite’ throws an exception...
libguestfs-1.58.0/daemon/guestfsd.c:283:7: danger: ‘sock’ leaks here; was opened at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  281|     xdr_u_int (&xdr, &len);
#  282|   
#  283|->   if (xwrite (sock, lenbuf, sizeof lenbuf) == -1)
#  284|       error (EXIT_FAILURE, errno, "xwrite");
#  285|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def292]
libguestfs-1.58.0/daemon/headtail.c:40:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
libguestfs-1.58.0/daemon/headtail.c:73:1: enter_function: entry to ‘do_tail’
libguestfs-1.58.0/daemon/headtail.c:75:10: call_function: calling ‘headtail’ from ‘do_tail’
#   38|     CHROOT_IN;
#   39|     fd = open (path, O_RDONLY|O_CLOEXEC);
#   40|->   CHROOT_OUT;
#   41|   
#   42|     if (fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def293]
libguestfs-1.58.0/daemon/hexdump.c:39:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
libguestfs-1.58.0/daemon/hexdump.c:38:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/hexdump.c:41:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hexdump.c:46:3: branch_false: ...to here
libguestfs-1.58.0/daemon/hexdump.c:39:3: danger: ‘open(path, 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   37|     CHROOT_IN;
#   38|     fd = open (path, O_RDONLY|O_CLOEXEC);
#   39|->   CHROOT_OUT;
#   40|   
#   41|     if (fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
libguestfs-1.58.0/daemon/hivex.c:163:29: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/hivex.c:166:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:168:7: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:169:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:169:6: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:179:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/hivex.c:184:3: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:186:5: acquire_memory: allocated here
libguestfs-1.58.0/daemon/hivex.c:187:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:187:6: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:163:29: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/hivex.c:163:29: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  161|   {
#  162|     guestfs_int_hivex_node_list *ret;
#  163|->   CLEANUP_FREE hive_node_h *r = NULL;
#  164|     size_t i, len;
#  165|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
libguestfs-1.58.0/daemon/hivex.c:163:29: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/hivex.c:166:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:168:7: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:169:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:169:6: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:178:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/hivex.c:179:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/hivex.c:184:3: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:187:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:187:6: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:163:29: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/hivex.c:163:29: danger: ‘ret’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  161|   {
#  162|     guestfs_int_hivex_node_list *ret;
#  163|->   CLEANUP_FREE hive_node_h *r = NULL;
#  164|     size_t i, len;
#  165|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
libguestfs-1.58.0/daemon/hivex.c:236:30: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/hivex.c:239:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:241:7: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:242:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:242:6: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:252:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/hivex.c:257:3: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:259:5: acquire_memory: allocated here
libguestfs-1.58.0/daemon/hivex.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:260:6: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:236:30: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/hivex.c:236:30: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  234|   {
#  235|     guestfs_int_hivex_value_list *ret;
#  236|->   CLEANUP_FREE hive_value_h *r = NULL;
#  237|     size_t i, len;
#  238|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
libguestfs-1.58.0/daemon/hivex.c:236:30: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/hivex.c:239:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:241:7: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:242:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:242:6: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:251:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/hivex.c:252:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/hivex.c:257:3: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/hivex.c:260:6: branch_false: ...to here
libguestfs-1.58.0/daemon/hivex.c:236:30: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/hivex.c:236:30: danger: ‘ret’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  234|   {
#  235|     guestfs_int_hivex_value_list *ret;
#  236|->   CLEANUP_FREE hive_value_h *r = NULL;
#  237|     size_t i, len;
#  238|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def298]
libguestfs-1.58.0/daemon/initrd.c:212:5: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘open(fullpath, 524288)’
libguestfs-1.58.0/daemon/initrd.c:110:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/initrd.c:121:8: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:122:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/initrd.c:128:3: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:134:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/initrd.c:137:7: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:138:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/initrd.c:143:7: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:143:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/initrd.c:151:7: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:151:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/initrd.c:158:8: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:158:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/initrd.c:159:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/initrd.c:168:7: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:168:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/initrd.c:178:7: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:178:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/initrd.c:184:9: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:185:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/initrd.c:190:7: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:190:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/initrd.c:197:7: branch_false: ...to here
libguestfs-1.58.0/daemon/initrd.c:197:7: release_resource: first ‘close’ here
libguestfs-1.58.0/daemon/initrd.c:197:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/initrd.c:198:5: branch_true: ...to here
libguestfs-1.58.0/daemon/initrd.c:211:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/initrd.c:212:5: branch_true: ...to here
libguestfs-1.58.0/daemon/initrd.c:212:5: danger: second ‘close’ here; first ‘close’ was at [(25)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/24)
#  210|    cleanup:
#  211|     if (fd >= 0)
#  212|->     close (fd);
#  213|   
#  214|     /* Remove the file. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
libguestfs-1.58.0/daemon/inotify.c:197:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "w")’
libguestfs-1.58.0/daemon/inotify.c:310:1: enter_function: entry to ‘do_inotify_files’
libguestfs-1.58.0/daemon/inotify.c:321:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:323:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:324:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:329:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:331:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:332:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:332:6: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:339:14: call_function: calling ‘do_inotify_read’ from ‘do_inotify_files’
libguestfs-1.58.0/daemon/inotify.c:197:3: danger: ‘popen(&cmd, "w")’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  195|     guestfs_int_inotify_event_list *ret;
#  196|   
#  197|->   NEED_INOTIFY (NULL);
#  198|   
#  199|     ret = malloc (sizeof *ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
libguestfs-1.58.0/daemon/inotify.c:225:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:274:23: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:222:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:225:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:225:7: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:225:7: danger: ‘<unknown>’ leaks here; was allocated at [(18)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/17)
#  223|             (EWOULDBLOCK != EAGAIN && errno == EAGAIN))
#  224|           break;
#  225|->       reply_with_perror ("read");
#  226|         goto error;
#  227|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
libguestfs-1.58.0/daemon/inotify.c:225:7: warning[-Wanalyzer-malloc-leak]: leak of ‘np’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:222:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:225:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:225:7: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:225:7: danger: ‘np’ leaks here; was allocated at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  223|             (EWOULDBLOCK != EAGAIN && errno == EAGAIN))
#  224|           break;
#  225|->       reply_with_perror ("read");
#  226|         goto error;
#  227|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
libguestfs-1.58.0/daemon/inotify.c:225:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:199:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:222:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:225:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:225:7: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:225:7: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  223|             (EWOULDBLOCK != EAGAIN && errno == EAGAIN))
#  224|           break;
#  225|->       reply_with_perror ("read");
#  226|         goto error;
#  227|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
libguestfs-1.58.0/daemon/inotify.c:229:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:274:23: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:229:7: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:229:7: danger: ‘<unknown>’ leaks here; was allocated at [(18)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/17)
#  227|       }
#  228|       if (r == 0) {		/* End of file - we're not expecting it. */
#  229|->       reply_with_error ("unexpected end of file");
#  230|         goto error;
#  231|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
libguestfs-1.58.0/daemon/inotify.c:229:7: warning[-Wanalyzer-malloc-leak]: leak of ‘np’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:229:7: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:229:7: danger: ‘np’ leaks here; was allocated at [(13)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/12)
#  227|       }
#  228|       if (r == 0) {		/* End of file - we're not expecting it. */
#  229|->       reply_with_error ("unexpected end of file");
#  230|         goto error;
#  231|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
libguestfs-1.58.0/daemon/inotify.c:229:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:199:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:229:7: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:229:7: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  227|       }
#  228|       if (r == 0) {		/* End of file - we're not expecting it. */
#  229|->       reply_with_error ("unexpected end of file");
#  230|         goto error;
#  231|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
libguestfs-1.58.0/daemon/inotify.c:254:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:274:23: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:246:47: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:254:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:254:9: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:254:9: danger: ‘<unknown>’ leaks here; was allocated at [(22)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/21)
#  252|         /* Check event->len is reasonable (note the field is uint32_t). */
#  253|         if (event->len > PATH_MAX) {
#  254|->         reply_with_error ("event->len = %" PRIu32 " > PATH_MAX", event->len);
#  255|           goto error;
#  256|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
libguestfs-1.58.0/daemon/inotify.c:254:9: warning[-Wanalyzer-malloc-leak]: leak of ‘np’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:246:47: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:254:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:254:9: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:254:9: danger: ‘np’ leaks here; was allocated at [(17)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/16)
#  252|         /* Check event->len is reasonable (note the field is uint32_t). */
#  253|         if (event->len > PATH_MAX) {
#  254|->         reply_with_error ("event->len = %" PRIu32 " > PATH_MAX", event->len);
#  255|           goto error;
#  256|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
libguestfs-1.58.0/daemon/inotify.c:254:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:199:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:254:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:254:9: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:254:9: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  252|         /* Check event->len is reasonable (note the field is uint32_t). */
#  253|         if (event->len > PATH_MAX) {
#  254|->         reply_with_error ("event->len = %" PRIu32 " > PATH_MAX", event->len);
#  255|           goto error;
#  256|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
libguestfs-1.58.0/daemon/inotify.c:258:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:274:23: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:246:47: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:258:12: danger: ‘<unknown>’ leaks here; was allocated at [(22)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/21)
#  256|         }
#  257|   
#  258|->       np = realloc (ret->guestfs_int_inotify_event_list_val,
#  259|                       (ret->guestfs_int_inotify_event_list_len + 1) *
#  260|                       sizeof (guestfs_int_inotify_event));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
libguestfs-1.58.0/daemon/inotify.c:262:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:274:23: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:246:47: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_true: following ‘true’ branch (when ‘np’ is NULL)...
libguestfs-1.58.0/daemon/inotify.c:262:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:262:9: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:262:9: danger: ‘<unknown>’ leaks here; was allocated at [(22)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/21)
#  260|                       sizeof (guestfs_int_inotify_event));
#  261|         if (np == NULL) {
#  262|->         reply_with_perror ("realloc");
#  263|           goto error;
#  264|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
libguestfs-1.58.0/daemon/inotify.c:262:9: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:246:47: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_true: following ‘true’ branch (when ‘np’ is NULL)...
libguestfs-1.58.0/daemon/inotify.c:262:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:262:9: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:262:9: danger: ‘in’ leaks here; was allocated at [(17)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/16)
#  260|                       sizeof (guestfs_int_inotify_event));
#  261|         if (np == NULL) {
#  262|->         reply_with_perror ("realloc");
#  263|           goto error;
#  264|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
libguestfs-1.58.0/daemon/inotify.c:262:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:199:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_true: following ‘true’ branch (when ‘np’ is NULL)...
libguestfs-1.58.0/daemon/inotify.c:262:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:262:9: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:262:9: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  260|                       sizeof (guestfs_int_inotify_event));
#  261|         if (np == NULL) {
#  262|->         reply_with_perror ("realloc");
#  263|           goto error;
#  264|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
libguestfs-1.58.0/daemon/inotify.c:278:9: warning[-Wanalyzer-malloc-leak]: leak of ‘np’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:276:23: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:278:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:278:9: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:278:9: danger: ‘np’ leaks here; was allocated at [(17)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/16)
#  276|           in->in_name = strdup (""); /* Should have optional string fields XXX. */
#  277|         if (in->in_name == NULL) {
#  278|->         reply_with_perror ("strdup");
#  279|           goto error;
#  280|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
libguestfs-1.58.0/daemon/inotify.c:278:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:199:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:276:23: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:278:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:278:9: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:278:9: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  276|           in->in_name = strdup (""); /* Should have optional string fields XXX. */
#  277|         if (in->in_name == NULL) {
#  278|->         reply_with_perror ("strdup");
#  279|           goto error;
#  280|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
libguestfs-1.58.0/daemon/inotify.c:304:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:246:47: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:274:23: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:254:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:304:3: throw: if ‘xdr_free’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:304:3: danger: ‘<unknown>’ leaks here; was allocated at [(37)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/36)
#  302|   
#  303|    error:
#  304|->   xdr_free ((xdrproc_t) xdr_guestfs_int_inotify_event_list, (char *) ret);
#  305|     free (ret);
#  306|     return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
libguestfs-1.58.0/daemon/inotify.c:304:3: warning[-Wanalyzer-malloc-leak]: leak of ‘np’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:220:8: branch_false: following ‘false’ branch (when ‘r != -1’)...
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:228:8: branch_false: following ‘false’ branch (when ‘r != 0’)...
libguestfs-1.58.0/daemon/inotify.c:233:18: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:273:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:274:31: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:283:13: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:237:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:241:7: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:246:47: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:245:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:253:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:259:22: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:261:10: branch_false: following ‘false’ branch (when ‘np’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:265:7: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:277:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/inotify.c:278:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:304:3: throw: if ‘xdr_free’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:304:3: danger: ‘np’ leaks here; was allocated at [(32)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/31)
#  302|   
#  303|    error:
#  304|->   xdr_free ((xdrproc_t) xdr_guestfs_int_inotify_event_list, (char *) ret);
#  305|     free (ret);
#  306|     return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
libguestfs-1.58.0/daemon/inotify.c:304:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/inotify.c:197:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/inotify.c:199:9: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:199:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/inotify.c:200:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/inotify.c:204:3: branch_false: ...to here
libguestfs-1.58.0/daemon/inotify.c:213:10: branch_true: following ‘true’ branch (when ‘space > 0’)...
libguestfs-1.58.0/daemon/inotify.c:218:9: branch_true: ...to here
libguestfs-1.58.0/daemon/inotify.c:304:3: throw: if ‘xdr_free’ throws an exception...
libguestfs-1.58.0/daemon/inotify.c:304:3: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  302|   
#  303|    error:
#  304|->   xdr_free ((xdrproc_t) xdr_guestfs_int_inotify_event_list, (char *) ret);
#  305|     free (ret);
#  306|     return NULL;

Error: CPPCHECK_WARNING (CWE-457): [#def318]
libguestfs-1.58.0/daemon/is.c:107: error[uninitvar]: Uninitialized variable: &buf
#  105|   
#  106|     CHROOT_IN;
#  107|->   r = (!followsymlinks ? lstat : stat) (path, &buf);
#  108|     CHROOT_OUT;
#  109|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
libguestfs-1.58.0/daemon/ldm.c:229:29: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’
libguestfs-1.58.0/daemon/ldm.c:217:1: enter_function: entry to ‘do_ldmtool_scan’
libguestfs-1.58.0/daemon/ldm.c:221:10: call_function: calling ‘do_ldmtool_scan_devices’ from ‘do_ldmtool_scan’
#  227|     char **ret;
#  228|     size_t i, nr_devices;
#  229|->   CLEANUP_FREE const char **argv = NULL;
#  230|     int r;
#  231|     CLEANUP_FREE char *out = NULL, *err = NULL;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def320]
libguestfs-1.58.0/daemon/ldm.c:243:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libguestfs-1.58.0/daemon/ldm.c:217:1: enter_function: entry to ‘do_ldmtool_scan’
libguestfs-1.58.0/daemon/ldm.c:221:10: call_function: calling ‘do_ldmtool_scan_devices’ from ‘do_ldmtool_scan’
#  241|     argv[1] = "scan";
#  242|     for (i = 0; i < nr_devices; ++i)
#  243|->     argv[2+i] = devices[i];
#  244|     argv[2+i] = NULL;
#  245|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def321]
libguestfs-1.58.0/daemon/link.c:42:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 589824)’
libguestfs-1.58.0/daemon/link.c:41:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/link.c:42:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/link.c:42:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/link.c:42:3: danger: ‘open(path, 589824)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   40|     CHROOT_IN;
#   41|     fd_cwd = open (path, O_RDONLY|O_DIRECTORY|O_CLOEXEC);
#   42|->   CHROOT_OUT;
#   43|   
#   44|     if (fd_cwd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
libguestfs-1.58.0/daemon/ls.c:43:3: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(path)’
libguestfs-1.58.0/daemon/ls.c:42:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ls.c:45:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ls.c:54:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ls.c:54:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/ls.c:43:3: danger: ‘opendir(path)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   41|     CHROOT_IN;
#   42|     dir = opendir (path);
#   43|->   CHROOT_OUT;
#   44|   
#   45|     if (dir == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
libguestfs-1.58.0/daemon/luks.c:53:8: warning[-Wanalyzer-malloc-leak]: leak of ‘tempfile’
libguestfs-1.58.0/daemon/luks.c:47:14: acquire_memory: allocated here
libguestfs-1.58.0/daemon/luks.c:48:6: branch_false: following ‘false’ branch (when ‘tempfile’ is non-NULL)...
libguestfs-1.58.0/daemon/luks.c:53:8: branch_false: ...to here
libguestfs-1.58.0/daemon/luks.c:53:8: throw: if ‘mkstemp’ throws an exception...
libguestfs-1.58.0/daemon/luks.c:53:8: danger: ‘tempfile’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   51|     }
#   52|   
#   53|->   fd = mkstemp (tempfile);
#   54|     if (fd == -1) {
#   55|       reply_with_perror ("mkstemp");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def324]
libguestfs-1.58.0/daemon/lvm-filter.c:76:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(conf, "we")’
libguestfs-1.58.0/daemon/lvm-filter.c:86:1: enter_function: entry to ‘set_filter’
libguestfs-1.58.0/daemon/lvm-filter.c:93:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm-filter.c:97:8: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm-filter.c:97:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/lvm-filter.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm-filter.c:103:3: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm-filter.c:108:7: call_function: calling ‘devicesfile_feature’ from ‘set_filter’
libguestfs-1.58.0/daemon/lvm-filter.c:76:7: danger: ‘fopen(conf, "we")’ leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   74|     static bool checked, available;
#   75|   
#   76|->   if (!checked) {
#   77|       checked = true;
#   78|       available = command (NULL, NULL, "lvmdevices", "--help", NULL) == 0 ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
libguestfs-1.58.0/daemon/lvm-filter.c:76:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(conf, "we")’
libguestfs-1.58.0/daemon/lvm-filter.c:86:1: enter_function: entry to ‘set_filter’
libguestfs-1.58.0/daemon/lvm-filter.c:93:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm-filter.c:97:8: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm-filter.c:97:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/lvm-filter.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm-filter.c:103:3: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm-filter.c:108:7: call_function: calling ‘devicesfile_feature’ from ‘set_filter’
libguestfs-1.58.0/daemon/lvm-filter.c:76:7: danger: ‘fopen(conf, "we")’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
#   74|     static bool checked, available;
#   75|   
#   76|->   if (!checked) {
#   77|       checked = true;
#   78|       available = command (NULL, NULL, "lvmdevices", "--help", NULL) == 0 ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
libguestfs-1.58.0/daemon/lvm.c:470:22: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’
libguestfs-1.58.0/daemon/lvm.c:499:1: enter_function: entry to ‘do_vg_activate_all’
libguestfs-1.58.0/daemon/lvm.c:502:10: call_function: calling ‘do_vg_activate’ from ‘do_vg_activate_all’
#  468|   {
#  469|     int r, i, argc;
#  470|->   CLEANUP_FREE char *err = NULL;
#  471|     CLEANUP_FREE const char **argv = NULL;
#  472|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def327]
libguestfs-1.58.0/daemon/lvm.c:485:15: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libguestfs-1.58.0/daemon/lvm.c:499:1: enter_function: entry to ‘do_vg_activate_all’
libguestfs-1.58.0/daemon/lvm.c:502:10: call_function: calling ‘do_vg_activate’ from ‘do_vg_activate_all’
#  483|     argv[3] = activate ? "y" : "n";
#  484|     for (i = 4; i < argc+1; ++i)
#  485|->     argv[i] = volgroups[i-4];
#  486|   
#  487|     r = commandv (NULL, &err, (const char * const*) argv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
libguestfs-1.58.0/daemon/lvm.c:688:35: warning[-Wanalyzer-malloc-leak]: leak of ‘canonical’
libguestfs-1.58.0/daemon/lvm.c:726:1: enter_function: entry to ‘do_lvm_canonical_lv_name’
libguestfs-1.58.0/daemon/lvm.c:735:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm.c:740:7: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:740:7: call_function: calling ‘lv_canonical’ from ‘do_lvm_canonical_lv_name’
#  686|     }
#  687|   
#  688|->   CLEANUP_FREE_STRING_LIST char **lvs = do_lvs ();
#  689|     if (lvs == NULL)
#  690|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def329]
libguestfs-1.58.0/daemon/lvm.c:803:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&tmp, 524288)’
libguestfs-1.58.0/daemon/lvm.c:764:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm.c:769:3: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:772:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm.c:778:8: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:778:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/lvm.c:779:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm.c:779:6: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:793:8: branch_true: following ‘true’ branch (when ‘alloc <= size’)...
libguestfs-1.58.0/daemon/lvm.c:794:7: branch_true: ...to here
libguestfs-1.58.0/daemon/lvm.c:795:10: branch_false: following ‘false’ branch (when ‘alloc <= 4193304’)...
libguestfs-1.58.0/daemon/lvm.c:801:14: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:802:10: branch_true: following ‘true’ branch (when ‘buf2’ is NULL)...
libguestfs-1.58.0/daemon/lvm.c:803:9: branch_true: ...to here
libguestfs-1.58.0/daemon/lvm.c:803:9: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/lvm.c:803:9: danger: ‘open(&tmp, 524288)’ leaks here; was opened at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  801|         buf2 = realloc (buf, alloc);
#  802|         if (buf2 == NULL) {
#  803|->         reply_with_perror ("realloc");
#  804|           free (buf);
#  805|           close (fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def330]
libguestfs-1.58.0/daemon/lvm.c:811:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&tmp, 524288)’
libguestfs-1.58.0/daemon/lvm.c:764:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm.c:769:3: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:772:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm.c:778:8: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:778:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/lvm.c:779:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm.c:779:6: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:793:8: branch_true: following ‘true’ branch (when ‘alloc <= size’)...
libguestfs-1.58.0/daemon/lvm.c:794:7: branch_true: ...to here
libguestfs-1.58.0/daemon/lvm.c:795:10: branch_false: following ‘false’ branch (when ‘alloc <= 4193304’)...
libguestfs-1.58.0/daemon/lvm.c:801:14: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:802:10: branch_false: following ‘false’ branch (when ‘buf2’ is non-NULL)...
libguestfs-1.58.0/daemon/lvm.c:811:10: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:812:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/lvm.c:818:8: branch_false: ...to here
libguestfs-1.58.0/daemon/lvm.c:818:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/lvm.c:824:7: branch_true: ...to here
libguestfs-1.58.0/daemon/lvm.c:811:10: danger: ‘open(&tmp, 524288)’ leaks here; was opened at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  809|       }
#  810|   
#  811|->     rs = read (fd, buf + size, alloc - size);
#  812|       if (rs == -1) {
#  813|         reply_with_perror ("read: %s", tmp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
libguestfs-1.58.0/daemon/md.c:269:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/md.c:256:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:268:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:269:5: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:269:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/md.c:269:5: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  267|       calloc (spaces+1, sizeof (struct guestfs_int_mdstat));
#  268|     if (ret->guestfs_int_mdstat_list_val == NULL) {
#  269|->     reply_with_perror ("calloc");
#  270|       free (ret);
#  271|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
libguestfs-1.58.0/daemon/md.c:303:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/md.c:256:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:274:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:275:11: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:276:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:283:9: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:302:8: branch_true: following ‘true’ branch (when ‘line == p’)...
libguestfs-1.58.0/daemon/md.c:303:7: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:303:7: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/md.c:303:7: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  301|        */
#  302|       if (p == line) {
#  303|->       reply_with_error ("device entry is too short: %s", line);
#  304|         goto error;
#  305|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def333]
libguestfs-1.58.0/daemon/md.c:303:7: warning[-Wanalyzer-malloc-leak]: leak of ‘t’
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:267:5: acquire_memory: allocated here
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:274:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:275:11: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:276:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:283:9: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:302:8: branch_true: following ‘true’ branch (when ‘line == p’)...
libguestfs-1.58.0/daemon/md.c:303:7: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:303:7: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/md.c:303:7: danger: ‘t’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  301|        */
#  302|       if (p == line) {
#  303|->       reply_with_error ("device entry is too short: %s", line);
#  304|         goto error;
#  305|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
libguestfs-1.58.0/daemon/md.c:309:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/md.c:256:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:274:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:275:11: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:302:8: branch_false: following ‘false’ branch (when ‘line != p’)...
libguestfs-1.58.0/daemon/md.c:307:5: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:308:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:309:7: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:309:7: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/md.c:309:7: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  307|       *p = '\0';
#  308|       if (asprintf (&t->mdstat_device, "/dev/%s", line) == -1) {
#  309|->       reply_with_perror ("asprintf");
#  310|         goto error;
#  311|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def335]
libguestfs-1.58.0/daemon/md.c:317:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/md.c:256:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:274:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:275:11: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:302:8: branch_false: following ‘false’ branch (when ‘line != p’)...
libguestfs-1.58.0/daemon/md.c:307:5: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:308:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/md.c:314:5: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:316:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:317:7: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:317:7: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/md.c:317:7: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  315|       *q = '\0';
#  316|       if (sscanf (line, "%" SCNi32, &t->mdstat_index) != 1) {
#  317|->       reply_with_error ("not a device number: %s", line);
#  318|         goto error;
#  319|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
libguestfs-1.58.0/daemon/md.c:326:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/md.c:256:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/md.c:257:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/md.c:268:6: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:274:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:275:11: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:302:8: branch_false: following ‘false’ branch (when ‘line != p’)...
libguestfs-1.58.0/daemon/md.c:307:5: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:308:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/md.c:314:5: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:316:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/md.c:322:5: branch_false: ...to here
libguestfs-1.58.0/daemon/md.c:325:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/md.c:326:7: branch_true: ...to here
libguestfs-1.58.0/daemon/md.c:326:7: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/md.c:326:7: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  324|       t->mdstat_flags = malloc (len+1);
#  325|       if (!t->mdstat_flags) {
#  326|->       reply_with_error ("malloc");
#  327|         goto error;
#  328|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def337]
libguestfs-1.58.0/daemon/mkfs.c:223:11: warning[-Wanalyzer-null-argument]: use of NULL ‘label’ where non-null expected
libguestfs-1.58.0/daemon/mkfs.c:281:1: enter_function: entry to ‘do_mkfs_b’
libguestfs-1.58.0/daemon/mkfs.c:284:10: call_function: calling ‘do_mkfs’ from ‘do_mkfs_b’
#  221|     if (optargs_bitmask & GUESTFS_MKFS_LABEL_BITMASK) {
#  222|       if (extfs) {
#  223|->       if (strlen (label) > EXT2_LABEL_MAX) {
#  224|           reply_with_error ("%s: ext2/3/4 labels are limited to %d bytes",
#  225|                             label, EXT2_LABEL_MAX);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def338]
libguestfs-1.58.0/daemon/mkfs.c:242:11: warning[-Wanalyzer-null-argument]: use of NULL ‘label’ where non-null expected
libguestfs-1.58.0/daemon/mkfs.c:281:1: enter_function: entry to ‘do_mkfs_b’
libguestfs-1.58.0/daemon/mkfs.c:284:10: call_function: calling ‘do_mkfs’ from ‘do_mkfs_b’
#  240|       }
#  241|       else if (STREQ (fstype, "xfs")) {
#  242|->       if (strlen (label) > XFS_LABEL_MAX) {
#  243|           reply_with_error ("%s: xfs labels are limited to %d bytes",
#  244|                             label, XFS_LABEL_MAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
libguestfs-1.58.0/daemon/mktemp.c:39:3: warning[-Wanalyzer-malloc-leak]: leak of ‘writable’
libguestfs-1.58.0/daemon/mktemp.c:33:20: acquire_memory: allocated here
libguestfs-1.58.0/daemon/mktemp.c:34:6: branch_false: following ‘false’ branch (when ‘writable’ is non-NULL)...
libguestfs-1.58.0/daemon/mktemp.c:39:3: branch_false: ...to here
libguestfs-1.58.0/daemon/mktemp.c:39:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mktemp.c:39:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/mktemp.c:39:3: danger: ‘writable’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   37|     }
#   38|   
#   39|->   CHROOT_IN;
#   40|     char *r = mkdtemp (writable);
#   41|     CHROOT_OUT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
libguestfs-1.58.0/daemon/mktemp.c:86:8: warning[-Wanalyzer-malloc-leak]: leak of ‘dest_name’
libguestfs-1.58.0/daemon/mktemp.c:77:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mktemp.c:78:17: branch_true: ...to here
libguestfs-1.58.0/daemon/mktemp.c:78:17: acquire_memory: allocated here
libguestfs-1.58.0/daemon/mktemp.c:79:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/mktemp.c:85:3: branch_false: ...to here
libguestfs-1.58.0/daemon/mktemp.c:85:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/mktemp.c:86:8: branch_false: ...to here
libguestfs-1.58.0/daemon/mktemp.c:86:8: throw: if ‘mkstemps’ throws an exception...
libguestfs-1.58.0/daemon/mktemp.c:86:8: danger: ‘dest_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   84|   
#   85|     CHROOT_IN;
#   86|->   fd = mkstemps (dest_name, (int) suffix_len);
#   87|     CHROOT_OUT;
#   88|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
libguestfs-1.58.0/daemon/mountable.c:46:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/mountable.c:32:41: acquire_memory: allocated here
libguestfs-1.58.0/daemon/mountable.c:33:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/mountable.c:38:18: branch_false: ...to here
libguestfs-1.58.0/daemon/mountable.c:40:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mountable.c:41:22: branch_true: ...to here
libguestfs-1.58.0/daemon/mountable.c:45:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mountable.c:46:5: branch_true: ...to here
libguestfs-1.58.0/daemon/mountable.c:46:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/mountable.c:46:5: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   44|   
#   45|     if (!ret->im_device) {
#   46|->     reply_with_perror ("strdup");
#   47|       free (ret);
#   48|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
libguestfs-1.58.0/daemon/mountable.c:51:7: warning[-Wanalyzer-malloc-leak]: leak of ‘*ret.im_device’
libguestfs-1.58.0/daemon/mountable.c:33:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/mountable.c:38:18: branch_false: ...to here
libguestfs-1.58.0/daemon/mountable.c:40:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mountable.c:41:22: branch_true: ...to here
libguestfs-1.58.0/daemon/mountable.c:41:22: acquire_memory: allocated here
libguestfs-1.58.0/daemon/mountable.c:45:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/mountable.c:51:7: branch_false: ...to here
libguestfs-1.58.0/daemon/mountable.c:51:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mountable.c:52:22: branch_true: ...to here
libguestfs-1.58.0/daemon/mountable.c:56:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mountable.c:57:5: branch_true: ...to here
libguestfs-1.58.0/daemon/mountable.c:57:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/mountable.c:51:7: danger: ‘*ret.im_device’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   49|     }
#   50|   
#   51|->   if (mountable->volume)
#   52|       ret->im_volume = strdup (mountable->volume);
#   53|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
libguestfs-1.58.0/daemon/mountable.c:57:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/mountable.c:32:41: acquire_memory: allocated here
libguestfs-1.58.0/daemon/mountable.c:33:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/mountable.c:38:18: branch_false: ...to here
libguestfs-1.58.0/daemon/mountable.c:40:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mountable.c:41:22: branch_true: ...to here
libguestfs-1.58.0/daemon/mountable.c:45:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/mountable.c:51:7: branch_false: ...to here
libguestfs-1.58.0/daemon/mountable.c:51:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mountable.c:52:22: branch_true: ...to here
libguestfs-1.58.0/daemon/mountable.c:56:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/mountable.c:57:5: branch_true: ...to here
libguestfs-1.58.0/daemon/mountable.c:57:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/mountable.c:57:5: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   55|   
#   56|     if (!ret->im_volume) {
#   57|->     reply_with_perror ("strdup");
#   58|       free (ret->im_device);
#   59|       free (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
libguestfs-1.58.0/daemon/ntfs.c:270:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
libguestfs-1.58.0/daemon/ntfs.c:273:12: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfs.c:274:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfs.c:280:6: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfs.c:280:6: branch_true: following ‘true’ branch (when ‘inode < 0’)...
libguestfs-1.58.0/daemon/ntfs.c:281:5: branch_true: ...to here
libguestfs-1.58.0/daemon/ntfs.c:271:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/ntfs.c:270:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/ntfs.c:270:22: danger: ‘buffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  268|     int r;
#  269|     FILE *fp;
#  270|->   CLEANUP_FREE char *cmd = NULL;
#  271|     CLEANUP_FREE char *buffer = NULL;
#  272|   

Error: CPPCHECK_WARNING (CWE-401): [#def345]
libguestfs-1.58.0/daemon/ntfs.c:282: error[memleak]: Memory leak: buffer
#  280|     if (inode < 0) {
#  281|       reply_with_error ("inode must be >= 0");
#  282|->     return -1;
#  283|     }
#  284|   

Error: CPPCHECK_WARNING (CWE-401): [#def346]
libguestfs-1.58.0/daemon/ntfs.c:289: error[memleak]: Memory leak: buffer
#  287|                   inode, mountable->device) == -1) {
#  288|       reply_with_perror ("asprintf");
#  289|->     return -1;
#  290|     }
#  291|   

Error: CPPCHECK_WARNING (CWE-401): [#def347]
libguestfs-1.58.0/daemon/ntfs.c:298: error[memleak]: Memory leak: buffer
#  296|     if (fp == NULL) {
#  297|       reply_with_perror ("%s", cmd);
#  298|->     return -1;
#  299|     }
#  300|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
libguestfs-1.58.0/daemon/ntfs.c:305:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/ntfs.c:274:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfs.c:280:6: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfs.c:280:6: branch_false: following ‘false’ branch (when ‘inode >= 0’)...
libguestfs-1.58.0/daemon/ntfs.c:287:24: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfs.c:286:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfs.c:292:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfs.c:295:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfs.c:296:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfs.c:305:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfs.c:305:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/ntfs.c:305:3: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  303|      * message back.  Instead we can only cancel the transfer.
#  304|      */
#  305|->   reply (NULL, NULL);
#  306|   
#  307|     while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
libguestfs-1.58.0/daemon/ntfs.c:307:15: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/ntfs.c:274:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfs.c:280:6: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfs.c:280:6: branch_false: following ‘false’ branch (when ‘inode >= 0’)...
libguestfs-1.58.0/daemon/ntfs.c:287:24: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfs.c:286:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfs.c:292:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfs.c:295:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfs.c:296:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfs.c:305:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfs.c:307:10: branch_true: following ‘true’ branch (when ‘r > 0’)...
libguestfs-1.58.0/daemon/ntfs.c:308:9: branch_true: ...to here
libguestfs-1.58.0/daemon/ntfs.c:308:9: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/ntfs.c:307:15: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  305|     reply (NULL, NULL);
#  306|   
#  307|->   while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#  308|       if (send_file_write (buffer, r) < 0) {
#  309|         pclose (fp);

Error: CPPCHECK_WARNING (CWE-476): [#def350]
libguestfs-1.58.0/daemon/ntfsclone.c:47: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: str
#   45|       if (str == NULL)
#   46|         error (EXIT_FAILURE, errno, "strdup"); /* XXX */
#   47|->     len = strlen (str);
#   48|     }
#   49|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
libguestfs-1.58.0/daemon/ntfsclone.c:51:7: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/ntfsclone.c:67:1: enter_function: entry to ‘do_ntfsclone_in’
libguestfs-1.58.0/daemon/ntfsclone.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:84:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:94:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:97:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:110:8: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:113:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:114:5: branch_true: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:115:33: call_function: calling ‘read_error_file’ from ‘do_ntfsclone_in’
libguestfs-1.58.0/daemon/ntfsclone.c:115:33: return_function: returning to ‘do_ntfsclone_in’ from ‘read_error_file’
libguestfs-1.58.0/daemon/ntfsclone.c:116:5: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/ntfsclone.c:51:7: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   49|   
#   50|     /* Remove trailing \n character if any. */
#   51|->   if (len > 0 && str[len-1] == '\n')
#   52|       str[--len] = '\0';
#   53|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
libguestfs-1.58.0/daemon/ntfsclone.c:112:7: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/ntfsclone.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:84:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:94:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:97:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:110:8: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:112:7: throw: if ‘receive_file’ throws an exception...
libguestfs-1.58.0/daemon/ntfsclone.c:112:7: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  110|     fd = fileno (fp);
#  111|   
#  112|->   r = receive_file (write_cb, &fd);
#  113|     if (r == -1) {		/* write error */
#  114|       cancel_receive ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
libguestfs-1.58.0/daemon/ntfsclone.c:114:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/ntfsclone.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:84:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:94:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:97:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:110:8: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:113:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:114:5: branch_true: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:114:5: throw: if ‘cancel_receive’ throws an exception...
libguestfs-1.58.0/daemon/ntfsclone.c:114:5: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  112|     r = receive_file (write_cb, &fd);
#  113|     if (r == -1) {		/* write error */
#  114|->     cancel_receive ();
#  115|       CLEANUP_FREE char *errstr = read_error_file (error_file);
#  116|       reply_with_error ("write error on device: %s: %s", device, errstr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
libguestfs-1.58.0/daemon/ntfsclone.c:115:33: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/ntfsclone.c:67:1: enter_function: entry to ‘do_ntfsclone_in’
libguestfs-1.58.0/daemon/ntfsclone.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:84:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:94:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:97:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:110:8: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:113:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:114:5: branch_true: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:115:33: call_function: calling ‘read_error_file’ from ‘do_ntfsclone_in’
libguestfs-1.58.0/daemon/ntfsclone.c:115:33: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
#  113|     if (r == -1) {		/* write error */
#  114|       cancel_receive ();
#  115|->     CLEANUP_FREE char *errstr = read_error_file (error_file);
#  116|       reply_with_error ("write error on device: %s: %s", device, errstr);
#  117|       unlink (error_file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
libguestfs-1.58.0/daemon/ntfsclone.c:125:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/ntfsclone.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:84:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:94:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:97:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:110:8: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:113:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:121:6: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:121:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:125:5: branch_true: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:125:5: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/ntfsclone.c:125:5: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  123|        * cancel.  Nevertheless we must send an error reply here.
#  124|        */
#  125|->     reply_with_error ("ntfsclone cancelled");
#  126|       pclose (fp);
#  127|       unlink (error_file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
libguestfs-1.58.0/daemon/ntfsclone.c:126:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/ntfsclone.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:84:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:94:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:97:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:110:8: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:113:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:121:6: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:121:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:125:5: branch_true: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:126:5: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  124|        */
#  125|       reply_with_error ("ntfsclone cancelled");
#  126|->     pclose (fp);
#  127|       unlink (error_file);
#  128|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
libguestfs-1.58.0/daemon/ntfsclone.c:131:7: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/ntfsclone.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:84:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:94:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:97:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:98:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:110:8: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:113:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:121:6: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:121:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:131:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:131:7: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  129|     }
#  130|   
#  131|->   if (pclose (fp) != 0) {
#  132|       CLEANUP_FREE char *errstr = read_error_file (error_file);
#  133|       reply_with_error ("ntfsclone subcommand failed on device: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
libguestfs-1.58.0/daemon/ntfsclone.c:153:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/ntfsclone.c:156:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:157:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:168:17: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:154:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/ntfsclone.c:153:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/ntfsclone.c:153:22: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  151|     int r;
#  152|     FILE *fp;
#  153|->   CLEANUP_FREE char *cmd = NULL;
#  154|     CLEANUP_FREE char *buf = NULL;
#  155|   

Error: CPPCHECK_WARNING (CWE-401): [#def359]
libguestfs-1.58.0/daemon/ntfsclone.c:171: error[memleak]: Memory leak: buf
#  169|                   device) == -1) {
#  170|       reply_with_perror ("asprintf");
#  171|->     return -1;
#  172|     }
#  173|   

Error: CPPCHECK_WARNING (CWE-401): [#def360]
libguestfs-1.58.0/daemon/ntfsclone.c:180: error[memleak]: Memory leak: buf
#  178|     if (fp == NULL) {
#  179|       reply_with_perror ("%s", cmd);
#  180|->     return -1;
#  181|     }
#  182|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def361]
libguestfs-1.58.0/daemon/ntfsclone.c:187:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/ntfsclone.c:157:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:168:17: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:163:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:174:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:177:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:178:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:187:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:187:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/ntfsclone.c:187:3: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  185|      * message back.  Instead we can only cancel the transfer.
#  186|      */
#  187|->   reply (NULL, NULL);
#  188|   
#  189|     while ((r = fread (buf, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
libguestfs-1.58.0/daemon/ntfsclone.c:189:15: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/ntfsclone.c:157:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:168:17: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:163:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:174:7: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:177:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/ntfsclone.c:178:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/ntfsclone.c:187:3: branch_false: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:189:10: branch_true: following ‘true’ branch (when ‘r > 0’)...
libguestfs-1.58.0/daemon/ntfsclone.c:190:9: branch_true: ...to here
libguestfs-1.58.0/daemon/ntfsclone.c:190:9: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/ntfsclone.c:189:15: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  187|     reply (NULL, NULL);
#  188|   
#  189|->   while ((r = fread (buf, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#  190|       if (send_file_write (buf, r) < 0) {
#  191|         pclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
libguestfs-1.58.0/daemon/proto.c:114:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/proto.c:92:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/proto.c:95:5: branch_false: ...to here
libguestfs-1.58.0/daemon/proto.c:105:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/proto.c:108:11: branch_false: ...to here
libguestfs-1.58.0/daemon/proto.c:108:11: acquire_memory: allocated here
libguestfs-1.58.0/daemon/proto.c:109:8: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/daemon/proto.c:114:9: branch_false: ...to here
libguestfs-1.58.0/daemon/proto.c:114:9: throw: if ‘xread’ throws an exception...
libguestfs-1.58.0/daemon/proto.c:114:9: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  112|       }
#  113|   
#  114|->     if (xread (sock, buf, len) == -1)
#  115|         exit (EXIT_FAILURE);
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
libguestfs-1.58.0/daemon/proto.c:247:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/proto.c:305:1: enter_function: entry to ‘reply’
libguestfs-1.58.0/daemon/proto.c:313:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/proto.c:315:3: branch_false: ...to here
libguestfs-1.58.0/daemon/proto.c:326:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/proto.c:329:6: branch_false: ...to here
libguestfs-1.58.0/daemon/proto.c:329:6: branch_true: following ‘true’ branch (when ‘xdrp’ is non-NULL)...
libguestfs-1.58.0/daemon/proto.c:334:10: branch_true: ...to here
libguestfs-1.58.0/daemon/proto.c:334:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/proto.c:335:7: branch_true: ...to here
libguestfs-1.58.0/daemon/proto.c:335:7: call_function: calling ‘reply_with_error_errno’ from ‘reply’
#  245|   {
#  246|     XDR xdr;
#  247|->   CLEANUP_FREE char *buf = NULL;
#  248|     char lenbuf[4];
#  249|     struct guestfs_message_error err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def365]
libguestfs-1.58.0/daemon/proto.c:550:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/proto.c:555:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/proto.c:556:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/proto.c:561:3: branch_false: ...to here
libguestfs-1.58.0/daemon/proto.c:561:3: throw: if ‘xdrmem_create’ throws an exception...
libguestfs-1.58.0/daemon/proto.c:550:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/proto.c:550:22: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  548|   {
#  549|     const size_t buf_len = GUESTFS_MAX_CHUNK_SIZE + 48;
#  550|->   CLEANUP_FREE char *buf = NULL;
#  551|     char lenbuf[4];
#  552|     XDR xdr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
libguestfs-1.58.0/daemon/readdir.c:47:3: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir)’
libguestfs-1.58.0/daemon/readdir.c:46:15: acquire_memory: allocated here
libguestfs-1.58.0/daemon/readdir.c:47:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/readdir.c:47:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/readdir.c:47:3: danger: ‘opendir(dir)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   45|     CHROOT_IN;
#   46|     dirstream = opendir (dir);
#   47|->   CHROOT_OUT;
#   48|   
#   49|     if (dirstream == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
libguestfs-1.58.0/daemon/readdir.c:59:3: warning[-Wanalyzer-malloc-leak]: leak of ‘xdr_buf’
libguestfs-1.58.0/daemon/readdir.c:49:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/readdir.c:54:13: branch_false: ...to here
libguestfs-1.58.0/daemon/readdir.c:54:13: acquire_memory: allocated here
libguestfs-1.58.0/daemon/readdir.c:55:6: branch_false: following ‘false’ branch (when ‘xdr_buf’ is non-NULL)...
libguestfs-1.58.0/daemon/readdir.c:59:3: branch_false: ...to here
libguestfs-1.58.0/daemon/readdir.c:59:3: throw: if ‘xdrmem_create’ throws an exception...
libguestfs-1.58.0/daemon/readdir.c:59:3: danger: ‘xdr_buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#   57|       goto close_dir;
#   58|     }
#   59|->   xdrmem_create (&xdr, xdr_buf, GUESTFS_MAX_CHUNK_SIZE, XDR_ENCODE);
#   60|   
#   61|     /* Calculate the max number of bytes a "guestfs_int_dirent" can be encoded to.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
libguestfs-1.58.0/daemon/selinux.c:81:3: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libguestfs-1.58.0/daemon/selinux.c:75:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/selinux.c:80:7: branch_false: ...to here
libguestfs-1.58.0/daemon/selinux.c:80:7: acquire_memory: allocated here
libguestfs-1.58.0/daemon/selinux.c:81:3: throw: if ‘freecon’ throws an exception...
libguestfs-1.58.0/daemon/selinux.c:81:3: danger: ‘r’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   79|   
#   80|     r = strdup (context);
#   81|->   freecon (context);
#   82|     if (r == NULL) {
#   83|       reply_with_perror ("strdup");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
libguestfs-1.58.0/daemon/sfdisk.c:78:20: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&buf, "w")’
libguestfs-1.58.0/daemon/sfdisk.c:63:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sfdisk.c:67:3: branch_false: ...to here
libguestfs-1.58.0/daemon/sfdisk.c:72:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/sfdisk.c:73:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sfdisk.c:73:6: branch_false: ...to here
libguestfs-1.58.0/daemon/sfdisk.c:78:20: danger: ‘popen(&buf, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   76|     }
#   77|   
#   78|->   for (i = 0; lines[i] != NULL; ++i) {
#   79|       if (fprintf (fp, "%s\n", lines[i]) < 0) {
#   80|         reply_with_perror ("failed to write to pipe: %s", buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
libguestfs-1.58.0/daemon/sleuthkit.c:102:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
libguestfs-1.58.0/daemon/sleuthkit.c:107:12: acquire_memory: allocated here
libguestfs-1.58.0/daemon/sleuthkit.c:108:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sleuthkit.c:113:8: branch_false: ...to here
libguestfs-1.58.0/daemon/sleuthkit.c:113:8: throw: if ‘popen’ throws an exception...
libguestfs-1.58.0/daemon/sleuthkit.c:102:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/sleuthkit.c:102:22: danger: ‘buffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  100|     int ret;
#  101|     FILE *fp;
#  102|->   CLEANUP_FREE char *buffer = NULL;
#  103|   
#  104|     if (verbose)

Error: CPPCHECK_WARNING (CWE-401): [#def371]
libguestfs-1.58.0/daemon/sleuthkit.c:116: error[memleak]: Memory leak: buffer
#  114|     if (fp == NULL) {
#  115|       reply_with_perror ("%s", cmd);
#  116|->     return -1;
#  117|     }
#  118|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
libguestfs-1.58.0/daemon/sleuthkit.c:120:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/sleuthkit.c:108:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sleuthkit.c:113:8: branch_false: ...to here
libguestfs-1.58.0/daemon/sleuthkit.c:113:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/sleuthkit.c:114:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sleuthkit.c:120:3: branch_false: ...to here
libguestfs-1.58.0/daemon/sleuthkit.c:120:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/sleuthkit.c:120:3: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  118|   
#  119|     /* Send reply message before the file content. */
#  120|->   reply (NULL, NULL);
#  121|   
#  122|     while ((ret = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
libguestfs-1.58.0/daemon/sleuthkit.c:122:17: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/sleuthkit.c:108:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sleuthkit.c:113:8: branch_false: ...to here
libguestfs-1.58.0/daemon/sleuthkit.c:113:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/sleuthkit.c:114:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sleuthkit.c:120:3: branch_false: ...to here
libguestfs-1.58.0/daemon/sleuthkit.c:122:10: branch_true: following ‘true’ branch (when ‘ret > 0’)...
libguestfs-1.58.0/daemon/sleuthkit.c:123:11: branch_true: ...to here
libguestfs-1.58.0/daemon/sleuthkit.c:123:11: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/sleuthkit.c:122:17: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  120|     reply (NULL, NULL);
#  121|   
#  122|->   while ((ret = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#  123|       ret = send_file_write (buffer, ret);
#  124|       if (ret < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def374]
libguestfs-1.58.0/daemon/squashfs.c:122:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tmpfile, "r")’
libguestfs-1.58.0/daemon/squashfs.c:54:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:62:13: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:63:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:68:8: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:69:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:73:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:95:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:104:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:107:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:112:8: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:112:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/squashfs.c:113:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:122:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:122:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/squashfs.c:122:3: danger: ‘fopen(tmpfile, "r")’ leaks here; was opened at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  120|      * message back.  Instead we can only cancel the transfer.
#  121|      */
#  122|->   reply (NULL, NULL);
#  123|   
#  124|     while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
libguestfs-1.58.0/daemon/squashfs.c:122:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tmpfile, "r")’
libguestfs-1.58.0/daemon/squashfs.c:54:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:62:13: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:63:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:68:8: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:69:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:73:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:95:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:104:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:107:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:112:8: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:112:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/squashfs.c:113:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:122:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:122:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/squashfs.c:122:3: danger: ‘fopen(tmpfile, "r")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#  120|      * message back.  Instead we can only cancel the transfer.
#  121|      */
#  122|->   reply (NULL, NULL);
#  123|   
#  124|     while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def376]
libguestfs-1.58.0/daemon/squashfs.c:124:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tmpfile, "r")’
libguestfs-1.58.0/daemon/squashfs.c:54:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:62:13: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:63:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:68:8: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:69:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:73:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:95:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:104:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:107:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:112:8: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:112:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/squashfs.c:113:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:122:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:124:10: branch_true: following ‘true’ branch (when ‘r > 0’)...
libguestfs-1.58.0/daemon/squashfs.c:125:9: branch_true: ...to here
libguestfs-1.58.0/daemon/squashfs.c:125:9: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/squashfs.c:124:15: danger: ‘fopen(tmpfile, "r")’ leaks here; was opened at [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
#  122|     reply (NULL, NULL);
#  123|   
#  124|->   while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#  125|       if (send_file_write (buffer, r) < 0) {
#  126|         fclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
libguestfs-1.58.0/daemon/squashfs.c:124:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tmpfile, "r")’
libguestfs-1.58.0/daemon/squashfs.c:54:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:62:13: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:63:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:68:8: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:69:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:73:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:76:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:81:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:95:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:104:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:107:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:112:8: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:112:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/squashfs.c:113:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/squashfs.c:122:3: branch_false: ...to here
libguestfs-1.58.0/daemon/squashfs.c:124:10: branch_true: following ‘true’ branch (when ‘r > 0’)...
libguestfs-1.58.0/daemon/squashfs.c:125:9: branch_true: ...to here
libguestfs-1.58.0/daemon/squashfs.c:125:9: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/squashfs.c:124:15: danger: ‘fopen(tmpfile, "r")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  122|     reply (NULL, NULL);
#  123|   
#  124|->   while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#  125|       if (send_file_write (buffer, r) < 0) {
#  126|         fclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
libguestfs-1.58.0/daemon/stat.c:145:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/stat.c:136:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/stat.c:137:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/stat.c:141:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:144:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stat.c:145:5: branch_true: ...to here
libguestfs-1.58.0/daemon/stat.c:145:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/stat.c:145:5: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  143|       calloc (nr_names, sizeof (guestfs_int_statns));
#  144|     if (ret->guestfs_int_statns_list_val == NULL) {
#  145|->     reply_with_perror ("calloc");
#  146|       free (ret);
#  147|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
libguestfs-1.58.0/daemon/stat.c:150:3: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(guestfs_int_count_strings(names), 176)’
libguestfs-1.58.0/daemon/stat.c:137:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/stat.c:141:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:143:5: acquire_memory: allocated here
libguestfs-1.58.0/daemon/stat.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:150:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:151:13: throw: if ‘open’ throws an exception...
libguestfs-1.58.0/daemon/stat.c:150:3: danger: ‘calloc(guestfs_int_count_strings(names), 176)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  148|     }
#  149|   
#  150|->   CHROOT_IN;
#  151|     path_fd = open (path, O_RDONLY|O_DIRECTORY|O_CLOEXEC);
#  152|     CHROOT_OUT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
libguestfs-1.58.0/daemon/stat.c:150:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/stat.c:136:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/stat.c:137:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/stat.c:141:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:150:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:150:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stat.c:150:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/stat.c:150:3: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  148|     }
#  149|   
#  150|->   CHROOT_IN;
#  151|     path_fd = open (path, O_RDONLY|O_DIRECTORY|O_CLOEXEC);
#  152|     CHROOT_OUT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
libguestfs-1.58.0/daemon/stat.c:151:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/stat.c:136:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/stat.c:137:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/stat.c:141:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:150:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:151:13: throw: if ‘open’ throws an exception...
libguestfs-1.58.0/daemon/stat.c:151:13: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  149|   
#  150|     CHROOT_IN;
#  151|->   path_fd = open (path, O_RDONLY|O_DIRECTORY|O_CLOEXEC);
#  152|     CHROOT_OUT;
#  153|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def382]
libguestfs-1.58.0/daemon/stat.c:152:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 589824)’
libguestfs-1.58.0/daemon/stat.c:137:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/stat.c:141:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:150:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:151:13: acquire_resource: opened here
libguestfs-1.58.0/daemon/stat.c:152:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stat.c:152:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/stat.c:152:3: danger: ‘open(path, 589824)’ leaks here; was opened at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  150|     CHROOT_IN;
#  151|     path_fd = open (path, O_RDONLY|O_DIRECTORY|O_CLOEXEC);
#  152|->   CHROOT_OUT;
#  153|   
#  154|     if (path_fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
libguestfs-1.58.0/daemon/stat.c:152:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/stat.c:136:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/stat.c:137:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/stat.c:141:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:150:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:152:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stat.c:152:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/stat.c:152:3: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  150|     CHROOT_IN;
#  151|     path_fd = open (path, O_RDONLY|O_DIRECTORY|O_CLOEXEC);
#  152|->   CHROOT_OUT;
#  153|   
#  154|     if (path_fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
libguestfs-1.58.0/daemon/stat.c:155:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/stat.c:136:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/stat.c:137:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/stat.c:141:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:150:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:154:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stat.c:155:5: branch_true: ...to here
libguestfs-1.58.0/daemon/stat.c:155:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/stat.c:155:5: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  153|   
#  154|     if (path_fd == -1) {
#  155|->     reply_with_perror ("%s", path);
#  156|       free (ret->guestfs_int_statns_list_val);
#  157|       free (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
libguestfs-1.58.0/daemon/stat.c:172:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/stat.c:136:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/stat.c:137:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/stat.c:141:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:150:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:154:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:154:6: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:161:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stat.c:165:9: branch_true: ...to here
libguestfs-1.58.0/daemon/stat.c:166:8: branch_true: following ‘true’ branch (when ‘r == -1’)...
libguestfs-1.58.0/daemon/stat.c:167:39: branch_true: ...to here
libguestfs-1.58.0/daemon/stat.c:172:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/stat.c:172:7: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  170|     }
#  171|   
#  172|->   if (close (path_fd) == -1) {
#  173|       reply_with_perror ("close: %s", path);
#  174|       free (ret->guestfs_int_statns_list_val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
libguestfs-1.58.0/daemon/stat.c:173:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/stat.c:136:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/stat.c:137:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/stat.c:141:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:150:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:154:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stat.c:154:6: branch_false: ...to here
libguestfs-1.58.0/daemon/stat.c:161:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stat.c:165:9: branch_true: ...to here
libguestfs-1.58.0/daemon/stat.c:166:8: branch_true: following ‘true’ branch (when ‘r == -1’)...
libguestfs-1.58.0/daemon/stat.c:167:39: branch_true: ...to here
libguestfs-1.58.0/daemon/stat.c:172:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stat.c:173:5: branch_true: ...to here
libguestfs-1.58.0/daemon/stat.c:173:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/stat.c:173:5: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  171|   
#  172|     if (close (path_fd) == -1) {
#  173|->     reply_with_perror ("close: %s", path);
#  174|       free (ret->guestfs_int_statns_list_val);
#  175|       free (ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def387]
libguestfs-1.58.0/daemon/strings.c:45:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
libguestfs-1.58.0/daemon/strings.c:37:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/strings.c:38:7: branch_false: ...to here
libguestfs-1.58.0/daemon/strings.c:37:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/strings.c:43:3: branch_false: ...to here
libguestfs-1.58.0/daemon/strings.c:44:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/strings.c:47:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/strings.c:52:3: branch_false: ...to here
libguestfs-1.58.0/daemon/strings.c:45:3: danger: ‘open(path, 524288)’ leaks here; was opened at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   43|     CHROOT_IN;
#   44|     fd = open (path, O_RDONLY|O_CLOEXEC);
#   45|->   CHROOT_OUT;
#   46|   
#   47|     if (fd == -1) {

Error: CPPCHECK_WARNING (CWE-476): [#def388]
libguestfs-1.58.0/daemon/stubs-0.c:1838: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: devices
# 1836|       size_t i;
# 1837|       for (i = 0; i < args.devices.devices_len; ++i)
# 1838|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1839|       devices[i] = NULL;
# 1840|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def389]
libguestfs-1.58.0/daemon/stubs-0.c:1838:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-0.c:1817:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-0.c:1822:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-0.c:1822:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-0.c:1827:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-0.c:1827:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-0.c:1834:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-0.c:1834:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-0.c:1837:17: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stubs-0.c:1838:7: branch_true: ...to here
libguestfs-1.58.0/daemon/stubs-0.c:1838:7: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
# 1836|       size_t i;
# 1837|       for (i = 0; i < args.devices.devices_len; ++i)
# 1838|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1839|       devices[i] = NULL;
# 1840|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def390]
libguestfs-1.58.0/daemon/stubs-0.c:1839:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-0.c:1817:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-0.c:1822:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-0.c:1822:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-0.c:1827:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-0.c:1827:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-0.c:1834:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-0.c:1834:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-0.c:1837:17: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-0.c:1839:12: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-0.c:1839:5: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 1837|       for (i = 0; i < args.devices.devices_len; ++i)
# 1838|         RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1839|->     devices[i] = NULL;
# 1840|     }
# 1841|     allocstart = args.allocstart;

Error: CPPCHECK_WARNING (CWE-476): [#def391]
libguestfs-1.58.0/daemon/stubs-1.c:1785: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: devices
# 1783|       size_t i;
# 1784|       for (i = 0; i < args.devices.devices_len; ++i)
# 1785|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1786|       devices[i] = NULL;
# 1787|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def392]
libguestfs-1.58.0/daemon/stubs-1.c:1785:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-1.c:1763:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-1.c:1768:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-1.c:1768:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-1.c:1773:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-1.c:1773:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-1.c:1777:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-1.c:1781:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-1.c:1784:17: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stubs-1.c:1785:7: branch_true: ...to here
libguestfs-1.58.0/daemon/stubs-1.c:1785:7: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
# 1783|       size_t i;
# 1784|       for (i = 0; i < args.devices.devices_len; ++i)
# 1785|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1786|       devices[i] = NULL;
# 1787|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def393]
libguestfs-1.58.0/daemon/stubs-1.c:1786:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-1.c:1763:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-1.c:1768:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-1.c:1768:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-1.c:1773:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-1.c:1773:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-1.c:1777:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-1.c:1781:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-1.c:1784:17: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-1.c:1786:12: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-1.c:1786:5: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 1784|       for (i = 0; i < args.devices.devices_len; ++i)
# 1785|         RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1786|->     devices[i] = NULL;
# 1787|     }
# 1788|     missingbitmap = args.missingbitmap;

Error: CPPCHECK_WARNING (CWE-476): [#def394]
libguestfs-1.58.0/daemon/stubs-2.c:1561: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: devices
# 1559|       size_t i;
# 1560|       for (i = 0; i < args.devices.devices_len; ++i)
# 1561|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1562|       devices[i] = NULL;
# 1563|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def395]
libguestfs-1.58.0/daemon/stubs-2.c:1561:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-2.c:1540:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-2.c:1545:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-2.c:1545:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-2.c:1550:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-2.c:1550:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-2.c:1557:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-2.c:1557:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-2.c:1560:17: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stubs-2.c:1561:7: branch_true: ...to here
libguestfs-1.58.0/daemon/stubs-2.c:1561:7: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
# 1559|       size_t i;
# 1560|       for (i = 0; i < args.devices.devices_len; ++i)
# 1561|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1562|       devices[i] = NULL;
# 1563|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def396]
libguestfs-1.58.0/daemon/stubs-2.c:1562:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-2.c:1540:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-2.c:1545:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-2.c:1545:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-2.c:1550:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-2.c:1550:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-2.c:1557:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-2.c:1557:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-2.c:1560:17: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-2.c:1562:12: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-2.c:1562:5: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 1560|       for (i = 0; i < args.devices.devices_len; ++i)
# 1561|         RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1562|->     devices[i] = NULL;
# 1563|     }
# 1564|   

Error: CPPCHECK_WARNING (CWE-476): [#def397]
libguestfs-1.58.0/daemon/stubs-3.c:462: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: devices
#  460|       size_t i;
#  461|       for (i = 0; i < args.devices.devices_len; ++i)
#  462|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
#  463|       devices[i] = NULL;
#  464|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def398]
libguestfs-1.58.0/daemon/stubs-3.c:462:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-3.c:441:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:446:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:446:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:451:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:451:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:458:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:458:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-3.c:461:17: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:462:7: branch_true: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:462:7: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  460|       size_t i;
#  461|       for (i = 0; i < args.devices.devices_len; ++i)
#  462|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
#  463|       devices[i] = NULL;
#  464|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def399]
libguestfs-1.58.0/daemon/stubs-3.c:463:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-3.c:441:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:446:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:446:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:451:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:451:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:458:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:458:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-3.c:461:17: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:463:12: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:463:5: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  461|       for (i = 0; i < args.devices.devices_len; ++i)
#  462|         RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
#  463|->     devices[i] = NULL;
#  464|     }
#  465|     fs = args.fs;

Error: CPPCHECK_WARNING (CWE-476): [#def400]
libguestfs-1.58.0/daemon/stubs-3.c:660: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: source
#  658|       size_t i;
#  659|       for (i = 0; i < args.source.source_len; ++i)
#  660|->       RESOLVE_DEVICE (args.source.source_val[i], source[i], false);
#  661|       source[i] = NULL;
#  662|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def401]
libguestfs-1.58.0/daemon/stubs-3.c:660:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘source’
libguestfs-1.58.0/daemon/stubs-3.c:639:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:644:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:644:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:649:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:649:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:656:20: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:656:12: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-3.c:659:17: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:660:7: branch_true: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:660:7: danger: ‘source + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  658|       size_t i;
#  659|       for (i = 0; i < args.source.source_len; ++i)
#  660|->       RESOLVE_DEVICE (args.source.source_val[i], source[i], false);
#  661|       source[i] = NULL;
#  662|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def402]
libguestfs-1.58.0/daemon/stubs-3.c:661:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘source’
libguestfs-1.58.0/daemon/stubs-3.c:639:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:644:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:644:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:649:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:649:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:656:20: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:656:12: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-3.c:659:17: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-3.c:661:11: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-3.c:661:5: danger: ‘source + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  659|       for (i = 0; i < args.source.source_len; ++i)
#  660|         RESOLVE_DEVICE (args.source.source_val[i], source[i], false);
#  661|->     source[i] = NULL;
#  662|     }
#  663|     image = args.image;

Error: CPPCHECK_WARNING (CWE-476): [#def403]
libguestfs-1.58.0/daemon/stubs-5.c:252: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: devices
#  250|       size_t i;
#  251|       for (i = 0; i < args.devices.devices_len; ++i)
#  252|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
#  253|       devices[i] = NULL;
#  254|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def404]
libguestfs-1.58.0/daemon/stubs-5.c:252:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-5.c:231:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:236:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:236:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:241:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:241:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:248:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:248:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-5.c:251:17: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:252:7: branch_true: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:252:7: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  250|       size_t i;
#  251|       for (i = 0; i < args.devices.devices_len; ++i)
#  252|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
#  253|       devices[i] = NULL;
#  254|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def405]
libguestfs-1.58.0/daemon/stubs-5.c:253:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-5.c:231:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:236:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:236:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:241:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:241:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:248:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:248:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-5.c:251:17: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:253:12: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:253:5: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  251|       for (i = 0; i < args.devices.devices_len; ++i)
#  252|         RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
#  253|->     devices[i] = NULL;
#  254|     }
#  255|     fs = args.fs;

Error: CPPCHECK_WARNING (CWE-476): [#def406]
libguestfs-1.58.0/daemon/stubs-5.c:1934: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: devices
# 1932|       size_t i;
# 1933|       for (i = 0; i < args.devices.devices_len; ++i)
# 1934|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1935|       devices[i] = NULL;
# 1936|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def407]
libguestfs-1.58.0/daemon/stubs-5.c:1934:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-5.c:1913:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:1918:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:1918:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:1923:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:1923:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:1930:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:1930:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-5.c:1933:17: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:1934:7: branch_true: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:1934:7: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
# 1932|       size_t i;
# 1933|       for (i = 0; i < args.devices.devices_len; ++i)
# 1934|->       RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1935|       devices[i] = NULL;
# 1936|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def408]
libguestfs-1.58.0/daemon/stubs-5.c:1935:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘devices’
libguestfs-1.58.0/daemon/stubs-5.c:1913:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:1918:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:1918:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:1923:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:1923:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:1930:21: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:1930:13: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-5.c:1933:17: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-5.c:1935:12: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-5.c:1935:5: danger: ‘devices + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
# 1933|       for (i = 0; i < args.devices.devices_len; ++i)
# 1934|         RESOLVE_DEVICE (args.devices.devices_val[i], devices[i], false);
# 1935|->     devices[i] = NULL;
# 1936|     }
# 1937|   

Error: CPPCHECK_WARNING (CWE-476): [#def409]
libguestfs-1.58.0/daemon/stubs-6.c:2749: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: physvols
# 2747|       size_t i;
# 2748|       for (i = 0; i < args.physvols.physvols_len; ++i)
# 2749|->       RESOLVE_DEVICE (args.physvols.physvols_val[i], physvols[i], false);
# 2750|       physvols[i] = NULL;
# 2751|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def410]
libguestfs-1.58.0/daemon/stubs-6.c:2749:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘physvols’
libguestfs-1.58.0/daemon/stubs-6.c:2727:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-6.c:2732:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-6.c:2732:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-6.c:2737:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-6.c:2737:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-6.c:2741:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-6.c:2745:14: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-6.c:2748:17: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/stubs-6.c:2749:7: branch_true: ...to here
libguestfs-1.58.0/daemon/stubs-6.c:2749:7: danger: ‘physvols + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
# 2747|       size_t i;
# 2748|       for (i = 0; i < args.physvols.physvols_len; ++i)
# 2749|->       RESOLVE_DEVICE (args.physvols.physvols_val[i], physvols[i], false);
# 2750|       physvols[i] = NULL;
# 2751|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def411]
libguestfs-1.58.0/daemon/stubs-6.c:2750:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘physvols’
libguestfs-1.58.0/daemon/stubs-6.c:2727:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-6.c:2732:7: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-6.c:2732:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-6.c:2737:8: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-6.c:2737:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-6.c:2741:3: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-6.c:2745:14: acquire_memory: this call could return NULL
libguestfs-1.58.0/daemon/stubs-6.c:2748:17: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/stubs-6.c:2750:13: branch_false: ...to here
libguestfs-1.58.0/daemon/stubs-6.c:2750:5: danger: ‘physvols + i * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 2748|       for (i = 0; i < args.physvols.physvols_len; ++i)
# 2749|         RESOLVE_DEVICE (args.physvols.physvols_val[i], physvols[i], false);
# 2750|->     physvols[i] = NULL;
# 2751|     }
# 2752|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
libguestfs-1.58.0/daemon/sync.c:99:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/sys/block")’
libguestfs-1.58.0/daemon/sync.c:91:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/sync.c:92:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sync.c:92:6: branch_false: ...to here
libguestfs-1.58.0/daemon/sync.c:99:9: throw: if ‘readdir’ throws an exception...
libguestfs-1.58.0/daemon/sync.c:99:9: danger: ‘opendir("/sys/block")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   97|     for (;;) {
#   98|       errno = 0;
#   99|->     d = readdir (dir);
#  100|       if (!d) break;
#  101|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def413]
libguestfs-1.58.0/daemon/sync.c:124:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev_path, 524288)’
libguestfs-1.58.0/daemon/sync.c:92:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sync.c:92:6: branch_false: ...to here
libguestfs-1.58.0/daemon/sync.c:100:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/sync.c:102:9: branch_false: ...to here
libguestfs-1.58.0/daemon/sync.c:117:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/sync.c:127:11: throw: if ‘fsync’ throws an exception...
libguestfs-1.58.0/daemon/sync.c:124:11: danger: ‘open(dev_path, 524288)’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  122|   
#  123|         /* fsync the device. */
#  124|->       if (verbose)
#  125|           fprintf (stderr, "fsync %s\n", dev_path);
#  126|   

Error: CPPCHECK_WARNING (CWE-476): [#def414]
libguestfs-1.58.0/daemon/tar.c:116: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: str
#  114|       if (str == NULL)
#  115|         error (EXIT_FAILURE, errno, "strdup"); /* XXX */
#  116|->     len = strlen (str);
#  117|     }
#  118|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
libguestfs-1.58.0/daemon/tar.c:120:7: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/tar.c:280:1: enter_function: entry to ‘do_txz_in’
libguestfs-1.58.0/daemon/tar.c:283:10: call_function: calling ‘do_tar_in’ from ‘do_txz_in’
#  118|   
#  119|     /* Remove trailing \n character if any. */
#  120|->   if (len > 0 && str[len-1] == '\n')
#  121|       str[--len] = '\0';
#  122|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
libguestfs-1.58.0/daemon/tar.c:238:7: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/tar.c:280:1: enter_function: entry to ‘do_txz_in’
libguestfs-1.58.0/daemon/tar.c:283:10: call_function: calling ‘do_tar_in’ from ‘do_txz_in’
#  236|     fd = fileno (fp);
#  237|   
#  238|->   r = receive_file (write_cb, &fd);
#  239|     if (r == -1) {		/* write error */
#  240|       cancel_receive ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
libguestfs-1.58.0/daemon/tar.c:240:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/tar.c:280:1: enter_function: entry to ‘do_txz_in’
libguestfs-1.58.0/daemon/tar.c:283:10: call_function: calling ‘do_tar_in’ from ‘do_txz_in’
#  238|     r = receive_file (write_cb, &fd);
#  239|     if (r == -1) {		/* write error */
#  240|->     cancel_receive ();
#  241|       CLEANUP_FREE char *errstr = read_error_file (error_file);
#  242|       reply_with_error ("write error on directory: %s: %s", dir, errstr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
libguestfs-1.58.0/daemon/tar.c:241:33: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/tar.c:280:1: enter_function: entry to ‘do_txz_in’
libguestfs-1.58.0/daemon/tar.c:283:10: call_function: calling ‘do_tar_in’ from ‘do_txz_in’
#  239|     if (r == -1) {		/* write error */
#  240|       cancel_receive ();
#  241|->     CLEANUP_FREE char *errstr = read_error_file (error_file);
#  242|       reply_with_error ("write error on directory: %s: %s", dir, errstr);
#  243|       unlink (error_file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
libguestfs-1.58.0/daemon/tar.c:251:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/tar.c:280:1: enter_function: entry to ‘do_txz_in’
libguestfs-1.58.0/daemon/tar.c:283:10: call_function: calling ‘do_tar_in’ from ‘do_txz_in’
#  249|        * cancel.  Nevertheless we must send an error reply here.
#  250|        */
#  251|->     reply_with_error ("file upload cancelled");
#  252|       pclose (fp);
#  253|       unlink (error_file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
libguestfs-1.58.0/daemon/tar.c:252:5: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/tar.c:280:1: enter_function: entry to ‘do_txz_in’
libguestfs-1.58.0/daemon/tar.c:283:10: call_function: calling ‘do_tar_in’ from ‘do_txz_in’
#  250|        */
#  251|       reply_with_error ("file upload cancelled");
#  252|->     pclose (fp);
#  253|       unlink (error_file);
#  254|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
libguestfs-1.58.0/daemon/tar.c:257:7: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
libguestfs-1.58.0/daemon/tar.c:280:1: enter_function: entry to ‘do_txz_in’
libguestfs-1.58.0/daemon/tar.c:283:10: call_function: calling ‘do_tar_in’ from ‘do_txz_in’
#  255|     }
#  256|   
#  257|->   if (pclose (fp) != 0) {
#  258|       CLEANUP_FREE char *errstr = read_error_file (error_file);
#  259|       reply_with_error ("tar subcommand failed on directory: %s: %s",

Error: CPPCHECK_WARNING (CWE-401): [#def422]
libguestfs-1.58.0/daemon/tar.c:325: error[memleak]: Memory leak: buffer
#  323|       else {
#  324|         reply_with_error ("unknown compression type: %s", compress);
#  325|->       return -1;
#  326|       }
#  327|     } else

Error: CPPCHECK_WARNING (CWE-401): [#def423]
libguestfs-1.58.0/daemon/tar.c:336: error[memleak]: Memory leak: buffer
#  334|       exclude_from_file = make_exclude_from_file ("tar-out", excludes);
#  335|       if (!exclude_from_file)
#  336|->       return -1;
#  337|     }
#  338|   

Error: CPPCHECK_WARNING (CWE-401): [#def424]
libguestfs-1.58.0/daemon/tar.c:352: error[memleak]: Memory leak: buffer
#  350|     if (buf == NULL) {
#  351|       reply_with_perror ("malloc");
#  352|->     return -1;
#  353|     }
#  354|   

Error: CPPCHECK_WARNING (CWE-401): [#def425]
libguestfs-1.58.0/daemon/tar.c:357: error[memleak]: Memory leak: buffer
#  355|     if (stat (buf, &statbuf) == -1) {
#  356|       reply_with_perror ("stat: %s", dir);
#  357|->     return -1;
#  358|     }
#  359|   

Error: CPPCHECK_WARNING (CWE-401): [#def426]
libguestfs-1.58.0/daemon/tar.c:362: error[memleak]: Memory leak: buffer
#  360|     if (! S_ISDIR (statbuf.st_mode)) {
#  361|       reply_with_error ("%s: not a directory", dir);
#  362|->     return -1;
#  363|     }
#  364|   

Error: CPPCHECK_WARNING (CWE-401): [#def427]
libguestfs-1.58.0/daemon/tar.c:370: error[memleak]: Memory leak: buffer
#  368|     cmd_error:
#  369|       reply_with_perror ("open_memstream");
#  370|->     return -1;
#  371|     }
#  372|     fprintf (fp, "tar -C ");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def428]
libguestfs-1.58.0/daemon/tar.c:398:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/tar.c:303:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:308:7: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:333:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:339:8: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:350:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:355:7: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:355:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:360:9: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:366:8: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:367:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/tar.c:372:3: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:374:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:382:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:385:7: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:388:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/tar.c:389:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:398:3: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:398:3: throw: if ‘reply’ throws an exception...
libguestfs-1.58.0/daemon/tar.c:398:3: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(17)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/16)
#  396|      * message back.  Instead we can only cancel the transfer.
#  397|      */
#  398|->   reply (NULL, NULL);
#  399|   
#  400|     while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def429]
libguestfs-1.58.0/daemon/tar.c:400:15: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "r")’
libguestfs-1.58.0/daemon/tar.c:303:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:308:7: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:333:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:339:8: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:350:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:355:7: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:355:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:360:9: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:366:8: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:367:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libguestfs-1.58.0/daemon/tar.c:372:3: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:374:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:382:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:385:7: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:388:8: acquire_memory: allocated here
libguestfs-1.58.0/daemon/tar.c:389:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/tar.c:398:3: branch_false: ...to here
libguestfs-1.58.0/daemon/tar.c:400:10: branch_true: following ‘true’ branch (when ‘r > 0’)...
libguestfs-1.58.0/daemon/tar.c:401:9: branch_true: ...to here
libguestfs-1.58.0/daemon/tar.c:401:9: throw: if ‘send_file_write’ throws an exception...
libguestfs-1.58.0/daemon/tar.c:400:15: danger: ‘popen(cmd, "r")’ leaks here; was allocated at [(17)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/16)
#  398|     reply (NULL, NULL);
#  399|   
#  400|->   while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
#  401|       if (send_file_write (buffer, r) < 0) {
#  402|         pclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def430]
libguestfs-1.58.0/daemon/truncate.c:39:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524545)’
libguestfs-1.58.0/daemon/truncate.c:38:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/truncate.c:39:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/truncate.c:39:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/truncate.c:39:3: danger: ‘open(path, 524545)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   37|     CHROOT_IN;
#   38|     fd = open (path, O_WRONLY|O_NOCTTY|O_CLOEXEC);
#   39|->   CHROOT_OUT;
#   40|   
#   41|     if (fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
libguestfs-1.58.0/daemon/upload.c:166:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/upload.c:168:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/upload.c:169:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/upload.c:174:12: branch_false: ...to here
libguestfs-1.58.0/daemon/upload.c:174:12: throw: if ‘is_device_parameter’ throws an exception...
libguestfs-1.58.0/daemon/upload.c:166:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/upload.c:166:22: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  164|   {
#  165|     int fd, r, is_dev;
#  166|->   CLEANUP_FREE char *buf = NULL;
#  167|   
#  168|     buf = malloc (GUESTFS_MAX_CHUNK_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def432]
libguestfs-1.58.0/daemon/upload.c:178:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 524288)’
libguestfs-1.58.0/daemon/upload.c:169:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/upload.c:174:12: branch_false: ...to here
libguestfs-1.58.0/daemon/upload.c:177:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/upload.c:178:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/upload.c:178:16: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/upload.c:178:16: danger: ‘open(filename, 524288)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  176|     if (!is_dev) CHROOT_IN;
#  177|     fd = open (filename, O_RDONLY|O_CLOEXEC);
#  178|->   if (!is_dev) CHROOT_OUT;
#  179|     if (fd == -1) {
#  180|       reply_with_perror ("%s", filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def433]
libguestfs-1.58.0/daemon/upload.c:249:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/upload.c:251:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/upload.c:252:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/upload.c:257:6: branch_false: ...to here
libguestfs-1.58.0/daemon/upload.c:257:6: branch_true: following ‘true’ branch (when ‘offset < 0’)...
libguestfs-1.58.0/daemon/upload.c:258:5: branch_true: ...to here
libguestfs-1.58.0/daemon/upload.c:258:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/upload.c:249:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/upload.c:249:22: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  247|   {
#  248|     int fd, r, is_dev;
#  249|->   CLEANUP_FREE char *buf = NULL;
#  250|   
#  251|     buf = malloc (GUESTFS_MAX_CHUNK_SIZE);

Error: CPPCHECK_WARNING (CWE-401): [#def434]
libguestfs-1.58.0/daemon/upload.c:259: error[memleak]: Memory leak: buf
#  257|     if (offset < 0) {
#  258|       reply_with_perror ("%s: offset in file is negative", filename);
#  259|->     return -1;
#  260|     }
#  261|   

Error: CPPCHECK_WARNING (CWE-401): [#def435]
libguestfs-1.58.0/daemon/upload.c:264: error[memleak]: Memory leak: buf
#  262|     if (size < 0) {
#  263|       reply_with_perror ("%s: size is negative", filename);
#  264|->     return -1;
#  265|     }
#  266|     uint64_t usize = (uint64_t) size;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def436]
libguestfs-1.58.0/daemon/upload.c:272:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 524288)’
libguestfs-1.58.0/daemon/upload.c:252:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/upload.c:257:6: branch_false: ...to here
libguestfs-1.58.0/daemon/upload.c:257:6: branch_false: following ‘false’ branch (when ‘offset >= 0’)...
libguestfs-1.58.0/daemon/upload.c:262:6: branch_false: ...to here
libguestfs-1.58.0/daemon/upload.c:262:6: branch_false: following ‘false’ branch (when ‘size >= 0’)...
libguestfs-1.58.0/daemon/upload.c:266:12: branch_false: ...to here
libguestfs-1.58.0/daemon/upload.c:271:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/upload.c:272:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/upload.c:272:16: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/upload.c:272:16: danger: ‘open(filename, 524288)’ leaks here; was opened at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  270|     if (!is_dev) CHROOT_IN;
#  271|     fd = open (filename, O_RDONLY|O_CLOEXEC);
#  272|->   if (!is_dev) CHROOT_OUT;
#  273|     if (fd == -1) {
#  274|       reply_with_perror ("%s", filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
libguestfs-1.58.0/daemon/utils.c:273:7: warning[-Wanalyzer-malloc-leak]: leak of ‘new_str’
libguestfs-1.58.0/daemon/utils.c:287:1: enter_function: entry to ‘add_string’
libguestfs-1.58.0/daemon/utils.c:291:6: branch_true: following ‘true’ branch (when ‘str’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:292:15: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:292:15: acquire_memory: allocated here
libguestfs-1.58.0/daemon/utils.c:293:8: branch_false: following ‘false’ branch (when ‘new_str’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:299:10: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:299:10: call_function: calling ‘add_string_nodup’ from ‘add_string’
#  271|       new_argv = realloc (sb->argv, sb->alloc * sizeof (char *));
#  272|       if (new_argv == NULL) {
#  273|->       reply_with_perror ("realloc");
#  274|         free (str);
#  275|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-415): [#def438]
libguestfs-1.58.0/daemon/utils.c:274:7: warning[-Wanalyzer-double-free]: double-‘free’ of ‘str’
libguestfs-1.58.0/daemon/utils.c:494:1: enter_function: entry to ‘filter_list’
libguestfs-1.58.0/daemon/utils.c:499:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utils.c:500:9: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:500:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utils.c:501:11: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:501:11: call_function: calling ‘add_string_nodup’ from ‘filter_list’
libguestfs-1.58.0/daemon/utils.c:501:11: return_function: returning to ‘filter_list’ from ‘add_string_nodup’
libguestfs-1.58.0/daemon/utils.c:501:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:499:32: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:501:11: call_function: calling ‘add_string_nodup’ from ‘filter_list’
libguestfs-1.58.0/daemon/utils.c:501:11: return_function: returning to ‘filter_list’ from ‘add_string_nodup’
libguestfs-1.58.0/daemon/utils.c:501:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:499:32: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:507:7: call_function: inlined call to ‘end_stringsbuf’ from ‘filter_list’
#  272|       if (new_argv == NULL) {
#  273|         reply_with_perror ("realloc");
#  274|->       free (str);
#  275|         return -1;
#  276|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
libguestfs-1.58.0/daemon/utils.c:294:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/utils.c:426:1: enter_function: entry to ‘split_lines_sb’
libguestfs-1.58.0/daemon/utils.c:432:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:432:6: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:441:10: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:443:9: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:443:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:446:12: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:447:8: branch_true: following ‘true’ branch (when ‘pend’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:448:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:452:9: call_function: calling ‘add_string’ from ‘split_lines_sb’
libguestfs-1.58.0/daemon/utils.c:452:9: return_function: returning to ‘split_lines_sb’ from ‘add_string’
libguestfs-1.58.0/daemon/utils.c:452:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:452:8: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:441:10: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:443:9: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:443:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:446:12: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:447:8: branch_true: following ‘true’ branch (when ‘pend’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:448:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:452:9: call_function: calling ‘add_string’ from ‘split_lines_sb’
#  292|       new_str = strdup (str);
#  293|       if (new_str == NULL) {
#  294|->       reply_with_perror ("strdup");
#  295|         return -1;
#  296|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
libguestfs-1.58.0/daemon/utils.c:294:7: warning[-Wanalyzer-malloc-leak]: leak of ‘lines.argv’
libguestfs-1.58.0/daemon/utils.c:426:1: enter_function: entry to ‘split_lines_sb’
libguestfs-1.58.0/daemon/utils.c:432:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:432:6: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:441:10: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:443:9: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:443:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:446:12: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:447:8: branch_true: following ‘true’ branch (when ‘pend’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:448:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:452:9: call_function: calling ‘add_string’ from ‘split_lines_sb’
libguestfs-1.58.0/daemon/utils.c:452:9: return_function: returning to ‘split_lines_sb’ from ‘add_string’
libguestfs-1.58.0/daemon/utils.c:452:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:452:8: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:441:10: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:443:9: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:443:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:446:12: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:447:8: branch_true: following ‘true’ branch (when ‘pend’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:448:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:452:9: call_function: calling ‘add_string’ from ‘split_lines_sb’
#  292|       new_str = strdup (str);
#  293|       if (new_str == NULL) {
#  294|->       reply_with_perror ("strdup");
#  295|         return -1;
#  296|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def441]
libguestfs-1.58.0/daemon/utils.c:500:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.argv’
libguestfs-1.58.0/daemon/utils.c:494:1: enter_function: entry to ‘filter_list’
libguestfs-1.58.0/daemon/utils.c:499:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utils.c:500:9: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:500:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utils.c:501:11: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:501:11: call_function: calling ‘add_string_nodup’ from ‘filter_list’
libguestfs-1.58.0/daemon/utils.c:501:11: return_function: returning to ‘filter_list’ from ‘add_string_nodup’
libguestfs-1.58.0/daemon/utils.c:501:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:499:32: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:499:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utils.c:500:9: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:500:9: throw: if the called function throws an exception...
libguestfs-1.58.0/daemon/utils.c:500:9: danger: ‘ret.argv’ leaks here; was allocated at [(10)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/9)
#  498|   
#  499|     for (i = 0; strs[i] != NULL; ++i) {
#  500|->     if (p (strs[i])) {
#  501|         if (add_string_nodup (&ret, strs[i]) == -1) {
#  502|           free (ret.argv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
libguestfs-1.58.0/daemon/utils.c:556:22: warning[-Wanalyzer-malloc-leak]: leak of ‘desc’
libguestfs-1.58.0/daemon/utils.c:564:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:567:10: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:567:10: acquire_memory: allocated here
libguestfs-1.58.0/daemon/utils.c:568:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:573:3: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:574:10: branch_true: following ‘true’ branch (when ‘slash’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:575:5: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:579:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:584:9: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:584:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utils.c:585:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:556:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/utils.c:556:22: danger: ‘desc’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  554|   parse_btrfsvol (const char *desc_orig, mountable_t *mountable)
#  555|   {
#  556|->   CLEANUP_FREE char *desc = NULL;
#  557|     CLEANUP_FREE char *device = NULL;
#  558|     const char *volume = NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def443]
libguestfs-1.58.0/daemon/utils.c:701:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 524288)’
libguestfs-1.58.0/daemon/utils.c:696:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/utils.c:697:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:700:7: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:701:6: danger: ‘open("/dev/urandom", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  699|   
#  700|     p = strrchr (template, '/');
#  701|->   if (p == NULL)
#  702|       abort ();                   /* internal error - bad template */
#  703|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def444]
libguestfs-1.58.0/daemon/utils.c:704:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 524288)’
libguestfs-1.58.0/daemon/utils.c:696:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/utils.c:697:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:700:7: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:701:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:701:6: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:704:10: danger: ‘open("/dev/urandom", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  702|       abort ();                   /* internal error - bad template */
#  703|   
#  704|->   while (*p) {
#  705|       if (*p == 'X') {
#  706|         if (read (fd, &c, 1) != 1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def445]
libguestfs-1.58.0/daemon/utils.c:872:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 524288)’
libguestfs-1.58.0/daemon/utils.c:862:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:871:8: branch_true: following ‘true’ branch (when ‘r2’ is NULL)...
libguestfs-1.58.0/daemon/utils.c:872:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:872:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/utils.c:872:7: danger: ‘open(filename, 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  870|       char *r2 = realloc (r, alloc);
#  871|       if (r2 == NULL) {
#  872|->       perror ("realloc");
#  873|         free (r);
#  874|         close (fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
libguestfs-1.58.0/daemon/utils.c:872:7: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:871:8: branch_false: following ‘false’ branch (when ‘r2’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:882:37: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:883:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:889:8: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:889:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:891:10: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:871:8: branch_true: following ‘true’ branch (when ‘r2’ is NULL)...
libguestfs-1.58.0/daemon/utils.c:872:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:872:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/utils.c:872:7: danger: ‘r’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  870|       char *r2 = realloc (r, alloc);
#  871|       if (r2 == NULL) {
#  872|->       perror ("realloc");
#  873|         free (r);
#  874|         close (fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def447]
libguestfs-1.58.0/daemon/utils.c:874:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 524288)’
libguestfs-1.58.0/daemon/utils.c:862:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:871:8: branch_true: following ‘true’ branch (when ‘r2’ is NULL)...
libguestfs-1.58.0/daemon/utils.c:872:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:874:7: danger: ‘open(filename, 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  872|         perror ("realloc");
#  873|         free (r);
#  874|->       close (fd);
#  875|         return NULL;
#  876|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def448]
libguestfs-1.58.0/daemon/utils.c:882:37: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 524288)’
libguestfs-1.58.0/daemon/utils.c:862:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:871:8: branch_false: following ‘false’ branch (when ‘r2’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:882:37: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:883:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:889:8: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:889:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utils.c:894:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:882:37: danger: ‘open(filename, 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  880|        * to add \0 to the end of the input.
#  881|        */
#  882|->     ssize_t n = read (fd, r + size, alloc - size - 1);
#  883|       if (n == -1) {
#  884|         fprintf (stderr, "read: %s: %m\n", filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def449]
libguestfs-1.58.0/daemon/utils.c:894:7: warning[-Wanalyzer-malloc-leak]: leak of ‘r2’
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:871:8: branch_false: following ‘false’ branch (when ‘r2’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:882:37: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:883:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:889:8: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:889:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utils.c:894:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:894:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/utils.c:894:7: danger: ‘r2’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  892|     }
#  893|   
#  894|->   if (close (fd) == -1) {
#  895|       fprintf (stderr, "close: %s: %m\n", filename);
#  896|       free (r);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
libguestfs-1.58.0/daemon/utils.c:894:7: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:863:6: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:871:8: branch_false: following ‘false’ branch (when ‘r2’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:882:37: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:883:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:889:8: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:889:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:891:10: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:871:8: branch_false: following ‘false’ branch (when ‘r2’ is non-NULL)...
libguestfs-1.58.0/daemon/utils.c:882:37: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:883:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utils.c:889:8: branch_false: ...to here
libguestfs-1.58.0/daemon/utils.c:889:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utils.c:894:7: branch_true: ...to here
libguestfs-1.58.0/daemon/utils.c:894:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/daemon/utils.c:894:7: danger: ‘r’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  892|     }
#  893|   
#  894|->   if (close (fd) == -1) {
#  895|       fprintf (stderr, "close: %s: %m\n", filename);
#  896|       free (r);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def451]
libguestfs-1.58.0/daemon/utsname.c:53:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/utsname.c:36:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utsname.c:41:9: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:41:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/utsname.c:42:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/utsname.c:47:22: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:51:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utsname.c:53:5: branch_true: ...to here
libguestfs-1.58.0/daemon/utsname.c:53:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/utsname.c:53:5: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#   51|     if (!ret->uts_sysname || !ret->uts_release ||
#   52|         !ret->uts_version || !ret->uts_machine) {
#   53|->     reply_with_perror ("strdup");
#   54|       free (ret->uts_sysname);
#   55|       free (ret->uts_release);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
libguestfs-1.58.0/daemon/utsname.c:53:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&uts.machine)’
libguestfs-1.58.0/daemon/utsname.c:36:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utsname.c:41:9: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:42:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/utsname.c:47:22: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:50:22: acquire_memory: allocated here
libguestfs-1.58.0/daemon/utsname.c:51:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utsname.c:53:5: branch_true: ...to here
libguestfs-1.58.0/daemon/utsname.c:53:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/utsname.c:53:5: danger: ‘strdup(&uts.machine)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   51|     if (!ret->uts_sysname || !ret->uts_release ||
#   52|         !ret->uts_version || !ret->uts_machine) {
#   53|->     reply_with_perror ("strdup");
#   54|       free (ret->uts_sysname);
#   55|       free (ret->uts_release);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
libguestfs-1.58.0/daemon/utsname.c:53:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&uts.release)’
libguestfs-1.58.0/daemon/utsname.c:36:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utsname.c:41:9: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:42:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/utsname.c:47:22: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:48:22: acquire_memory: allocated here
libguestfs-1.58.0/daemon/utsname.c:51:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utsname.c:53:5: branch_true: ...to here
libguestfs-1.58.0/daemon/utsname.c:53:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/utsname.c:53:5: danger: ‘strdup(&uts.release)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   51|     if (!ret->uts_sysname || !ret->uts_release ||
#   52|         !ret->uts_version || !ret->uts_machine) {
#   53|->     reply_with_perror ("strdup");
#   54|       free (ret->uts_sysname);
#   55|       free (ret->uts_release);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
libguestfs-1.58.0/daemon/utsname.c:53:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&uts.sysname)’
libguestfs-1.58.0/daemon/utsname.c:36:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utsname.c:41:9: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:42:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/utsname.c:47:22: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:47:22: acquire_memory: allocated here
libguestfs-1.58.0/daemon/utsname.c:51:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utsname.c:51:7: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:51:7: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utsname.c:53:5: branch_true: ...to here
libguestfs-1.58.0/daemon/utsname.c:53:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/utsname.c:53:5: danger: ‘strdup(&uts.sysname)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#   51|     if (!ret->uts_sysname || !ret->uts_release ||
#   52|         !ret->uts_version || !ret->uts_machine) {
#   53|->     reply_with_perror ("strdup");
#   54|       free (ret->uts_sysname);
#   55|       free (ret->uts_release);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
libguestfs-1.58.0/daemon/utsname.c:53:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&uts.version)’
libguestfs-1.58.0/daemon/utsname.c:36:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/utsname.c:41:9: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:42:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/utsname.c:47:22: branch_false: ...to here
libguestfs-1.58.0/daemon/utsname.c:49:22: acquire_memory: allocated here
libguestfs-1.58.0/daemon/utsname.c:51:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/utsname.c:53:5: branch_true: ...to here
libguestfs-1.58.0/daemon/utsname.c:53:5: throw: if ‘reply_with_perror_errno’ throws an exception...
libguestfs-1.58.0/daemon/utsname.c:53:5: danger: ‘strdup(&uts.version)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   51|     if (!ret->uts_sysname || !ret->uts_release ||
#   52|         !ret->uts_version || !ret->uts_machine) {
#   53|->     reply_with_perror ("strdup");
#   54|       free (ret->uts_sysname);
#   55|       free (ret->uts_release);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def456]
libguestfs-1.58.0/daemon/wc.c:39:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
libguestfs-1.58.0/daemon/wc.c:81:1: enter_function: entry to ‘do_wc_c’
libguestfs-1.58.0/daemon/wc.c:83:10: call_function: calling ‘wc’ from ‘do_wc_c’
#   37|     CHROOT_IN;
#   38|     fd = open (path, O_RDONLY|O_CLOEXEC);
#   39|->   CHROOT_OUT;
#   40|   
#   41|     if (fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
libguestfs-1.58.0/daemon/xattr.c:317:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/xattr.c:306:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:311:9: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:311:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/xattr.c:312:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:317:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:317:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:317:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/xattr.c:317:3: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  315|     }
#  316|   
#  317|->   CHROOT_IN;
#  318|     len = listxattr (path, buf, len);
#  319|     CHROOT_OUT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
libguestfs-1.58.0/daemon/xattr.c:318:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/xattr.c:306:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:311:9: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:311:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/xattr.c:312:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:317:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:318:9: throw: if the called function throws an exception...
libguestfs-1.58.0/daemon/xattr.c:318:9: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  316|   
#  317|     CHROOT_IN;
#  318|->   len = listxattr (path, buf, len);
#  319|     CHROOT_OUT;
#  320|     if (len == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
libguestfs-1.58.0/daemon/xattr.c:353:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xattr.c:343:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:348:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:351:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:353:24: branch_true: ...to here
libguestfs-1.58.0/daemon/xattr.c:368:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:375:24: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:377:8: branch_false: following ‘false’ branch (when ‘newptr’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:381:5: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:390:23: acquire_memory: allocated here
libguestfs-1.58.0/daemon/xattr.c:391:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:396:5: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:398:5: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:399:8: branch_true: following ‘true’ branch (when ‘len == -1’)...
libguestfs-1.58.0/daemon/xattr.c:399:8: branch_true: ...to here
libguestfs-1.58.0/daemon/xattr.c:353:24: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/xattr.c:353:24: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/9)
#  351|     for (k = 0; names[k] != NULL; ++k) {
#  352|       void *newptr;
#  353|->     CLEANUP_FREE char *pathname = NULL;
#  354|       CLEANUP_FREE char *buf = NULL;
#  355|       CLEANUP_FREE /* not string list */ char **attrnames_unfiltered = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
libguestfs-1.58.0/daemon/xattr.c:353:24: warning[-Wanalyzer-malloc-leak]: leak of ‘newptr’
libguestfs-1.58.0/daemon/xattr.c:343:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:348:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:351:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:353:24: branch_true: ...to here
libguestfs-1.58.0/daemon/xattr.c:368:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:375:24: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:377:8: branch_false: following ‘false’ branch (when ‘newptr’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:381:5: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:391:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:392:7: branch_true: ...to here
libguestfs-1.58.0/daemon/xattr.c:353:24: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/xattr.c:353:24: danger: ‘newptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  351|     for (k = 0; names[k] != NULL; ++k) {
#  352|       void *newptr;
#  353|->     CLEANUP_FREE char *pathname = NULL;
#  354|       CLEANUP_FREE char *buf = NULL;
#  355|       CLEANUP_FREE /* not string list */ char **attrnames_unfiltered = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def461]
libguestfs-1.58.0/daemon/xattr.c:353:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/xattr.c:342:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/xattr.c:343:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:348:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:351:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:353:24: branch_true: ...to here
libguestfs-1.58.0/daemon/xattr.c:353:24: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/xattr.c:353:24: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  351|     for (k = 0; names[k] != NULL; ++k) {
#  352|       void *newptr;
#  353|->     CLEANUP_FREE char *pathname = NULL;
#  354|       CLEANUP_FREE char *buf = NULL;
#  355|       CLEANUP_FREE /* not string list */ char **attrnames_unfiltered = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
libguestfs-1.58.0/daemon/xattr.c:374:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xattr.c:343:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:348:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:351:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:353:24: branch_true: ...to here
libguestfs-1.58.0/daemon/xattr.c:368:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:375:24: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:377:8: branch_false: following ‘false’ branch (when ‘newptr’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:381:5: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:390:23: acquire_memory: allocated here
libguestfs-1.58.0/daemon/xattr.c:391:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:396:5: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:398:5: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:399:8: branch_true: following ‘true’ branch (when ‘len == -1’)...
libguestfs-1.58.0/daemon/xattr.c:399:8: branch_true: ...to here
libguestfs-1.58.0/daemon/xattr.c:351:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:353:24: branch_true: ...to here
libguestfs-1.58.0/daemon/xattr.c:368:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:375:24: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:374:14: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/9)
#  372|   
#  373|       /* Reserve space for the special attribute. */
#  374|->     newptr = realloc (ret->guestfs_int_xattr_list_val,
#  375|                         (ret->guestfs_int_xattr_list_len+1) *
#  376|                         sizeof (guestfs_int_xattr));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
libguestfs-1.58.0/daemon/xattr.c:423:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xattr.c:335:1: enter_function: entry to ‘do_internal_lxattrlist’
libguestfs-1.58.0/daemon/xattr.c:343:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:348:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:351:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:353:24: branch_true: ...to here
libguestfs-1.58.0/daemon/xattr.c:368:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:375:24: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:377:8: branch_false: following ‘false’ branch (when ‘newptr’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:381:5: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:390:23: acquire_memory: allocated here
libguestfs-1.58.0/daemon/xattr.c:391:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:396:5: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:399:8: branch_false: following ‘false’ branch (when ‘len != -1’)...
libguestfs-1.58.0/daemon/xattr.c:402:11: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:403:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:408:5: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:411:8: branch_false: following ‘false’ branch (when ‘len != -1’)...
libguestfs-1.58.0/daemon/xattr.c:414:28: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:414:28: call_function: calling ‘split_attr_names’ from ‘do_internal_lxattrlist’
libguestfs-1.58.0/daemon/xattr.c:414:28: return_function: returning to ‘do_internal_lxattrlist’ from ‘split_attr_names’
libguestfs-1.58.0/daemon/xattr.c:415:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:417:17: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:418:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:420:16: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:423:7: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/10)
#  421|   
#  422|       newptr =
#  423|->       realloc (ret->guestfs_int_xattr_list_val,
#  424|                  (ret->guestfs_int_xattr_list_len+nr_attrs) *
#  425|                  sizeof (guestfs_int_xattr));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
libguestfs-1.58.0/daemon/xattr.c:544:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/xattr.c:526:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:531:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:533:6: branch_false: following ‘false’ branch (when ‘len <= 65536’)...
libguestfs-1.58.0/daemon/xattr.c:538:9: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:538:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/xattr.c:539:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:544:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:544:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xattr.c:544:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/xattr.c:544:3: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  542|     }
#  543|   
#  544|->   CHROOT_IN;
#  545|     r = getxattr (path, name, buf, len);
#  546|     CHROOT_OUT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
libguestfs-1.58.0/daemon/xattr.c:545:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/xattr.c:526:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xattr.c:531:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:533:6: branch_false: following ‘false’ branch (when ‘len <= 65536’)...
libguestfs-1.58.0/daemon/xattr.c:538:9: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:538:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/xattr.c:539:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/daemon/xattr.c:544:3: branch_false: ...to here
libguestfs-1.58.0/daemon/xattr.c:545:7: throw: if the called function throws an exception...
libguestfs-1.58.0/daemon/xattr.c:545:7: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
#  543|   
#  544|     CHROOT_IN;
#  545|->   r = getxattr (path, name, buf, len);
#  546|     CHROOT_OUT;
#  547|     if (r == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
libguestfs-1.58.0/daemon/xfs.c:108:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
#  106|   {
#  107|     guestfs_int_xfsinfo *ret;
#  108|->   CLEANUP_FREE char *section = NULL; /* first column, eg "meta-data", "data" */
#  109|     char *p;
#  110|     size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
libguestfs-1.58.0/daemon/xfs.c:108:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
#  106|   {
#  107|     guestfs_int_xfsinfo *ret;
#  108|->   CLEANUP_FREE char *section = NULL; /* first column, eg "meta-data", "data" */
#  109|     char *p;
#  110|     size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
libguestfs-1.58.0/daemon/xfs.c:108:22: warning[-Wanalyzer-malloc-leak]: leak of ‘section’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
#  106|   {
#  107|     guestfs_int_xfsinfo *ret;
#  108|->   CLEANUP_FREE char *section = NULL; /* first column, eg "meta-data", "data" */
#  109|     char *p;
#  110|     size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
libguestfs-1.58.0/daemon/xfs.c:161:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
#  159|   
#  160|       if ((p = strstr (lines[i], "meta-data="))) {
#  161|->       ret->xfs_mntpoint = split_strdup (p + 10);
#  162|         if (ret->xfs_mntpoint == NULL) goto error;
#  163|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def470]
libguestfs-1.58.0/daemon/xfs.c:307:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
#  305|     }
#  306|     if (ret->xfs_rtname == NULL) {
#  307|->     ret->xfs_rtname = strdup ("");
#  308|       if (ret->xfs_rtname == NULL) goto error;
#  309|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def471]
libguestfs-1.58.0/daemon/xfs.c:325:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
#  323|   {
#  324|     int r;
#  325|->   CLEANUP_FREE char *buf = NULL;
#  326|     CLEANUP_FREE char *out = NULL, *err = NULL;
#  327|     CLEANUP_FREE_STRING_LIST char **lines = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def472]
libguestfs-1.58.0/daemon/xfs.c:326:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
#  324|     int r;
#  325|     CLEANUP_FREE char *buf = NULL;
#  326|->   CLEANUP_FREE char *out = NULL, *err = NULL;
#  327|     CLEANUP_FREE_STRING_LIST char **lines = NULL;
#  328|     int is_dev;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def473]
libguestfs-1.58.0/daemon/xfs.c:326:35: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
#  324|     int r;
#  325|     CLEANUP_FREE char *buf = NULL;
#  326|->   CLEANUP_FREE char *out = NULL, *err = NULL;
#  327|     CLEANUP_FREE_STRING_LIST char **lines = NULL;
#  328|     int is_dev;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def474]
libguestfs-1.58.0/daemon/xfs.c:661:52: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: return_function: returning to ‘xfs_minimum_size’ from ‘do_xfs_info’
libguestfs-1.58.0/daemon/xfs.c:663:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xfs.c:667:19: branch_false: ...to here
libguestfs-1.58.0/daemon/xfs.c:667:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xfs.c:668:5: branch_true: ...to here
libguestfs-1.58.0/daemon/xfs.c:668:5: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/xfs.c:661:52: throw: if ‘cleanup_free_int_xfsinfo’ throws an exception...
libguestfs-1.58.0/daemon/xfs.c:661:52: danger: ‘<unknown>’ leaks here; was allocated at [(16)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/15)
#  659|   xfs_minimum_size (const char *path)
#  660|   {
#  661|->   CLEANUP_FREE_XFSINFO struct guestfs_int_xfsinfo *info = do_xfs_info (path);
#  662|   
#  663|     if (info == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def475]
libguestfs-1.58.0/daemon/xfs.c:661:52: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
libguestfs-1.58.0/daemon/xfs.c:659:1: enter_function: entry to ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: call_function: calling ‘do_xfs_info’ from ‘xfs_minimum_size’
libguestfs-1.58.0/daemon/xfs.c:661:59: return_function: returning to ‘xfs_minimum_size’ from ‘do_xfs_info’
libguestfs-1.58.0/daemon/xfs.c:663:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/xfs.c:667:19: branch_false: ...to here
libguestfs-1.58.0/daemon/xfs.c:667:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/xfs.c:668:5: branch_true: ...to here
libguestfs-1.58.0/daemon/xfs.c:668:5: throw: if ‘reply_with_error_errno’ throws an exception...
libguestfs-1.58.0/daemon/xfs.c:661:52: throw: if ‘cleanup_free_int_xfsinfo’ throws an exception...
libguestfs-1.58.0/daemon/xfs.c:661:52: danger: ‘info’ leaks here; was allocated at [(12)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/11)
#  659|   xfs_minimum_size (const char *path)
#  660|   {
#  661|->   CLEANUP_FREE_XFSINFO struct guestfs_int_xfsinfo *info = do_xfs_info (path);
#  662|   
#  663|     if (info == NULL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def476]
libguestfs-1.58.0/daemon/zero.c:54:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 524290)’
libguestfs-1.58.0/daemon/zero.c:44:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/zero.c:45:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:45:6: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:50:15: branch_true: following ‘true’ branch (when ‘i != 32’)...
libguestfs-1.58.0/daemon/zero.c:51:5: branch_true: ...to here
libguestfs-1.58.0/daemon/zero.c:54:9: throw: if ‘pread’ throws an exception...
libguestfs-1.58.0/daemon/zero.c:54:9: danger: ‘open(device, 524290)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   52|   
#   53|       /* Check if the block is already zero before overwriting it. */
#   54|->     if (pread (fd, buf, sizeof buf, offset) != sizeof buf) {
#   55|         reply_with_perror ("pread: %s", device);
#   56|         close (fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def477]
libguestfs-1.58.0/daemon/zero.c:156:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 524290)’
libguestfs-1.58.0/daemon/zero.c:139:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:141:12: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:143:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/zero.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:144:6: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:153:10: branch_true: following ‘true’ branch (when ‘pos < size’)...
libguestfs-1.58.0/daemon/zero.c:154:14: branch_true: ...to here
libguestfs-1.58.0/daemon/zero.c:163:9: throw: if ‘pread’ throws an exception...
libguestfs-1.58.0/daemon/zero.c:156:8: danger: ‘open(device, 524290)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  154|       uint64_t n64 = size - pos;
#  155|       size_t n;
#  156|->     if (n64 > sizeof buf)
#  157|         n = sizeof buf;
#  158|       else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def478]
libguestfs-1.58.0/daemon/zero.c:186:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 524290)’
libguestfs-1.58.0/daemon/zero.c:139:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:141:12: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:143:12: acquire_resource: opened here
libguestfs-1.58.0/daemon/zero.c:144:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:144:6: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:153:10: branch_false: following ‘false’ branch (when ‘pos >= size’)...
libguestfs-1.58.0/daemon/zero.c:186:7: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:186:7: danger: ‘open(device, 524290)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  184|     }
#  185|   
#  186|->   if (close (fd) == -1) {
#  187|       reply_with_perror ("close: %s", device);
#  188|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def479]
libguestfs-1.58.0/daemon/zero.c:198:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/zero.c:201:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/zero.c:202:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:207:3: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:208:8: throw: if ‘open’ throws an exception...
libguestfs-1.58.0/daemon/zero.c:198:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/zero.c:198:22: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  196|   {
#  197|     int fd;
#  198|->   CLEANUP_FREE char *buf = NULL;
#  199|     ssize_t r;
#  200|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def480]
libguestfs-1.58.0/daemon/zero.c:209:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
libguestfs-1.58.0/daemon/zero.c:202:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:207:3: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:208:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/zero.c:209:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/daemon/zero.c:209:3: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/daemon/zero.c:209:3: danger: ‘open(path, 524288)’ leaks here; was opened at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  207|     CHROOT_IN;
#  208|     fd = open (path, O_RDONLY|O_CLOEXEC);
#  209|->   CHROOT_OUT;
#  210|   
#  211|     if (fd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def481]
libguestfs-1.58.0/daemon/zero.c:241:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/daemon/zero.c:244:9: acquire_memory: allocated here
libguestfs-1.58.0/daemon/zero.c:245:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:250:8: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:241:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/daemon/zero.c:241:22: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  239|   {
#  240|     int fd;
#  241|->   CLEANUP_FREE char *buf = NULL;
#  242|     ssize_t r;
#  243|   

Error: CPPCHECK_WARNING (CWE-401): [#def482]
libguestfs-1.58.0/daemon/zero.c:253: error[memleak]: Memory leak: buf
#  251|     if (fd == -1) {
#  252|       reply_with_perror ("open: %s", device);
#  253|->     return -1;
#  254|     }
#  255|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def483]
libguestfs-1.58.0/daemon/zero.c:256:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 524288)’
libguestfs-1.58.0/daemon/zero.c:245:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:250:8: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:250:8: acquire_resource: opened here
libguestfs-1.58.0/daemon/zero.c:251:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:251:6: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:263:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/daemon/zero.c:269:7: branch_false: ...to here
libguestfs-1.58.0/daemon/zero.c:256:15: danger: ‘open(device, 524288)’ leaks here; was opened at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  254|     }
#  255|   
#  256|->   while ((r = read (fd, buf, BUFSIZ)) > 0) {
#  257|       if (!is_zero (buf, r)) {
#  258|         close (fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def484]
libguestfs-1.58.0/examples/copy-over.c:88:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/examples/copy-over.c:68:6: branch_false: following ‘false’ branch (when ‘argc == 5’)...
libguestfs-1.58.0/examples/copy-over.c:73:3: branch_false: ...to here
libguestfs-1.58.0/examples/copy-over.c:82:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/copy-over.c:88:7: branch_false: ...to here
libguestfs-1.58.0/examples/copy-over.c:88:7: throw: if ‘fcntl’ throws an exception...
libguestfs-1.58.0/examples/copy-over.c:88:7: danger: ‘fd[0]’ leaks here
#   86|   
#   87|     /* We don't want the pipe to be passed to subprocesses. */
#   88|->   if (fcntl (fd[0], F_SETFD, FD_CLOEXEC) == -1 ||
#   89|         fcntl (fd[1], F_SETFD, FD_CLOEXEC) == -1) {
#   90|       perror ("fcntl");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def485]
libguestfs-1.58.0/examples/copy-over.c:88:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/examples/copy-over.c:68:6: branch_false: following ‘false’ branch (when ‘argc == 5’)...
libguestfs-1.58.0/examples/copy-over.c:73:3: branch_false: ...to here
libguestfs-1.58.0/examples/copy-over.c:82:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/copy-over.c:88:7: branch_false: ...to here
libguestfs-1.58.0/examples/copy-over.c:88:7: throw: if ‘fcntl’ throws an exception...
libguestfs-1.58.0/examples/copy-over.c:88:7: danger: ‘fd[1]’ leaks here
#   86|   
#   87|     /* We don't want the pipe to be passed to subprocesses. */
#   88|->   if (fcntl (fd[0], F_SETFD, FD_CLOEXEC) == -1 ||
#   89|         fcntl (fd[1], F_SETFD, FD_CLOEXEC) == -1) {
#   90|       perror ("fcntl");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def486]
libguestfs-1.58.0/examples/copy-over.c:89:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/examples/copy-over.c:68:6: branch_false: following ‘false’ branch (when ‘argc == 5’)...
libguestfs-1.58.0/examples/copy-over.c:73:3: branch_false: ...to here
libguestfs-1.58.0/examples/copy-over.c:82:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/copy-over.c:88:7: branch_false: ...to here
libguestfs-1.58.0/examples/copy-over.c:88:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/copy-over.c:89:7: branch_false: ...to here
libguestfs-1.58.0/examples/copy-over.c:89:7: throw: if ‘fcntl’ throws an exception...
libguestfs-1.58.0/examples/copy-over.c:89:7: danger: ‘fd[1]’ leaks here
#   87|     /* We don't want the pipe to be passed to subprocesses. */
#   88|     if (fcntl (fd[0], F_SETFD, FD_CLOEXEC) == -1 ||
#   89|->       fcntl (fd[1], F_SETFD, FD_CLOEXEC) == -1) {
#   90|       perror ("fcntl");
#   91|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def487]
libguestfs-1.58.0/examples/copy-over.c:90:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/examples/copy-over.c:68:6: branch_false: following ‘false’ branch (when ‘argc == 5’)...
libguestfs-1.58.0/examples/copy-over.c:73:3: branch_false: ...to here
libguestfs-1.58.0/examples/copy-over.c:82:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/copy-over.c:88:7: branch_false: ...to here
libguestfs-1.58.0/examples/copy-over.c:88:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/examples/copy-over.c:90:5: branch_true: ...to here
libguestfs-1.58.0/examples/copy-over.c:90:5: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/examples/copy-over.c:90:5: danger: ‘fd[1]’ leaks here
#   88|     if (fcntl (fd[0], F_SETFD, FD_CLOEXEC) == -1 ||
#   89|         fcntl (fd[1], F_SETFD, FD_CLOEXEC) == -1) {
#   90|->     perror ("fcntl");
#   91|       exit (EXIT_FAILURE);
#   92|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def488]
libguestfs-1.58.0/examples/debug-logging.c:112:5: warning[-Wanalyzer-malloc-leak]: leak of ‘msg’
libguestfs-1.58.0/examples/debug-logging.c:111:11: acquire_memory: allocated here
libguestfs-1.58.0/examples/debug-logging.c:112:5: throw: if ‘syslog’ throws an exception...
libguestfs-1.58.0/examples/debug-logging.c:112:5: danger: ‘msg’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  110|       event_name = guestfs_event_to_string (event);
#  111|       msg = strndup (buf, buf_len);
#  112|->     syslog (priority, "[%s] %s", event_name, msg);
#  113|       free (msg);
#  114|       free (event_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def489]
libguestfs-1.58.0/examples/display-icon.c:114:11: warning[-Wanalyzer-malloc-leak]: leak of ‘popen("display -", "w")’
libguestfs-1.58.0/examples/display-icon.c:30:1: enter_function: entry to ‘main’
libguestfs-1.58.0/examples/display-icon.c:38:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libguestfs-1.58.0/examples/display-icon.c:42:3: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:45:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:51:7: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:51:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:59:7: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:59:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:63:11: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:64:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:66:7: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:66:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:66:6: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:71:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/examples/display-icon.c:79:19: branch_true: ...to here
libguestfs-1.58.0/examples/display-icon.c:80:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:80:8: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:83:25: call_function: inlined call to ‘count_strings’ from ‘main’
libguestfs-1.58.0/examples/display-icon.c:83:5: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:85:17: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:93:5: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:102:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:104:9: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:104:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:109:12: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:109:12: acquire_memory: allocated here
libguestfs-1.58.0/examples/display-icon.c:110:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/examples/display-icon.c:114:11: branch_false: ...to here
libguestfs-1.58.0/examples/display-icon.c:114:11: danger: ‘popen("display -", "w")’ leaks here; was allocated at [(27)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/26)
#  112|           exit (EXIT_FAILURE);
#  113|         }
#  114|->       if (fwrite (icon, 1, icon_size, fp) != icon_size) {
#  115|           perror ("write");
#  116|           exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def490]
libguestfs-1.58.0/fish/events.c:109:29: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’
libguestfs-1.58.0/fish/events.c:115:10: acquire_memory: allocated here
libguestfs-1.58.0/fish/events.c:116:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/events.c:121:9: branch_false: ...to here
libguestfs-1.58.0/fish/events.c:122:6: branch_true: following ‘true’ branch (when ‘pid == -1’)...
libguestfs-1.58.0/fish/events.c:123:5: branch_true: ...to here
libguestfs-1.58.0/fish/events.c:109:29: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/fish/events.c:109:29: danger: ‘argv’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  107|   {
#  108|     pid_t pid;
#  109|->   CLEANUP_FREE const char **argv = NULL;
#  110|     const char *shell;
#  111|     struct entry *entry = opaque;

Error: CPPCHECK_WARNING (CWE-401): [#def491]
libguestfs-1.58.0/fish/events.c:124: error[memleak]: Memory leak: argv
#  122|     if (pid == -1) {
#  123|       perror ("event handler: fork");
#  124|->     return;
#  125|     }
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def492]
libguestfs-1.58.0/fish/events.c:190:7: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
libguestfs-1.58.0/fish/events.c:177:6: branch_false: following ‘false’ branch (when ‘argc == 3’)...
libguestfs-1.58.0/fish/events.c:183:11: branch_false: ...to here
libguestfs-1.58.0/fish/events.c:183:11: acquire_memory: allocated here
libguestfs-1.58.0/fish/events.c:184:6: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
libguestfs-1.58.0/fish/events.c:188:3: branch_false: ...to here
libguestfs-1.58.0/fish/events.c:190:7: throw: if ‘event_bitmask_of_event_set’ throws an exception...
libguestfs-1.58.0/fish/events.c:190:7: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  188|     entry->eh = -1;
#  189|   
#  190|->   r = event_bitmask_of_event_set (argv[1], &entry->event_bitmask);
#  191|     if (r == -1)
#  192|       goto error;

Error: CPPCHECK_WARNING (CWE-476): [#def493]
libguestfs-1.58.0/fish/fish.c:348: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mp
#  346|   
#  347|       case 'm':
#  348|->       OPTION_m;
#  349|         break;
#  350|   

Error: CPPCHECK_WARNING (CWE-476): [#def494]
libguestfs-1.58.0/fish/fish.c:368: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  366|         if (!drv)
#  367|           error (EXIT_FAILURE, errno, "calloc");
#  368|->       drv->type = drv_N;
#  369|         p = strchr (optarg, '=');
#  370|         if (p != NULL) {

Error: CPPCHECK_WARNING (CWE-476): [#def495]
libguestfs-1.58.0/fish/fish.c:382: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  380|           p = optarg;
#  381|         }
#  382|->       drv->N.data = create_prepared_file (p, drv->N.filename);
#  383|         drv->N.data_free = free_prep_data;
#  384|         drv->next = drvs;

Error: CPPCHECK_WARNING (CWE-476): [#def496]
libguestfs-1.58.0/fish/fish.c:383: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  381|         }
#  382|         drv->N.data = create_prepared_file (p, drv->N.filename);
#  383|->       drv->N.data_free = free_prep_data;
#  384|         drv->next = drvs;
#  385|         drvs = drv;

Error: CPPCHECK_WARNING (CWE-476): [#def497]
libguestfs-1.58.0/fish/fish.c:384: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  382|         drv->N.data = create_prepared_file (p, drv->N.filename);
#  383|         drv->N.data_free = free_prep_data;
#  384|->       drv->next = drvs;
#  385|         drvs = drv;
#  386|         next_prepared_drive++;

Error: CPPCHECK_WARNING (CWE-476): [#def498]
libguestfs-1.58.0/fish/fish.c:446: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  444|           if (!drv)
#  445|             error (EXIT_FAILURE, errno, "calloc");
#  446|->         drv->type = drv_a;
#  447|           drv->a.filename = strdup (argv[optind]);
#  448|           if (!drv->a.filename)

Error: CPPCHECK_WARNING (CWE-476): [#def499]
libguestfs-1.58.0/fish/fish.c:447: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  445|             error (EXIT_FAILURE, errno, "calloc");
#  446|           drv->type = drv_a;
#  447|->         drv->a.filename = strdup (argv[optind]);
#  448|           if (!drv->a.filename)
#  449|             error (EXIT_FAILURE, errno, "strdup");

Error: CPPCHECK_WARNING (CWE-476): [#def500]
libguestfs-1.58.0/fish/fish.c:448: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  446|           drv->type = drv_a;
#  447|           drv->a.filename = strdup (argv[optind]);
#  448|->         if (!drv->a.filename)
#  449|             error (EXIT_FAILURE, errno, "strdup");
#  450|           drv->next = drvs;

Error: CPPCHECK_WARNING (CWE-476): [#def501]
libguestfs-1.58.0/fish/fish.c:456: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  454|           if (!drv)
#  455|             error (EXIT_FAILURE, errno, "calloc");
#  456|->         drv->type = drv_d;
#  457|           drv->d.guest = argv[optind];
#  458|           drv->next = drvs;

Error: CPPCHECK_WARNING (CWE-476): [#def502]
libguestfs-1.58.0/fish/fish.c:457: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  455|             error (EXIT_FAILURE, errno, "calloc");
#  456|           drv->type = drv_d;
#  457|->         drv->d.guest = argv[optind];
#  458|           drv->next = drvs;
#  459|           drvs = drv;

Error: CPPCHECK_WARNING (CWE-476): [#def503]
libguestfs-1.58.0/fish/fish.c:458: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  456|           drv->type = drv_d;
#  457|           drv->d.guest = argv[optind];
#  458|->         drv->next = drvs;
#  459|           drvs = drv;
#  460|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def504]
libguestfs-1.58.0/fish/fish.c:1130:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1130:14: danger: ‘fd[0]’ leaks here
# 1128|       if (fflush (stdout) == EOF) {
# 1129|         perror ("failed to flush standard output");
# 1130|->       return -1;
# 1131|       }
# 1132|       if (pipe (fd) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def505]
libguestfs-1.58.0/fish/fish.c:1130:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1130:14: danger: ‘fd[1]’ leaks here
# 1128|       if (fflush (stdout) == EOF) {
# 1129|         perror ("failed to flush standard output");
# 1130|->       return -1;
# 1131|       }
# 1132|       if (pipe (fd) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def506]
libguestfs-1.58.0/fish/fish.c:1138:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_true: following ‘true’ branch (when ‘pid == -1’)...
libguestfs-1.58.0/fish/fish.c:1138:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1138:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1138:7: danger: ‘fd[0]’ leaks here
# 1136|       pid = fork ();
# 1137|       if (pid == -1) {
# 1138|->       perror ("fork");
# 1139|         return -1;
# 1140|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def507]
libguestfs-1.58.0/fish/fish.c:1138:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_true: following ‘true’ branch (when ‘pid == -1’)...
libguestfs-1.58.0/fish/fish.c:1138:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1138:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1138:7: danger: ‘fd[1]’ leaks here
# 1136|       pid = fork ();
# 1137|       if (pid == -1) {
# 1138|->       perror ("fork");
# 1139|         return -1;
# 1140|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def508]
libguestfs-1.58.0/fish/fish.c:1143:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/fish/fish.c:1143:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1143:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1143:7: danger: ‘fd[0]’ leaks here
# 1141|   
# 1142|       if (pid == 0) {		/* Child process. */
# 1143|->       close (fd[1]);
# 1144|         if (dup2 (fd[0], 0) < 0) {
# 1145|           perror ("dup2 of stdin failed");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def509]
libguestfs-1.58.0/fish/fish.c:1143:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/fish/fish.c:1143:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1143:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1143:7: danger: ‘fd[1]’ leaks here
# 1141|   
# 1142|       if (pid == 0) {		/* Child process. */
# 1143|->       close (fd[1]);
# 1144|         if (dup2 (fd[0], 0) < 0) {
# 1145|           perror ("dup2 of stdin failed");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def510]
libguestfs-1.58.0/fish/fish.c:1144:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(fd[0], 0)’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/fish/fish.c:1143:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1144:11: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1144:10: danger: ‘dup2(fd[0], 0)’ leaks here; was opened at [(12)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/11)
# 1142|       if (pid == 0) {		/* Child process. */
# 1143|         close (fd[1]);
# 1144|->       if (dup2 (fd[0], 0) < 0) {
# 1145|           perror ("dup2 of stdin failed");
# 1146|           _exit (1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def511]
libguestfs-1.58.0/fish/fish.c:1145:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/fish/fish.c:1143:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1144:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1145:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1145:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1145:9: danger: ‘fd[0]’ leaks here
# 1143|         close (fd[1]);
# 1144|         if (dup2 (fd[0], 0) < 0) {
# 1145|->         perror ("dup2 of stdin failed");
# 1146|           _exit (1);
# 1147|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def512]
libguestfs-1.58.0/fish/fish.c:1149:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/fish/fish.c:1143:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1144:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1149:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1149:11: throw: if ‘system’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1149:11: danger: ‘fd[0]’ leaks here
# 1147|         }
# 1148|   
# 1149|->       r = system (pipecmd);
# 1150|         if (r == -1) {
# 1151|           perror (pipecmd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def513]
libguestfs-1.58.0/fish/fish.c:1151:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/fish/fish.c:1143:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1144:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1149:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1150:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1151:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1151:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1151:9: danger: ‘fd[0]’ leaks here
# 1149|         r = system (pipecmd);
# 1150|         if (r == -1) {
# 1151|->         perror (pipecmd);
# 1152|           _exit (1);
# 1153|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def514]
libguestfs-1.58.0/fish/fish.c:1158:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_true: following ‘true’ branch (when ‘stdout_saved_fd < 0’)...
libguestfs-1.58.0/fish/fish.c:1158:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1158:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1158:7: danger: ‘fd[0]’ leaks here
# 1156|   
# 1157|       if ((stdout_saved_fd = dup (1)) < 0) {
# 1158|->       perror ("failed to dup stdout");
# 1159|         return -1;
# 1160|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def515]
libguestfs-1.58.0/fish/fish.c:1158:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_true: following ‘true’ branch (when ‘stdout_saved_fd < 0’)...
libguestfs-1.58.0/fish/fish.c:1158:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1158:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1158:7: danger: ‘fd[1]’ leaks here
# 1156|   
# 1157|       if ((stdout_saved_fd = dup (1)) < 0) {
# 1158|->       perror ("failed to dup stdout");
# 1159|         return -1;
# 1160|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def516]
libguestfs-1.58.0/fish/fish.c:1161:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1161:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1161:5: danger: ‘fd[0]’ leaks here
# 1159|         return -1;
# 1160|       }
# 1161|->     close (fd[0]);
# 1162|       if (dup2 (fd[1], 1) < 0) {
# 1163|         perror ("failed to dup stdout");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def517]
libguestfs-1.58.0/fish/fish.c:1161:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1161:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1161:5: danger: ‘fd[1]’ leaks here
# 1159|         return -1;
# 1160|       }
# 1161|->     close (fd[0]);
# 1162|       if (dup2 (fd[1], 1) < 0) {
# 1163|         perror ("failed to dup stdout");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def518]
libguestfs-1.58.0/fish/fish.c:1161:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1161:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1161:5: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/11)
# 1159|         return -1;
# 1160|       }
# 1161|->     close (fd[0]);
# 1162|       if (dup2 (fd[1], 1) < 0) {
# 1163|         perror ("failed to dup stdout");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def519]
libguestfs-1.58.0/fish/fish.c:1162:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(fd[1], 1)’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:9: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1162:8: danger: ‘dup2(fd[1], 1)’ leaks here; was opened at [(14)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/13)
# 1160|       }
# 1161|       close (fd[0]);
# 1162|->     if (dup2 (fd[1], 1) < 0) {
# 1163|         perror ("failed to dup stdout");
# 1164|         close (stdout_saved_fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def520]
libguestfs-1.58.0/fish/fish.c:1163:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1163:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1163:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1163:7: danger: ‘fd[1]’ leaks here
# 1161|       close (fd[0]);
# 1162|       if (dup2 (fd[1], 1) < 0) {
# 1163|->       perror ("failed to dup stdout");
# 1164|         close (stdout_saved_fd);
# 1165|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def521]
libguestfs-1.58.0/fish/fish.c:1163:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1163:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1163:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1163:7: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/11)
# 1161|       close (fd[0]);
# 1162|       if (dup2 (fd[1], 1) < 0) {
# 1163|->       perror ("failed to dup stdout");
# 1164|         close (stdout_saved_fd);
# 1165|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def522]
libguestfs-1.58.0/fish/fish.c:1164:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1163:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1164:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1164:7: danger: ‘fd[1]’ leaks here
# 1162|       if (dup2 (fd[1], 1) < 0) {
# 1163|         perror ("failed to dup stdout");
# 1164|->       close (stdout_saved_fd);
# 1165|         return -1;
# 1166|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def523]
libguestfs-1.58.0/fish/fish.c:1164:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1163:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1164:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1164:7: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/11)
# 1162|       if (dup2 (fd[1], 1) < 0) {
# 1163|         perror ("failed to dup stdout");
# 1164|->       close (stdout_saved_fd);
# 1165|         return -1;
# 1166|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def524]
libguestfs-1.58.0/fish/fish.c:1167:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1167:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1167:5: danger: ‘fd[1]’ leaks here
# 1165|         return -1;
# 1166|       }
# 1167|->     close (fd[1]);
# 1168|     }
# 1169|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def525]
libguestfs-1.58.0/fish/fish.c:1167:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1167:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1167:5: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/11)
# 1165|         return -1;
# 1166|       }
# 1167|->     close (fd[1]);
# 1168|     }
# 1169|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def526]
libguestfs-1.58.0/fish/fish.c:1175:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1174:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1175:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1175:9: throw: if ‘rc_remote’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1175:9: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/11)
# 1173|     /* If --remote was set, then send this command to a remote process. */
# 1174|     if (remote_control)
# 1175|->     r = rc_remote (remote_control, cmd, argc, argv, rc_exit_on_error_flag);
# 1176|   
# 1177|     /* Otherwise execute it locally. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def527]
libguestfs-1.58.0/fish/fish.c:1179:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1178:12: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1178:11: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1179:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1179:9: throw: if ‘display_help’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1179:9: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/11)
# 1177|     /* Otherwise execute it locally. */
# 1178|     else if (STRCASEEQ (cmd, "help"))
# 1179|->     r = display_help (cmd, argc, argv);
# 1180|     else if (STRCASEEQ (cmd, "quit") ||
# 1181|              STRCASEEQ (cmd, "exit") ||

Error: GCC_ANALYZER_WARNING (CWE-775): [#def528]
libguestfs-1.58.0/fish/fish.c:1187:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1178:12: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1178:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1180:12: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1180:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1181:12: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1180:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1182:12: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1180:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1187:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1187:9: throw: if ‘run_action’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1187:9: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/11)
# 1185|     }
# 1186|     else
# 1187|->     r = run_action (cmd, argc, argv);
# 1188|   
# 1189|     /* Always flush stdout after every command, so that messages, results

Error: GCC_ANALYZER_WARNING (CWE-775): [#def529]
libguestfs-1.58.0/fish/fish.c:1192:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1192:7: throw: if ‘fflush’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1192:7: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/11)
# 1190|      * etc appear immediately.
# 1191|      */
# 1192|->   if (fflush (stdout) == EOF) {
# 1193|       perror ("failed to flush standard output");
# 1194|       if (pipecmd)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def530]
libguestfs-1.58.0/fish/fish.c:1193:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1192:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1193:5: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1193:5: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1193:5: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/11)
# 1191|      */
# 1192|     if (fflush (stdout) == EOF) {
# 1193|->     perror ("failed to flush standard output");
# 1194|       if (pipecmd)
# 1195|         close (stdout_saved_fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def531]
libguestfs-1.58.0/fish/fish.c:1195:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1192:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1193:5: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1194:8: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1195:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1195:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1195:7: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/11)
# 1193|       perror ("failed to flush standard output");
# 1194|       if (pipecmd)
# 1195|->       close (stdout_saved_fd);
# 1196|       return -1;
# 1197|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def532]
libguestfs-1.58.0/fish/fish.c:1209:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1192:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1198:7: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1208:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1209:5: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1209:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1209:5: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/11)
# 1207|   
# 1208|     if (pipecmd) {
# 1209|->     close (1);
# 1210|       if (dup2 (stdout_saved_fd, 1) < 0) {
# 1211|         perror ("failed to dup2 standard output");

Error: GCC_ANALYZER_WARNING: [#def533]
libguestfs-1.58.0/fish/fish.c:1210:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1192:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1198:7: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1208:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1209:5: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1209:5: release_resource: closed here
libguestfs-1.58.0/fish/fish.c:1210:9: danger: ‘1’ could be invalid
# 1208|     if (pipecmd) {
# 1209|       close (1);
# 1210|->     if (dup2 (stdout_saved_fd, 1) < 0) {
# 1211|         perror ("failed to dup2 standard output");
# 1212|         r = -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def534]
libguestfs-1.58.0/fish/fish.c:1211:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1192:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1198:7: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1208:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1209:5: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1210:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1211:7: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1211:7: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1211:7: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/11)
# 1209|       close (1);
# 1210|       if (dup2 (stdout_saved_fd, 1) < 0) {
# 1211|->       perror ("failed to dup2 standard output");
# 1212|         r = -1;
# 1213|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def535]
libguestfs-1.58.0/fish/fish.c:1214:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_saved_fd’
libguestfs-1.58.0/fish/fish.c:1125:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1128:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1128:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1132:9: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1132:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1136:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1137:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1142:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fish/fish.c:1157:28: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1157:28: acquire_resource: opened here
libguestfs-1.58.0/fish/fish.c:1157:8: branch_false: following ‘false’ branch (when ‘stdout_saved_fd >= 0’)...
libguestfs-1.58.0/fish/fish.c:1161:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1162:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1167:5: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1192:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1198:7: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1208:6: branch_true: following ‘true’ branch (when ‘pipecmd’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1209:5: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1214:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1214:5: danger: ‘stdout_saved_fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/11)
# 1212|         r = -1;
# 1213|       }
# 1214|->     close (stdout_saved_fd);
# 1215|       if (waitpid (pid, NULL, 0) < 0) {
# 1216|         perror ("waiting for command to complete");

Error: GCC_ANALYZER_WARNING (CWE-415): [#def536]
libguestfs-1.58.0/fish/fish.c:1324:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘str’
libguestfs-1.58.0/fish/fish.c:1328:1: enter_function: entry to ‘parse_string_list’
libguestfs-1.58.0/fish/fish.c:1348:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1353:10: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1362:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1362:20: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1362:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1366:10: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1366:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1368:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1375:10: branch_true: following ‘true’ branch (when ‘in_quote != 0’)...
libguestfs-1.58.0/fish/fish.c:1376:16: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1388:10: branch_false: following ‘false’ branch (when ‘tok_new’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1397:19: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1362:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1417:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1417:8: branch_true: following ‘true’ branch (when ‘in_quote != 0’)...
libguestfs-1.58.0/fish/fish.c:1418:24: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1419:7: call_function: passing freed pointer ‘argv’ in call to ‘free_n_strings’ from ‘parse_string_list’
# 1322|       free (str[i]);
# 1323|     }
# 1324|->   free (str);
# 1325|   }
# 1326|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def537]
libguestfs-1.58.0/fish/fish.c:1389:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tok’
libguestfs-1.58.0/fish/fish.c:1348:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1353:10: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1362:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1362:20: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1362:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1366:10: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1366:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1368:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1375:10: branch_true: following ‘true’ branch (when ‘in_quote != 0’)...
libguestfs-1.58.0/fish/fish.c:1376:16: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1388:10: branch_false: following ‘false’ branch (when ‘tok_new’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1397:19: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1397:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1362:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1362:20: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1366:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1375:10: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1375:10: branch_true: following ‘true’ branch (when ‘in_quote != 0’)...
libguestfs-1.58.0/fish/fish.c:1376:16: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1388:10: branch_true: following ‘true’ branch (when ‘tok_new’ is NULL)...
libguestfs-1.58.0/fish/fish.c:1389:9: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1389:9: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1389:9: danger: ‘tok’ leaks here; was allocated at [(11)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/10)
# 1387|         char *tok_new = realloc (tok, tok_len + 1);
# 1388|         if (NULL == tok_new) {
# 1389|->         perror ("realloc");
# 1390|           free_n_strings (argv, argv_len);
# 1391|           free (tok);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def538]
libguestfs-1.58.0/fish/fish.c:1432:25: warning[-Wanalyzer-double-free]: double-‘free’ of ‘argv’
libguestfs-1.58.0/fish/fish.c:1348:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1353:10: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1362:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1362:20: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1362:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1366:10: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1375:10: branch_true: following ‘true’ branch (when ‘in_quote != 0’)...
libguestfs-1.58.0/fish/fish.c:1376:16: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1388:10: branch_false: following ‘false’ branch (when ‘tok_new’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1397:19: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1397:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1362:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/fish.c:1362:20: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1366:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1375:10: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1375:10: branch_true: following ‘true’ branch (when ‘in_quote != 0’)...
libguestfs-1.58.0/fish/fish.c:1376:16: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1388:10: branch_false: following ‘false’ branch (when ‘tok_new’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1397:19: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1417:8: branch_false: following ‘false’ branch (when ‘in_quote == 0’)...
libguestfs-1.58.0/fish/fish.c:1426:8: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1426:8: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1428:10: branch_true: ...to here
libguestfs-1.58.0/fish/fish.c:1432:25: danger: second ‘free’ here
# 1430|         /* Add the argument to the argument list */
# 1431|         argv_len++;
# 1432|->       char **argv_new = realloc (argv, sizeof (*argv) * argv_len);
# 1433|         if (NULL == argv_new) {
# 1434|           perror ("realloc");

Error: CPPCHECK_WARNING (CWE-476): [#def539]
libguestfs-1.58.0/fish/fish.c:1612: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1610|     }
# 1611|   
# 1612|->   ret[j] = '\0';
# 1613|     return ret;                   /* caller frees */
# 1614|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def540]
libguestfs-1.58.0/fish/fish.c:1729:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/fish/fish.c:1692:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1699:3: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1709:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/fish.c:1717:11: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1717:11: acquire_memory: allocated here
libguestfs-1.58.0/fish/fish.c:1718:8: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libguestfs-1.58.0/fish/fish.c:1725:3: branch_false: ...to here
libguestfs-1.58.0/fish/fish.c:1729:13: throw: if ‘guestfs_case_sensitive_path’ throws an exception...
libguestfs-1.58.0/fish/fish.c:1729:13: danger: ‘ret’ leaks here; was allocated at [(5)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/4)
# 1727|         ret[i] = '/';
# 1728|   
# 1729|->   char *t = guestfs_case_sensitive_path (g, ret);
# 1730|     free (ret);
# 1731|     ret = t;

Error: CPPCHECK_WARNING (CWE-401): [#def541]
libguestfs-1.58.0/fish/fish.c:1864: error[memleak]: Memory leak: buffer
# 1862|     if (asprintf (&template, "%s/guestfishXXXXXX", tmpdir) == -1) {
# 1863|       perror ("asprintf");
# 1864|->     return NULL;
# 1865|     }
# 1866|   

Error: CPPCHECK_WARNING (CWE-401): [#def542]
libguestfs-1.58.0/fish/fish.c:1870: error[memleak]: Memory leak: buffer
# 1868|     if (file_in_tmpfile == NULL) {
# 1869|       perror ("strdup");
# 1870|->     return NULL;
# 1871|     }
# 1872|   

Error: CPPCHECK_WARNING (CWE-401): [#def543]
libguestfs-1.58.0/fish/glob.c:75: error[memleak]: Memory leak: count
#   73|     if (argc < 1) {
#   74|       fprintf (stderr, _("use 'glob command [args...]'\n"));
#   75|->     return -1;
#   76|     }
#   77|   

Error: CPPCHECK_WARNING (CWE-401): [#def544]
libguestfs-1.58.0/fish/glob.c:75: error[memleak]: Memory leak: globs
#   73|     if (argc < 1) {
#   74|       fprintf (stderr, _("use 'glob command [args...]'\n"));
#   75|->     return -1;
#   76|     }
#   77|   

Error: CPPCHECK_WARNING (CWE-401): [#def545]
libguestfs-1.58.0/fish/glob.c:75: error[memleak]: Memory leak: posn
#   73|     if (argc < 1) {
#   74|       fprintf (stderr, _("use 'glob command [args...]'\n"));
#   75|->     return -1;
#   76|     }
#   77|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def546]
libguestfs-1.58.0/fish/glob.c:249:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/fish/glob.c:190:1: enter_function: entry to ‘expand_devicename’
libguestfs-1.58.0/fish/glob.c:198:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/glob.c:199:7: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:199:7: call_function: calling ‘add_strings_matching’ from ‘expand_devicename’
#  247|     for (i = 0; pp[i] != NULL; ++i) {
#  248|       errno = 0;
#  249|->     r = fnmatch (glob, pp[i], FNM_PATHNAME);
#  250|       if (r == 0) {               /* matches - add it */
#  251|         if (add_string (pp[i], ret, size_r) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def547]
libguestfs-1.58.0/fish/glob.c:249:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/fish/glob.c:190:1: enter_function: entry to ‘expand_devicename’
libguestfs-1.58.0/fish/glob.c:198:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/glob.c:199:7: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:199:7: call_function: calling ‘add_strings_matching’ from ‘expand_devicename’
#  247|     for (i = 0; pp[i] != NULL; ++i) {
#  248|       errno = 0;
#  249|->     r = fnmatch (glob, pp[i], FNM_PATHNAME);
#  250|       if (r == 0) {               /* matches - add it */
#  251|         if (add_string (pp[i], ret, size_r) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def548]
libguestfs-1.58.0/fish/glob.c:274:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/fish/glob.c:190:1: enter_function: entry to ‘expand_devicename’
libguestfs-1.58.0/fish/glob.c:198:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/glob.c:199:7: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:199:7: call_function: calling ‘add_strings_matching’ from ‘expand_devicename’
#  272|     size_t size = *size_r;
#  273|   
#  274|->   new_ret = realloc (new_ret, (size + 2) * (sizeof (char *)));
#  275|     if (!new_ret) {
#  276|       perror ("realloc");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def549]
libguestfs-1.58.0/fish/glob.c:276:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/fish/glob.c:190:1: enter_function: entry to ‘expand_devicename’
libguestfs-1.58.0/fish/glob.c:198:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/glob.c:199:7: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:199:7: call_function: calling ‘add_strings_matching’ from ‘expand_devicename’
#  274|     new_ret = realloc (new_ret, (size + 2) * (sizeof (char *)));
#  275|     if (!new_ret) {
#  276|->     perror ("realloc");
#  277|       return -1;
#  278|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def550]
libguestfs-1.58.0/fish/glob.c:276:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/fish/glob.c:190:1: enter_function: entry to ‘expand_devicename’
libguestfs-1.58.0/fish/glob.c:198:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/glob.c:199:7: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:199:7: call_function: calling ‘add_strings_matching’ from ‘expand_devicename’
#  274|     new_ret = realloc (new_ret, (size + 2) * (sizeof (char *)));
#  275|     if (!new_ret) {
#  276|->     perror ("realloc");
#  277|       return -1;
#  278|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def551]
libguestfs-1.58.0/fish/glob.c:283:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/fish/glob.c:190:1: enter_function: entry to ‘expand_devicename’
libguestfs-1.58.0/fish/glob.c:198:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/glob.c:199:7: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:199:7: call_function: calling ‘add_strings_matching’ from ‘expand_devicename’
#  281|     new_ret[size] = strdup (str);
#  282|     if (new_ret[size] == NULL) {
#  283|->     perror ("strdup");
#  284|       return -1;
#  285|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def552]
libguestfs-1.58.0/fish/glob.c:283:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libguestfs-1.58.0/fish/glob.c:190:1: enter_function: entry to ‘expand_devicename’
libguestfs-1.58.0/fish/glob.c:198:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/glob.c:199:7: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:199:7: call_function: calling ‘add_strings_matching’ from ‘expand_devicename’
#  281|     new_ret[size] = strdup (str);
#  282|     if (new_ret[size] == NULL) {
#  283|->     perror ("strdup");
#  284|       return -1;
#  285|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def553]
libguestfs-1.58.0/fish/glob.c:309:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pp’
libguestfs-1.58.0/fish/glob.c:302:8: acquire_memory: allocated here
libguestfs-1.58.0/fish/glob.c:303:6: branch_false: following ‘false’ branch (when ‘pp’ is non-NULL)...
libguestfs-1.58.0/fish/glob.c:307:11: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:308:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/glob.c:309:5: branch_true: ...to here
libguestfs-1.58.0/fish/glob.c:309:5: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/fish/glob.c:309:5: danger: ‘pp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  307|     pp[0] = strdup (element);
#  308|     if (pp[0] == NULL) {
#  309|->     perror ("strdup");
#  310|       free (pp);
#  311|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def554]
libguestfs-1.58.0/fish/glob.c:324:23: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’
libguestfs-1.58.0/fish/glob.c:326:10: acquire_memory: allocated here
libguestfs-1.58.0/fish/glob.c:327:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/glob.c:332:3: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:336:15: branch_false: following ‘false’ branch (when ‘i >= argc’)...
libguestfs-1.58.0/fish/glob.c:339:7: branch_false: ...to here
libguestfs-1.58.0/fish/glob.c:339:7: throw: if ‘issue_command’ throws an exception...
libguestfs-1.58.0/fish/glob.c:324:23: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/fish/glob.c:324:23: danger: ‘argv’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  322|   {
#  323|     size_t i;
#  324|->   CLEANUP_FREE char **argv = NULL;
#  325|   
#  326|     argv = malloc (sizeof (char *) * (argc+1));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def555]
libguestfs-1.58.0/fish/prep-lv.c:78:22: warning[-Wanalyzer-malloc-leak]: leak of ‘vg’
libguestfs-1.58.0/fish/prep-lv.c:72:1: enter_function: entry to ‘prep_postlaunch_lv’
libguestfs-1.58.0/fish/prep-lv.c:74:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:80:20: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:80:7: call_function: calling ‘vg_lv_parse’ from ‘prep_postlaunch_lv’
libguestfs-1.58.0/fish/prep-lv.c:80:7: return_function: returning to ‘prep_postlaunch_lv’ from ‘vg_lv_parse’
libguestfs-1.58.0/fish/prep-lv.c:80:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:84:7: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:84:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:87:7: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:87:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:91:9: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:92:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:97:7: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:97:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:83:22: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:78:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/fish/prep-lv.c:78:22: danger: ‘vg’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#   76|                   guestfs_last_error (g));
#   77|   
#   78|->   CLEANUP_FREE char *vg;
#   79|     CLEANUP_FREE char *lv;
#   80|     if (vg_lv_parse (data->params[0], &vg, &lv) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def556]
libguestfs-1.58.0/fish/prep-lv.c:119:22: warning[-Wanalyzer-malloc-leak]: leak of ‘vg’
libguestfs-1.58.0/fish/prep-lv.c:113:1: enter_function: entry to ‘prep_postlaunch_lvfs’
libguestfs-1.58.0/fish/prep-lv.c:115:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:121:20: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:121:7: call_function: calling ‘vg_lv_parse’ from ‘prep_postlaunch_lvfs’
libguestfs-1.58.0/fish/prep-lv.c:121:7: return_function: returning to ‘prep_postlaunch_lvfs’ from ‘vg_lv_parse’
libguestfs-1.58.0/fish/prep-lv.c:121:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:125:7: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:125:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:128:7: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:128:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:132:9: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:133:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:138:7: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:138:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:143:41: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:143:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/prep-lv.c:124:22: branch_false: ...to here
libguestfs-1.58.0/fish/prep-lv.c:119:22: throw: if ‘guestfs_int_cleanup_free’ throws an exception...
libguestfs-1.58.0/fish/prep-lv.c:119:22: danger: ‘vg’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  117|                   guestfs_last_error (g));
#  118|   
#  119|->   CLEANUP_FREE char *vg;
#  120|     CLEANUP_FREE char *lv;
#  121|     if (vg_lv_parse (data->params[0], &vg, &lv) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def557]
libguestfs-1.58.0/fish/prep.c:92:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/fish/prep.c:88:1: enter_function: entry to ‘create_prepared_file’
libguestfs-1.58.0/fish/prep.c:90:21: call_function: calling ‘parse_type_string’ from ‘create_prepared_file’
libguestfs-1.58.0/fish/prep.c:90:21: return_function: returning to ‘create_prepared_file’ from ‘parse_type_string’
libguestfs-1.58.0/fish/prep.c:91:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/prep.c:92:5: branch_true: ...to here
libguestfs-1.58.0/fish/prep.c:92:5: throw: if the called function throws an exception...
libguestfs-1.58.0/fish/prep.c:92:5: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9)
#   90|     prep_data *data = parse_type_string (type_string);
#   91|     if (data->prep->prelaunch)
#   92|->     data->prep->prelaunch (filename, data);
#   93|     return data;
#   94|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def558]
libguestfs-1.58.0/fish/prep.c:104:9: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_type_string(type_string)’
libguestfs-1.58.0/fish/prep.c:88:1: enter_function: entry to ‘create_prepared_file’
libguestfs-1.58.0/fish/prep.c:90:21: call_function: calling ‘parse_type_string’ from ‘create_prepared_file’
libguestfs-1.58.0/fish/prep.c:90:21: return_function: returning to ‘create_prepared_file’ from ‘parse_type_string’
libguestfs-1.58.0/fish/prep.c:91:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/prep.c:92:5: branch_true: ...to here
libguestfs-1.58.0/fish/prep.c:92:5: throw: if the called function throws an exception...
libguestfs-1.58.0/fish/prep.c:104:9: danger: ‘parse_type_string(type_string)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  102|     size_t len = strcspn (type_string, ":");
#  103|     for (i = 0; i < NR_PREPS; ++i)
#  104|->     if (STRCASEEQLEN (type_string, preps[i].name, len))
#  105|         break;
#  106|   

Error: CPPCHECK_WARNING (CWE-476): [#def559]
libguestfs-1.58.0/fish/prep.c:116: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  114|     if (data == NULL)
#  115|       error (EXIT_FAILURE, errno, "malloc");
#  116|->   data->prep = &preps[i];
#  117|     data->orig_type_string = type_string;
#  118|   

Error: CPPCHECK_WARNING (CWE-476): [#def560]
libguestfs-1.58.0/fish/prep.c:117: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  115|       error (EXIT_FAILURE, errno, "malloc");
#  116|     data->prep = &preps[i];
#  117|->   data->orig_type_string = type_string;
#  118|   
#  119|     /* Set up the optional parameters to all-defaults. */

Error: CPPCHECK_WARNING (CWE-476): [#def561]
libguestfs-1.58.0/fish/prep.c:120: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  118|   
#  119|     /* Set up the optional parameters to all-defaults. */
#  120|->   data->params = malloc (data->prep->nr_params * sizeof (char *));
#  121|     if (data->params == NULL)
#  122|       error (EXIT_FAILURE, errno, "malloc");

Error: CPPCHECK_WARNING (CWE-476): [#def562]
libguestfs-1.58.0/fish/prep.c:121: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  119|     /* Set up the optional parameters to all-defaults. */
#  120|     data->params = malloc (data->prep->nr_params * sizeof (char *));
#  121|->   if (data->params == NULL)
#  122|       error (EXIT_FAILURE, errno, "malloc");
#  123|   

Error: CPPCHECK_WARNING (CWE-476): [#def563]
libguestfs-1.58.0/fish/prep.c:124: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  122|       error (EXIT_FAILURE, errno, "malloc");
#  123|   
#  124|->   for (i = 0; i < data->prep->nr_params; ++i)
#  125|       data->params[i] = (char *) data->prep->params[i].pdefault;
#  126|   

Error: CPPCHECK_WARNING (CWE-476): [#def564]
libguestfs-1.58.0/fish/prep.c:125: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  123|   
#  124|     for (i = 0; i < data->prep->nr_params; ++i)
#  125|->     data->params[i] = (char *) data->prep->params[i].pdefault;
#  126|   
#  127|     /* Parse the optional parameters. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def565]
libguestfs-1.58.0/fish/rc.c:195:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/fish/rc.c:208:1: enter_function: entry to ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: call_function: calling ‘create_sockdir’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: return_function: returning to ‘rc_listen’ from ‘create_sockdir’
libguestfs-1.58.0/fish/rc.c:229:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: following ‘false’ branch (when ‘pid <= 0’)...
libguestfs-1.58.0/fish/rc.c:253:9: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:254:3: call_function: calling ‘create_sockpath’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:254:3: return_function: returning to ‘rc_listen’ from ‘create_sockpath’
libguestfs-1.58.0/fish/rc.c:256:10: acquire_resource: socket created here
libguestfs-1.58.0/fish/rc.c:257:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
libguestfs-1.58.0/fish/rc.c:259:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:266:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/rc.c:271:5: branch_true: ...to here
libguestfs-1.58.0/fish/rc.c:271:5: call_function: calling ‘close_stdout’ from ‘rc_listen’
#  193|     int fd;
#  194|   
#  195|->   fd = open ("/dev/null", O_WRONLY);
#  196|     if (fd == -1)
#  197|       perror ("/dev/null");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def566]
libguestfs-1.58.0/fish/rc.c:197:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/fish/rc.c:208:1: enter_function: entry to ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: call_function: calling ‘create_sockdir’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: return_function: returning to ‘rc_listen’ from ‘create_sockdir’
libguestfs-1.58.0/fish/rc.c:229:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: following ‘false’ branch (when ‘pid <= 0’)...
libguestfs-1.58.0/fish/rc.c:253:9: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:254:3: call_function: calling ‘create_sockpath’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:254:3: return_function: returning to ‘rc_listen’ from ‘create_sockpath’
libguestfs-1.58.0/fish/rc.c:256:10: acquire_resource: socket created here
libguestfs-1.58.0/fish/rc.c:257:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
libguestfs-1.58.0/fish/rc.c:259:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:266:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/rc.c:271:5: branch_true: ...to here
libguestfs-1.58.0/fish/rc.c:271:5: call_function: calling ‘close_stdout’ from ‘rc_listen’
#  195|     fd = open ("/dev/null", O_WRONLY);
#  196|     if (fd == -1)
#  197|->     perror ("/dev/null");
#  198|     else {
#  199|       dup2 (fd, STDOUT_FILENO);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def567]
libguestfs-1.58.0/fish/rc.c:200:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
libguestfs-1.58.0/fish/rc.c:195:8: acquire_resource: opened here
libguestfs-1.58.0/fish/rc.c:196:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:199:5: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:200:5: danger: ‘open("/dev/null", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  198|     else {
#  199|       dup2 (fd, STDOUT_FILENO);
#  200|->     close (fd);
#  201|     }
#  202|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def568]
libguestfs-1.58.0/fish/rc.c:200:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/fish/rc.c:208:1: enter_function: entry to ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: call_function: calling ‘create_sockdir’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: return_function: returning to ‘rc_listen’ from ‘create_sockdir’
libguestfs-1.58.0/fish/rc.c:229:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: following ‘false’ branch (when ‘pid <= 0’)...
libguestfs-1.58.0/fish/rc.c:253:9: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:254:3: call_function: calling ‘create_sockpath’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:254:3: return_function: returning to ‘rc_listen’ from ‘create_sockpath’
libguestfs-1.58.0/fish/rc.c:256:10: acquire_resource: socket created here
libguestfs-1.58.0/fish/rc.c:257:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
libguestfs-1.58.0/fish/rc.c:259:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:266:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/rc.c:271:5: branch_true: ...to here
libguestfs-1.58.0/fish/rc.c:271:5: call_function: calling ‘close_stdout’ from ‘rc_listen’
#  198|     else {
#  199|       dup2 (fd, STDOUT_FILENO);
#  200|->     close (fd);
#  201|     }
#  202|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def569]
libguestfs-1.58.0/fish/rc.c:273:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/fish/rc.c:208:1: enter_function: entry to ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: call_function: calling ‘create_sockdir’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: return_function: returning to ‘rc_listen’ from ‘create_sockdir’
libguestfs-1.58.0/fish/rc.c:229:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: following ‘false’ branch (when ‘pid <= 0’)...
libguestfs-1.58.0/fish/rc.c:253:9: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:254:3: call_function: calling ‘create_sockpath’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:254:3: return_function: returning to ‘rc_listen’ from ‘create_sockpath’
libguestfs-1.58.0/fish/rc.c:256:10: acquire_resource: socket created here
libguestfs-1.58.0/fish/rc.c:257:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
libguestfs-1.58.0/fish/rc.c:259:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:266:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/rc.c:271:5: branch_true: ...to here
libguestfs-1.58.0/fish/rc.c:273:9: throw: if ‘accept4’ throws an exception...
libguestfs-1.58.0/fish/rc.c:273:9: danger: ‘sock’ leaks here
#  271|       close_stdout ();
#  272|   
#  273|->     s = accept4 (sock, NULL, NULL, SOCK_CLOEXEC);
#  274|       if (s == -1)
#  275|         perror ("accept");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def570]
libguestfs-1.58.0/fish/rc.c:280:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libguestfs-1.58.0/fish/rc.c:208:1: enter_function: entry to ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: call_function: calling ‘create_sockdir’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: return_function: returning to ‘rc_listen’ from ‘create_sockdir’
libguestfs-1.58.0/fish/rc.c:229:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: following ‘false’ branch (when ‘pid <= 0’)...
libguestfs-1.58.0/fish/rc.c:253:9: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:254:3: call_function: calling ‘create_sockpath’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:254:3: return_function: returning to ‘rc_listen’ from ‘create_sockpath’
libguestfs-1.58.0/fish/rc.c:257:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
libguestfs-1.58.0/fish/rc.c:259:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:266:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/rc.c:271:5: branch_true: ...to here
libguestfs-1.58.0/fish/rc.c:277:7: call_function: calling ‘receive_stdout’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:277:7: return_function: returning to ‘rc_listen’ from ‘receive_stdout’
libguestfs-1.58.0/fish/rc.c:279:12: acquire_memory: allocated here
libguestfs-1.58.0/fish/rc.c:280:7: throw: if ‘xdrstdio_create’ throws an exception...
libguestfs-1.58.0/fish/rc.c:280:7: danger: ‘fp’ leaks here; was allocated at [(56)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/55)
#  278|   
#  279|         fp = fdopen (s, "r+");
#  280|->       xdrstdio_create (&xdr, fp, XDR_DECODE);
#  281|   
#  282|         if (!xdr_guestfish_hello (&xdr, &hello)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
libguestfs-1.58.0/fish/rc.c:313:19: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’
libguestfs-1.58.0/fish/rc.c:208:1: enter_function: entry to ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: call_function: calling ‘create_sockdir’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: return_function: returning to ‘rc_listen’ from ‘create_sockdir’
libguestfs-1.58.0/fish/rc.c:229:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: following ‘false’ branch (when ‘pid <= 0’)...
libguestfs-1.58.0/fish/rc.c:253:9: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:254:3: call_function: calling ‘create_sockpath’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:254:3: return_function: returning to ‘rc_listen’ from ‘create_sockpath’
libguestfs-1.58.0/fish/rc.c:257:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
libguestfs-1.58.0/fish/rc.c:259:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:266:10: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/rc.c:271:5: branch_true: ...to here
libguestfs-1.58.0/fish/rc.c:277:7: call_function: calling ‘receive_stdout’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:277:7: return_function: returning to ‘rc_listen’ from ‘receive_stdout’
libguestfs-1.58.0/fish/rc.c:282:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:287:11: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:287:10: branch_false: following ‘false’ branch (when the strings are equal)...
libguestfs-1.58.0/fish/rc.c:294:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:296:14: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fish/rc.c:298:16: branch_true: ...to here
libguestfs-1.58.0/fish/rc.c:300:12: branch_false: following ‘false’ branch (when ‘argv’ is non-NULL)...
libguestfs-1.58.0/fish/rc.c:302:9: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:313:19: throw: if ‘issue_command’ throws an exception...
libguestfs-1.58.0/fish/rc.c:313:19: danger: ‘argv’ leaks here; was allocated at [(62)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/61)
#  311|   
#  312|           /* Run the command. */
#  313|->         reply.r = issue_command (call.cmd, argv, NULL, 0);
#  314|   
#  315|           xdr_free ((xdrproc_t) xdr_guestfish_call, (char *) &call);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def572]
libguestfs-1.58.0/fish/rc.c:345:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/fish/rc.c:208:1: enter_function: entry to ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: call_function: calling ‘create_sockdir’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:226:3: return_function: returning to ‘rc_listen’ from ‘create_sockdir’
libguestfs-1.58.0/fish/rc.c:229:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:232:6: branch_false: following ‘false’ branch (when ‘pid <= 0’)...
libguestfs-1.58.0/fish/rc.c:253:9: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:254:3: call_function: calling ‘create_sockpath’ from ‘rc_listen’
libguestfs-1.58.0/fish/rc.c:254:3: return_function: returning to ‘rc_listen’ from ‘create_sockpath’
libguestfs-1.58.0/fish/rc.c:256:10: acquire_resource: socket created here
libguestfs-1.58.0/fish/rc.c:257:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
libguestfs-1.58.0/fish/rc.c:259:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:260:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:262:6: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:266:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:344:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:345:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fish/rc.c:345:3: danger: ‘sock’ leaks here
#  343|   
#  344|     unlink (sockpath);
#  345|->   close (sock);
#  346|   
#  347|     /* This returns to 'fish.c', where it jumps to global cleanups and exits. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def573]
libguestfs-1.58.0/fish/rc.c:385:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
libguestfs-1.58.0/fish/rc.c:354:1: enter_function: entry to ‘rc_remote’
libguestfs-1.58.0/fish/rc.c:372:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:377:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:377:3: call_function: calling ‘create_sockpath’ from ‘rc_remote’
libguestfs-1.58.0/fish/rc.c:377:3: return_function: returning to ‘rc_remote’ from ‘create_sockpath’
libguestfs-1.58.0/fish/rc.c:379:10: acquire_resource: socket created here
libguestfs-1.58.0/fish/rc.c:380:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
libguestfs-1.58.0/fish/rc.c:385:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:385:7: throw: if ‘connect’ throws an exception...
libguestfs-1.58.0/fish/rc.c:385:7: danger: ‘sock’ leaks here
#  383|     }
#  384|   
#  385|->   if (connect (sock, (struct sockaddr *) &addr, sizeof addr) == -1) {
#  386|       perror (sockpath);
#  387|       fprintf (stderr, _("guestfish: remote: looks like the server is not running\n"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def574]
libguestfs-1.58.0/fish/rc.c:396:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libguestfs-1.58.0/fish/rc.c:354:1: enter_function: entry to ‘rc_remote’
libguestfs-1.58.0/fish/rc.c:372:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:377:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:377:3: call_function: calling ‘create_sockpath’ from ‘rc_remote’
libguestfs-1.58.0/fish/rc.c:377:3: return_function: returning to ‘rc_remote’ from ‘create_sockpath’
libguestfs-1.58.0/fish/rc.c:380:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
libguestfs-1.58.0/fish/rc.c:385:7: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:385:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fish/rc.c:392:3: branch_false: ...to here
libguestfs-1.58.0/fish/rc.c:392:3: call_function: calling ‘send_stdout’ from ‘rc_remote’
libguestfs-1.58.0/fish/rc.c:392:3: return_function: returning to ‘rc_remote’ from ‘send_stdout’
libguestfs-1.58.0/fish/rc.c:395:8: acquire_memory: allocated here
libguestfs-1.58.0/fish/rc.c:396:3: throw: if ‘xdrstdio_create’ throws an exception...
libguestfs-1.58.0/fish/rc.c:396:3: danger: ‘fp’ leaks here; was allocated at [(28)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/27)
#  394|     /* Send the greeting. */
#  395|     fp = fdopen (sock, "r+");
#  396|->   xdrstdio_create (&xdr, fp, XDR_ENCODE);
#  397|   
#  398|     if (!xdr_guestfish_hello (&xdr, &hello)) {

Error: CPPCHECK_WARNING (CWE-476): [#def575]
libguestfs-1.58.0/fish/tilde.c:72: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: str
#   70|         if (str == NULL)
#   71|           error (EXIT_FAILURE, errno, "malloc");
#   72|->       strcpy (str, home);
#   73|         strcat (str, rest);
#   74|         return str;

Error: CPPCHECK_WARNING (CWE-476): [#def576]
libguestfs-1.58.0/fish/tilde.c:73: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: str
#   71|           error (EXIT_FAILURE, errno, "malloc");
#   72|         strcpy (str, home);
#   73|->       strcat (str, rest);
#   74|         return str;
#   75|       }

Error: CPPCHECK_WARNING (CWE-476): [#def577]
libguestfs-1.58.0/fish/tilde.c:107: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: str
#  105|       error (EXIT_FAILURE, errno, "malloc");
#  106|   
#  107|->   strcpy (str, home);
#  108|     if (append)
#  109|       strcat (str, append);

Error: CPPCHECK_WARNING (CWE-476): [#def578]
libguestfs-1.58.0/fish/tilde.c:109: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: str
#  107|     strcpy (str, home);
#  108|     if (append)
#  109|->     strcat (str, append);
#  110|   
#  111|     return str;

Error: CPPCHECK_WARNING (CWE-476): [#def579]
libguestfs-1.58.0/fuse/guestmount.c:280: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mp
#  278|   
#  279|       case 'm':
#  280|->       OPTION_m;
#  281|         break;
#  282|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def580]
libguestfs-1.58.0/fuse/guestunmount.c:249:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fuse/guestunmount.c:237:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:240:7: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:245:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/fuse/guestunmount.c:249:5: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:249:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fuse/guestunmount.c:249:5: danger: ‘fd[0]’ leaks here
#  247|   
#  248|     if (pid == 0) {               /* Child - run fusermount. */
#  249|->     close (fd[0]);
#  250|       dup2 (fd[1], 1);
#  251|       dup2 (fd[1], 2);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def581]
libguestfs-1.58.0/fuse/guestunmount.c:249:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fuse/guestunmount.c:237:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:240:7: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:245:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/fuse/guestunmount.c:249:5: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:249:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fuse/guestunmount.c:249:5: danger: ‘fd[1]’ leaks here
#  247|   
#  248|     if (pid == 0) {               /* Child - run fusermount. */
#  249|->     close (fd[0]);
#  250|       dup2 (fd[1], 1);
#  251|       dup2 (fd[1], 2);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def582]
libguestfs-1.58.0/fuse/guestunmount.c:252:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fuse/guestunmount.c:237:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:240:7: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:245:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libguestfs-1.58.0/fuse/guestunmount.c:249:5: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:252:5: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fuse/guestunmount.c:252:5: danger: ‘fd[1]’ leaks here
#  250|       dup2 (fd[1], 1);
#  251|       dup2 (fd[1], 2);
#  252|->     close (fd[1]);
#  253|   
#  254|       /* We have to parse error messages from fusermount, so ... */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def583]
libguestfs-1.58.0/fuse/guestunmount.c:268:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fuse/guestunmount.c:237:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:240:7: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:245:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fuse/guestunmount.c:268:3: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:268:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fuse/guestunmount.c:268:3: danger: ‘fd[0]’ leaks here
#  266|   
#  267|     /* Parent - read from the pipe any errors etc. */
#  268|->   close (fd[1]);
#  269|   
#  270|     while (1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def584]
libguestfs-1.58.0/fuse/guestunmount.c:268:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
libguestfs-1.58.0/fuse/guestunmount.c:237:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:240:7: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:245:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fuse/guestunmount.c:268:3: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:268:3: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fuse/guestunmount.c:268:3: danger: ‘fd[1]’ leaks here
#  266|   
#  267|     /* Parent - read from the pipe any errors etc. */
#  268|->   close (fd[1]);
#  269|   
#  270|     while (1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def585]
libguestfs-1.58.0/fuse/guestunmount.c:289:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
libguestfs-1.58.0/fuse/guestunmount.c:237:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:240:7: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:245:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fuse/guestunmount.c:268:3: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:271:8: branch_true: following ‘true’ branch (when ‘allocsize <= len’)...
libguestfs-1.58.0/fuse/guestunmount.c:272:7: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:274:10: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/fuse/guestunmount.c:279:33: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:280:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:283:9: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:283:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:289:7: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:289:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fuse/guestunmount.c:289:7: danger: ‘fd[0]’ leaks here
#  287|     }
#  288|   
#  289|->   if (close (fd[0]) == -1)
#  290|       error (EXIT_FAILURE, errno, "close");
#  291|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def586]
libguestfs-1.58.0/fuse/guestunmount.c:289:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/fuse/guestunmount.c:237:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:240:7: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:245:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fuse/guestunmount.c:268:3: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:271:8: branch_true: following ‘true’ branch (when ‘allocsize <= len’)...
libguestfs-1.58.0/fuse/guestunmount.c:272:7: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:274:10: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/fuse/guestunmount.c:279:33: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:280:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:283:9: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:283:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:289:7: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:289:7: throw: if ‘close’ throws an exception...
libguestfs-1.58.0/fuse/guestunmount.c:289:7: danger: ‘buf’ leaks here; was allocated at [(10)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/9)
#  287|     }
#  288|   
#  289|->   if (close (fd[0]) == -1)
#  290|       error (EXIT_FAILURE, errno, "close");
#  291|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def587]
libguestfs-1.58.0/fuse/guestunmount.c:304:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libguestfs-1.58.0/fuse/guestunmount.c:237:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:240:7: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:245:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:248:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libguestfs-1.58.0/fuse/guestunmount.c:268:3: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:271:8: branch_true: following ‘true’ branch (when ‘allocsize <= len’)...
libguestfs-1.58.0/fuse/guestunmount.c:272:7: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:274:10: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/fuse/guestunmount.c:279:33: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:280:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:283:9: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:283:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:286:9: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:271:8: branch_true: following ‘true’ branch (when ‘allocsize <= len’)...
libguestfs-1.58.0/fuse/guestunmount.c:272:7: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:274:10: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/fuse/guestunmount.c:279:33: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:280:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:283:9: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:283:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:289:7: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:289:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/fuse/guestunmount.c:292:6: branch_false: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:292:6: branch_true: following ‘true’ branch (when ‘buf’ is non-NULL)...
libguestfs-1.58.0/fuse/guestunmount.c:292:6: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:300:8: branch_true: following ‘true’ branch (when ‘allocsize > len’)...
libguestfs-1.58.0/fuse/guestunmount.c:301:10: branch_true: ...to here
libguestfs-1.58.0/fuse/guestunmount.c:304:7: throw: if ‘waitpid’ throws an exception...
libguestfs-1.58.0/fuse/guestunmount.c:304:7: danger: ‘buf’ leaks here; was allocated at [(10)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/9)
#  302|     }
#  303|   
#  304|->   if (waitpid (pid, &r, 0) == -1)
#  305|       error (EXIT_FAILURE, errno, "waitpid");
#  306|   

Error: COMPILER_WARNING (CWE-9001): [#def588]
libguestfs-1.58.0/gobject/src/session.c:853:21: warning[-Wcomment]: '/*' within comment
#  853 |  * /dev/disk/guestfs/*label*.
#  851|    * using *only* ASCII characters "[a-zA-Z]". As well as its usual name
#  852|    * in the API (such as /dev/sda), the drive will also be named
#  853|->  * /dev/disk/guestfs/*label*.
#  854|    * 
#  855|    * See "DISK LABELS" in guestfs(3).

Error: COMPILER_WARNING (CWE-9001): [#def589]
libguestfs-1.58.0/gobject/src/session.c:1831:73: warning[-Wcomment]: '/*' within comment
# 1831 |  * This is just a shortcut for listing guestfs_session_aug_match() "path/*"
# 1829|    * list Augeas nodes under augpath
# 1830|    *
# 1831|->  * This is just a shortcut for listing guestfs_session_aug_match() "path/*"
# 1832|    * and sorting the resulting nodes into alphabetical order.
# 1833|    * 

Error: COMPILER_WARNING (CWE-9001): [#def590]
libguestfs-1.58.0/gobject/src/session.c:17136:42: warning[-Wcomment]: '/*' within comment
#17136 |  * The returned list contains /dev/mapper/* devices, eg. ones created by a
#17134|    * List all device mapper devices.
#17135|    * 
#17136|->  * The returned list contains /dev/mapper/* devices, eg. ones created by a
#17137|    * previous call to guestfs_session_luks_open().
#17138|    * 

Error: COMPILER_WARNING (CWE-9001): [#def591]
libguestfs-1.58.0/gobject/src/session.c:24775:34: warning[-Wcomment]: '/*' within comment
#24775 |  * <![CDATA[><fs> glob rsync-out /* rsync://remote/]]>
#24773|    * command (see "glob" in guestfish(1)), for example:
#24774|    * 
#24775|->  * <![CDATA[><fs> glob rsync-out /* rsync://remote/]]>
#24776|    * 
#24777|    * This function depends on the feature "rsync".

Error: GCC_ANALYZER_WARNING (CWE-775): [#def592]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:68:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def593]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:68:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def594]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:68:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def595]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:68:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def596]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:81:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def597]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:81:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def598]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:81:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def599]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:81:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def600]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:93:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def601]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:93:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def602]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:93:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def603]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:93:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def604]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:99:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def605]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:99:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def606]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:99:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def607]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:99:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def608]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:102:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def609]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:102:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def610]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:102:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def611]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:102:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:704:20: call_function: calling ‘read_line’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-404): [#def612]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:120:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:599:1: enter_function: entry to ‘dump_error_quark’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:601:3: call_function: calling ‘escaped_printf’ from ‘dump_error_quark’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def613]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:138:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def614]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:138:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def615]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:138:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def616]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:138:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’

Error: GCC_ANALYZER_WARNING (CWE-775): [#def617]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:685:25: branch_true: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:7: throw: if ‘g_file_error_quark’ throws an exception...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:7: danger: ‘fopen(input_filename, "rb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/199/codeFlows/0/threadFlows/0/locations/4)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def618]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:685:25: branch_true: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:7: throw: if ‘g_file_error_quark’ throws an exception...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:7: danger: ‘fopen(input_filename, "rb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/200/codeFlows/0/threadFlows/0/locations/4)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def619]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:685:25: branch_true: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:41: throw: if ‘g_file_error_from_errno’ throws an exception...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:41: danger: ‘fopen(input_filename, "rb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/203/codeFlows/0/threadFlows/0/locations/4)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def620]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:685:25: branch_true: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:41: throw: if ‘g_file_error_from_errno’ throws an exception...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:686:41: danger: ‘fopen(input_filename, "rb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/204/codeFlows/0/threadFlows/0/locations/4)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def621]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: throw: if ‘g_hash_table_new’ throws an exception...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: danger: ‘fopen(input_filename, "rb")’ leaks here; was opened at [(6)](sarif:/runs/0/results/205/codeFlows/0/threadFlows/0/locations/5)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def622]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_resource: opened here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: throw: if ‘g_hash_table_new’ throws an exception...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: danger: ‘fopen(output_filename, "wb")’ leaks here; was opened at [(8)](sarif:/runs/0/results/206/codeFlows/0/threadFlows/0/locations/7)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def623]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_filename, "rb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: throw: if ‘g_hash_table_new’ throws an exception...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: danger: ‘fopen(input_filename, "rb")’ leaks here; was allocated at [(6)](sarif:/runs/0/results/207/codeFlows/0/threadFlows/0/locations/5)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def624]
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(output_filename, "wb")’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:630:1: enter_function: entry to ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:645:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:654:15: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:658:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:669:11: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:670:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:682:12: acquire_memory: allocated here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:683:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: branch_false: ...to here
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:696:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: call_function: calling ‘goutput_write’ from ‘dump_irepository’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:697:3: return_function: returning to ‘dump_irepository’ from ‘goutput_write’
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: throw: if ‘g_hash_table_new’ throws an exception...
libguestfs-1.58.0/gobject/tmp-introspect3ns5h0u6/Guestfs-1.0.c:699:18: danger: ‘fopen(output_filename, "wb")’ leaks here; was allocated at [(8)](sarif:/runs/0/results/208/codeFlows/0/threadFlows/0/locations/7)

Error: CPPCHECK_WARNING (CWE-457): [#def625]
libguestfs-1.58.0/lib/actions-2.c:225: warning[uninitvar]: Uninitialized variable: optargs->name
#  223|                                         "add_drive_scratch", 17);
#  224|     if ((optargs->bitmask & GUESTFS_ADD_DRIVE_SCRATCH_NAME_BITMASK) &&
#  225|->       optargs->name == NULL) {
#  226|       error (g, "%s: %s: optional parameter cannot be NULL",
#  227|              "add_drive_scratch", "name");

Error: GCC_ANALYZER_WARNING (CWE-404): [#def626]
libguestfs-1.58.0/lib/actions-variants.c:132:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:112:1: enter_function: entry to 'guestfs_add_drive_opts'
libguestfs-1.58.0/lib/actions-variants.c:120:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:121:7: call_function: calling 'guestfs_add_drive_opts_va' from 'guestfs_add_drive_opts'
#  130|                              va_list args)
#  131|   {
#  132|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  133|     struct guestfs_add_drive_opts_argv optargs_s;
#  134|     struct guestfs_add_drive_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def627]
libguestfs-1.58.0/lib/actions-variants.c:231:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:211:1: enter_function: entry to 'guestfs_add_drive_scratch'
libguestfs-1.58.0/lib/actions-variants.c:219:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:220:7: call_function: calling 'guestfs_add_drive_scratch_va' from 'guestfs_add_drive_scratch'
#  229|                                 va_list args)
#  230|   {
#  231|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  232|     struct guestfs_add_drive_scratch_argv optargs_s;
#  233|     struct guestfs_add_drive_scratch_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def628]
libguestfs-1.58.0/lib/actions-variants.c:289:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:269:1: enter_function: entry to 'guestfs_add_libvirt_dom'
libguestfs-1.58.0/lib/actions-variants.c:277:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:278:7: call_function: calling 'guestfs_add_libvirt_dom_va' from 'guestfs_add_libvirt_dom'
#  287|                               va_list args)
#  288|   {
#  289|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  290|     struct guestfs_add_libvirt_dom_argv optargs_s;
#  291|     struct guestfs_add_libvirt_dom_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def629]
libguestfs-1.58.0/lib/actions-variants.c:361:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:339:1: enter_function: entry to 'guestfs_aug_transform'
libguestfs-1.58.0/lib/actions-variants.c:348:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:349:7: call_function: calling 'guestfs_aug_transform_va' from 'guestfs_aug_transform'
#  359|                             va_list args)
#  360|   {
#  361|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  362|     struct guestfs_aug_transform_argv optargs_s;
#  363|     struct guestfs_aug_transform_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def630]
libguestfs-1.58.0/lib/actions-variants.c:413:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:393:1: enter_function: entry to 'guestfs_btrfs_filesystem_defragment'
libguestfs-1.58.0/lib/actions-variants.c:401:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:402:7: call_function: calling 'guestfs_btrfs_filesystem_defragment_va' from 'guestfs_btrfs_filesystem_defragment'
#  411|                                           va_list args)
#  412|   {
#  413|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  414|     struct guestfs_btrfs_filesystem_defragment_argv optargs_s;
#  415|     struct guestfs_btrfs_filesystem_defragment_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def631]
libguestfs-1.58.0/lib/actions-variants.c:468:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:448:1: enter_function: entry to 'guestfs_btrfs_filesystem_resize'
libguestfs-1.58.0/lib/actions-variants.c:456:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:457:7: call_function: calling 'guestfs_btrfs_filesystem_resize_va' from 'guestfs_btrfs_filesystem_resize'
#  466|                                       va_list args)
#  467|   {
#  468|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  469|     struct guestfs_btrfs_filesystem_resize_argv optargs_s;
#  470|     struct guestfs_btrfs_filesystem_resize_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def632]
libguestfs-1.58.0/lib/actions-variants.c:520:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:500:1: enter_function: entry to 'guestfs_btrfs_fsck'
libguestfs-1.58.0/lib/actions-variants.c:508:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:509:7: call_function: calling 'guestfs_btrfs_fsck_va' from 'guestfs_btrfs_fsck'
#  518|                          va_list args)
#  519|   {
#  520|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  521|     struct guestfs_btrfs_fsck_argv optargs_s;
#  522|     struct guestfs_btrfs_fsck_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def633]
libguestfs-1.58.0/lib/actions-variants.c:577:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:555:1: enter_function: entry to 'guestfs_btrfs_image'
libguestfs-1.58.0/lib/actions-variants.c:564:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:565:7: call_function: calling 'guestfs_btrfs_image_va' from 'guestfs_btrfs_image'
#  575|                           va_list args)
#  576|   {
#  577|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  578|     struct guestfs_btrfs_image_argv optargs_s;
#  579|     struct guestfs_btrfs_image_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def634]
libguestfs-1.58.0/lib/actions-variants.c:629:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:609:1: enter_function: entry to 'guestfs_btrfs_scrub_full'
libguestfs-1.58.0/lib/actions-variants.c:617:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:618:7: call_function: calling 'guestfs_btrfs_scrub_full_va' from 'guestfs_btrfs_scrub_full'
#  627|                                va_list args)
#  628|   {
#  629|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  630|     struct guestfs_btrfs_scrub_full_argv optargs_s;
#  631|     struct guestfs_btrfs_scrub_full_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def635]
libguestfs-1.58.0/lib/actions-variants.c:681:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:661:1: enter_function: entry to 'guestfs_btrfs_subvolume_create_opts'
libguestfs-1.58.0/lib/actions-variants.c:669:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:670:7: call_function: calling 'guestfs_btrfs_subvolume_create_opts_va' from 'guestfs_btrfs_subvolume_create_opts'
#  679|                                           va_list args)
#  680|   {
#  681|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  682|     struct guestfs_btrfs_subvolume_create_opts_argv optargs_s;
#  683|     struct guestfs_btrfs_subvolume_create_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def636]
libguestfs-1.58.0/lib/actions-variants.c:746:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:724:1: enter_function: entry to 'guestfs_btrfs_subvolume_snapshot_opts'
libguestfs-1.58.0/lib/actions-variants.c:733:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:734:7: call_function: calling 'guestfs_btrfs_subvolume_snapshot_opts_va' from 'guestfs_btrfs_subvolume_snapshot_opts'
#  744|                                             va_list args)
#  745|   {
#  746|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  747|     struct guestfs_btrfs_subvolume_snapshot_opts_argv optargs_s;
#  748|     struct guestfs_btrfs_subvolume_snapshot_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def637]
libguestfs-1.58.0/lib/actions-variants.c:817:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:793:1: enter_function: entry to 'guestfs_compress_device_out'
libguestfs-1.58.0/lib/actions-variants.c:803:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:804:7: call_function: calling 'guestfs_compress_device_out_va' from 'guestfs_compress_device_out'
#  815|                                   va_list args)
#  816|   {
#  817|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  818|     struct guestfs_compress_device_out_argv optargs_s;
#  819|     struct guestfs_compress_device_out_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def638]
libguestfs-1.58.0/lib/actions-variants.c:873:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:849:1: enter_function: entry to 'guestfs_compress_out'
libguestfs-1.58.0/lib/actions-variants.c:859:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:860:7: call_function: calling 'guestfs_compress_out_va' from 'guestfs_compress_out'
#  871|                            va_list args)
#  872|   {
#  873|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  874|     struct guestfs_compress_out_argv optargs_s;
#  875|     struct guestfs_compress_out_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def639]
libguestfs-1.58.0/lib/actions-variants.c:927:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:905:1: enter_function: entry to 'guestfs_copy_attributes'
libguestfs-1.58.0/lib/actions-variants.c:914:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:915:7: call_function: calling 'guestfs_copy_attributes_va' from 'guestfs_copy_attributes'
#  925|                               va_list args)
#  926|   {
#  927|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  928|     struct guestfs_copy_attributes_argv optargs_s;
#  929|     struct guestfs_copy_attributes_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def640]
libguestfs-1.58.0/lib/actions-variants.c:990:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:968:1: enter_function: entry to 'guestfs_copy_device_to_device'
libguestfs-1.58.0/lib/actions-variants.c:977:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:978:7: call_function: calling 'guestfs_copy_device_to_device_va' from 'guestfs_copy_device_to_device'
#  988|                                     va_list args)
#  989|   {
#  990|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
#  991|     struct guestfs_copy_device_to_device_argv optargs_s;
#  992|     struct guestfs_copy_device_to_device_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def641]
libguestfs-1.58.0/lib/actions-variants.c:1056:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1034:1: enter_function: entry to 'guestfs_copy_device_to_file'
libguestfs-1.58.0/lib/actions-variants.c:1043:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1044:7: call_function: calling 'guestfs_copy_device_to_file_va' from 'guestfs_copy_device_to_file'
# 1054|                                   va_list args)
# 1055|   {
# 1056|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1057|     struct guestfs_copy_device_to_file_argv optargs_s;
# 1058|     struct guestfs_copy_device_to_file_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def642]
libguestfs-1.58.0/lib/actions-variants.c:1122:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1100:1: enter_function: entry to 'guestfs_copy_file_to_device'
libguestfs-1.58.0/lib/actions-variants.c:1109:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1110:7: call_function: calling 'guestfs_copy_file_to_device_va' from 'guestfs_copy_file_to_device'
# 1120|                                   va_list args)
# 1121|   {
# 1122|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1123|     struct guestfs_copy_file_to_device_argv optargs_s;
# 1124|     struct guestfs_copy_file_to_device_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def643]
libguestfs-1.58.0/lib/actions-variants.c:1188:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1166:1: enter_function: entry to 'guestfs_copy_file_to_file'
libguestfs-1.58.0/lib/actions-variants.c:1175:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1176:7: call_function: calling 'guestfs_copy_file_to_file_va' from 'guestfs_copy_file_to_file'
# 1186|                                 va_list args)
# 1187|   {
# 1188|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1189|     struct guestfs_copy_file_to_file_argv optargs_s;
# 1190|     struct guestfs_copy_file_to_file_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def644]
libguestfs-1.58.0/lib/actions-variants.c:1254:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1232:1: enter_function: entry to 'guestfs_cpio_out'
libguestfs-1.58.0/lib/actions-variants.c:1241:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1242:7: call_function: calling 'guestfs_cpio_out_va' from 'guestfs_cpio_out'
# 1252|                        va_list args)
# 1253|   {
# 1254|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1255|     struct guestfs_cpio_out_argv optargs_s;
# 1256|     struct guestfs_cpio_out_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def645]
libguestfs-1.58.0/lib/actions-variants.c:1310:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1286:1: enter_function: entry to 'guestfs_cryptsetup_open'
libguestfs-1.58.0/lib/actions-variants.c:1296:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1297:7: call_function: calling 'guestfs_cryptsetup_open_va' from 'guestfs_cryptsetup_open'
# 1308|                               va_list args)
# 1309|   {
# 1310|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1311|     struct guestfs_cryptsetup_open_argv optargs_s;
# 1312|     struct guestfs_cryptsetup_open_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def646]
libguestfs-1.58.0/lib/actions-variants.c:1372:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1348:1: enter_function: entry to 'guestfs_disk_create'
libguestfs-1.58.0/lib/actions-variants.c:1358:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1359:7: call_function: calling 'guestfs_disk_create_va' from 'guestfs_disk_create'
# 1370|                           va_list args)
# 1371|   {
# 1372|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1373|     struct guestfs_disk_create_argv optargs_s;
# 1374|     struct guestfs_disk_create_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def647]
libguestfs-1.58.0/lib/actions-variants.c:1442:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1416:1: enter_function: entry to 'guestfs_download_blocks'
libguestfs-1.58.0/lib/actions-variants.c:1427:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1428:7: call_function: calling 'guestfs_download_blocks_va' from 'guestfs_download_blocks'
# 1440|                               va_list args)
# 1441|   {
# 1442|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1443|     struct guestfs_download_blocks_argv optargs_s;
# 1444|     struct guestfs_download_blocks_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def648]
libguestfs-1.58.0/lib/actions-variants.c:1494:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1474:1: enter_function: entry to 'guestfs_e2fsck'
libguestfs-1.58.0/lib/actions-variants.c:1482:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1483:7: call_function: calling 'guestfs_e2fsck_va' from 'guestfs_e2fsck'
# 1492|                      va_list args)
# 1493|   {
# 1494|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1495|     struct guestfs_e2fsck_argv optargs_s;
# 1496|     struct guestfs_e2fsck_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def649]
libguestfs-1.58.0/lib/actions-variants.c:1552:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1532:1: enter_function: entry to 'guestfs_fstrim'
libguestfs-1.58.0/lib/actions-variants.c:1540:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1541:7: call_function: calling 'guestfs_fstrim_va' from 'guestfs_fstrim'
# 1550|                      va_list args)
# 1551|   {
# 1552|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1553|     struct guestfs_fstrim_argv optargs_s;
# 1554|     struct guestfs_fstrim_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def650]
libguestfs-1.58.0/lib/actions-variants.c:1610:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1590:1: enter_function: entry to 'guestfs_glob_expand_opts'
libguestfs-1.58.0/lib/actions-variants.c:1598:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1599:7: call_function: calling 'guestfs_glob_expand_opts_va' from 'guestfs_glob_expand_opts'
# 1608|                                va_list args)
# 1609|   {
# 1610|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1611|     struct guestfs_glob_expand_opts_argv optargs_s;
# 1612|     struct guestfs_glob_expand_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def651]
libguestfs-1.58.0/lib/actions-variants.c:1675:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1653:1: enter_function: entry to 'guestfs_grep_opts'
libguestfs-1.58.0/lib/actions-variants.c:1662:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1663:7: call_function: calling 'guestfs_grep_opts_va' from 'guestfs_grep_opts'
# 1673|                         va_list args)
# 1674|   {
# 1675|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1676|     struct guestfs_grep_opts_argv optargs_s;
# 1677|     struct guestfs_grep_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def652]
libguestfs-1.58.0/lib/actions-variants.c:1748:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1728:1: enter_function: entry to 'guestfs_hivex_open'
libguestfs-1.58.0/lib/actions-variants.c:1736:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1737:7: call_function: calling 'guestfs_hivex_open_va' from 'guestfs_hivex_open'
# 1746|                          va_list args)
# 1747|   {
# 1748|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1749|     struct guestfs_hivex_open_argv optargs_s;
# 1750|     struct guestfs_hivex_open_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def653]
libguestfs-1.58.0/lib/actions-variants.c:1811:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1789:1: enter_function: entry to 'guestfs_inspect_get_icon'
libguestfs-1.58.0/lib/actions-variants.c:1798:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1799:7: call_function: calling 'guestfs_inspect_get_icon_va' from 'guestfs_inspect_get_icon'
# 1809|                                va_list args)
# 1810|   {
# 1811|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1812|     struct guestfs_inspect_get_icon_argv optargs_s;
# 1813|     struct guestfs_inspect_get_icon_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def654]
libguestfs-1.58.0/lib/actions-variants.c:1884:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1846:1: enter_function: entry to 'guestfs_internal_test'
libguestfs-1.58.0/lib/actions-variants.c:1863:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1864:7: call_function: calling 'guestfs_internal_test_va' from 'guestfs_internal_test'
# 1882|                             va_list args)
# 1883|   {
# 1884|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1885|     struct guestfs_internal_test_argv optargs_s;
# 1886|     struct guestfs_internal_test_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def655]
libguestfs-1.58.0/lib/actions-variants.c:1946:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:1928:1: enter_function: entry to 'guestfs_internal_test_63_optargs'
libguestfs-1.58.0/lib/actions-variants.c:1935:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:1936:7: call_function: calling 'guestfs_internal_test_63_optargs_va' from 'guestfs_internal_test_63_optargs'
# 1944|                                        va_list args)
# 1945|   {
# 1946|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 1947|     struct guestfs_internal_test_63_optargs_argv optargs_s;
# 1948|     struct guestfs_internal_test_63_optargs_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def656]
libguestfs-1.58.0/lib/actions-variants.c:2182:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2164:1: enter_function: entry to 'guestfs_internal_test_only_optargs'
libguestfs-1.58.0/lib/actions-variants.c:2171:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2172:7: call_function: calling 'guestfs_internal_test_only_optargs_va' from 'guestfs_internal_test_only_optargs'
# 2180|                                          va_list args)
# 2181|   {
# 2182|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2183|     struct guestfs_internal_test_only_optargs_argv optargs_s;
# 2184|     struct guestfs_internal_test_only_optargs_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def657]
libguestfs-1.58.0/lib/actions-variants.c:2234:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2214:1: enter_function: entry to 'guestfs_is_blockdev_opts'
libguestfs-1.58.0/lib/actions-variants.c:2222:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2223:7: call_function: calling 'guestfs_is_blockdev_opts_va' from 'guestfs_is_blockdev_opts'
# 2232|                                va_list args)
# 2233|   {
# 2234|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2235|     struct guestfs_is_blockdev_opts_argv optargs_s;
# 2236|     struct guestfs_is_blockdev_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def658]
libguestfs-1.58.0/lib/actions-variants.c:2297:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2277:1: enter_function: entry to 'guestfs_is_chardev_opts'
libguestfs-1.58.0/lib/actions-variants.c:2285:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2286:7: call_function: calling 'guestfs_is_chardev_opts_va' from 'guestfs_is_chardev_opts'
# 2295|                               va_list args)
# 2296|   {
# 2297|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2298|     struct guestfs_is_chardev_opts_argv optargs_s;
# 2299|     struct guestfs_is_chardev_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def659]
libguestfs-1.58.0/lib/actions-variants.c:2360:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2340:1: enter_function: entry to 'guestfs_is_dir_opts'
libguestfs-1.58.0/lib/actions-variants.c:2348:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2349:7: call_function: calling 'guestfs_is_dir_opts_va' from 'guestfs_is_dir_opts'
# 2358|                           va_list args)
# 2359|   {
# 2360|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2361|     struct guestfs_is_dir_opts_argv optargs_s;
# 2362|     struct guestfs_is_dir_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def660]
libguestfs-1.58.0/lib/actions-variants.c:2423:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2403:1: enter_function: entry to 'guestfs_is_fifo_opts'
libguestfs-1.58.0/lib/actions-variants.c:2411:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2412:7: call_function: calling 'guestfs_is_fifo_opts_va' from 'guestfs_is_fifo_opts'
# 2421|                            va_list args)
# 2422|   {
# 2423|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2424|     struct guestfs_is_fifo_opts_argv optargs_s;
# 2425|     struct guestfs_is_fifo_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def661]
libguestfs-1.58.0/lib/actions-variants.c:2486:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2466:1: enter_function: entry to 'guestfs_is_file_opts'
libguestfs-1.58.0/lib/actions-variants.c:2474:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2475:7: call_function: calling 'guestfs_is_file_opts_va' from 'guestfs_is_file_opts'
# 2484|                            va_list args)
# 2485|   {
# 2486|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2487|     struct guestfs_is_file_opts_argv optargs_s;
# 2488|     struct guestfs_is_file_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def662]
libguestfs-1.58.0/lib/actions-variants.c:2549:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2529:1: enter_function: entry to 'guestfs_is_socket_opts'
libguestfs-1.58.0/lib/actions-variants.c:2537:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2538:7: call_function: calling 'guestfs_is_socket_opts_va' from 'guestfs_is_socket_opts'
# 2547|                              va_list args)
# 2548|   {
# 2549|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2550|     struct guestfs_is_socket_opts_argv optargs_s;
# 2551|     struct guestfs_is_socket_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def663]
libguestfs-1.58.0/lib/actions-variants.c:2614:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2592:1: enter_function: entry to 'guestfs_md_create'
libguestfs-1.58.0/lib/actions-variants.c:2601:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2602:7: call_function: calling 'guestfs_md_create_va' from 'guestfs_md_create'
# 2612|                         va_list args)
# 2613|   {
# 2614|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2615|     struct guestfs_md_create_argv optargs_s;
# 2616|     struct guestfs_md_create_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def664]
libguestfs-1.58.0/lib/actions-variants.c:2678:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2658:1: enter_function: entry to 'guestfs_mke2fs'
libguestfs-1.58.0/lib/actions-variants.c:2666:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2667:7: call_function: calling 'guestfs_mke2fs_va' from 'guestfs_mke2fs'
# 2676|                      va_list args)
# 2677|   {
# 2678|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2679|     struct guestfs_mke2fs_argv optargs_s;
# 2680|     struct guestfs_mke2fs_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def665]
libguestfs-1.58.0/lib/actions-variants.c:2843:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2821:1: enter_function: entry to 'guestfs_mkfs_opts'
libguestfs-1.58.0/lib/actions-variants.c:2830:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2831:7: call_function: calling 'guestfs_mkfs_opts_va' from 'guestfs_mkfs_opts'
# 2841|                         va_list args)
# 2842|   {
# 2843|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2844|     struct guestfs_mkfs_opts_argv optargs_s;
# 2845|     struct guestfs_mkfs_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def666]
libguestfs-1.58.0/lib/actions-variants.c:2919:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2899:1: enter_function: entry to 'guestfs_mkfs_btrfs'
libguestfs-1.58.0/lib/actions-variants.c:2907:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2908:7: call_function: calling 'guestfs_mkfs_btrfs_va' from 'guestfs_mkfs_btrfs'
# 2917|                          va_list args)
# 2918|   {
# 2919|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2920|     struct guestfs_mkfs_btrfs_argv optargs_s;
# 2921|     struct guestfs_mkfs_btrfs_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def667]
libguestfs-1.58.0/lib/actions-variants.c:2994:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:2972:1: enter_function: entry to 'guestfs_mksquashfs'
libguestfs-1.58.0/lib/actions-variants.c:2981:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:2982:7: call_function: calling 'guestfs_mksquashfs_va' from 'guestfs_mksquashfs'
# 2992|                          va_list args)
# 2993|   {
# 2994|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 2995|     struct guestfs_mksquashfs_argv optargs_s;
# 2996|     struct guestfs_mksquashfs_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def668]
libguestfs-1.58.0/lib/actions-variants.c:3049:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3029:1: enter_function: entry to 'guestfs_mkswap_opts'
libguestfs-1.58.0/lib/actions-variants.c:3037:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3038:7: call_function: calling 'guestfs_mkswap_opts_va' from 'guestfs_mkswap_opts'
# 3047|                           va_list args)
# 3048|   {
# 3049|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3050|     struct guestfs_mkswap_opts_argv optargs_s;
# 3051|     struct guestfs_mkswap_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def669]
libguestfs-1.58.0/lib/actions-variants.c:3115:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3095:1: enter_function: entry to 'guestfs_mktemp'
libguestfs-1.58.0/lib/actions-variants.c:3103:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3104:7: call_function: calling 'guestfs_mktemp_va' from 'guestfs_mktemp'
# 3113|                      va_list args)
# 3114|   {
# 3115|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3116|     struct guestfs_mktemp_argv optargs_s;
# 3117|     struct guestfs_mktemp_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def670]
libguestfs-1.58.0/lib/actions-variants.c:3169:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3147:1: enter_function: entry to 'guestfs_mount_9p'
libguestfs-1.58.0/lib/actions-variants.c:3156:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3157:7: call_function: calling 'guestfs_mount_9p_va' from 'guestfs_mount_9p'
# 3167|                        va_list args)
# 3168|   {
# 3169|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3170|     struct guestfs_mount_9p_argv optargs_s;
# 3171|     struct guestfs_mount_9p_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def671]
libguestfs-1.58.0/lib/actions-variants.c:3221:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3201:1: enter_function: entry to 'guestfs_mount_local'
libguestfs-1.58.0/lib/actions-variants.c:3209:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3210:7: call_function: calling 'guestfs_mount_local_va' from 'guestfs_mount_local'
# 3219|                           va_list args)
# 3220|   {
# 3221|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3222|     struct guestfs_mount_local_argv optargs_s;
# 3223|     struct guestfs_mount_local_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def672]
libguestfs-1.58.0/lib/actions-variants.c:3286:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3262:1: enter_function: entry to 'guestfs_ntfs_chmod'
libguestfs-1.58.0/lib/actions-variants.c:3272:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3273:7: call_function: calling 'guestfs_ntfs_chmod_va' from 'guestfs_ntfs_chmod'
# 3284|                          va_list args)
# 3285|   {
# 3286|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3287|     struct guestfs_ntfs_chmod_argv optargs_s;
# 3288|     struct guestfs_ntfs_chmod_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def673]
libguestfs-1.58.0/lib/actions-variants.c:3340:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3318:1: enter_function: entry to 'guestfs_ntfsclone_out'
libguestfs-1.58.0/lib/actions-variants.c:3327:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3328:7: call_function: calling 'guestfs_ntfsclone_out_va' from 'guestfs_ntfsclone_out'
# 3338|                             va_list args)
# 3339|   {
# 3340|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3341|     struct guestfs_ntfsclone_out_argv optargs_s;
# 3342|     struct guestfs_ntfsclone_out_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def674]
libguestfs-1.58.0/lib/actions-variants.c:3404:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3384:1: enter_function: entry to 'guestfs_ntfsfix'
libguestfs-1.58.0/lib/actions-variants.c:3392:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3393:7: call_function: calling 'guestfs_ntfsfix_va' from 'guestfs_ntfsfix'
# 3402|                       va_list args)
# 3403|   {
# 3404|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3405|     struct guestfs_ntfsfix_argv optargs_s;
# 3406|     struct guestfs_ntfsfix_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def675]
libguestfs-1.58.0/lib/actions-variants.c:3456:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3436:1: enter_function: entry to 'guestfs_ntfsresize_opts'
libguestfs-1.58.0/lib/actions-variants.c:3444:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3445:7: call_function: calling 'guestfs_ntfsresize_opts_va' from 'guestfs_ntfsresize_opts'
# 3454|                               va_list args)
# 3455|   {
# 3456|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3457|     struct guestfs_ntfsresize_opts_argv optargs_s;
# 3458|     struct guestfs_ntfsresize_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def676]
libguestfs-1.58.0/lib/actions-variants.c:3522:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3502:1: enter_function: entry to 'guestfs_remount'
libguestfs-1.58.0/lib/actions-variants.c:3510:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3511:7: call_function: calling 'guestfs_remount_va' from 'guestfs_remount'
# 3520|                       va_list args)
# 3521|   {
# 3522|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3523|     struct guestfs_remount_argv optargs_s;
# 3524|     struct guestfs_remount_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def677]
libguestfs-1.58.0/lib/actions-variants.c:3576:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3554:1: enter_function: entry to 'guestfs_rsync'
libguestfs-1.58.0/lib/actions-variants.c:3563:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3564:7: call_function: calling 'guestfs_rsync_va' from 'guestfs_rsync'
# 3574|                     va_list args)
# 3575|   {
# 3576|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3577|     struct guestfs_rsync_argv optargs_s;
# 3578|     struct guestfs_rsync_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def678]
libguestfs-1.58.0/lib/actions-variants.c:3633:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3611:1: enter_function: entry to 'guestfs_rsync_in'
libguestfs-1.58.0/lib/actions-variants.c:3620:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3621:7: call_function: calling 'guestfs_rsync_in_va' from 'guestfs_rsync_in'
# 3631|                        va_list args)
# 3632|   {
# 3633|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3634|     struct guestfs_rsync_in_argv optargs_s;
# 3635|     struct guestfs_rsync_in_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def679]
libguestfs-1.58.0/lib/actions-variants.c:3690:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3668:1: enter_function: entry to 'guestfs_rsync_out'
libguestfs-1.58.0/lib/actions-variants.c:3677:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3678:7: call_function: calling 'guestfs_rsync_out_va' from 'guestfs_rsync_out'
# 3688|                         va_list args)
# 3689|   {
# 3690|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3691|     struct guestfs_rsync_out_argv optargs_s;
# 3692|     struct guestfs_rsync_out_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def680]
libguestfs-1.58.0/lib/actions-variants.c:3747:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3725:1: enter_function: entry to 'guestfs_selinux_relabel'
libguestfs-1.58.0/lib/actions-variants.c:3734:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3735:7: call_function: calling 'guestfs_selinux_relabel_va' from 'guestfs_selinux_relabel'
# 3745|                               va_list args)
# 3746|   {
# 3747|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3748|     struct guestfs_selinux_relabel_argv optargs_s;
# 3749|     struct guestfs_selinux_relabel_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def681]
libguestfs-1.58.0/lib/actions-variants.c:3801:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3779:1: enter_function: entry to 'guestfs_set_e2attrs'
libguestfs-1.58.0/lib/actions-variants.c:3788:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3789:7: call_function: calling 'guestfs_set_e2attrs_va' from 'guestfs_set_e2attrs'
# 3799|                           va_list args)
# 3800|   {
# 3801|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3802|     struct guestfs_set_e2attrs_argv optargs_s;
# 3803|     struct guestfs_set_e2attrs_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def682]
libguestfs-1.58.0/lib/actions-variants.c:3855:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3833:1: enter_function: entry to 'guestfs_setfiles'
libguestfs-1.58.0/lib/actions-variants.c:3842:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3843:7: call_function: calling 'guestfs_setfiles_va' from 'guestfs_setfiles'
# 3853|                        va_list args)
# 3854|   {
# 3855|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3856|     struct guestfs_setfiles_argv optargs_s;
# 3857|     struct guestfs_setfiles_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def683]
libguestfs-1.58.0/lib/actions-variants.c:3907:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3887:1: enter_function: entry to 'guestfs_syslinux'
libguestfs-1.58.0/lib/actions-variants.c:3895:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3896:7: call_function: calling 'guestfs_syslinux_va' from 'guestfs_syslinux'
# 3905|                        va_list args)
# 3906|   {
# 3907|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3908|     struct guestfs_syslinux_argv optargs_s;
# 3909|     struct guestfs_syslinux_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def684]
libguestfs-1.58.0/lib/actions-variants.c:3961:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:3939:1: enter_function: entry to 'guestfs_tar_in_opts'
libguestfs-1.58.0/lib/actions-variants.c:3948:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:3949:7: call_function: calling 'guestfs_tar_in_opts_va' from 'guestfs_tar_in_opts'
# 3959|                           va_list args)
# 3960|   {
# 3961|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 3962|     struct guestfs_tar_in_opts_argv optargs_s;
# 3963|     struct guestfs_tar_in_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def685]
libguestfs-1.58.0/lib/actions-variants.c:4036:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:4014:1: enter_function: entry to 'guestfs_tar_out_opts'
libguestfs-1.58.0/lib/actions-variants.c:4023:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:4024:7: call_function: calling 'guestfs_tar_out_opts_va' from 'guestfs_tar_out_opts'
# 4034|                            va_list args)
# 4035|   {
# 4036|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 4037|     struct guestfs_tar_out_opts_argv optargs_s;
# 4038|     struct guestfs_tar_out_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def686]
libguestfs-1.58.0/lib/actions-variants.c:4115:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:4095:1: enter_function: entry to 'guestfs_tune2fs'
libguestfs-1.58.0/lib/actions-variants.c:4103:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:4104:7: call_function: calling 'guestfs_tune2fs_va' from 'guestfs_tune2fs'
# 4113|                       va_list args)
# 4114|   {
# 4115|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 4116|     struct guestfs_tune2fs_argv optargs_s;
# 4117|     struct guestfs_tune2fs_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def687]
libguestfs-1.58.0/lib/actions-variants.c:4194:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:4174:1: enter_function: entry to 'guestfs_umount_opts'
libguestfs-1.58.0/lib/actions-variants.c:4182:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:4183:7: call_function: calling 'guestfs_umount_opts_va' from 'guestfs_umount_opts'
# 4192|                           va_list args)
# 4193|   {
# 4194|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 4195|     struct guestfs_umount_opts_argv optargs_s;
# 4196|     struct guestfs_umount_opts_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def688]
libguestfs-1.58.0/lib/actions-variants.c:4258:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:4240:1: enter_function: entry to 'guestfs_umount_local'
libguestfs-1.58.0/lib/actions-variants.c:4247:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:4248:7: call_function: calling 'guestfs_umount_local_va' from 'guestfs_umount_local'
# 4256|                            va_list args)
# 4257|   {
# 4258|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 4259|     struct guestfs_umount_local_argv optargs_s;
# 4260|     struct guestfs_umount_local_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def689]
libguestfs-1.58.0/lib/actions-variants.c:4310:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:4290:1: enter_function: entry to 'guestfs_xfs_admin'
libguestfs-1.58.0/lib/actions-variants.c:4298:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:4299:7: call_function: calling 'guestfs_xfs_admin_va' from 'guestfs_xfs_admin'
# 4308|                         va_list args)
# 4309|   {
# 4310|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 4311|     struct guestfs_xfs_admin_argv optargs_s;
# 4312|     struct guestfs_xfs_admin_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def690]
libguestfs-1.58.0/lib/actions-variants.c:4380:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:4360:1: enter_function: entry to 'guestfs_xfs_growfs'
libguestfs-1.58.0/lib/actions-variants.c:4368:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:4369:7: call_function: calling 'guestfs_xfs_growfs_va' from 'guestfs_xfs_growfs'
# 4378|                          va_list args)
# 4379|   {
# 4380|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 4381|     struct guestfs_xfs_growfs_argv optargs_s;
# 4382|     struct guestfs_xfs_growfs_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def691]
libguestfs-1.58.0/lib/actions-variants.c:4453:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/actions-variants.c:4433:1: enter_function: entry to 'guestfs_xfs_repair'
libguestfs-1.58.0/lib/actions-variants.c:4441:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/actions-variants.c:4442:7: call_function: calling 'guestfs_xfs_repair_va' from 'guestfs_xfs_repair'
# 4451|                          va_list args)
# 4452|   {
# 4453|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&g->lock);
# 4454|     struct guestfs_xfs_repair_argv optargs_s;
# 4455|     struct guestfs_xfs_repair_argv *optargs = &optargs_s;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def692]
libguestfs-1.58.0/lib/appliance-kcmdline.c:77:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(appliance, 524288)'
libguestfs-1.58.0/lib/appliance-kcmdline.c:72:8: acquire_resource: opened here
libguestfs-1.58.0/lib/appliance-kcmdline.c:73:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/appliance-kcmdline.c:77:7: branch_false: ...to here
libguestfs-1.58.0/lib/appliance-kcmdline.c:77:6: danger: 'open(appliance, 524288)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   75|       return NULL;
#   76|     }
#   77|->   if (read (fd, magic, 4) != 4 || !strncmp ((char *) magic, "QFI\xfb", 4)) {
#   78|       /* No point looking for extfs signature in QCOW2 directly. */
#   79|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def693]
libguestfs-1.58.0/lib/appliance-kcmdline.c:77:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(appliance, 524288)'
libguestfs-1.58.0/lib/appliance-kcmdline.c:72:8: acquire_resource: opened here
libguestfs-1.58.0/lib/appliance-kcmdline.c:73:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/appliance-kcmdline.c:77:7: branch_false: ...to here
libguestfs-1.58.0/lib/appliance-kcmdline.c:77:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/appliance-kcmdline.c:77:36: branch_false: ...to here
libguestfs-1.58.0/lib/appliance-kcmdline.c:77:7: danger: 'open(appliance, 524288)' leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   75|       return NULL;
#   76|     }
#   77|->   if (read (fd, magic, 4) != 4 || !strncmp ((char *) magic, "QFI\xfb", 4)) {
#   78|       /* No point looking for extfs signature in QCOW2 directly. */
#   79|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def694]
libguestfs-1.58.0/lib/appliance.c:356:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libguestfs-1.58.0/lib/appliance.c:366:1: enter_function: entry to 'dir_contains_files'
libguestfs-1.58.0/lib/appliance.c:371:3: acquire_resource: 'va_start' called here
libguestfs-1.58.0/lib/appliance.c:372:10: branch_true: following 'true' branch (when 'file' is non-NULL)...
libguestfs-1.58.0/lib/appliance.c:373:10: branch_true: ...to here
libguestfs-1.58.0/lib/appliance.c:373:10: call_function: calling 'dir_contains_file' from 'dir_contains_files'
#  354|   dir_contains_file (guestfs_h *g, const char *dir, const char *file)
#  355|   {
#  356|->   CLEANUP_FREE char *path = NULL;
#  357|   
#  358|     path = safe_asprintf (g, "%s/%s", dir, file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def695]
libguestfs-1.58.0/lib/bindtests.c:47:7: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "w")'
libguestfs-1.58.0/lib/bindtests.c:41:8: acquire_resource: opened here
libguestfs-1.58.0/lib/bindtests.c:42:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/bindtests.c:47:7: branch_false: ...to here
libguestfs-1.58.0/lib/bindtests.c:47:7: throw: if 'guestfs_internal_test_close_output' throws an exception...
libguestfs-1.58.0/lib/bindtests.c:47:7: danger: 'fopen(filename, "w")' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   45|     }
#   46|   
#   47|->   if (guestfs_internal_test_close_output (g) == -1) {
#   48|       fclose (fp);
#   49|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def696]
libguestfs-1.58.0/lib/bindtests.c:47:7: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "w")'
libguestfs-1.58.0/lib/bindtests.c:41:8: acquire_memory: allocated here
libguestfs-1.58.0/lib/bindtests.c:42:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/bindtests.c:47:7: branch_false: ...to here
libguestfs-1.58.0/lib/bindtests.c:47:7: throw: if 'guestfs_internal_test_close_output' throws an exception...
libguestfs-1.58.0/lib/bindtests.c:47:7: danger: 'fopen(filename, "w")' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   45|     }
#   46|   
#   47|->   if (guestfs_internal_test_close_output (g) == -1) {
#   48|       fclose (fp);
#   49|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def697]
libguestfs-1.58.0/lib/command.c:448:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'errorfd[0]'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  446|     int errorfd[2] = { -1, -1 };
#  447|     int outfd[2] = { -1, -1 };
#  448|->   CLEANUP_FREE_STRING_LIST char **env = NULL;
#  449|   
#  450|     /* Set up a pipe to capture command output and send it to the error log. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def698]
libguestfs-1.58.0/lib/command.c:448:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'errorfd[1]'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  446|     int errorfd[2] = { -1, -1 };
#  447|     int outfd[2] = { -1, -1 };
#  448|->   CLEANUP_FREE_STRING_LIST char **env = NULL;
#  449|   
#  450|     /* Set up a pipe to capture command output and send it to the error log. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def699]
libguestfs-1.58.0/lib/command.c:448:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'outfd[0]'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  446|     int errorfd[2] = { -1, -1 };
#  447|     int outfd[2] = { -1, -1 };
#  448|->   CLEANUP_FREE_STRING_LIST char **env = NULL;
#  449|   
#  450|     /* Set up a pipe to capture command output and send it to the error log. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def700]
libguestfs-1.58.0/lib/command.c:448:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'outfd[1]'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  446|     int errorfd[2] = { -1, -1 };
#  447|     int outfd[2] = { -1, -1 };
#  448|->   CLEANUP_FREE_STRING_LIST char **env = NULL;
#  449|   
#  450|     /* Set up a pipe to capture command output and send it to the error log. */

Error: GCC_ANALYZER_WARNING: [#def701]
libguestfs-1.58.0/lib/command.c:499:7: warning[-Wanalyzer-fd-use-without-check]: 'dup2' on possibly invalid file descriptor '-1'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  497|       close (errorfd[0]);
#  498|       if (!cmd->stdout_callback)
#  499|->       dup2 (errorfd[1], 1);
#  500|       dup2 (errorfd[1], 2);
#  501|       close (errorfd[1]);

Error: GCC_ANALYZER_WARNING: [#def702]
libguestfs-1.58.0/lib/command.c:500:5: warning[-Wanalyzer-fd-use-without-check]: 'dup2' on possibly invalid file descriptor '-1'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  498|       if (!cmd->stdout_callback)
#  499|         dup2 (errorfd[1], 1);
#  500|->     dup2 (errorfd[1], 2);
#  501|       close (errorfd[1]);
#  502|     }

Error: GCC_ANALYZER_WARNING: [#def703]
libguestfs-1.58.0/lib/command.c:506:5: warning[-Wanalyzer-fd-use-without-check]: 'dup2' on possibly invalid file descriptor '-1'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  504|     if (cmd->stdout_callback) {
#  505|       close (outfd[0]);
#  506|->     dup2 (outfd[1], 1);
#  507|       close (outfd[1]);
#  508|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def704]
libguestfs-1.58.0/lib/command.c:527:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'errorfd[0]'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  525|   
#  526|     return -1;
#  527|-> }
#  528|   
#  529|   static void

Error: GCC_ANALYZER_WARNING (CWE-775): [#def705]
libguestfs-1.58.0/lib/command.c:527:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'errorfd[1]'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  525|   
#  526|     return -1;
#  527|-> }
#  528|   
#  529|   static void

Error: GCC_ANALYZER_WARNING (CWE-775): [#def706]
libguestfs-1.58.0/lib/command.c:527:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'outfd[0]'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  525|   
#  526|     return -1;
#  527|-> }
#  528|   
#  529|   static void

Error: GCC_ANALYZER_WARNING (CWE-775): [#def707]
libguestfs-1.58.0/lib/command.c:527:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'outfd[1]'
libguestfs-1.58.0/lib/command.c:749:1: enter_function: entry to 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: call_function: calling 'finish_command' from 'guestfs_int_cmd_run'
libguestfs-1.58.0/lib/command.c:751:3: return_function: returning to 'guestfs_int_cmd_run' from 'finish_command'
libguestfs-1.58.0/lib/command.c:756:7: call_function: calling 'run_command' from 'guestfs_int_cmd_run'
#  525|   
#  526|     return -1;
#  527|-> }
#  528|   
#  529|   static void

Error: GCC_ANALYZER_WARNING (CWE-775): [#def708]
libguestfs-1.58.0/lib/command.c:787:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[0]'
libguestfs-1.58.0/lib/command.c:791:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:795:3: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:795:3: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:796:3: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:796:3: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/command.c:797:3: branch_true: ...to here
libguestfs-1.58.0/lib/command.c:797:3: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:799:7: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:803:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:812:21: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:813:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/command.c:814:5: branch_true: ...to here
libguestfs-1.58.0/lib/command.c:870:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:872:7: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:872:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:787:35: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:787:35: throw: if 'guestfs_int_cleanup_free_string_list' throws an exception...
libguestfs-1.58.0/lib/command.c:787:35: danger: 'fd[0]' leaks here
#  785|     int r_mode;
#  786|     int ret;
#  787|->   CLEANUP_FREE_STRING_LIST char **env = NULL;
#  788|   
#  789|     finish_command (cmd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def709]
libguestfs-1.58.0/lib/command.c:787:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[1]'
libguestfs-1.58.0/lib/command.c:791:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:795:3: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:795:3: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:796:3: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:796:3: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/command.c:797:3: branch_true: ...to here
libguestfs-1.58.0/lib/command.c:797:3: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:799:7: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:803:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:812:21: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:813:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/command.c:814:5: branch_true: ...to here
libguestfs-1.58.0/lib/command.c:870:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:872:7: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:872:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/command.c:787:35: branch_false: ...to here
libguestfs-1.58.0/lib/command.c:787:35: throw: if 'guestfs_int_cleanup_free_string_list' throws an exception...
libguestfs-1.58.0/lib/command.c:787:35: danger: 'fd[1]' leaks here
#  785|     int r_mode;
#  786|     int ret;
#  787|->   CLEANUP_FREE_STRING_LIST char **env = NULL;
#  788|   
#  789|     finish_command (cmd);

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def710]
libguestfs-1.58.0/lib/file.c:138:5: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd'
libguestfs-1.58.0/lib/file.c:91:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:94:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:94:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:97:8: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:97:8: acquire_resource: opened here
libguestfs-1.58.0/lib/file.c:98:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:104:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:104:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:110:10: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:112:6: branch_false: following 'false' branch (when 'ret' is non-NULL)...
libguestfs-1.58.0/lib/file.c:117:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:117:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:122:6: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:124:7: release_resource: first 'close' here
libguestfs-1.58.0/lib/file.c:124:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/file.c:125:5: branch_true: ...to here
libguestfs-1.58.0/lib/file.c:137:6: branch_true: following 'true' branch (when 'fd >= 0')...
libguestfs-1.58.0/lib/file.c:138:5: branch_true: ...to here
libguestfs-1.58.0/lib/file.c:138:5: danger: second 'close' here; first 'close' was at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  136|     free (ret);
#  137|     if (fd >= 0)
#  138|->     close (fd);
#  139|     return NULL;
#  140|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def711]
libguestfs-1.58.0/lib/file.c:146:22: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libguestfs-1.58.0/lib/file.c:151:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:151:6: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:167:6: branch_false: following 'false' branch (when 'ret' is non-NULL)...
libguestfs-1.58.0/lib/file.c:173:6: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:186:15: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/file.c:187:14: branch_true: ...to here
libguestfs-1.58.0/lib/file.c:187:14: acquire_memory: allocated here
libguestfs-1.58.0/lib/file.c:188:8: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:194:11: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:195:8: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/file.c:186:15: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:146:22: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:146:22: throw: if 'guestfs_int_cleanup_free' throws an exception...
libguestfs-1.58.0/lib/file.c:146:22: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  144|   {
#  145|     size_t i, count, size, len;
#  146|->   CLEANUP_FREE char *buf = NULL;
#  147|     char **ret = NULL;
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def712]
libguestfs-1.58.0/lib/file.c:146:22: warning[-Wanalyzer-malloc-leak]: leak of 'ret'
libguestfs-1.58.0/lib/file.c:151:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:151:6: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:166:9: acquire_memory: allocated here
libguestfs-1.58.0/lib/file.c:167:6: branch_false: following 'false' branch (when 'ret' is non-NULL)...
libguestfs-1.58.0/lib/file.c:173:6: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:186:15: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:146:22: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:146:22: throw: if 'guestfs_int_cleanup_free' throws an exception...
libguestfs-1.58.0/lib/file.c:146:22: danger: 'ret' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  144|   {
#  145|     size_t i, count, size, len;
#  146|->   CLEANUP_FREE char *buf = NULL;
#  147|     char **ret = NULL;
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def713]
libguestfs-1.58.0/lib/file.c:298:5: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd'
libguestfs-1.58.0/lib/file.c:217:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:220:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:220:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:223:8: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:223:8: acquire_resource: opened here
libguestfs-1.58.0/lib/file.c:224:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:230:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:230:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:236:10: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:238:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:243:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:243:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:248:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:248:7: release_resource: first 'close' here
libguestfs-1.58.0/lib/file.c:248:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/file.c:249:5: branch_true: ...to here
libguestfs-1.58.0/lib/file.c:297:6: branch_true: following 'true' branch (when 'fd >= 0')...
libguestfs-1.58.0/lib/file.c:298:5: branch_true: ...to here
libguestfs-1.58.0/lib/file.c:298:5: danger: second 'close' here; first 'close' was at [(15)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/14)
#  296|     free (ret);
#  297|     if (fd >= 0)
#  298|->     close (fd);
#  299|     return NULL;
#  300|   }

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def714]
libguestfs-1.58.0/lib/file.c:358:5: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'open(guestfs_int_make_temp_path(g, "write", 0), 524609, 384)'
libguestfs-1.58.0/lib/file.c:314:6: branch_false: following 'false' branch (when 'size > 2097152')...
libguestfs-1.58.0/lib/file.c:320:13: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:321:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:324:8: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:325:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:330:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:330:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:335:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:335:7: release_resource: first 'close' here
libguestfs-1.58.0/lib/file.c:335:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/file.c:336:5: branch_true: ...to here
libguestfs-1.58.0/lib/file.c:357:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/file.c:358:5: branch_true: ...to here
libguestfs-1.58.0/lib/file.c:358:5: danger: second 'close' here; first 'close' was at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
#  356|    err:
#  357|     if (fd >= 0)
#  358|->     close (fd);
#  359|     return -1;
#  360|   }

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def715]
libguestfs-1.58.0/lib/file.c:597:5: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd'
libguestfs-1.58.0/lib/file.c:517:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:520:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:520:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:523:8: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:523:8: acquire_resource: opened here
libguestfs-1.58.0/lib/file.c:524:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:530:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:530:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:536:10: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:538:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:543:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:543:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/file.c:548:7: branch_false: ...to here
libguestfs-1.58.0/lib/file.c:548:7: release_resource: first 'close' here
libguestfs-1.58.0/lib/file.c:548:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/file.c:549:5: branch_true: ...to here
libguestfs-1.58.0/lib/file.c:596:6: branch_true: following 'true' branch (when 'fd >= 0')...
libguestfs-1.58.0/lib/file.c:597:5: branch_true: ...to here
libguestfs-1.58.0/lib/file.c:597:5: danger: second 'close' here; first 'close' was at [(15)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/14)
#  595|     free (ret);
#  596|     if (fd >= 0)
#  597|->     close (fd);
#  598|     return NULL;
#  599|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def716]
libguestfs-1.58.0/lib/fuse.c:1227:1: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
libguestfs-1.58.0/lib/fuse.c:1345:1: enter_function: entry to 'lsc_insert'
libguestfs-1.58.0/lib/fuse.c:1352:11: acquire_memory: allocated here
libguestfs-1.58.0/lib/fuse.c:1353:6: branch_false: following 'false' branch (when 'entry' is non-NULL)...
libguestfs-1.58.0/lib/fuse.c:1358:9: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1360:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/fuse.c:1365:7: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1365:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/lib/fuse.c:1368:5: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1374:10: call_function: calling 'gen_replace' from 'lsc_insert'
libguestfs-1.58.0/lib/fuse.c:1374:10: return_function: returning to 'lsc_insert' from 'gen_replace'
libguestfs-1.58.0/lib/fuse.c:1227:1: danger: 'entry' leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
# 1225|       free (p);
# 1226|     }
# 1227|-> }
# 1228|   
# 1229|   static void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def717]
libguestfs-1.58.0/lib/fuse.c:1235:5: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
libguestfs-1.58.0/lib/fuse.c:1378:1: enter_function: entry to 'xac_insert'
libguestfs-1.58.0/lib/fuse.c:1385:11: acquire_memory: allocated here
libguestfs-1.58.0/lib/fuse.c:1386:6: branch_false: following 'false' branch (when 'entry' is non-NULL)...
libguestfs-1.58.0/lib/fuse.c:1391:9: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1393:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/fuse.c:1398:7: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1398:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/lib/fuse.c:1401:5: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1407:10: call_function: calling 'gen_replace' from 'xac_insert'
# 1233|       struct xac_entry *p = x;
# 1234|   
# 1235|->     guestfs_free_xattr_list (p->xattrs);
# 1236|       lsc_free (x);
# 1237|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def718]
libguestfs-1.58.0/lib/fuse.c:1249:1: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
libguestfs-1.58.0/lib/fuse.c:1411:1: enter_function: entry to 'rlc_insert'
libguestfs-1.58.0/lib/fuse.c:1418:11: acquire_memory: allocated here
libguestfs-1.58.0/lib/fuse.c:1419:6: branch_false: following 'false' branch (when 'entry' is non-NULL)...
libguestfs-1.58.0/lib/fuse.c:1424:9: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1426:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/fuse.c:1431:7: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1431:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/lib/fuse.c:1434:5: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1440:10: call_function: calling 'gen_replace' from 'rlc_insert'
libguestfs-1.58.0/lib/fuse.c:1440:10: return_function: returning to 'rlc_insert' from 'gen_replace'
libguestfs-1.58.0/lib/fuse.c:1249:1: danger: 'entry' leaks here; was allocated at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
# 1247|       lsc_free (x);
# 1248|     }
# 1249|-> }
# 1250|   
# 1251|   static int

Error: GCC_ANALYZER_WARNING (CWE-401): [#def719]
libguestfs-1.58.0/lib/fuse.c:1330:15: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
libguestfs-1.58.0/lib/fuse.c:1411:1: enter_function: entry to 'rlc_insert'
libguestfs-1.58.0/lib/fuse.c:1418:11: acquire_memory: allocated here
libguestfs-1.58.0/lib/fuse.c:1419:6: branch_false: following 'false' branch (when 'entry' is non-NULL)...
libguestfs-1.58.0/lib/fuse.c:1424:9: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1426:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/fuse.c:1431:7: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1431:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/lib/fuse.c:1434:5: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1440:10: call_function: calling 'gen_replace' from 'rlc_insert'
# 1328|     struct entry_common *old_entry;
# 1329|   
# 1330|->   old_entry = hash_remove (ht, new_entry);
# 1331|     freer (old_entry);
# 1332|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def720]
libguestfs-1.58.0/lib/fuse.c:1333:15: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
libguestfs-1.58.0/lib/fuse.c:1411:1: enter_function: entry to 'rlc_insert'
libguestfs-1.58.0/lib/fuse.c:1418:11: acquire_memory: allocated here
libguestfs-1.58.0/lib/fuse.c:1419:6: branch_false: following 'false' branch (when 'entry' is non-NULL)...
libguestfs-1.58.0/lib/fuse.c:1424:9: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1426:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/fuse.c:1431:7: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1431:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/lib/fuse.c:1434:5: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1440:10: call_function: calling 'gen_replace' from 'rlc_insert'
# 1331|     freer (old_entry);
# 1332|   
# 1333|->   old_entry = hash_insert (ht, new_entry);
# 1334|     if (old_entry == NULL) {
# 1335|       perrorf (g, "hash_insert");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def721]
libguestfs-1.58.0/lib/fuse.c:1335:5: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
libguestfs-1.58.0/lib/fuse.c:1411:1: enter_function: entry to 'rlc_insert'
libguestfs-1.58.0/lib/fuse.c:1418:11: acquire_memory: allocated here
libguestfs-1.58.0/lib/fuse.c:1419:6: branch_false: following 'false' branch (when 'entry' is non-NULL)...
libguestfs-1.58.0/lib/fuse.c:1424:9: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1426:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/fuse.c:1431:7: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1431:6: branch_false: following 'false' branch (when the strings are non-equal)...
libguestfs-1.58.0/lib/fuse.c:1434:5: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1440:10: call_function: calling 'gen_replace' from 'rlc_insert'
# 1333|     old_entry = hash_insert (ht, new_entry);
# 1334|     if (old_entry == NULL) {
# 1335|->     perrorf (g, "hash_insert");
# 1336|       freer (new_entry);
# 1337|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def722]
libguestfs-1.58.0/lib/fuse.c:1361:5: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
libguestfs-1.58.0/lib/fuse.c:1352:11: acquire_memory: allocated here
libguestfs-1.58.0/lib/fuse.c:1353:6: branch_false: following 'false' branch (when 'entry' is non-NULL)...
libguestfs-1.58.0/lib/fuse.c:1358:9: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1360:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/fuse.c:1361:5: branch_true: ...to here
libguestfs-1.58.0/lib/fuse.c:1361:5: throw: if 'guestfs_int_perrorf' throws an exception...
libguestfs-1.58.0/lib/fuse.c:1361:5: danger: 'entry' leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1359|     entry->c.pathname = malloc (len);
# 1360|     if (entry->c.pathname == NULL) {
# 1361|->     perrorf (g, "malloc");
# 1362|       free (entry);
# 1363|       return -1;

Error: CPPCHECK_WARNING (CWE-401): [#def723]
libguestfs-1.58.0/lib/fuse.c:1374: error[memleak]: Memory leak: entry.c
# 1372|     entry->c.timeout = now + g->ml_dir_cache_timeout;
# 1373|   
# 1374|->   return gen_replace (g, g->lsc_ht, (struct entry_common *) entry, lsc_free);
# 1375|   }
# 1376|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def724]
libguestfs-1.58.0/lib/fuse.c:1394:5: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
libguestfs-1.58.0/lib/fuse.c:1385:11: acquire_memory: allocated here
libguestfs-1.58.0/lib/fuse.c:1386:6: branch_false: following 'false' branch (when 'entry' is non-NULL)...
libguestfs-1.58.0/lib/fuse.c:1391:9: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1393:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/fuse.c:1394:5: branch_true: ...to here
libguestfs-1.58.0/lib/fuse.c:1394:5: throw: if 'guestfs_int_perrorf' throws an exception...
libguestfs-1.58.0/lib/fuse.c:1394:5: danger: 'entry' leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 1392|     entry->c.pathname = malloc (len);
# 1393|     if (entry->c.pathname == NULL) {
# 1394|->     perrorf (g, "malloc");
# 1395|       free (entry);
# 1396|       return -1;

Error: CPPCHECK_WARNING (CWE-401): [#def725]
libguestfs-1.58.0/lib/fuse.c:1407: error[memleak]: Memory leak: entry.c
# 1405|     entry->c.timeout = now + g->ml_dir_cache_timeout;
# 1406|   
# 1407|->   return gen_replace (g, g->xac_ht, (struct entry_common *) entry, xac_free);
# 1408|   }
# 1409|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def726]
libguestfs-1.58.0/lib/fuse.c:1427:5: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
libguestfs-1.58.0/lib/fuse.c:1418:11: acquire_memory: allocated here
libguestfs-1.58.0/lib/fuse.c:1419:6: branch_false: following 'false' branch (when 'entry' is non-NULL)...
libguestfs-1.58.0/lib/fuse.c:1424:9: branch_false: ...to here
libguestfs-1.58.0/lib/fuse.c:1426:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/fuse.c:1427:5: branch_true: ...to here
libguestfs-1.58.0/lib/fuse.c:1427:5: throw: if 'guestfs_int_perrorf' throws an exception...
libguestfs-1.58.0/lib/fuse.c:1427:5: danger: 'entry' leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1425|     entry->c.pathname = malloc (len);
# 1426|     if (entry->c.pathname == NULL) {
# 1427|->     perrorf (g, "malloc");
# 1428|       free (entry);
# 1429|       return -1;

Error: CPPCHECK_WARNING (CWE-401): [#def727]
libguestfs-1.58.0/lib/fuse.c:1440: error[memleak]: Memory leak: entry.c
# 1438|     entry->c.timeout = now + g->ml_dir_cache_timeout;
# 1439|   
# 1440|->   return gen_replace (g, g->rlc_ht, (struct entry_common *) entry, rlc_free);
# 1441|   }
# 1442|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def728]
libguestfs-1.58.0/lib/inspect-apps.c:208:10: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(guestfs_int_download_to_tmp(g, "/var/lib/dpkg/status", 0, 50000000), "r")'
libguestfs-1.58.0/lib/inspect-apps.c:198:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:201:8: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:201:8: acquire_resource: opened here
libguestfs-1.58.0/lib/inspect-apps.c:202:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:208:10: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:208:10: throw: if 'guestfs_int_safe_malloc' throws an exception...
libguestfs-1.58.0/lib/inspect-apps.c:208:10: danger: 'fopen(guestfs_int_download_to_tmp(g, "/var/lib/dpkg/status", 0, 50000000), "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  206|   
#  207|     /* Allocate 'apps' list. */
#  208|->   apps = safe_malloc (g, sizeof *apps);
#  209|     apps->len = 0;
#  210|     apps->val = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def729]
libguestfs-1.58.0/lib/inspect-apps.c:208:10: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(guestfs_int_download_to_tmp(g, "/var/lib/dpkg/status", 0, 50000000), "r")'
libguestfs-1.58.0/lib/inspect-apps.c:198:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:201:8: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:201:8: acquire_memory: allocated here
libguestfs-1.58.0/lib/inspect-apps.c:202:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:208:10: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:208:10: throw: if 'guestfs_int_safe_malloc' throws an exception...
libguestfs-1.58.0/lib/inspect-apps.c:208:10: danger: 'fopen(guestfs_int_download_to_tmp(g, "/var/lib/dpkg/status", 0, 50000000), "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  206|   
#  207|     /* Allocate 'apps' list. */
#  208|->   apps = safe_malloc (g, sizeof *apps);
#  209|     apps->len = 0;
#  210|     apps->val = NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def730]
libguestfs-1.58.0/lib/inspect-apps.c:225:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(guestfs_int_download_to_tmp(g, "/var/lib/dpkg/status", 0, 50000000), "r")'
libguestfs-1.58.0/lib/inspect-apps.c:198:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:201:8: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:201:8: acquire_resource: opened here
libguestfs-1.58.0/lib/inspect-apps.c:202:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:208:10: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:215:10: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/inspect-apps.c:216:11: branch_true: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:225:9: branch_false: following 'false' branch (when 'continuation_field' is NULL)...
libguestfs-1.58.0/lib/inspect-apps.c:251:9: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:251:8: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/inspect-apps.c:252:7: branch_true: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:253:14: throw: if 'guestfs_int_safe_strdup' throws an exception...
libguestfs-1.58.0/lib/inspect-apps.c:225:9: danger: 'fopen(guestfs_int_download_to_tmp(g, "/var/lib/dpkg/status", 0, 50000000), "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  223|        * checking for other headers.
#  224|        */
#  225|->     if (line[0] == ' ' && continuation_field) {
#  226|         /* This is a continuation line, and this is the first line of
#  227|          * the field.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def731]
libguestfs-1.58.0/lib/inspect-apps.c:225:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(guestfs_int_download_to_tmp(g, "/var/lib/dpkg/status", 0, 50000000), "r")'
libguestfs-1.58.0/lib/inspect-apps.c:198:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:201:8: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:201:8: acquire_memory: allocated here
libguestfs-1.58.0/lib/inspect-apps.c:202:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:208:10: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:215:10: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/inspect-apps.c:216:11: branch_true: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:225:9: branch_false: following 'false' branch (when 'continuation_field' is NULL)...
libguestfs-1.58.0/lib/inspect-apps.c:251:9: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:251:8: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/inspect-apps.c:252:7: branch_true: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:253:14: throw: if 'guestfs_int_safe_strdup' throws an exception...
libguestfs-1.58.0/lib/inspect-apps.c:225:9: danger: 'fopen(guestfs_int_download_to_tmp(g, "/var/lib/dpkg/status", 0, 50000000), "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  223|        * checking for other headers.
#  224|        */
#  225|->     if (line[0] == ' ' && continuation_field) {
#  226|         /* This is a continuation line, and this is the first line of
#  227|          * the field.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def732]
libguestfs-1.58.0/lib/inspect-apps.c:492:10: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(guestfs_int_download_to_tmp(g, "/lib/apk/db/installed", 0, 50000000), "r")'
libguestfs-1.58.0/lib/inspect-apps.c:482:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:485:8: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:485:8: acquire_resource: opened here
libguestfs-1.58.0/lib/inspect-apps.c:486:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:492:10: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:492:10: throw: if 'guestfs_int_safe_malloc' throws an exception...
libguestfs-1.58.0/lib/inspect-apps.c:492:10: danger: 'fopen(guestfs_int_download_to_tmp(g, "/lib/apk/db/installed", 0, 50000000), "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  490|   
#  491|     /* Allocate 'apps' list. */
#  492|->   apps = safe_malloc (g, sizeof *apps);
#  493|     apps->len = 0;
#  494|     apps->val = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def733]
libguestfs-1.58.0/lib/inspect-apps.c:492:10: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(guestfs_int_download_to_tmp(g, "/lib/apk/db/installed", 0, 50000000), "r")'
libguestfs-1.58.0/lib/inspect-apps.c:482:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:485:8: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:485:8: acquire_memory: allocated here
libguestfs-1.58.0/lib/inspect-apps.c:486:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/inspect-apps.c:492:10: branch_false: ...to here
libguestfs-1.58.0/lib/inspect-apps.c:492:10: throw: if 'guestfs_int_safe_malloc' throws an exception...
libguestfs-1.58.0/lib/inspect-apps.c:492:10: danger: 'fopen(guestfs_int_download_to_tmp(g, "/lib/apk/db/installed", 0, 50000000), "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  490|   
#  491|     /* Allocate 'apps' list. */
#  492|->   apps = safe_malloc (g, sizeof *apps);
#  493|     apps->len = 0;
#  494|     apps->val = NULL;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def734]
libguestfs-1.58.0/lib/journal.c:159:5: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd'
libguestfs-1.58.0/lib/journal.c:70:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/journal.c:73:7: branch_false: ...to here
libguestfs-1.58.0/lib/journal.c:73:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/journal.c:76:8: branch_false: ...to here
libguestfs-1.58.0/lib/journal.c:76:8: acquire_resource: opened here
libguestfs-1.58.0/lib/journal.c:77:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/journal.c:83:7: branch_false: ...to here
libguestfs-1.58.0/lib/journal.c:83:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/journal.c:89:10: branch_false: ...to here
libguestfs-1.58.0/lib/journal.c:91:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/journal.c:95:3: branch_false: ...to here
libguestfs-1.58.0/lib/journal.c:98:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/journal.c:103:7: branch_false: ...to here
libguestfs-1.58.0/lib/journal.c:103:7: release_resource: first 'close' here
libguestfs-1.58.0/lib/journal.c:103:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/journal.c:104:5: branch_true: ...to here
libguestfs-1.58.0/lib/journal.c:158:6: branch_true: following 'true' branch (when 'fd >= 0')...
libguestfs-1.58.0/lib/journal.c:159:5: branch_true: ...to here
libguestfs-1.58.0/lib/journal.c:159:5: danger: second 'close' here; first 'close' was at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  157|     guestfs_free_xattr_list (ret);
#  158|     if (fd >= 0)
#  159|->     close (fd);
#  160|     return NULL;
#  161|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def735]
libguestfs-1.58.0/lib/launch-libvirt.c:105:6: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'secret_obj'
libguestfs-1.58.0/lib/launch-libvirt.c:1843:31: throw: if 'guestfs_int_cleanup_free' throws an exception...
libguestfs-1.58.0/lib/launch-libvirt.c:1841:38: call_function: inlined call to 'cleanup_virSecretFree' from 'add_secret'
#  103|   {
#  104|     virSecretPtr secret_obj = * (virSecretPtr *) ptr;
#  105|->   if (secret_obj)
#  106|       virSecretFree (secret_obj);
#  107|   }

Error: CPPCHECK_WARNING (CWE-457): [#def736]
libguestfs-1.58.0/lib/libvirt-auth.c:109: warning[uninitvar]: Uninitialized variable: credtypes
#  107|   
#  108|     g->nr_supported_credentials = ncredtypes;
#  109|->   memcpy (g->supported_credentials, credtypes, sizeof g->supported_credentials);
#  110|   
#  111|     return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def737]
libguestfs-1.58.0/lib/proto.c:362:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(filename, 524288)'
libguestfs-1.58.0/lib/proto.c:355:8: acquire_resource: opened here
libguestfs-1.58.0/lib/proto.c:356:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/proto.c:362:3: branch_false: ...to here
libguestfs-1.58.0/lib/proto.c:362:3: throw: if 'guestfs_int_fadvise_sequential' throws an exception...
libguestfs-1.58.0/lib/proto.c:362:3: danger: 'open(filename, 524288)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  360|     }
#  361|   
#  362|->   guestfs_int_fadvise_sequential (fd);
#  363|   
#  364|     /* Send file in chunked encoding. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def738]
libguestfs-1.58.0/lib/proto.c:801:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
libguestfs-1.58.0/lib/proto.c:790:6: branch_true: following 'true' branch (when the strings are equal)...
libguestfs-1.58.0/lib/proto.c:791:10: branch_true: ...to here
libguestfs-1.58.0/lib/proto.c:791:10: acquire_resource: opened here
libguestfs-1.58.0/lib/proto.c:796:6: branch_false: following 'false' branch (when 'fd != -1')...
libguestfs-1.58.0/lib/proto.c:801:3: branch_false: ...to here
libguestfs-1.58.0/lib/proto.c:801:3: throw: if 'guestfs_int_fadvise_sequential' throws an exception...
libguestfs-1.58.0/lib/proto.c:801:3: danger: 'fd' leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  799|     }
#  800|   
#  801|->   guestfs_int_fadvise_sequential (fd);
#  802|   
#  803|     /* Receive the file in chunked encoding. */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def739]
libguestfs-1.58.0/lib/qemu.c:55:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'tree'
libguestfs-1.58.0/lib/qemu.c:151:9: throw: if 'json_tokener_new' throws an exception...
libguestfs-1.58.0/lib/qemu.c:146:40: call_function: inlined call to 'cleanup_json_object_put' from 'parse_has_kvm'
#   53|   cleanup_json_object_put (void *ptr)
#   54|   {
#   55|->   json_object_put (* (json_object **) ptr);
#   56|   }
#   57|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def740]
libguestfs-1.58.0/lib/readdir.c:62:7: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(guestfs_int_make_temp_path(g, "readdir", 0), "r")'
libguestfs-1.58.0/lib/readdir.c:50:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/readdir.c:53:7: branch_false: ...to here
libguestfs-1.58.0/lib/readdir.c:53:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/readdir.c:56:7: branch_false: ...to here
libguestfs-1.58.0/lib/readdir.c:56:7: acquire_resource: opened here
libguestfs-1.58.0/lib/readdir.c:57:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/readdir.c:62:7: branch_false: ...to here
libguestfs-1.58.0/lib/readdir.c:62:7: throw: if 'fseeko' throws an exception...
libguestfs-1.58.0/lib/readdir.c:62:7: danger: 'fopen(guestfs_int_make_temp_path(g, "readdir", 0), "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   60|     }
#   61|   
#   62|->   if (fseeko (f, 0, SEEK_END) == -1) {
#   63|       perrorf (g, "fseeko");
#   64|       goto close_tmpfile;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def741]
libguestfs-1.58.0/lib/readdir.c:62:7: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(guestfs_int_make_temp_path(g, "readdir", 0), "r")'
libguestfs-1.58.0/lib/readdir.c:50:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/readdir.c:53:7: branch_false: ...to here
libguestfs-1.58.0/lib/readdir.c:53:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/readdir.c:56:7: branch_false: ...to here
libguestfs-1.58.0/lib/readdir.c:56:7: acquire_memory: allocated here
libguestfs-1.58.0/lib/readdir.c:57:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/readdir.c:62:7: branch_false: ...to here
libguestfs-1.58.0/lib/readdir.c:62:7: throw: if 'fseeko' throws an exception...
libguestfs-1.58.0/lib/readdir.c:62:7: danger: 'fopen(guestfs_int_make_temp_path(g, "readdir", 0), "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   60|     }
#   61|   
#   62|->   if (fseeko (f, 0, SEEK_END) == -1) {
#   63|       perrorf (g, "fseeko");
#   64|       goto close_tmpfile;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def742]
libguestfs-1.58.0/lib/umask.c:130:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[0]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_true: following 'true' branch (when 'pid == -1')...
libguestfs-1.58.0/lib/umask.c:130:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:130:5: throw: if 'guestfs_int_perrorf' throws an exception...
libguestfs-1.58.0/lib/umask.c:130:5: danger: 'fd[0]' leaks here
#  128|     pid = fork ();
#  129|     if (pid == -1) {
#  130|->     perrorf (g, "fork");
#  131|       close (fd[0]);
#  132|       close (fd[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def743]
libguestfs-1.58.0/lib/umask.c:130:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[1]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_true: following 'true' branch (when 'pid == -1')...
libguestfs-1.58.0/lib/umask.c:130:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:130:5: throw: if 'guestfs_int_perrorf' throws an exception...
libguestfs-1.58.0/lib/umask.c:130:5: danger: 'fd[1]' leaks here
#  128|     pid = fork ();
#  129|     if (pid == -1) {
#  130|->     perrorf (g, "fork");
#  131|       close (fd[0]);
#  132|       close (fd[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def744]
libguestfs-1.58.0/lib/umask.c:131:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[0]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_true: following 'true' branch (when 'pid == -1')...
libguestfs-1.58.0/lib/umask.c:130:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:131:5: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:131:5: danger: 'fd[0]' leaks here
#  129|     if (pid == -1) {
#  130|       perrorf (g, "fork");
#  131|->     close (fd[0]);
#  132|       close (fd[1]);
#  133|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def745]
libguestfs-1.58.0/lib/umask.c:131:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[1]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_true: following 'true' branch (when 'pid == -1')...
libguestfs-1.58.0/lib/umask.c:130:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:131:5: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:131:5: danger: 'fd[1]' leaks here
#  129|     if (pid == -1) {
#  130|       perrorf (g, "fork");
#  131|->     close (fd[0]);
#  132|       close (fd[1]);
#  133|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def746]
libguestfs-1.58.0/lib/umask.c:132:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[1]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_true: following 'true' branch (when 'pid == -1')...
libguestfs-1.58.0/lib/umask.c:130:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:132:5: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:132:5: danger: 'fd[1]' leaks here
#  130|       perrorf (g, "fork");
#  131|       close (fd[0]);
#  132|->     close (fd[1]);
#  133|       return -1;
#  134|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def747]
libguestfs-1.58.0/lib/umask.c:137:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[0]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_false: following 'false' branch (when 'pid != -1')...
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:135:6: branch_true: following 'true' branch (when 'pid == 0')...
libguestfs-1.58.0/lib/umask.c:137:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:137:5: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:137:5: danger: 'fd[0]' leaks here
#  135|     if (pid == 0) {
#  136|       /* The child process must ONLY call async-safe functions. */
#  137|->     close (fd[0]);
#  138|   
#  139|       /* umask can't fail. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def748]
libguestfs-1.58.0/lib/umask.c:137:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[1]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_false: following 'false' branch (when 'pid != -1')...
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:135:6: branch_true: following 'true' branch (when 'pid == 0')...
libguestfs-1.58.0/lib/umask.c:137:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:137:5: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:137:5: danger: 'fd[1]' leaks here
#  135|     if (pid == 0) {
#  136|       /* The child process must ONLY call async-safe functions. */
#  137|->     close (fd[0]);
#  138|   
#  139|       /* umask can't fail. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def749]
libguestfs-1.58.0/lib/umask.c:142:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[1]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_false: following 'false' branch (when 'pid != -1')...
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:135:6: branch_true: following 'true' branch (when 'pid == 0')...
libguestfs-1.58.0/lib/umask.c:137:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:142:9: throw: if 'write' throws an exception...
libguestfs-1.58.0/lib/umask.c:142:9: danger: 'fd[1]' leaks here
#  140|       mask = umask (0);
#  141|   
#  142|->     if (write (fd[1], &mask, sizeof mask) != sizeof mask)
#  143|         _exit (EXIT_FAILURE);
#  144|       if (close (fd[1]) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def750]
libguestfs-1.58.0/lib/umask.c:144:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[1]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_false: following 'false' branch (when 'pid != -1')...
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:135:6: branch_true: following 'true' branch (when 'pid == 0')...
libguestfs-1.58.0/lib/umask.c:137:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:142:8: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/umask.c:144:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:144:9: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:144:9: danger: 'fd[1]' leaks here
#  142|       if (write (fd[1], &mask, sizeof mask) != sizeof mask)
#  143|         _exit (EXIT_FAILURE);
#  144|->     if (close (fd[1]) == -1)
#  145|         _exit (EXIT_FAILURE);
#  146|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def751]
libguestfs-1.58.0/lib/umask.c:151:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[0]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_false: following 'false' branch (when 'pid != -1')...
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: following 'false' branch (when 'pid != 0')...
libguestfs-1.58.0/lib/umask.c:151:3: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:151:3: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:151:3: danger: 'fd[0]' leaks here
#  149|   
#  150|     /* Parent. */
#  151|->   close (fd[1]);
#  152|   
#  153|     /* Read the umask. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def752]
libguestfs-1.58.0/lib/umask.c:151:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[1]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_false: following 'false' branch (when 'pid != -1')...
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: following 'false' branch (when 'pid != 0')...
libguestfs-1.58.0/lib/umask.c:151:3: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:151:3: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:151:3: danger: 'fd[1]' leaks here
#  149|   
#  150|     /* Parent. */
#  151|->   close (fd[1]);
#  152|   
#  153|     /* Read the umask. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def753]
libguestfs-1.58.0/lib/umask.c:155:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[0]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_false: following 'false' branch (when 'pid != -1')...
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: following 'false' branch (when 'pid != 0')...
libguestfs-1.58.0/lib/umask.c:151:3: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:154:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/umask.c:155:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:155:5: throw: if 'guestfs_int_perrorf' throws an exception...
libguestfs-1.58.0/lib/umask.c:155:5: danger: 'fd[0]' leaks here
#  153|     /* Read the umask. */
#  154|     if (read (fd[0], &mask, sizeof mask) != sizeof mask) {
#  155|->     perrorf (g, "read");
#  156|       close (fd[0]);
#  157|       guestfs_int_waitpid_noerror (pid);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def754]
libguestfs-1.58.0/lib/umask.c:156:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[0]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_false: following 'false' branch (when 'pid != -1')...
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: following 'false' branch (when 'pid != 0')...
libguestfs-1.58.0/lib/umask.c:151:3: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:154:6: branch_true: following 'true' branch...
libguestfs-1.58.0/lib/umask.c:155:5: branch_true: ...to here
libguestfs-1.58.0/lib/umask.c:156:5: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:156:5: danger: 'fd[0]' leaks here
#  154|     if (read (fd[0], &mask, sizeof mask) != sizeof mask) {
#  155|       perrorf (g, "read");
#  156|->     close (fd[0]);
#  157|       guestfs_int_waitpid_noerror (pid);
#  158|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def755]
libguestfs-1.58.0/lib/umask.c:160:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd[0]'
libguestfs-1.58.0/lib/umask.c:123:6: branch_false: following 'false' branch (when 'r != -1')...
libguestfs-1.58.0/lib/umask.c:128:9: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:129:6: branch_false: following 'false' branch (when 'pid != -1')...
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:135:6: branch_false: following 'false' branch (when 'pid != 0')...
libguestfs-1.58.0/lib/umask.c:151:3: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:154:6: branch_false: following 'false' branch...
libguestfs-1.58.0/lib/umask.c:160:3: branch_false: ...to here
libguestfs-1.58.0/lib/umask.c:160:3: throw: if 'close' throws an exception...
libguestfs-1.58.0/lib/umask.c:160:3: danger: 'fd[0]' leaks here
#  158|       return -1;
#  159|     }
#  160|->   close (fd[0]);
#  161|   
#  162|     if (guestfs_int_waitpid (g, pid, &status, "umask") == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def756]
libguestfs-1.58.0/lua/lua-guestfs.c:16284:5: warning[-Wanalyzer-malloc-leak]: leak of 'strs'
libguestfs-1.58.0/lua/lua-guestfs.c:16275:10: acquire_memory: allocated here
libguestfs-1.58.0/lua/lua-guestfs.c:16276:6: branch_false: following 'false' branch (when 'strs' is non-NULL)...
libguestfs-1.58.0/lua/lua-guestfs.c:16276:6: branch_false: ...to here
libguestfs-1.58.0/lua/lua-guestfs.c:16283:15: branch_true: following 'true' branch...
libguestfs-1.58.0/lua/lua-guestfs.c:16284:28: branch_true: ...to here
libguestfs-1.58.0/lua/lua-guestfs.c:16284:5: throw: if 'lua_rawgeti' throws an exception...
libguestfs-1.58.0/lua/lua-guestfs.c:16284:5: danger: 'strs' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#16282|   
#16283|     for (i = 0; i < len; ++i) {
#16284|->     lua_rawgeti (L, index, i+1 /* because of base 1 arrays */);
#16285|       strs[i] = (char *) luaL_checkstring (L, -1);
#16286|       lua_pop (L, 1);

Error: CPPCHECK_WARNING (CWE-401): [#def757]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1392: error[memleak]: Memory leak: optargs_s.cachemode
# 1390|   
# 1391|     rv = Val_int (r);
# 1392|->   CAMLreturn (rv);
# 1393|   }
# 1394|   

Error: CPPCHECK_WARNING (CWE-401): [#def758]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1392: error[memleak]: Memory leak: optargs_s.discard
# 1390|   
# 1391|     rv = Val_int (r);
# 1392|->   CAMLreturn (rv);
# 1393|   }
# 1394|   

Error: CPPCHECK_WARNING (CWE-401): [#def759]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1392: error[memleak]: Memory leak: optargs_s.iface
# 1390|   
# 1391|     rv = Val_int (r);
# 1392|->   CAMLreturn (rv);
# 1393|   }
# 1394|   

Error: CPPCHECK_WARNING (CWE-401): [#def760]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1392: error[memleak]: Memory leak: optargs_s.libvirturi
# 1390|   
# 1391|     rv = Val_int (r);
# 1392|->   CAMLreturn (rv);
# 1393|   }
# 1394|   

Error: CPPCHECK_WARNING (CWE-401): [#def761]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1392: error[memleak]: Memory leak: optargs_s.readonlydisk
# 1390|   
# 1391|     rv = Val_int (r);
# 1392|->   CAMLreturn (rv);
# 1393|   }
# 1394|   

Error: CPPCHECK_WARNING (CWE-401): [#def762]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1517: error[memleak]: Memory leak: optargs_s.cachemode
# 1515|   
# 1516|     rv = Val_unit;
# 1517|->   CAMLreturn (rv);
# 1518|   }
# 1519|   

Error: CPPCHECK_WARNING (CWE-401): [#def763]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1517: error[memleak]: Memory leak: optargs_s.discard
# 1515|   
# 1516|     rv = Val_unit;
# 1517|->   CAMLreturn (rv);
# 1518|   }
# 1519|   

Error: CPPCHECK_WARNING (CWE-401): [#def764]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1517: error[memleak]: Memory leak: optargs_s.format
# 1515|   
# 1516|     rv = Val_unit;
# 1517|->   CAMLreturn (rv);
# 1518|   }
# 1519|   

Error: CPPCHECK_WARNING (CWE-401): [#def765]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1517: error[memleak]: Memory leak: optargs_s.iface
# 1515|   
# 1516|     rv = Val_unit;
# 1517|->   CAMLreturn (rv);
# 1518|   }
# 1519|   

Error: CPPCHECK_WARNING (CWE-401): [#def766]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1517: error[memleak]: Memory leak: optargs_s.label
# 1515|   
# 1516|     rv = Val_unit;
# 1517|->   CAMLreturn (rv);
# 1518|   }
# 1519|   

Error: CPPCHECK_WARNING (CWE-401): [#def767]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1517: error[memleak]: Memory leak: optargs_s.name
# 1515|   
# 1516|     rv = Val_unit;
# 1517|->   CAMLreturn (rv);
# 1518|   }
# 1519|   

Error: CPPCHECK_WARNING (CWE-401): [#def768]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1517: error[memleak]: Memory leak: optargs_s.protocol
# 1515|   
# 1516|     rv = Val_unit;
# 1517|->   CAMLreturn (rv);
# 1518|   }
# 1519|   

Error: CPPCHECK_WARNING (CWE-401): [#def769]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1517: error[memleak]: Memory leak: optargs_s.secret
# 1515|   
# 1516|     rv = Val_unit;
# 1517|->   CAMLreturn (rv);
# 1518|   }
# 1519|   

Error: CPPCHECK_WARNING (CWE-401): [#def770]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1517: error[memleak]: Memory leak: optargs_s.username
# 1515|   
# 1516|     rv = Val_unit;
# 1517|->   CAMLreturn (rv);
# 1518|   }
# 1519|   

Error: CPPCHECK_WARNING (CWE-401): [#def771]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1640: error[memleak]: Memory leak: optargs_s.label
# 1638|   
# 1639|     rv = Val_unit;
# 1640|->   CAMLreturn (rv);
# 1641|   }
# 1642|   

Error: CPPCHECK_WARNING (CWE-401): [#def772]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1640: error[memleak]: Memory leak: optargs_s.name
# 1638|   
# 1639|     rv = Val_unit;
# 1640|->   CAMLreturn (rv);
# 1641|   }
# 1642|   

Error: CPPCHECK_WARNING (CWE-401): [#def773]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1748: error[memleak]: Memory leak: optargs_s.cachemode
# 1746|   
# 1747|     rv = Val_int (r);
# 1748|->   CAMLreturn (rv);
# 1749|   }
# 1750|   

Error: CPPCHECK_WARNING (CWE-401): [#def774]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1748: error[memleak]: Memory leak: optargs_s.discard
# 1746|   
# 1747|     rv = Val_int (r);
# 1748|->   CAMLreturn (rv);
# 1749|   }
# 1750|   

Error: CPPCHECK_WARNING (CWE-401): [#def775]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1748: error[memleak]: Memory leak: optargs_s.iface
# 1746|   
# 1747|     rv = Val_int (r);
# 1748|->   CAMLreturn (rv);
# 1749|   }
# 1750|   

Error: CPPCHECK_WARNING (CWE-401): [#def776]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:1748: error[memleak]: Memory leak: optargs_s.readonlydisk
# 1746|   
# 1747|     rv = Val_int (r);
# 1748|->   CAMLreturn (rv);
# 1749|   }
# 1750|   

Error: CPPCHECK_WARNING (CWE-401): [#def777]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:3253: error[memleak]: Memory leak: optargs_s.compress
# 3251|   
# 3252|     rv = Val_unit;
# 3253|->   CAMLreturn (rv);
# 3254|   }
# 3255|   

Error: CPPCHECK_WARNING (CWE-401): [#def778]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:4091: error[memleak]: Memory leak: optargs_s.qgroupid
# 4089|   
# 4090|     rv = Val_unit;
# 4091|->   CAMLreturn (rv);
# 4092|   }
# 4093|   

Error: CPPCHECK_WARNING (CWE-401): [#def779]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:4311: error[memleak]: Memory leak: optargs_s.qgroupid
# 4309|   
# 4310|     rv = Val_unit;
# 4311|->   CAMLreturn (rv);
# 4312|   }
# 4313|   

Error: CPPCHECK_WARNING (CWE-401): [#def780]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:5711: error[memleak]: Memory leak: optargs_s.format
# 5709|   
# 5710|     rv = Val_unit;
# 5711|->   CAMLreturn (rv);
# 5712|   }
# 5713|   

Error: CPPCHECK_WARNING (CWE-401): [#def781]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:5806: error[memleak]: Memory leak: optargs_s.cipher
# 5804|   
# 5805|     rv = Val_unit;
# 5806|->   CAMLreturn (rv);
# 5807|   }
# 5808|   

Error: CPPCHECK_WARNING (CWE-401): [#def782]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:5806: error[memleak]: Memory leak: optargs_s.crypttype
# 5804|   
# 5805|     rv = Val_unit;
# 5806|->   CAMLreturn (rv);
# 5807|   }
# 5808|   

Error: CPPCHECK_WARNING (CWE-401): [#def783]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:6153: error[memleak]: Memory leak: optargs_s.backingfile
# 6151|   
# 6152|     rv = Val_unit;
# 6153|->   CAMLreturn (rv);
# 6154|   }
# 6155|   

Error: CPPCHECK_WARNING (CWE-401): [#def784]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:6153: error[memleak]: Memory leak: optargs_s.backingformat
# 6151|   
# 6152|     rv = Val_unit;
# 6153|->   CAMLreturn (rv);
# 6154|   }
# 6155|   

Error: CPPCHECK_WARNING (CWE-401): [#def785]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:6153: error[memleak]: Memory leak: optargs_s.compat
# 6151|   
# 6152|     rv = Val_unit;
# 6153|->   CAMLreturn (rv);
# 6154|   }
# 6155|   

Error: CPPCHECK_WARNING (CWE-401): [#def786]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:6153: error[memleak]: Memory leak: optargs_s.preallocation
# 6151|   
# 6152|     rv = Val_unit;
# 6153|->   CAMLreturn (rv);
# 6154|   }
# 6155|   

Error: CPPCHECK_WARNING (CWE-401): [#def787]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:10980: error[memleak]: Memory leak: optargs_s.ostring
#10978|   
#10979|     rv = Val_unit;
#10980|->   CAMLreturn (rv);
#10981|   }
#10982|   

Error: CPPCHECK_WARNING (CWE-401): [#def788]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15066: error[memleak]: Memory leak: optargs_s.level
#15064|   
#15065|     rv = Val_unit;
#15066|->   CAMLreturn (rv);
#15067|   }
#15068|   

Error: CPPCHECK_WARNING (CWE-401): [#def789]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15527: error[memleak]: Memory leak: optargs_s.creatoros
#15525|   
#15526|     rv = Val_unit;
#15527|->   CAMLreturn (rv);
#15528|   }
#15529|   

Error: CPPCHECK_WARNING (CWE-401): [#def790]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15527: error[memleak]: Memory leak: optargs_s.fstype
#15525|   
#15526|     rv = Val_unit;
#15527|->   CAMLreturn (rv);
#15528|   }
#15529|   

Error: CPPCHECK_WARNING (CWE-401): [#def791]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15527: error[memleak]: Memory leak: optargs_s.journaldevice
#15525|   
#15526|     rv = Val_unit;
#15527|->   CAMLreturn (rv);
#15528|   }
#15529|   

Error: CPPCHECK_WARNING (CWE-401): [#def792]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15527: error[memleak]: Memory leak: optargs_s.label
#15525|   
#15526|     rv = Val_unit;
#15527|->   CAMLreturn (rv);
#15528|   }
#15529|   

Error: CPPCHECK_WARNING (CWE-401): [#def793]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15527: error[memleak]: Memory leak: optargs_s.lastmounteddir
#15525|   
#15526|     rv = Val_unit;
#15527|->   CAMLreturn (rv);
#15528|   }
#15529|   

Error: CPPCHECK_WARNING (CWE-401): [#def794]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15527: error[memleak]: Memory leak: optargs_s.usagetype
#15525|   
#15526|     rv = Val_unit;
#15527|->   CAMLreturn (rv);
#15528|   }
#15529|   

Error: CPPCHECK_WARNING (CWE-401): [#def795]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15527: error[memleak]: Memory leak: optargs_s.uuid
#15525|   
#15526|     rv = Val_unit;
#15527|->   CAMLreturn (rv);
#15528|   }
#15529|   

Error: CPPCHECK_WARNING (CWE-401): [#def796]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15872: error[memleak]: Memory leak: optargs_s.features
#15870|   
#15871|     rv = Val_unit;
#15872|->   CAMLreturn (rv);
#15873|   }
#15874|   

Error: CPPCHECK_WARNING (CWE-401): [#def797]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15872: error[memleak]: Memory leak: optargs_s.label
#15870|   
#15871|     rv = Val_unit;
#15872|->   CAMLreturn (rv);
#15873|   }
#15874|   

Error: CPPCHECK_WARNING (CWE-401): [#def798]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15994: error[memleak]: Memory leak: optargs_s.datatype
#15992|   
#15993|     rv = Val_unit;
#15994|->   CAMLreturn (rv);
#15995|   }
#15996|   

Error: CPPCHECK_WARNING (CWE-401): [#def799]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15994: error[memleak]: Memory leak: optargs_s.label
#15992|   
#15993|     rv = Val_unit;
#15994|->   CAMLreturn (rv);
#15995|   }
#15996|   

Error: CPPCHECK_WARNING (CWE-401): [#def800]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:15994: error[memleak]: Memory leak: optargs_s.metadata
#15992|   
#15993|     rv = Val_unit;
#15994|->   CAMLreturn (rv);
#15995|   }
#15996|   

Error: CPPCHECK_WARNING (CWE-401): [#def801]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:16229: error[memleak]: Memory leak: optargs_s.compress
#16227|   
#16228|     rv = Val_unit;
#16229|->   CAMLreturn (rv);
#16230|   }
#16231|   

Error: CPPCHECK_WARNING (CWE-401): [#def802]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:16278: error[memleak]: Memory leak: optargs_s.label
#16276|   
#16277|     rv = Val_unit;
#16278|->   CAMLreturn (rv);
#16279|   }
#16280|   

Error: CPPCHECK_WARNING (CWE-401): [#def803]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:16278: error[memleak]: Memory leak: optargs_s.uuid
#16276|   
#16277|     rv = Val_unit;
#16278|->   CAMLreturn (rv);
#16279|   }
#16280|   

Error: CPPCHECK_WARNING (CWE-401): [#def804]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:16428: error[memleak]: Memory leak: optargs_s.suffix
#16426|     rv = caml_copy_string (r);
#16427|     free (r);
#16428|->   CAMLreturn (rv);
#16429|   }
#16430|   

Error: CPPCHECK_WARNING (CWE-401): [#def805]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:16544: error[memleak]: Memory leak: optargs_s.options
#16542|   
#16543|     rv = Val_unit;
#16544|->   CAMLreturn (rv);
#16545|   }
#16546|   

Error: CPPCHECK_WARNING (CWE-401): [#def806]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:16599: error[memleak]: Memory leak: optargs_s.options
#16597|   
#16598|     rv = Val_unit;
#16599|->   CAMLreturn (rv);
#16600|   }
#16601|   

Error: CPPCHECK_WARNING (CWE-401): [#def807]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:21707: error[memleak]: Memory leak: optargs_s.directory
#21705|   
#21706|     rv = Val_unit;
#21707|->   CAMLreturn (rv);
#21708|   }
#21709|   

Error: CPPCHECK_WARNING (CWE-401): [#def808]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:21839: error[memleak]: Memory leak: optargs_s.compress
#21837|   
#21838|     rv = Val_unit;
#21839|->   CAMLreturn (rv);
#21840|   }
#21841|   

Error: CPPCHECK_WARNING (CWE-401): [#def809]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:21917: error[memleak]: Memory leak: optargs_s.compress
#21915|   
#21916|     rv = Val_unit;
#21917|->   CAMLreturn (rv);
#21918|   }
#21919|   

Error: CPPCHECK_WARNING (CWE-401): [#def810]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:22183: error[memleak]: Memory leak: optargs_s.errorbehavior
#22181|   
#22182|     rv = Val_unit;
#22183|->   CAMLreturn (rv);
#22184|   }
#22185|   

Error: CPPCHECK_WARNING (CWE-401): [#def811]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:22183: error[memleak]: Memory leak: optargs_s.lastmounteddirectory
#22181|   
#22182|     rv = Val_unit;
#22183|->   CAMLreturn (rv);
#22184|   }
#22185|   

Error: CPPCHECK_WARNING (CWE-401): [#def812]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:23587: error[memleak]: Memory leak: optargs_s.label
#23585|   
#23586|     rv = Val_unit;
#23587|->   CAMLreturn (rv);
#23588|   }
#23589|   

Error: CPPCHECK_WARNING (CWE-401): [#def813]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:23587: error[memleak]: Memory leak: optargs_s.uuid
#23585|   
#23586|     rv = Val_unit;
#23587|->   CAMLreturn (rv);
#23588|   }
#23589|   

Error: CPPCHECK_WARNING (CWE-401): [#def814]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:23790: error[memleak]: Memory leak: optargs_s.logdev
#23788|   
#23789|     rv = Val_int (r);
#23790|->   CAMLreturn (rv);
#23791|   }
#23792|   

Error: CPPCHECK_WARNING (CWE-401): [#def815]
libguestfs-1.58.0/ocaml/guestfs-c-actions.c:23790: error[memleak]: Memory leak: optargs_s.rtdev
#23788|   
#23789|     rv = Val_int (r);
#23790|->   CAMLreturn (rv);
#23791|   }
#23792|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def816]
libguestfs-1.58.0/ocaml/guestfs-c.c:196:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/ocaml/guestfs-c.c:188:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:188:3: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:193:6: branch_false: following ‘false’ branch (when ‘r’ is non-NULL)...
libguestfs-1.58.0/ocaml/guestfs-c.c:193:6: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:194:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:195:20: branch_true: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:195:12: acquire_memory: allocated here
libguestfs-1.58.0/ocaml/guestfs-c.c:196:8: branch_false: following ‘false’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:194:36: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:194:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:195:20: branch_true: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:196:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:196:23: branch_true: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:196:23: throw: if ‘caml_raise_out_of_memory’ throws an exception...
libguestfs-1.58.0/ocaml/guestfs-c.c:196:23: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  194|     for (i = 0; i < Wosize_val (sv); ++i) {
#  195|       r[i] = strdup (String_val (Field (sv, i)));
#  196|->     if (r[i] == NULL) caml_raise_out_of_memory ();
#  197|     }
#  198|     r[i] = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def817]
libguestfs-1.58.0/ocaml/guestfs-c.c:196:23: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libguestfs-1.58.0/ocaml/guestfs-c.c:188:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:188:3: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:192:7: acquire_memory: allocated here
libguestfs-1.58.0/ocaml/guestfs-c.c:193:6: branch_false: following ‘false’ branch (when ‘r’ is non-NULL)...
libguestfs-1.58.0/ocaml/guestfs-c.c:193:6: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:194:15: branch_true: following ‘true’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:195:20: branch_true: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:196:8: branch_true: following ‘true’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:196:23: branch_true: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:196:23: throw: if ‘caml_raise_out_of_memory’ throws an exception...
libguestfs-1.58.0/ocaml/guestfs-c.c:196:23: danger: ‘r’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  194|     for (i = 0; i < Wosize_val (sv); ++i) {
#  195|       r[i] = strdup (String_val (Field (sv, i)));
#  196|->     if (r[i] == NULL) caml_raise_out_of_memory ();
#  197|     }
#  198|     r[i] = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def818]
libguestfs-1.58.0/ocaml/guestfs-c.c:233:8: warning[-Wanalyzer-malloc-leak]: leak of ‘root’
libguestfs-1.58.0/ocaml/guestfs-c.c:220:3: branch_false: following ‘false’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:220:3: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:229:17: acquire_memory: allocated here
libguestfs-1.58.0/ocaml/guestfs-c.c:230:6: branch_false: following ‘false’ branch (when ‘root’ is non-NULL)...
libguestfs-1.58.0/ocaml/guestfs-c.c:231:3: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:233:8: throw: if ‘guestfs_set_event_callback’ throws an exception...
libguestfs-1.58.0/ocaml/guestfs-c.c:233:8: danger: ‘root’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  231|     *root = closure;
#  232|   
#  233|->   eh = guestfs_set_event_callback (g, event_callback_wrapper,
#  234|                                      event_bitmask, 0, root);
#  235|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def819]
libguestfs-1.58.0/ocaml/guestfs-c.c:318:10: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libguestfs-1.58.0/ocaml/guestfs-c.c:310:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:314:15: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:314:7: acquire_memory: allocated here
libguestfs-1.58.0/ocaml/guestfs-c.c:315:6: branch_false: following ‘false’ branch (when ‘r’ is non-NULL)...
libguestfs-1.58.0/ocaml/guestfs-c.c:318:10: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:318:10: throw: if ‘guestfs_first_private’ throws an exception...
libguestfs-1.58.0/ocaml/guestfs-c.c:318:10: danger: ‘r’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  316|   
#  317|     i = 0;
#  318|->   root = guestfs_first_private (g, &key);
#  319|     while (root != NULL) {
#  320|       if (strncmp (key, "_ocaml_event_", strlen ("_ocaml_event_")) == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def820]
libguestfs-1.58.0/ocaml/guestfs-c.c:324:12: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libguestfs-1.58.0/ocaml/guestfs-c.c:310:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/ocaml/guestfs-c.c:314:15: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:314:7: acquire_memory: allocated here
libguestfs-1.58.0/ocaml/guestfs-c.c:315:6: branch_false: following ‘false’ branch (when ‘r’ is non-NULL)...
libguestfs-1.58.0/ocaml/guestfs-c.c:318:10: branch_false: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:319:10: branch_true: following ‘true’ branch (when ‘root’ is non-NULL)...
libguestfs-1.58.0/ocaml/guestfs-c.c:320:9: branch_true: ...to here
libguestfs-1.58.0/ocaml/guestfs-c.c:324:12: throw: if ‘guestfs_next_private’ throws an exception...
libguestfs-1.58.0/ocaml/guestfs-c.c:324:12: danger: ‘r’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  322|         i++;
#  323|       }
#  324|->     root = guestfs_next_private (g, &key);
#  325|     }
#  326|   

Error: COMPILER_WARNING (CWE-569): [#def821]
libguestfs-1.58.0/php/extension/guestfs_php.c: scope_hint: In function 'get_stringlist'
libguestfs-1.58.0/php/extension/guestfs_php.c:3768:8: warning[-Wparentheses]: suggest parentheses around assignment used as truth value
# 3768 |        d = zend_hash_get_current_data_ex (a, &p);
#      |        ^
# 3766|     for (zend_hash_internal_pointer_reset_ex (a, &p);
# 3767|   #if ZEND_MODULE_API_NO >= 20151012
# 3768|->        d = zend_hash_get_current_data_ex (a, &p);
# 3769|   #else
# 3770|          zend_hash_get_current_data_ex (a, (void **) &d, &p) == SUCCESS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def822]
libguestfs-1.58.0/python/handle.c:281:8: warning[-Wanalyzer-malloc-leak]: leak of 'r'
libguestfs-1.58.0/python/handle.c:270:6: branch_false: following 'false' branch...
libguestfs-1.58.0/python/handle.c:274:15: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:274:7: acquire_memory: allocated here
libguestfs-1.58.0/python/handle.c:275:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libguestfs-1.58.0/python/handle.c:281:8: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:281:8: throw: if 'guestfs_first_private' throws an exception...
libguestfs-1.58.0/python/handle.c:281:8: danger: 'r' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  279|   
#  280|     i = 0;
#  281|->   cb = guestfs_first_private (g, &key);
#  282|     while (cb != NULL) {
#  283|       if (strncmp (key, "_python_event_", strlen ("_python_event_")) == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def823]
libguestfs-1.58.0/python/handle.c:287:10: warning[-Wanalyzer-malloc-leak]: leak of 'r'
libguestfs-1.58.0/python/handle.c:270:6: branch_false: following 'false' branch...
libguestfs-1.58.0/python/handle.c:274:15: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:274:7: acquire_memory: allocated here
libguestfs-1.58.0/python/handle.c:275:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libguestfs-1.58.0/python/handle.c:281:8: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:282:10: branch_true: following 'true' branch (when 'cb' is non-NULL)...
libguestfs-1.58.0/python/handle.c:283:9: branch_true: ...to here
libguestfs-1.58.0/python/handle.c:287:10: throw: if 'guestfs_next_private' throws an exception...
libguestfs-1.58.0/python/handle.c:287:10: danger: 'r' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  285|         i++;
#  286|       }
#  287|->     cb = guestfs_next_private (g, &key);
#  288|     }
#  289|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def824]
libguestfs-1.58.0/python/handle.c:320:12: warning[-Wanalyzer-malloc-leak]: leak of 'r'
libguestfs-1.58.0/python/handle.c:295:1: enter_function: entry to 'guestfs_int_py_get_string_list'
libguestfs-1.58.0/python/handle.c:300:3: branch_true: following 'true' branch (when 'obj' is non-NULL)...
libguestfs-1.58.0/python/handle.c:302:8: call_function: inlined call to '_Py_TYPE' from 'guestfs_int_py_get_string_list'
libguestfs-1.58.0/python/handle.c:302:6: branch_false: following 'false' branch...
libguestfs-1.58.0/python/handle.c:307:21: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:308:6: branch_false: following 'false' branch...
libguestfs-1.58.0/python/handle.c:312:3: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:313:7: acquire_memory: allocated here
libguestfs-1.58.0/python/handle.c:314:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libguestfs-1.58.0/python/handle.c:314:6: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:319:15: branch_true: following 'true' branch (when 'i < len')...
libguestfs-1.58.0/python/handle.c:320:12: branch_true: ...to here
libguestfs-1.58.0/python/handle.c:320:12: throw: if 'PyList_GetItem' throws an exception...
libguestfs-1.58.0/python/handle.c:320:12: danger: 'r' leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  318|   
#  319|     for (i = 0; i < len; ++i)
#  320|->     r[i] = guestfs_int_py_asstring (PyList_GetItem (obj, i));
#  321|     r[len] = NULL;
#  322|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def825]
libguestfs-1.58.0/python/handle.c:400:21: warning[-Wanalyzer-malloc-leak]: leak of 'r'
libguestfs-1.58.0/python/handle.c:295:1: enter_function: entry to 'guestfs_int_py_get_string_list'
libguestfs-1.58.0/python/handle.c:300:3: branch_true: following 'true' branch (when 'obj' is non-NULL)...
libguestfs-1.58.0/python/handle.c:302:8: call_function: inlined call to '_Py_TYPE' from 'guestfs_int_py_get_string_list'
libguestfs-1.58.0/python/handle.c:302:6: branch_false: following 'false' branch...
libguestfs-1.58.0/python/handle.c:307:21: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:308:6: branch_false: following 'false' branch...
libguestfs-1.58.0/python/handle.c:312:3: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:313:7: acquire_memory: allocated here
libguestfs-1.58.0/python/handle.c:314:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libguestfs-1.58.0/python/handle.c:314:6: branch_false: ...to here
libguestfs-1.58.0/python/handle.c:319:15: branch_true: following 'true' branch (when 'i < len')...
libguestfs-1.58.0/python/handle.c:320:12: branch_true: ...to here
libguestfs-1.58.0/python/handle.c:320:12: call_function: calling 'guestfs_int_py_asstring' from 'guestfs_int_py_get_string_list'
#  398|   guestfs_int_py_asstring (PyObject *obj)
#  399|   {
#  400|->   PyObject *bytes = PyUnicode_AsUTF8String (obj);
#  401|     return PyBytes_AS_STRING (bytes);
#  402|   }

Error: CPPCHECK_WARNING (CWE-476): [#def826]
libguestfs-1.58.0/rescue/rescue.c:258: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mp
#  256|           memsize = m;
#  257|         else {
#  258|->         OPTION_m;
#  259|         }
#  260|         break;

Error: CPPCHECK_WARNING (CWE-476): [#def827]
libguestfs-1.58.0/rescue/rescue.c:300: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  298|           if (!drv)
#  299|             error (EXIT_FAILURE, errno, "calloc");
#  300|->         drv->type = drv_a;
#  301|           drv->a.filename = strdup (argv[optind]);
#  302|           if (!drv->a.filename)

Error: CPPCHECK_WARNING (CWE-476): [#def828]
libguestfs-1.58.0/rescue/rescue.c:301: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  299|             error (EXIT_FAILURE, errno, "calloc");
#  300|           drv->type = drv_a;
#  301|->         drv->a.filename = strdup (argv[optind]);
#  302|           if (!drv->a.filename)
#  303|             error (EXIT_FAILURE, errno, "strdup");

Error: CPPCHECK_WARNING (CWE-476): [#def829]
libguestfs-1.58.0/rescue/rescue.c:302: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  300|           drv->type = drv_a;
#  301|           drv->a.filename = strdup (argv[optind]);
#  302|->         if (!drv->a.filename)
#  303|             error (EXIT_FAILURE, errno, "strdup");
#  304|           drv->next = drvs;

Error: CPPCHECK_WARNING (CWE-476): [#def830]
libguestfs-1.58.0/rescue/rescue.c:310: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  308|           if (!drv)
#  309|             error (EXIT_FAILURE, errno, "calloc");
#  310|->         drv->type = drv_d;
#  311|           drv->d.guest = argv[optind];
#  312|           drv->next = drvs;

Error: CPPCHECK_WARNING (CWE-476): [#def831]
libguestfs-1.58.0/rescue/rescue.c:311: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  309|             error (EXIT_FAILURE, errno, "calloc");
#  310|           drv->type = drv_d;
#  311|->         drv->d.guest = argv[optind];
#  312|           drv->next = drvs;
#  313|           drvs = drv;

Error: CPPCHECK_WARNING (CWE-476): [#def832]
libguestfs-1.58.0/rescue/rescue.c:312: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  310|           drv->type = drv_d;
#  311|           drv->d.guest = argv[optind];
#  312|->         drv->next = drvs;
#  313|           drvs = drv;
#  314|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def833]
libguestfs-1.58.0/rescue/rescue.c:358:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:179:8: branch_false: following ‘false’ branch (when ‘c != -1’)...
libguestfs-1.58.0/rescue/rescue.c:181:5: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:183:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libguestfs-1.58.0/rescue/rescue.c:185:16: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:185:15: branch_false: following ‘false’ branch (when the strings are non-equal)...
libguestfs-1.58.0/rescue/rescue.c:187:16: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:275:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:275:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:298:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:300:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:301:27: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:302:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:304:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_true: following ‘true’ branch (when ‘network != 0’)...
libguestfs-1.58.0/rescue/rescue.c:358:9: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:358:9: throw: if ‘guestfs_set_network’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:358:9: danger: ‘<unknown>’ leaks here; was allocated at [(18)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/17)
#  356|         exit (EXIT_FAILURE);
#  357|     if (network)
#  358|->     if (guestfs_set_network (g, 1) == -1)
#  359|         exit (EXIT_FAILURE);
#  360|     if (smp >= 1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def834]
libguestfs-1.58.0/rescue/rescue.c:358:9: warning[-Wanalyzer-malloc-leak]: leak of ‘drvs’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:275:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:296:11: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:307:15: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:307:15: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:308:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:310:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_true: following ‘true’ branch (when ‘network != 0’)...
libguestfs-1.58.0/rescue/rescue.c:358:9: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:358:9: throw: if ‘guestfs_set_network’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:358:9: danger: ‘drvs’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  356|         exit (EXIT_FAILURE);
#  357|     if (network)
#  358|->     if (guestfs_set_network (g, 1) == -1)
#  359|         exit (EXIT_FAILURE);
#  360|     if (smp >= 1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def835]
libguestfs-1.58.0/rescue/rescue.c:370:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:298:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:300:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:301:27: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:302:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:304:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: following ‘false’ branch (when ‘append’ is NULL)...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:370:5: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:370:5: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:370:5: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/9)
#  368|                   append ? " " : "",
#  369|                   append ? append : "") == -1) {
#  370|->     perror ("asprintf");
#  371|       exit (EXIT_FAILURE);
#  372|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def836]
libguestfs-1.58.0/rescue/rescue.c:370:5: warning[-Wanalyzer-malloc-leak]: leak of ‘drvs’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:296:11: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:307:15: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:307:15: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:308:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:310:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: following ‘false’ branch (when ‘append’ is NULL)...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:370:5: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:370:5: throw: if ‘perror’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:370:5: danger: ‘drvs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/11)
#  368|                   append ? " " : "",
#  369|                   append ? append : "") == -1) {
#  370|->     perror ("asprintf");
#  371|       exit (EXIT_FAILURE);
#  372|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def837]
libguestfs-1.58.0/rescue/rescue.c:373:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:298:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:300:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:301:27: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:302:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:304:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:373:7: throw: if ‘guestfs_set_append’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:373:7: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/9)
#  371|       exit (EXIT_FAILURE);
#  372|     }
#  373|->   if (guestfs_set_append (g, append_full) == -1)
#  374|       exit (EXIT_FAILURE);
#  375|     free (append_full);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def838]
libguestfs-1.58.0/rescue/rescue.c:373:7: warning[-Wanalyzer-malloc-leak]: leak of ‘drvs’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:296:11: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:307:15: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:307:15: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:308:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:310:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:373:7: throw: if ‘guestfs_set_append’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:373:7: danger: ‘drvs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/11)
#  371|       exit (EXIT_FAILURE);
#  372|     }
#  373|->   if (guestfs_set_append (g, append_full) == -1)
#  374|       exit (EXIT_FAILURE);
#  375|     free (append_full);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def839]
libguestfs-1.58.0/rescue/rescue.c:382:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:298:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:300:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:301:27: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:302:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:304:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:373:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:375:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:382:7: throw: if ‘guestfs_set_event_callback’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:382:7: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/9)
#  380|      * socket and they won't be passed through the event callback.
#  381|      */
#  382|->   if (guestfs_set_event_callback (g, log_message_callback,
#  383|                                     GUESTFS_EVENT_APPLIANCE, 0, NULL) == -1)
#  384|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def840]
libguestfs-1.58.0/rescue/rescue.c:382:7: warning[-Wanalyzer-malloc-leak]: leak of ‘drvs’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:296:11: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:307:15: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:307:15: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:308:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:310:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:373:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:375:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:382:7: throw: if ‘guestfs_set_event_callback’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:382:7: danger: ‘drvs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/11)
#  380|      * socket and they won't be passed through the event callback.
#  381|      */
#  382|->   if (guestfs_set_event_callback (g, log_message_callback,
#  383|                                     GUESTFS_EVENT_APPLIANCE, 0, NULL) == -1)
#  384|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def841]
libguestfs-1.58.0/rescue/rescue.c:387:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:298:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:300:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:301:27: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:302:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:304:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:373:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:375:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:382:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:387:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:387:3: throw: if ‘add_drives_handle’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:387:3: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/9)
#  385|   
#  386|     /* Do the guest drives and mountpoints. */
#  387|->   add_drives (drvs);
#  388|     if (guestfs_launch (g) == -1)
#  389|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def842]
libguestfs-1.58.0/rescue/rescue.c:387:3: warning[-Wanalyzer-malloc-leak]: leak of ‘drvs’
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:174:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:293:6: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:10: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:296:11: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:295:11: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:307:15: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:307:15: acquire_memory: allocated here
libguestfs-1.58.0/rescue/rescue.c:308:12: branch_false: following ‘false’ branch (when ‘drv’ is non-NULL)...
libguestfs-1.58.0/rescue/rescue.c:310:9: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:294:12: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:321:6: branch_false: following ‘false’ branch (when ‘suggest == 0’)...
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:330:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:331:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:332:3: branch_true: following ‘true’ branch...
libguestfs-1.58.0/rescue/rescue.c:335:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:335:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:343:3: branch_true: following ‘true’ branch (when ‘format_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:344:3: branch_true: following ‘true’ branch (when ‘blocksize_consumed != 0’)...
libguestfs-1.58.0/rescue/rescue.c:347:7: branch_true: ...to here
libguestfs-1.58.0/rescue/rescue.c:347:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:354:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:354:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:357:6: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:360:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:367:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:373:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:375:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:382:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/rescue/rescue.c:387:3: branch_false: ...to here
libguestfs-1.58.0/rescue/rescue.c:387:3: throw: if ‘add_drives_handle’ throws an exception...
libguestfs-1.58.0/rescue/rescue.c:387:3: danger: ‘drvs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/11)
#  385|   
#  386|     /* Do the guest drives and mountpoints. */
#  387|->   add_drives (drvs);
#  388|     if (guestfs_launch (g) == -1)
#  389|       exit (EXIT_FAILURE);

Error: CPPCHECK_WARNING (CWE-476): [#def843]
libguestfs-1.58.0/rescue/rescue.c:687: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  685|     if (!drv)
#  686|       error (EXIT_FAILURE, errno, "calloc");
#  687|->   drv->type = drv_scratch;
#  688|     drv->scratch.size = INT64_C (10737418240);
#  689|     drv->next = *drvs;

Error: CPPCHECK_WARNING (CWE-476): [#def844]
libguestfs-1.58.0/rescue/rescue.c:688: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  686|       error (EXIT_FAILURE, errno, "calloc");
#  687|     drv->type = drv_scratch;
#  688|->   drv->scratch.size = INT64_C (10737418240);
#  689|     drv->next = *drvs;
#  690|     *drvs = drv;

Error: CPPCHECK_WARNING (CWE-476): [#def845]
libguestfs-1.58.0/rescue/rescue.c:689: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: drv
#  687|     drv->type = drv_scratch;
#  688|     drv->scratch.size = INT64_C (10737418240);
#  689|->   drv->next = *drvs;
#  690|     *drvs = drv;
#  691|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def846]
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:230:8: warning[-Wanalyzer-malloc-leak]: leak of ‘root’
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:213:1: enter_function: entry to ‘guestfs_int_ruby_set_event_callback’
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:223:19: call_function: inlined call to ‘rb_num2ull_inline’ from ‘guestfs_int_ruby_set_event_callback’
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:225:10: acquire_memory: allocated here
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:226:6: branch_false: following ‘false’ branch (when ‘root’ is non-NULL)...
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:228:3: branch_false: ...to here
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:230:8: throw: if ‘guestfs_set_event_callback’ throws an exception...
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:230:8: danger: ‘root’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  228|     *root = cbv;
#  229|   
#  230|->   eh = guestfs_set_event_callback (g, event_callback_wrapper,
#  231|                                      event_bitmask, 0, root);
#  232|     if (eh == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def847]
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:409:10: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:400:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:404:15: branch_false: ...to here
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:404:7: acquire_memory: allocated here
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:405:6: branch_false: following ‘false’ branch (when ‘r’ is non-NULL)...
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:409:10: branch_false: ...to here
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:409:10: throw: if ‘guestfs_first_private’ throws an exception...
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:409:10: danger: ‘r’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  407|   
#  408|     i = 0;
#  409|->   root = guestfs_first_private (g, &key);
#  410|     while (root != NULL) {
#  411|       if (strncmp (key, "_ruby_event_", strlen ("_ruby_event_")) == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def848]
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:415:12: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:400:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:404:15: branch_false: ...to here
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:404:7: acquire_memory: allocated here
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:405:6: branch_false: following ‘false’ branch (when ‘r’ is non-NULL)...
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:409:10: branch_false: ...to here
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:410:10: branch_true: following ‘true’ branch (when ‘root’ is non-NULL)...
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:411:9: branch_true: ...to here
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:415:12: throw: if ‘guestfs_next_private’ throws an exception...
libguestfs-1.58.0/ruby/ext/guestfs/handle.c:415:12: danger: ‘r’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  413|         i++;
#  414|       }
#  415|->     root = guestfs_next_private (g, &key);
#  416|     }
#  417|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def849]
libguestfs-1.58.0/test-tool/test-tool.c:345:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fp’ where non-null expected
libguestfs-1.58.0/test-tool/test-tool.c:314:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/test-tool/test-tool.c:315:7: branch_false: ...to here
libguestfs-1.58.0/test-tool/test-tool.c:314:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/test-tool/test-tool.c:320:6: branch_false: ...to here
libguestfs-1.58.0/test-tool/test-tool.c:320:6: branch_false: following ‘false’ branch (when ‘use_wrapper != 0’)...
libguestfs-1.58.0/test-tool/test-tool.c:330:7: branch_false: ...to here
libguestfs-1.58.0/test-tool/test-tool.c:330:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/test-tool/test-tool.c:332:7: branch_false: ...to here
libguestfs-1.58.0/test-tool/test-tool.c:332:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/test-tool/test-tool.c:333:8: branch_false: ...to here
libguestfs-1.58.0/test-tool/test-tool.c:332:7: branch_false: following ‘false’ branch...
libguestfs-1.58.0/test-tool/test-tool.c:338:8: branch_false: ...to here
libguestfs-1.58.0/test-tool/test-tool.c:339:6: branch_false: following ‘false’ branch...
libguestfs-1.58.0/test-tool/test-tool.c:342:3: branch_false: ...to here
libguestfs-1.58.0/test-tool/test-tool.c:344:8: acquire_memory: this call could return NULL
libguestfs-1.58.0/test-tool/test-tool.c:345:3: danger: argument 1 (‘fp’) from [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14) could be NULL where non-null expected
#  343|   
#  344|     fp = fdopen (fd, "w");
#  345|->   fprintf (fp,
#  346|              "#!/bin/sh -\n"
#  347|              "host_cpu=%s\n"

Error: CLIPPY_WARNING: [#def850]
src/base.rs:42:27: warning: very complex type used. Consider factoring parts into `type` definitions
#     |
#  42 |       pub(crate) callbacks: collections::HashMap<
#     |  ___________________________^
#  43 | |         event::EventHandle,
#  44 | |         Box<Box<dyn Fn(guestfs::Event, event::EventHandle, &[u8], &[u64]) + 'a>>,
#  45 | |     >,
#     | |_____^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#type_complexity
#     = note: `#[warn(clippy::type_complexity)]` on by default

Error: CLIPPY_WARNING: [#def851]
src/base.rs:89:5: warning: you should consider adding a `Default` implementation for `CreateFlags`
#     |
#  89 | /     pub fn new() -> CreateFlags {
#  90 | |         CreateFlags::none()
#  91 | |     }
#     | |_____^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#new_without_default
#     = note: `#[warn(clippy::new_without_default)]` on by default
#  help: try adding this
#     |
#  81 + impl Default for CreateFlags {
#  82 +     fn default() -> Self {
#  83 +         Self::new()
#  84 +     }
#  85 + }
#     |

Error: CLIPPY_WARNING: [#def852]
src/base.rs:103:27: warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
#      |
#  103 |     unsafe fn to_libc_int(self) -> i64 {
#      |                           ^^^^
#      |
#      = help: consider choosing a less ambiguous name
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#wrong_self_convention
#      = note: `#[warn(clippy::wrong_self_convention)]` on by default

Error: CLIPPY_WARNING: [#def853]
src/event.rs:79:31: warning: bound is defined in more than one place
#     |
#  79 |     pub fn set_event_callback<C: 'a>(
#     |                               ^
#  ...
#  85 |         C: Fn(guestfs::Event, EventHandle, &[u8], &[u64]) + 'a,
#     |         ^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#multiple_bound_locations
#     = note: `#[warn(clippy::multiple_bound_locations)]` on by default

Error: CLIPPY_WARNING: [#def854]
src/event.rs:87:34: warning: type parameter `C` goes unused in function definition
#     |
#  87 |         extern "C" fn trampoline<C>(
#     |                                  ^
#     |
#     = help: consider removing the parameter
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#extra_unused_type_parameters
#     = note: `#[warn(clippy::extra_unused_type_parameters)]` on by default

Error: CLIPPY_WARNING: [#def855]
src/event.rs:119:27: warning: very complex type used. Consider factoring parts into `type` definitions
#      |
#  119 |             let callback: &Box<dyn Fn(guestfs::Event, EventHandle, &[u8], &[u64])> =
#      |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#type_complexity

Error: CLIPPY_WARNING: [#def856]
src/event.rs:126:23: warning: very complex type used. Consider factoring parts into `type` definitions
#      |
#  126 |         let callback: Box<Box<dyn Fn(guestfs::Event, EventHandle, &[u8], &[u64]) + 'a>> =
#      |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#type_complexity

Error: CLIPPY_WARNING: [#def857]
src/guestfs.rs:132:48: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  132 |                 app_name: char_ptr_to_string((*raw).app_name)?,
#      |                                                ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref
#      = note: `#[warn(clippy::not_unsafe_ptr_arg_deref)]` on by default

Error: CLIPPY_WARNING: [#def858]
src/guestfs.rs:133:56: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  133 |                 app_display_name: char_ptr_to_string((*raw).app_display_name)?,
#      |                                                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def859]
src/guestfs.rs:134:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  134 |                 app_epoch: (*raw).app_epoch,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def860]
src/guestfs.rs:135:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  135 |                 app_version: char_ptr_to_string((*raw).app_version)?,
#      |                                                   ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def861]
src/guestfs.rs:136:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  136 |                 app_release: char_ptr_to_string((*raw).app_release)?,
#      |                                                   ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def862]
src/guestfs.rs:137:56: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  137 |                 app_install_path: char_ptr_to_string((*raw).app_install_path)?,
#      |                                                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def863]
src/guestfs.rs:138:54: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  138 |                 app_trans_path: char_ptr_to_string((*raw).app_trans_path)?,
#      |                                                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def864]
src/guestfs.rs:139:53: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  139 |                 app_publisher: char_ptr_to_string((*raw).app_publisher)?,
#      |                                                     ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def865]
src/guestfs.rs:140:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  140 |                 app_url: char_ptr_to_string((*raw).app_url)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def866]
src/guestfs.rs:141:58: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  141 |                 app_source_package: char_ptr_to_string((*raw).app_source_package)?,
#      |                                                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def867]
src/guestfs.rs:142:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  142 |                 app_summary: char_ptr_to_string((*raw).app_summary)?,
#      |                                                   ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def868]
src/guestfs.rs:143:55: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  143 |                 app_description: char_ptr_to_string((*raw).app_description)?,
#      |                                                       ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def869]
src/guestfs.rs:194:49: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  194 |                 app2_name: char_ptr_to_string((*raw).app2_name)?,
#      |                                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def870]
src/guestfs.rs:195:57: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  195 |                 app2_display_name: char_ptr_to_string((*raw).app2_display_name)?,
#      |                                                         ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def871]
src/guestfs.rs:196:31: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  196 |                 app2_epoch: (*raw).app2_epoch,
#      |                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def872]
src/guestfs.rs:197:52: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  197 |                 app2_version: char_ptr_to_string((*raw).app2_version)?,
#      |                                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def873]
src/guestfs.rs:198:52: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  198 |                 app2_release: char_ptr_to_string((*raw).app2_release)?,
#      |                                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def874]
src/guestfs.rs:199:49: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  199 |                 app2_arch: char_ptr_to_string((*raw).app2_arch)?,
#      |                                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def875]
src/guestfs.rs:200:57: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  200 |                 app2_install_path: char_ptr_to_string((*raw).app2_install_path)?,
#      |                                                         ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def876]
src/guestfs.rs:201:55: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  201 |                 app2_trans_path: char_ptr_to_string((*raw).app2_trans_path)?,
#      |                                                       ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def877]
src/guestfs.rs:202:54: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  202 |                 app2_publisher: char_ptr_to_string((*raw).app2_publisher)?,
#      |                                                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def878]
src/guestfs.rs:203:48: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  203 |                 app2_url: char_ptr_to_string((*raw).app2_url)?,
#      |                                                ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def879]
src/guestfs.rs:204:59: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  204 |                 app2_source_package: char_ptr_to_string((*raw).app2_source_package)?,
#      |                                                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def880]
src/guestfs.rs:205:52: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  205 |                 app2_summary: char_ptr_to_string((*raw).app2_summary)?,
#      |                                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def881]
src/guestfs.rs:206:56: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  206 |                 app2_description: char_ptr_to_string((*raw).app2_description)?,
#      |                                                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def882]
src/guestfs.rs:207:50: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  207 |                 app2_class: char_ptr_to_string((*raw).app2_class)?,
#      |                                                  ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def883]
src/guestfs.rs:208:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  208 |                 app2_spare2: char_ptr_to_string((*raw).app2_spare2)?,
#      |                                                   ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def884]
src/guestfs.rs:209:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  209 |                 app2_spare3: char_ptr_to_string((*raw).app2_spare3)?,
#      |                                                   ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def885]
src/guestfs.rs:210:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  210 |                 app2_spare4: char_ptr_to_string((*raw).app2_spare4)?,
#      |                                                   ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def886]
src/guestfs.rs:237:59: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  237 |                 btrfsbalance_status: char_ptr_to_string((*raw).btrfsbalance_status)?,
#      |                                                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def887]
src/guestfs.rs:238:39: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  238 |                 btrfsbalance_total: (*raw).btrfsbalance_total,
#      |                                       ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def888]
src/guestfs.rs:239:42: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  239 |                 btrfsbalance_balanced: (*raw).btrfsbalance_balanced,
#      |                                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def889]
src/guestfs.rs:240:44: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  240 |                 btrfsbalance_considered: (*raw).btrfsbalance_considered,
#      |                                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def890]
src/guestfs.rs:241:38: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  241 |                 btrfsbalance_left: (*raw).btrfsbalance_left,
#      |                                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def891]
src/guestfs.rs:264:54: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  264 |                 btrfsqgroup_id: char_ptr_to_string((*raw).btrfsqgroup_id)?,
#      |                                                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def892]
src/guestfs.rs:265:37: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  265 |                 btrfsqgroup_rfer: (*raw).btrfsqgroup_rfer,
#      |                                     ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def893]
src/guestfs.rs:266:37: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  266 |                 btrfsqgroup_excl: (*raw).btrfsqgroup_excl,
#      |                                     ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def894]
src/guestfs.rs:313:53: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  313 |                 btrfsscrub_data_extents_scrubbed: (*raw).btrfsscrub_data_extents_scrubbed,
#      |                                                     ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def895]
src/guestfs.rs:314:53: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  314 |                 btrfsscrub_tree_extents_scrubbed: (*raw).btrfsscrub_tree_extents_scrubbed,
#      |                                                     ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def896]
src/guestfs.rs:315:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  315 |                 btrfsscrub_data_bytes_scrubbed: (*raw).btrfsscrub_data_bytes_scrubbed,
#      |                                                   ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def897]
src/guestfs.rs:316:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  316 |                 btrfsscrub_tree_bytes_scrubbed: (*raw).btrfsscrub_tree_bytes_scrubbed,
#      |                                                   ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def898]
src/guestfs.rs:317:43: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  317 |                 btrfsscrub_read_errors: (*raw).btrfsscrub_read_errors,
#      |                                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def899]
src/guestfs.rs:318:43: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  318 |                 btrfsscrub_csum_errors: (*raw).btrfsscrub_csum_errors,
#      |                                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def900]
src/guestfs.rs:319:45: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  319 |                 btrfsscrub_verify_errors: (*raw).btrfsscrub_verify_errors,
#      |                                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def901]
src/guestfs.rs:320:39: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  320 |                 btrfsscrub_no_csum: (*raw).btrfsscrub_no_csum,
#      |                                       ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def902]
src/guestfs.rs:321:45: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  321 |                 btrfsscrub_csum_discards: (*raw).btrfsscrub_csum_discards,
#      |                                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def903]
src/guestfs.rs:322:44: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  322 |                 btrfsscrub_super_errors: (*raw).btrfsscrub_super_errors,
#      |                                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def904]
src/guestfs.rs:323:45: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  323 |                 btrfsscrub_malloc_errors: (*raw).btrfsscrub_malloc_errors,
#      |                                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def905]
src/guestfs.rs:324:52: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  324 |                 btrfsscrub_uncorrectable_errors: (*raw).btrfsscrub_uncorrectable_errors,
#      |                                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def906]
src/guestfs.rs:325:49: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  325 |                 btrfsscrub_unverified_errors: (*raw).btrfsscrub_unverified_errors,
#      |                                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def907]
src/guestfs.rs:326:48: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  326 |                 btrfsscrub_corrected_errors: (*raw).btrfsscrub_corrected_errors,
#      |                                                ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def908]
src/guestfs.rs:327:45: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  327 |                 btrfsscrub_last_physical: (*raw).btrfsscrub_last_physical,
#      |                                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def909]
src/guestfs.rs:350:38: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  350 |                 btrfssubvolume_id: (*raw).btrfssubvolume_id,
#      |                                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def910]
src/guestfs.rs:351:48: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  351 |                 btrfssubvolume_top_level_id: (*raw).btrfssubvolume_top_level_id,
#      |                                                ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def911]
src/guestfs.rs:352:59: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  352 |                 btrfssubvolume_path: char_ptr_to_string((*raw).btrfssubvolume_path)?,
#      |                                                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def912]
src/guestfs.rs:375:24: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  375 |                 ino: (*raw).ino,
#      |                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def913]
src/guestfs.rs:376:23: warning: casting to the same type is unnecessary (`i8` -> `i8`)
#      |
#  376 |                 ftyp: (*raw).ftyp as i8,
#      |                       ^^^^^^^^^^^^^^^^^ help: try: `(*raw).ftyp`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast
#      = note: `#[warn(clippy::unnecessary_cast)]` on by default

Error: CLIPPY_WARNING: [#def914]
src/guestfs.rs:376:25: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  376 |                 ftyp: (*raw).ftyp as i8,
#      |                         ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def915]
src/guestfs.rs:377:44: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  377 |                 name: char_ptr_to_string((*raw).name)?,
#      |                                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def916]
src/guestfs.rs:396:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  396 |                 hivex_node_h: (*raw).hivex_node_h,
#      |                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def917]
src/guestfs.rs:415:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  415 |                 hivex_value_h: (*raw).hivex_value_h,
#      |                                  ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def918]
src/guestfs.rs:440:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  440 |                 in_wd: (*raw).in_wd,
#      |                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def919]
src/guestfs.rs:441:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  441 |                 in_mask: (*raw).in_mask,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def920]
src/guestfs.rs:442:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  442 |                 in_cookie: (*raw).in_cookie,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def921]
src/guestfs.rs:443:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  443 |                 in_name: char_ptr_to_string((*raw).in_name)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def922]
src/guestfs.rs:464:22: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  464 |                 i: (*raw).i,
#      |                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def923]
src/guestfs.rs:465:22: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  465 |                 b: (*raw).b,
#      |                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def924]
src/guestfs.rs:516:53: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  516 |                 iso_system_id: char_ptr_to_string((*raw).iso_system_id)?,
#      |                                                     ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def925]
src/guestfs.rs:517:53: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  517 |                 iso_volume_id: char_ptr_to_string((*raw).iso_volume_id)?,
#      |                                                     ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def926]
src/guestfs.rs:518:42: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  518 |                 iso_volume_space_size: (*raw).iso_volume_space_size,
#      |                                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def927]
src/guestfs.rs:519:40: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  519 |                 iso_volume_set_size: (*raw).iso_volume_set_size,
#      |                                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def928]
src/guestfs.rs:520:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  520 |                 iso_volume_sequence_number: (*raw).iso_volume_sequence_number,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def929]
src/guestfs.rs:521:43: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  521 |                 iso_logical_block_size: (*raw).iso_logical_block_size,
#      |                                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def930]
src/guestfs.rs:522:57: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  522 |                 iso_volume_set_id: char_ptr_to_string((*raw).iso_volume_set_id)?,
#      |                                                         ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def931]
src/guestfs.rs:523:56: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  523 |                 iso_publisher_id: char_ptr_to_string((*raw).iso_publisher_id)?,
#      |                                                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def932]
src/guestfs.rs:524:60: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  524 |                 iso_data_preparer_id: char_ptr_to_string((*raw).iso_data_preparer_id)?,
#      |                                                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def933]
src/guestfs.rs:525:58: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  525 |                 iso_application_id: char_ptr_to_string((*raw).iso_application_id)?,
#      |                                                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def934]
src/guestfs.rs:526:61: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  526 |                 iso_copyright_file_id: char_ptr_to_string((*raw).iso_copyright_file_id)?,
#      |                                                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def935]
src/guestfs.rs:527:60: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  527 |                 iso_abstract_file_id: char_ptr_to_string((*raw).iso_abstract_file_id)?,
#      |                                                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def936]
src/guestfs.rs:528:65: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  528 |                 iso_bibliographic_file_id: char_ptr_to_string((*raw).iso_bibliographic_file_id)?,
#      |                                                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def937]
src/guestfs.rs:529:42: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  529 |                 iso_volume_creation_t: (*raw).iso_volume_creation_t,
#      |                                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def938]
src/guestfs.rs:530:46: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  530 |                 iso_volume_modification_t: (*raw).iso_volume_modification_t,
#      |                                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def939]
src/guestfs.rs:531:44: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  531 |                 iso_volume_expiration_t: (*raw).iso_volume_expiration_t,
#      |                                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def940]
src/guestfs.rs:532:43: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  532 |                 iso_volume_effective_t: (*raw).iso_volume_effective_t,
#      |                                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def941]
src/guestfs.rs:581:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  581 |                 lv_name: char_ptr_to_string((*raw).lv_name)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def942]
src/guestfs.rs:582:38: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  582 |                 lv_uuid: UUID::new((*raw).lv_uuid),
#      |                                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def943]
src/guestfs.rs:583:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  583 |                 lv_attr: char_ptr_to_string((*raw).lv_attr)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def944]
src/guestfs.rs:584:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  584 |                 lv_major: (*raw).lv_major,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def945]
src/guestfs.rs:585:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  585 |                 lv_minor: (*raw).lv_minor,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def946]
src/guestfs.rs:586:36: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  586 |                 lv_kernel_major: (*raw).lv_kernel_major,
#      |                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def947]
src/guestfs.rs:587:36: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  587 |                 lv_kernel_minor: (*raw).lv_kernel_minor,
#      |                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def948]
src/guestfs.rs:588:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  588 |                 lv_size: (*raw).lv_size,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def949]
src/guestfs.rs:589:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  589 |                 seg_count: (*raw).seg_count,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def950]
src/guestfs.rs:590:46: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  590 |                 origin: char_ptr_to_string((*raw).origin)?,
#      |                                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def951]
src/guestfs.rs:591:36: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  591 |                 snap_percent: if (*raw).snap_percent < 0.0 {
#      |                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def952]
src/guestfs.rs:594:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  594 |                     Some((*raw).snap_percent)
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def953]
src/guestfs.rs:596:36: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  596 |                 copy_percent: if (*raw).copy_percent < 0.0 {
#      |                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def954]
src/guestfs.rs:599:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  599 |                     Some((*raw).copy_percent)
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def955]
src/guestfs.rs:601:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  601 |                 move_pv: char_ptr_to_string((*raw).move_pv)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def956]
src/guestfs.rs:602:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  602 |                 lv_tags: char_ptr_to_string((*raw).lv_tags)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def957]
src/guestfs.rs:603:50: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  603 |                 mirror_log: char_ptr_to_string((*raw).mirror_log)?,
#      |                                                  ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def958]
src/guestfs.rs:604:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  604 |                 modules: char_ptr_to_string((*raw).modules)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def959]
src/guestfs.rs:649:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  649 |                 pv_name: char_ptr_to_string((*raw).pv_name)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def960]
src/guestfs.rs:650:38: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  650 |                 pv_uuid: UUID::new((*raw).pv_uuid),
#      |                                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def961]
src/guestfs.rs:651:46: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  651 |                 pv_fmt: char_ptr_to_string((*raw).pv_fmt)?,
#      |                                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def962]
src/guestfs.rs:652:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  652 |                 pv_size: (*raw).pv_size,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def963]
src/guestfs.rs:653:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  653 |                 dev_size: (*raw).dev_size,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def964]
src/guestfs.rs:654:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  654 |                 pv_free: (*raw).pv_free,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def965]
src/guestfs.rs:655:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  655 |                 pv_used: (*raw).pv_used,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def966]
src/guestfs.rs:656:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  656 |                 pv_attr: char_ptr_to_string((*raw).pv_attr)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def967]
src/guestfs.rs:657:32: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  657 |                 pv_pe_count: (*raw).pv_pe_count,
#      |                                ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def968]
src/guestfs.rs:658:38: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  658 |                 pv_pe_alloc_count: (*raw).pv_pe_alloc_count,
#      |                                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def969]
src/guestfs.rs:659:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  659 |                 pv_tags: char_ptr_to_string((*raw).pv_tags)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def970]
src/guestfs.rs:660:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  660 |                 pe_start: (*raw).pe_start,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def971]
src/guestfs.rs:661:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  661 |                 pv_mda_count: (*raw).pv_mda_count,
#      |                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def972]
src/guestfs.rs:662:32: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  662 |                 pv_mda_free: (*raw).pv_mda_free,
#      |                                ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def973]
src/guestfs.rs:717:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  717 |                 vg_name: char_ptr_to_string((*raw).vg_name)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def974]
src/guestfs.rs:718:38: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  718 |                 vg_uuid: UUID::new((*raw).vg_uuid),
#      |                                      ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def975]
src/guestfs.rs:719:46: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  719 |                 vg_fmt: char_ptr_to_string((*raw).vg_fmt)?,
#      |                                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def976]
src/guestfs.rs:720:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  720 |                 vg_attr: char_ptr_to_string((*raw).vg_attr)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def977]
src/guestfs.rs:721:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  721 |                 vg_size: (*raw).vg_size,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def978]
src/guestfs.rs:722:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  722 |                 vg_free: (*raw).vg_free,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def979]
src/guestfs.rs:723:48: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  723 |                 vg_sysid: char_ptr_to_string((*raw).vg_sysid)?,
#      |                                                ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def980]
src/guestfs.rs:724:35: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  724 |                 vg_extent_size: (*raw).vg_extent_size,
#      |                                   ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def981]
src/guestfs.rs:725:36: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  725 |                 vg_extent_count: (*raw).vg_extent_count,
#      |                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def982]
src/guestfs.rs:726:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  726 |                 vg_free_count: (*raw).vg_free_count,
#      |                                  ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def983]
src/guestfs.rs:727:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  727 |                 max_lv: (*raw).max_lv,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def984]
src/guestfs.rs:728:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  728 |                 max_pv: (*raw).max_pv,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def985]
src/guestfs.rs:729:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  729 |                 pv_count: (*raw).pv_count,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def986]
src/guestfs.rs:730:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  730 |                 lv_count: (*raw).lv_count,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def987]
src/guestfs.rs:731:31: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  731 |                 snap_count: (*raw).snap_count,
#      |                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def988]
src/guestfs.rs:732:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  732 |                 vg_seqno: (*raw).vg_seqno,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def989]
src/guestfs.rs:733:47: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  733 |                 vg_tags: char_ptr_to_string((*raw).vg_tags)?,
#      |                                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def990]
src/guestfs.rs:734:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  734 |                 vg_mda_count: (*raw).vg_mda_count,
#      |                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def991]
src/guestfs.rs:735:32: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  735 |                 vg_mda_free: (*raw).vg_mda_free,
#      |                                ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def992]
src/guestfs.rs:758:53: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  758 |                 mdstat_device: char_ptr_to_string((*raw).mdstat_device)?,
#      |                                                     ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def993]
src/guestfs.rs:759:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  759 |                 mdstat_index: (*raw).mdstat_index,
#      |                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def994]
src/guestfs.rs:760:52: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  760 |                 mdstat_flags: char_ptr_to_string((*raw).mdstat_flags)?,
#      |                                                    ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def995]
src/guestfs.rs:785:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  785 |                 part_num: (*raw).part_num,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def996]
src/guestfs.rs:786:31: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  786 |                 part_start: (*raw).part_start,
#      |                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def997]
src/guestfs.rs:787:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  787 |                 part_end: (*raw).part_end,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def998]
src/guestfs.rs:788:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  788 |                 part_size: (*raw).part_size,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def999]
src/guestfs.rs:831:24: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  831 |                 dev: (*raw).dev,
#      |                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1000]
src/guestfs.rs:832:24: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  832 |                 ino: (*raw).ino,
#      |                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1001]
src/guestfs.rs:833:25: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  833 |                 mode: (*raw).mode,
#      |                         ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1002]
src/guestfs.rs:834:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  834 |                 nlink: (*raw).nlink,
#      |                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1003]
src/guestfs.rs:835:24: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  835 |                 uid: (*raw).uid,
#      |                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1004]
src/guestfs.rs:836:24: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  836 |                 gid: (*raw).gid,
#      |                        ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1005]
src/guestfs.rs:837:25: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  837 |                 rdev: (*raw).rdev,
#      |                         ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1006]
src/guestfs.rs:838:25: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  838 |                 size: (*raw).size,
#      |                         ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1007]
src/guestfs.rs:839:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  839 |                 blksize: (*raw).blksize,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1008]
src/guestfs.rs:840:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  840 |                 blocks: (*raw).blocks,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1009]
src/guestfs.rs:841:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  841 |                 atime: (*raw).atime,
#      |                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1010]
src/guestfs.rs:842:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  842 |                 mtime: (*raw).mtime,
#      |                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1011]
src/guestfs.rs:843:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  843 |                 ctime: (*raw).ctime,
#      |                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1012]
src/guestfs.rs:904:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  904 |                 st_dev: (*raw).st_dev,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1013]
src/guestfs.rs:905:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  905 |                 st_ino: (*raw).st_ino,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1014]
src/guestfs.rs:906:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  906 |                 st_mode: (*raw).st_mode,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1015]
src/guestfs.rs:907:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  907 |                 st_nlink: (*raw).st_nlink,
#      |                             ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1016]
src/guestfs.rs:908:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  908 |                 st_uid: (*raw).st_uid,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1017]
src/guestfs.rs:909:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  909 |                 st_gid: (*raw).st_gid,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1018]
src/guestfs.rs:910:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  910 |                 st_rdev: (*raw).st_rdev,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1019]
src/guestfs.rs:911:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  911 |                 st_size: (*raw).st_size,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1020]
src/guestfs.rs:912:31: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  912 |                 st_blksize: (*raw).st_blksize,
#      |                               ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1021]
src/guestfs.rs:913:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  913 |                 st_blocks: (*raw).st_blocks,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1022]
src/guestfs.rs:914:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  914 |                 st_atime_sec: (*raw).st_atime_sec,
#      |                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1023]
src/guestfs.rs:915:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  915 |                 st_atime_nsec: (*raw).st_atime_nsec,
#      |                                  ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1024]
src/guestfs.rs:916:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  916 |                 st_mtime_sec: (*raw).st_mtime_sec,
#      |                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1025]
src/guestfs.rs:917:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  917 |                 st_mtime_nsec: (*raw).st_mtime_nsec,
#      |                                  ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1026]
src/guestfs.rs:918:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  918 |                 st_ctime_sec: (*raw).st_ctime_sec,
#      |                                 ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1027]
src/guestfs.rs:919:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  919 |                 st_ctime_nsec: (*raw).st_ctime_nsec,
#      |                                  ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1028]
src/guestfs.rs:920:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  920 |                 st_spare1: (*raw).st_spare1,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1029]
src/guestfs.rs:921:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  921 |                 st_spare2: (*raw).st_spare2,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1030]
src/guestfs.rs:922:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  922 |                 st_spare3: (*raw).st_spare3,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1031]
src/guestfs.rs:923:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  923 |                 st_spare4: (*raw).st_spare4,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1032]
src/guestfs.rs:924:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  924 |                 st_spare5: (*raw).st_spare5,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1033]
src/guestfs.rs:925:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  925 |                 st_spare6: (*raw).st_spare6,
#      |                              ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1034]
src/guestfs.rs:964:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  964 |                 bsize: (*raw).bsize,
#      |                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1035]
src/guestfs.rs:965:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  965 |                 frsize: (*raw).frsize,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1036]
src/guestfs.rs:966:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  966 |                 blocks: (*raw).blocks,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1037]
src/guestfs.rs:967:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  967 |                 bfree: (*raw).bfree,
#      |                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1038]
src/guestfs.rs:968:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  968 |                 bavail: (*raw).bavail,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1039]
src/guestfs.rs:969:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  969 |                 files: (*raw).files,
#      |                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1040]
src/guestfs.rs:970:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  970 |                 ffree: (*raw).ffree,
#      |                          ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1041]
src/guestfs.rs:971:27: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  971 |                 favail: (*raw).favail,
#      |                           ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1042]
src/guestfs.rs:972:25: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  972 |                 fsid: (*raw).fsid,
#      |                         ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1043]
src/guestfs.rs:973:25: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  973 |                 flag: (*raw).flag,
#      |                         ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1044]
src/guestfs.rs:974:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#      |
#  974 |                 namemax: (*raw).namemax,
#      |                            ^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1045]
src/guestfs.rs:1023:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1023 |                 tsk_inode: (*raw).tsk_inode,
#       |                              ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1046]
src/guestfs.rs:1024:27: warning: casting to the same type is unnecessary (`i8` -> `i8`)
#       |
#  1024 |                 tsk_type: (*raw).tsk_type as i8,
#       |                           ^^^^^^^^^^^^^^^^^^^^^ help: try: `(*raw).tsk_type`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1047]
src/guestfs.rs:1024:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1024 |                 tsk_type: (*raw).tsk_type as i8,
#       |                             ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1048]
src/guestfs.rs:1025:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1025 |                 tsk_size: (*raw).tsk_size,
#       |                             ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1049]
src/guestfs.rs:1026:48: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1026 |                 tsk_name: char_ptr_to_string((*raw).tsk_name)?,
#       |                                                ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1050]
src/guestfs.rs:1027:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1027 |                 tsk_flags: (*raw).tsk_flags,
#       |                              ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1051]
src/guestfs.rs:1028:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1028 |                 tsk_atime_sec: (*raw).tsk_atime_sec,
#       |                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1052]
src/guestfs.rs:1029:35: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1029 |                 tsk_atime_nsec: (*raw).tsk_atime_nsec,
#       |                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1053]
src/guestfs.rs:1030:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1030 |                 tsk_mtime_sec: (*raw).tsk_mtime_sec,
#       |                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1054]
src/guestfs.rs:1031:35: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1031 |                 tsk_mtime_nsec: (*raw).tsk_mtime_nsec,
#       |                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1055]
src/guestfs.rs:1032:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1032 |                 tsk_ctime_sec: (*raw).tsk_ctime_sec,
#       |                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1056]
src/guestfs.rs:1033:35: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1033 |                 tsk_ctime_nsec: (*raw).tsk_ctime_nsec,
#       |                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1057]
src/guestfs.rs:1034:35: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1034 |                 tsk_crtime_sec: (*raw).tsk_crtime_sec,
#       |                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1058]
src/guestfs.rs:1035:36: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1035 |                 tsk_crtime_nsec: (*raw).tsk_crtime_nsec,
#       |                                    ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1059]
src/guestfs.rs:1036:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1036 |                 tsk_nlink: (*raw).tsk_nlink,
#       |                              ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1060]
src/guestfs.rs:1037:48: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1037 |                 tsk_link: char_ptr_to_string((*raw).tsk_link)?,
#       |                                                ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1061]
src/guestfs.rs:1038:31: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1038 |                 tsk_spare1: (*raw).tsk_spare1,
#       |                               ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1062]
src/guestfs.rs:1063:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1063 |                 uts_sysname: char_ptr_to_string((*raw).uts_sysname)?,
#       |                                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1063]
src/guestfs.rs:1064:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1064 |                 uts_release: char_ptr_to_string((*raw).uts_release)?,
#       |                                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1064]
src/guestfs.rs:1065:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1065 |                 uts_version: char_ptr_to_string((*raw).uts_version)?,
#       |                                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1065]
src/guestfs.rs:1066:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1066 |                 uts_machine: char_ptr_to_string((*raw).uts_machine)?,
#       |                                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1066]
src/guestfs.rs:1091:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1091 |                 major: (*raw).major,
#       |                          ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1067]
src/guestfs.rs:1092:26: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1092 |                 minor: (*raw).minor,
#       |                          ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1068]
src/guestfs.rs:1093:28: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1093 |                 release: (*raw).release,
#       |                            ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1069]
src/guestfs.rs:1094:45: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1094 |                 extra: char_ptr_to_string((*raw).extra)?,
#       |                                             ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1070]
src/guestfs.rs:1116:48: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1116 |                 attrname: char_ptr_to_string((*raw).attrname)?,
#       |                                                ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1071]
src/guestfs.rs:1117:50: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1117 |                 attrval: slice::from_raw_parts((*raw).attrval as *const u8, (*raw).attrval_len).to_vec(),
#       |                                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1072]
src/guestfs.rs:1117:79: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1117 |                 attrval: slice::from_raw_parts((*raw).attrval as *const u8, (*raw).attrval_len).to_vec(),
#       |                                                                               ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1073]
src/guestfs.rs:1184:52: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1184 |                 xfs_mntpoint: char_ptr_to_string((*raw).xfs_mntpoint)?,
#       |                                                    ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1074]
src/guestfs.rs:1185:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1185 |                 xfs_inodesize: (*raw).xfs_inodesize,
#       |                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1075]
src/guestfs.rs:1186:32: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1186 |                 xfs_agcount: (*raw).xfs_agcount,
#       |                                ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1076]
src/guestfs.rs:1187:31: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1187 |                 xfs_agsize: (*raw).xfs_agsize,
#       |                               ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1077]
src/guestfs.rs:1188:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1188 |                 xfs_sectsize: (*raw).xfs_sectsize,
#       |                                 ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1078]
src/guestfs.rs:1189:29: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1189 |                 xfs_attr: (*raw).xfs_attr,
#       |                             ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1079]
src/guestfs.rs:1190:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1190 |                 xfs_blocksize: (*raw).xfs_blocksize,
#       |                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1080]
src/guestfs.rs:1191:35: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1191 |                 xfs_datablocks: (*raw).xfs_datablocks,
#       |                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1081]
src/guestfs.rs:1192:32: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1192 |                 xfs_imaxpct: (*raw).xfs_imaxpct,
#       |                                ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1082]
src/guestfs.rs:1193:30: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1193 |                 xfs_sunit: (*raw).xfs_sunit,
#       |                              ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1083]
src/guestfs.rs:1194:31: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1194 |                 xfs_swidth: (*raw).xfs_swidth,
#       |                               ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1084]
src/guestfs.rs:1195:35: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1195 |                 xfs_dirversion: (*raw).xfs_dirversion,
#       |                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1085]
src/guestfs.rs:1196:37: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1196 |                 xfs_dirblocksize: (*raw).xfs_dirblocksize,
#       |                                     ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1086]
src/guestfs.rs:1197:31: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1197 |                 xfs_cimode: (*raw).xfs_cimode,
#       |                               ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1087]
src/guestfs.rs:1198:51: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1198 |                 xfs_logname: char_ptr_to_string((*raw).xfs_logname)?,
#       |                                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1088]
src/guestfs.rs:1199:37: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1199 |                 xfs_logblocksize: (*raw).xfs_logblocksize,
#       |                                     ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1089]
src/guestfs.rs:1200:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1200 |                 xfs_logblocks: (*raw).xfs_logblocks,
#       |                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1090]
src/guestfs.rs:1201:35: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1201 |                 xfs_logversion: (*raw).xfs_logversion,
#       |                                   ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1091]
src/guestfs.rs:1202:36: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1202 |                 xfs_logsectsize: (*raw).xfs_logsectsize,
#       |                                    ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1092]
src/guestfs.rs:1203:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1203 |                 xfs_logsunit: (*raw).xfs_logsunit,
#       |                                 ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1093]
src/guestfs.rs:1204:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1204 |                 xfs_lazycount: (*raw).xfs_lazycount,
#       |                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1094]
src/guestfs.rs:1205:50: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1205 |                 xfs_rtname: char_ptr_to_string((*raw).xfs_rtname)?,
#       |                                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1095]
src/guestfs.rs:1206:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1206 |                 xfs_rtextsize: (*raw).xfs_rtextsize,
#       |                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1096]
src/guestfs.rs:1207:33: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1207 |                 xfs_rtblocks: (*raw).xfs_rtblocks,
#       |                                 ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1097]
src/guestfs.rs:1208:34: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1208 |                 xfs_rtextents: (*raw).xfs_rtextents,
#       |                                  ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1098]
src/guestfs.rs:1229:49: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1229 |                 yara_name: char_ptr_to_string((*raw).yara_name)?,
#       |                                                 ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1099]
src/guestfs.rs:1230:49: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  1230 |                 yara_rule: char_ptr_to_string((*raw).yara_rule)?,
#       |                                                 ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1100]
src/guestfs.rs:1373:44: warning: redundant closure
#       |
#  1373 |         libvirturi: optargs.libvirturi.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                            ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure
#       = note: `#[warn(clippy::redundant_closure)]` on by default

Error: CLIPPY_WARNING: [#def1101]
src/guestfs.rs:1375:34: warning: redundant closure
#       |
#  1375 |         iface: optargs.iface.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1102]
src/guestfs.rs:1378:48: warning: redundant closure
#       |
#  1378 |         readonlydisk: optargs.readonlydisk.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1103]
src/guestfs.rs:1379:42: warning: redundant closure
#       |
#  1379 |         cachemode: optargs.cachemode.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                          ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1104]
src/guestfs.rs:1380:38: warning: redundant closure
#       |
#  1380 |         discard: optargs.discard.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                      ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1105]
src/guestfs.rs:1501:36: warning: redundant closure
#       |
#  1501 |         format: optargs.format.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1106]
src/guestfs.rs:1502:34: warning: redundant closure
#       |
#  1502 |         iface: optargs.iface.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1107]
src/guestfs.rs:1503:32: warning: redundant closure
#       |
#  1503 |         name: optargs.name.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1108]
src/guestfs.rs:1504:34: warning: redundant closure
#       |
#  1504 |         label: optargs.label.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1109]
src/guestfs.rs:1505:40: warning: redundant closure
#       |
#  1505 |         protocol: optargs.protocol.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1110]
src/guestfs.rs:1509:43: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  1509 |                          let mut w = (&v).into_iter()
#       |                                           ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref
#       = note: `#[warn(clippy::into_iter_on_ref)]` on by default

Error: CLIPPY_WARNING: [#def1111]
src/guestfs.rs:1516:40: warning: redundant closure
#       |
#  1516 |         username: optargs.username.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1112]
src/guestfs.rs:1517:36: warning: redundant closure
#       |
#  1517 |         secret: optargs.secret.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1113]
src/guestfs.rs:1518:42: warning: redundant closure
#       |
#  1518 |         cachemode: optargs.cachemode.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                          ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1114]
src/guestfs.rs:1519:38: warning: redundant closure
#       |
#  1519 |         discard: optargs.discard.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                      ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1115]
src/guestfs.rs:1648:32: warning: redundant closure
#       |
#  1648 |         name: optargs.name.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1116]
src/guestfs.rs:1649:34: warning: redundant closure
#       |
#  1649 |         label: optargs.label.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1117]
src/guestfs.rs:1716:34: warning: redundant closure
#       |
#  1716 |         iface: optargs.iface.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1118]
src/guestfs.rs:1718:48: warning: redundant closure
#       |
#  1718 |         readonlydisk: optargs.readonlydisk.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1119]
src/guestfs.rs:1719:42: warning: redundant closure
#       |
#  1719 |         cachemode: optargs.cachemode.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                          ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1120]
src/guestfs.rs:1720:38: warning: redundant closure
#       |
#  1720 |         discard: optargs.discard.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                      ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1121]
src/guestfs.rs:1844:40: warning: redundant closure
#       |
#  1844 |         compress: optargs.compress.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1122]
src/guestfs.rs:2056:40: warning: redundant closure
#       |
#  2056 |         qgroupid: optargs.qgroupid.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1123]
src/guestfs.rs:2098:40: warning: redundant closure
#       |
#  2098 |         qgroupid: optargs.qgroupid.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1124]
src/guestfs.rs:2607:36: warning: redundant closure
#       |
#  2607 |         format: optargs.format.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1125]
src/guestfs.rs:2651:42: warning: redundant closure
#       |
#  2651 |         crypttype: optargs.crypttype.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                          ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1126]
src/guestfs.rs:2652:36: warning: redundant closure
#       |
#  2652 |         cipher: optargs.cipher.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1127]
src/guestfs.rs:2713:46: warning: redundant closure
#       |
#  2713 |         backingfile: optargs.backingfile.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                              ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1128]
src/guestfs.rs:2714:50: warning: redundant closure
#       |
#  2714 |         backingformat: optargs.backingformat.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1129]
src/guestfs.rs:2715:50: warning: redundant closure
#       |
#  2715 |         preallocation: optargs.preallocation.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1130]
src/guestfs.rs:2716:36: warning: redundant closure
#       |
#  2716 |         compat: optargs.compat.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1131]
src/guestfs.rs:3178:38: warning: redundant closure
#       |
#  3178 |         ostring: optargs.ostring.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                      ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1132]
src/guestfs.rs:3182:43: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  3182 |                          let mut w = (&v).into_iter()
#       |                                           ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1133]
src/guestfs.rs:4199:34: warning: redundant closure
#       |
#  4199 |         level: optargs.level.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1134]
src/guestfs.rs:4354:50: warning: redundant closure
#       |
#  4354 |         journaldevice: optargs.journaldevice.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1135]
src/guestfs.rs:4355:34: warning: redundant closure
#       |
#  4355 |         label: optargs.label.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1136]
src/guestfs.rs:4356:52: warning: redundant closure
#       |
#  4356 |         lastmounteddir: optargs.lastmounteddir.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1137]
src/guestfs.rs:4357:42: warning: redundant closure
#       |
#  4357 |         creatoros: optargs.creatoros.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                          ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1138]
src/guestfs.rs:4358:36: warning: redundant closure
#       |
#  4358 |         fstype: optargs.fstype.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1139]
src/guestfs.rs:4359:42: warning: redundant closure
#       |
#  4359 |         usagetype: optargs.usagetype.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                          ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1140]
src/guestfs.rs:4360:32: warning: redundant closure
#       |
#  4360 |         uuid: optargs.uuid.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1141]
src/guestfs.rs:4684:40: warning: redundant closure
#       |
#  4684 |         features: optargs.features.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1142]
src/guestfs.rs:4687:34: warning: redundant closure
#       |
#  4687 |         label: optargs.label.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1143]
src/guestfs.rs:4770:40: warning: redundant closure
#       |
#  4770 |         datatype: optargs.datatype.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1144]
src/guestfs.rs:4772:34: warning: redundant closure
#       |
#  4772 |         label: optargs.label.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1145]
src/guestfs.rs:4773:40: warning: redundant closure
#       |
#  4773 |         metadata: optargs.metadata.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1146]
src/guestfs.rs:4865:40: warning: redundant closure
#       |
#  4865 |         compress: optargs.compress.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1147]
src/guestfs.rs:4869:43: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  4869 |                          let mut w = (&v).into_iter()
#       |                                           ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1148]
src/guestfs.rs:4923:34: warning: redundant closure
#       |
#  4923 |         label: optargs.label.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1149]
src/guestfs.rs:4924:32: warning: redundant closure
#       |
#  4924 |         uuid: optargs.uuid.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1150]
src/guestfs.rs:4970:36: warning: redundant closure
#       |
#  4970 |         suffix: optargs.suffix.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1151]
src/guestfs.rs:5009:38: warning: redundant closure
#       |
#  5009 |         options: optargs.options.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                      ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1152]
src/guestfs.rs:5055:38: warning: redundant closure
#       |
#  5055 |         options: optargs.options.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                      ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1153]
src/guestfs.rs:5626:42: warning: redundant closure
#       |
#  5626 |         directory: optargs.directory.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                          ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1154]
src/guestfs.rs:5671:40: warning: redundant closure
#       |
#  5671 |         compress: optargs.compress.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1155]
src/guestfs.rs:5744:40: warning: redundant closure
#       |
#  5744 |         compress: optargs.compress.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1156]
src/guestfs.rs:5749:43: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  5749 |                          let mut w = (&v).into_iter()
#       |                                           ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1157]
src/guestfs.rs:5853:50: warning: redundant closure
#       |
#  5853 |         errorbehavior: optargs.errorbehavior.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1158]
src/guestfs.rs:5857:64: warning: redundant closure
#       |
#  5857 |         lastmounteddirectory: optargs.lastmounteddirectory.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1159]
src/guestfs.rs:6066:34: warning: redundant closure
#       |
#  6066 |         label: optargs.label.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1160]
src/guestfs.rs:6067:32: warning: redundant closure
#       |
#  6067 |         uuid: optargs.uuid.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1161]
src/guestfs.rs:6283:36: warning: redundant closure
#       |
#  6283 |         logdev: optargs.logdev.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1162]
src/guestfs.rs:6284:34: warning: redundant closure
#       |
#  6284 |         rtdev: optargs.rtdev.map(|v| ffi::CString::new(v)).transpose()?,
#       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1163]
src/guestfs.rs:7639:62: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7639 |         let r = unsafe { guestfs_acl_delete_def_file(self.g, (&c_dir).as_ptr()) };
#       |                                                              ^^^^^^^^ help: change this to: `c_dir`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow
#       = note: `#[warn(clippy::needless_borrow)]` on by default

Error: CLIPPY_WARNING: [#def1164]
src/guestfs.rs:7653:55: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7653 |         let r = unsafe { guestfs_acl_get_file(self.g, (&c_path).as_ptr(), (&c_acltype).as_ptr()) };
#       |                                                       ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1165]
src/guestfs.rs:7653:75: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7653 |         let r = unsafe { guestfs_acl_get_file(self.g, (&c_path).as_ptr(), (&c_acltype).as_ptr()) };
#       |                                                                           ^^^^^^^^^^^^ help: change this to: `c_acltype`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1166]
src/guestfs.rs:7672:55: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7672 |         let r = unsafe { guestfs_acl_set_file(self.g, (&c_path).as_ptr(), (&c_acltype).as_ptr(), (&c_acl).as_ptr()) };
#       |                                                       ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1167]
src/guestfs.rs:7672:75: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7672 |         let r = unsafe { guestfs_acl_set_file(self.g, (&c_path).as_ptr(), (&c_acltype).as_ptr(), (&c_acl).as_ptr()) };
#       |                                                                           ^^^^^^^^^^^^ help: change this to: `c_acltype`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1168]
src/guestfs.rs:7672:98: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7672 |         let r = unsafe { guestfs_acl_set_file(self.g, (&c_path).as_ptr(), (&c_acltype).as_ptr(), (&c_acl).as_ptr()) };
#       |                                                                                                  ^^^^^^^^ help: change this to: `c_acl`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1169]
src/guestfs.rs:7687:52: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7687 |         let r = unsafe { guestfs_add_cdrom(self.g, (&c_filename).as_ptr()) };
#       |                                                    ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1170]
src/guestfs.rs:7701:58: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7701 | ...   let r = unsafe { guestfs_add_domain_argv(self.g, (&c_dom).as_ptr(), &(RawAddDomainOptArgs::from(&optargs_cexpr)) as *const RawAddDo...
#       |                                                        ^^^^^^^^ help: change this to: `c_dom`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1171]
src/guestfs.rs:7716:62: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7716 | ...   let r = unsafe { guestfs_add_drive_opts_argv(self.g, (&c_filename).as_ptr(), &(RawAddDriveOptArgs::from(&optargs_cexpr)) as *const ...
#       |                                                            ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1172]
src/guestfs.rs:7730:55: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7730 |         let r = unsafe { guestfs_add_drive_ro(self.g, (&c_filename).as_ptr()) };
#       |                                                       ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1173]
src/guestfs.rs:7744:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7744 |         let r = unsafe { guestfs_add_drive_ro_with_if(self.g, (&c_filename).as_ptr(), (&c_iface).as_ptr()) };
#       |                                                               ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1174]
src/guestfs.rs:7744:87: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7744 |         let r = unsafe { guestfs_add_drive_ro_with_if(self.g, (&c_filename).as_ptr(), (&c_iface).as_ptr()) };
#       |                                                                                       ^^^^^^^^^^ help: change this to: `c_iface`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1175]
src/guestfs.rs:7772:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7772 |         let r = unsafe { guestfs_add_drive_with_if(self.g, (&c_filename).as_ptr(), (&c_iface).as_ptr()) };
#       |                                                            ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1176]
src/guestfs.rs:7772:84: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7772 |         let r = unsafe { guestfs_add_drive_with_if(self.g, (&c_filename).as_ptr(), (&c_iface).as_ptr()) };
#       |                                                                                    ^^^^^^^^^^ help: change this to: `c_iface`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1177]
src/guestfs.rs:7786:63: warning: this public function might dereference a raw pointer but is not marked `unsafe`
#       |
#  7786 | ...   let r = unsafe { guestfs_add_libvirt_dom_argv(self.g, dom, &(RawAddLibvirtDomOptArgs::from(&optargs_cexpr)) as *const RawAddLibvirt...
#       |                                                             ^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#not_unsafe_ptr_arg_deref

Error: CLIPPY_WARNING: [#def1178]
src/guestfs.rs:7799:52: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7799 |         let r = unsafe { guestfs_aug_clear(self.g, (&c_augpath).as_ptr()) };
#       |                                                    ^^^^^^^^^^^^ help: change this to: `c_augpath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1179]
src/guestfs.rs:7825:54: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7825 |         let r = unsafe { guestfs_aug_defnode(self.g, (&c_name).as_ptr(), (&c_expr).as_ptr(), (&c_val).as_ptr()) };
#       |                                                      ^^^^^^^^^ help: change this to: `c_name`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1180]
src/guestfs.rs:7825:74: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7825 |         let r = unsafe { guestfs_aug_defnode(self.g, (&c_name).as_ptr(), (&c_expr).as_ptr(), (&c_val).as_ptr()) };
#       |                                                                          ^^^^^^^^^ help: change this to: `c_expr`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1181]
src/guestfs.rs:7825:94: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7825 |         let r = unsafe { guestfs_aug_defnode(self.g, (&c_name).as_ptr(), (&c_expr).as_ptr(), (&c_val).as_ptr()) };
#       |                                                                                              ^^^^^^^^ help: change this to: `c_val`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1182]
src/guestfs.rs:7843:31: warning: redundant closure
#       |
#  7843 |         let c_expr = expr.map(|s| ffi::CString::new(s)).transpose()?;
#       |                               ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1183]
src/guestfs.rs:7845:53: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7845 |         let r = unsafe { guestfs_aug_defvar(self.g, (&c_name).as_ptr(), match &c_expr { Some(ref s) => s.as_ptr(), None => ptr::null() }
#       |                                                     ^^^^^^^^^ help: change this to: `c_name`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1184]
src/guestfs.rs:7860:50: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7860 |         let r = unsafe { guestfs_aug_get(self.g, (&c_augpath).as_ptr()) };
#       |                                                  ^^^^^^^^^^^^ help: change this to: `c_augpath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1185]
src/guestfs.rs:7876:51: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7876 |         let r = unsafe { guestfs_aug_init(self.g, (&c_root).as_ptr(), flags) };
#       |                                                   ^^^^^^^^^ help: change this to: `c_root`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1186]
src/guestfs.rs:7891:53: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7891 |         let r = unsafe { guestfs_aug_insert(self.g, (&c_augpath).as_ptr(), (&c_label).as_ptr(), before) };
#       |                                                     ^^^^^^^^^^^^ help: change this to: `c_augpath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1187]
src/guestfs.rs:7891:76: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7891 |         let r = unsafe { guestfs_aug_insert(self.g, (&c_augpath).as_ptr(), (&c_label).as_ptr(), before) };
#       |                                                                            ^^^^^^^^^^ help: change this to: `c_label`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1188]
src/guestfs.rs:7905:52: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7905 |         let r = unsafe { guestfs_aug_label(self.g, (&c_augpath).as_ptr()) };
#       |                                                    ^^^^^^^^^^^^ help: change this to: `c_augpath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1189]
src/guestfs.rs:7932:49: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7932 |         let r = unsafe { guestfs_aug_ls(self.g, (&c_augpath).as_ptr()) };
#       |                                                 ^^^^^^^^^^^^ help: change this to: `c_augpath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1190]
src/guestfs.rs:7949:52: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7949 |         let r = unsafe { guestfs_aug_match(self.g, (&c_augpath).as_ptr()) };
#       |                                                    ^^^^^^^^^^^^ help: change this to: `c_augpath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1191]
src/guestfs.rs:7967:49: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7967 |         let r = unsafe { guestfs_aug_mv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                                 ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1192]
src/guestfs.rs:7967:68: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7967 |         let r = unsafe { guestfs_aug_mv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                                                    ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1193]
src/guestfs.rs:7981:49: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  7981 |         let r = unsafe { guestfs_aug_rm(self.g, (&c_augpath).as_ptr()) };
#       |                                                 ^^^^^^^^^^^^ help: change this to: `c_augpath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1194]
src/guestfs.rs:8006:50: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8006 |         let r = unsafe { guestfs_aug_set(self.g, (&c_augpath).as_ptr(), (&c_val).as_ptr()) };
#       |                                                  ^^^^^^^^^^^^ help: change this to: `c_augpath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1195]
src/guestfs.rs:8006:73: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8006 |         let r = unsafe { guestfs_aug_set(self.g, (&c_augpath).as_ptr(), (&c_val).as_ptr()) };
#       |                                                                         ^^^^^^^^ help: change this to: `c_val`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1196]
src/guestfs.rs:8019:29: warning: redundant closure
#       |
#  8019 |         let c_sub = sub.map(|s| ffi::CString::new(s)).transpose()?;
#       |                             ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1197]
src/guestfs.rs:8022:51: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8022 |         let r = unsafe { guestfs_aug_setm(self.g, (&c_base).as_ptr(), match &c_sub { Some(ref s) => s.as_ptr(), None => ptr::null() }
#       |                                                   ^^^^^^^^^ help: change this to: `c_base`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1198]
src/guestfs.rs:8023:3: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8023 | , (&c_val).as_ptr()) };
#       |   ^^^^^^^^ help: change this to: `c_val`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1199]
src/guestfs.rs:8040:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8040 | ...   let r = unsafe { guestfs_aug_transform_argv(self.g, (&c_lens).as_ptr(), (&c_file).as_ptr(), &(RawAugTransformOptArgs::from(&optargs...
#       |                                                           ^^^^^^^^^ help: change this to: `c_lens`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1200]
src/guestfs.rs:8040:81: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8040 | ...   let r = unsafe { guestfs_aug_transform_argv(self.g, (&c_lens).as_ptr(), (&c_file).as_ptr(), &(RawAugTransformOptArgs::from(&optargs...
#       |                                                                               ^^^^^^^^^ help: change this to: `c_file`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1201]
src/guestfs.rs:8046:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  8046 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprAugTransformOptArgs`
#      --> src/guestfs.rs:8046:14
#       |
#  8046 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop
#       = note: `#[warn(clippy::drop_non_drop)]` on by default

Error: CLIPPY_WARNING: [#def1202]
src/guestfs.rs:8054:42: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  8054 |         let mut c_groups = (&c_groups_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                          ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1203]
src/guestfs.rs:8057:52: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  8057 |         let r = unsafe { guestfs_available(self.g, (&c_groups).as_ptr() as *const *const c_char) };
#       |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_groups).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1204]
src/guestfs.rs:8057:52: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8057 |         let r = unsafe { guestfs_available(self.g, (&c_groups).as_ptr() as *const *const c_char) };
#       |                                                    ^^^^^^^^^^^ help: change this to: `c_groups`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1205]
src/guestfs.rs:8087:52: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8087 |         let r = unsafe { guestfs_base64_in(self.g, (&c_base64file).as_ptr(), (&c_filename).as_ptr()) };
#       |                                                    ^^^^^^^^^^^^^^^ help: change this to: `c_base64file`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1206]
src/guestfs.rs:8087:78: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8087 |         let r = unsafe { guestfs_base64_in(self.g, (&c_base64file).as_ptr(), (&c_filename).as_ptr()) };
#       |                                                                              ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1207]
src/guestfs.rs:8102:53: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8102 |         let r = unsafe { guestfs_base64_out(self.g, (&c_filename).as_ptr(), (&c_base64file).as_ptr()) };
#       |                                                     ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1208]
src/guestfs.rs:8102:77: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8102 |         let r = unsafe { guestfs_base64_out(self.g, (&c_filename).as_ptr(), (&c_base64file).as_ptr()) };
#       |                                                                             ^^^^^^^^^^^^^^^ help: change this to: `c_base64file`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1209]
src/guestfs.rs:8116:53: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8116 |         let r = unsafe { guestfs_blkdiscard(self.g, (&c_device).as_ptr()) };
#       |                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1210]
src/guestfs.rs:8129:59: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8129 |         let r = unsafe { guestfs_blkdiscardzeroes(self.g, (&c_device).as_ptr()) };
#       |                                                           ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1211]
src/guestfs.rs:8142:48: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8142 |         let r = unsafe { guestfs_blkid(self.g, (&c_device).as_ptr()) };
#       |                                                ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1212]
src/guestfs.rs:8159:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8159 |         let r = unsafe { guestfs_blockdev_flushbufs(self.g, (&c_device).as_ptr()) };
#       |                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1213]
src/guestfs.rs:8172:58: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8172 |         let r = unsafe { guestfs_blockdev_getbsz(self.g, (&c_device).as_ptr()) };
#       |                                                          ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1214]
src/guestfs.rs:8185:57: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8185 |         let r = unsafe { guestfs_blockdev_getro(self.g, (&c_device).as_ptr()) };
#       |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1215]
src/guestfs.rs:8198:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8198 |         let r = unsafe { guestfs_blockdev_getsize64(self.g, (&c_device).as_ptr()) };
#       |                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1216]
src/guestfs.rs:8211:57: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8211 |         let r = unsafe { guestfs_blockdev_getss(self.g, (&c_device).as_ptr()) };
#       |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1217]
src/guestfs.rs:8224:57: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8224 |         let r = unsafe { guestfs_blockdev_getsz(self.g, (&c_device).as_ptr()) };
#       |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1218]
src/guestfs.rs:8237:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8237 |         let r = unsafe { guestfs_blockdev_rereadpt(self.g, (&c_device).as_ptr()) };
#       |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1219]
src/guestfs.rs:8250:58: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8250 |         let r = unsafe { guestfs_blockdev_setbsz(self.g, (&c_device).as_ptr(), blocksize) };
#       |                                                          ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1220]
src/guestfs.rs:8263:57: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8263 |         let r = unsafe { guestfs_blockdev_setra(self.g, (&c_device).as_ptr(), sectors) };
#       |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1221]
src/guestfs.rs:8276:57: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8276 |         let r = unsafe { guestfs_blockdev_setro(self.g, (&c_device).as_ptr()) };
#       |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1222]
src/guestfs.rs:8289:57: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8289 |         let r = unsafe { guestfs_blockdev_setrw(self.g, (&c_device).as_ptr()) };
#       |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1223]
src/guestfs.rs:8302:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8302 |         let r = unsafe { guestfs_btrfs_balance_cancel(self.g, (&c_path).as_ptr()) };
#       |                                                               ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1224]
src/guestfs.rs:8315:62: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8315 |         let r = unsafe { guestfs_btrfs_balance_pause(self.g, (&c_path).as_ptr()) };
#       |                                                              ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1225]
src/guestfs.rs:8328:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8328 |         let r = unsafe { guestfs_btrfs_balance_resume(self.g, (&c_path).as_ptr()) };
#       |                                                               ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1226]
src/guestfs.rs:8341:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8341 |         let r = unsafe { guestfs_btrfs_balance_status(self.g, (&c_path).as_ptr()) };
#       |                                                               ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1227]
src/guestfs.rs:8357:44: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  8357 |         let mut c_devices = (&c_devices_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                            ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1228]
src/guestfs.rs:8361:59: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  8361 |         let r = unsafe { guestfs_btrfs_device_add(self.g, (&c_devices).as_ptr() as *const *const c_char, (&c_fs).as_ptr()) };
#       |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_devices).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1229]
src/guestfs.rs:8361:59: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8361 |         let r = unsafe { guestfs_btrfs_device_add(self.g, (&c_devices).as_ptr() as *const *const c_char, (&c_fs).as_ptr()) };
#       |                                                           ^^^^^^^^^^^^ help: change this to: `c_devices`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1230]
src/guestfs.rs:8361:106: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8361 |         let r = unsafe { guestfs_btrfs_device_add(self.g, (&c_devices).as_ptr() as *const *const c_char, (&c_fs).as_ptr()) };
#       |                                                                                                          ^^^^^^^ help: change this to: `c_fs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1231]
src/guestfs.rs:8375:44: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  8375 |         let mut c_devices = (&c_devices_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                            ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1232]
src/guestfs.rs:8379:62: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  8379 |         let r = unsafe { guestfs_btrfs_device_delete(self.g, (&c_devices).as_ptr() as *const *const c_char, (&c_fs).as_ptr()) };
#       |                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_devices).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1233]
src/guestfs.rs:8379:62: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8379 |         let r = unsafe { guestfs_btrfs_device_delete(self.g, (&c_devices).as_ptr() as *const *const c_char, (&c_fs).as_ptr()) };
#       |                                                              ^^^^^^^^^^^^ help: change this to: `c_devices`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1234]
src/guestfs.rs:8379:109: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8379 |         let r = unsafe { guestfs_btrfs_device_delete(self.g, (&c_devices).as_ptr() as *const *const c_char, (&c_fs).as_ptr()) };
#       |                                                                                                             ^^^^^^^ help: change this to: `c_fs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1235]
src/guestfs.rs:8394:67: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8394 |         let r = unsafe { guestfs_btrfs_filesystem_balance(self.g, (&c_fs).as_ptr()) };
#       |                                                                   ^^^^^^^ help: change this to: `c_fs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1236]
src/guestfs.rs:8408:75: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8408 | ...   let r = unsafe { guestfs_btrfs_filesystem_defragment_argv(self.g, (&c_path).as_ptr(), &(RawBtrfsFilesystemDefragmentOptArgs::from(&...
#       |                                                                         ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1237]
src/guestfs.rs:8423:71: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8423 | ...   let r = unsafe { guestfs_btrfs_filesystem_resize_argv(self.g, (&c_mountpoint).as_ptr(), &(RawBtrfsFilesystemResizeOptArgs::from(&op...
#       |                                                                     ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1238]
src/guestfs.rs:8428:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  8428 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprBtrfsFilesystemResizeOptArgs`
#      --> src/guestfs.rs:8428:14
#       |
#  8428 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1239]
src/guestfs.rs:8437:64: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8437 |         let r = unsafe { guestfs_btrfs_filesystem_show(self.g, (&c_device).as_ptr()) };
#       |                                                                ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1240]
src/guestfs.rs:8454:64: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8454 |         let r = unsafe { guestfs_btrfs_filesystem_sync(self.g, (&c_fs).as_ptr()) };
#       |                                                                ^^^^^^^ help: change this to: `c_fs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1241]
src/guestfs.rs:8468:58: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8468 | ...   let r = unsafe { guestfs_btrfs_fsck_argv(self.g, (&c_device).as_ptr(), &(RawBtrfsFsckOptArgs::from(&optargs_cexpr)) as *const RawBt...
#       |                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1242]
src/guestfs.rs:8473:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  8473 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprBtrfsFsckOptArgs`
#      --> src/guestfs.rs:8473:14
#       |
#  8473 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1243]
src/guestfs.rs:8481:42: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  8481 |         let mut c_source = (&c_source_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                          ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1244]
src/guestfs.rs:8486:59: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  8486 | ...   let r = unsafe { guestfs_btrfs_image_argv(self.g, (&c_source).as_ptr() as *const *const c_char, (&c_image).as_ptr(), &(RawBtrfsImag...
#       |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_source).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1245]
src/guestfs.rs:8486:59: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8486 | ...   let r = unsafe { guestfs_btrfs_image_argv(self.g, (&c_source).as_ptr() as *const *const c_char, (&c_image).as_ptr(), &(RawBtrfsImag...
#       |                                                         ^^^^^^^^^^^ help: change this to: `c_source`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1246]
src/guestfs.rs:8486:105: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8486 | ...(&c_source).as_ptr() as *const *const c_char, (&c_image).as_ptr(), &(RawBtrfsImageOptArgs::from(&optargs_cexpr)) as *const RawBtrfsIma...
#       |                                                  ^^^^^^^^^^ help: change this to: `c_image`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1247]
src/guestfs.rs:8493:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  8493 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprBtrfsImageOptArgs`
#      --> src/guestfs.rs:8493:14
#       |
#  8493 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1248]
src/guestfs.rs:8504:62: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8504 |         let r = unsafe { guestfs_btrfs_qgroup_assign(self.g, (&c_src).as_ptr(), (&c_dst).as_ptr(), (&c_path).as_ptr()) };
#       |                                                              ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1249]
src/guestfs.rs:8504:81: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8504 |         let r = unsafe { guestfs_btrfs_qgroup_assign(self.g, (&c_src).as_ptr(), (&c_dst).as_ptr(), (&c_path).as_ptr()) };
#       |                                                                                 ^^^^^^^^ help: change this to: `c_dst`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1250]
src/guestfs.rs:8504:100: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8504 |         let r = unsafe { guestfs_btrfs_qgroup_assign(self.g, (&c_src).as_ptr(), (&c_dst).as_ptr(), (&c_path).as_ptr()) };
#       |                                                                                                    ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1251]
src/guestfs.rs:8520:62: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8520 |         let r = unsafe { guestfs_btrfs_qgroup_create(self.g, (&c_qgroupid).as_ptr(), (&c_subvolume).as_ptr()) };
#       |                                                              ^^^^^^^^^^^^^ help: change this to: `c_qgroupid`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1252]
src/guestfs.rs:8520:86: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8520 |         let r = unsafe { guestfs_btrfs_qgroup_create(self.g, (&c_qgroupid).as_ptr(), (&c_subvolume).as_ptr()) };
#       |                                                                                      ^^^^^^^^^^^^^^ help: change this to: `c_subvolume`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1253]
src/guestfs.rs:8535:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8535 |         let r = unsafe { guestfs_btrfs_qgroup_destroy(self.g, (&c_qgroupid).as_ptr(), (&c_subvolume).as_ptr()) };
#       |                                                               ^^^^^^^^^^^^^ help: change this to: `c_qgroupid`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1254]
src/guestfs.rs:8535:87: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8535 |         let r = unsafe { guestfs_btrfs_qgroup_destroy(self.g, (&c_qgroupid).as_ptr(), (&c_subvolume).as_ptr()) };
#       |                                                                                       ^^^^^^^^^^^^^^ help: change this to: `c_subvolume`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1255]
src/guestfs.rs:8549:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8549 |         let r = unsafe { guestfs_btrfs_qgroup_limit(self.g, (&c_subvolume).as_ptr(), size) };
#       |                                                             ^^^^^^^^^^^^^^ help: change this to: `c_subvolume`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1256]
src/guestfs.rs:8564:62: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8564 |         let r = unsafe { guestfs_btrfs_qgroup_remove(self.g, (&c_src).as_ptr(), (&c_dst).as_ptr(), (&c_path).as_ptr()) };
#       |                                                              ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1257]
src/guestfs.rs:8564:81: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8564 |         let r = unsafe { guestfs_btrfs_qgroup_remove(self.g, (&c_src).as_ptr(), (&c_dst).as_ptr(), (&c_path).as_ptr()) };
#       |                                                                                 ^^^^^^^^ help: change this to: `c_dst`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1258]
src/guestfs.rs:8564:100: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8564 |         let r = unsafe { guestfs_btrfs_qgroup_remove(self.g, (&c_src).as_ptr(), (&c_dst).as_ptr(), (&c_path).as_ptr()) };
#       |                                                                                                    ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1259]
src/guestfs.rs:8579:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8579 |         let r = unsafe { guestfs_btrfs_qgroup_show(self.g, (&c_path).as_ptr()) };
#       |                                                            ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1260]
src/guestfs.rs:8597:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8597 |         let r = unsafe { guestfs_btrfs_quota_enable(self.g, (&c_fs).as_ptr(), enable) };
#       |                                                             ^^^^^^^ help: change this to: `c_fs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1261]
src/guestfs.rs:8610:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8610 |         let r = unsafe { guestfs_btrfs_quota_rescan(self.g, (&c_fs).as_ptr()) };
#       |                                                             ^^^^^^^ help: change this to: `c_fs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1262]
src/guestfs.rs:8625:56: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8625 |         let r = unsafe { guestfs_btrfs_replace(self.g, (&c_srcdev).as_ptr(), (&c_targetdev).as_ptr(), (&c_mntpoint).as_ptr()) };
#       |                                                        ^^^^^^^^^^^ help: change this to: `c_srcdev`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1263]
src/guestfs.rs:8625:78: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8625 |         let r = unsafe { guestfs_btrfs_replace(self.g, (&c_srcdev).as_ptr(), (&c_targetdev).as_ptr(), (&c_mntpoint).as_ptr()) };
#       |                                                                              ^^^^^^^^^^^^^^ help: change this to: `c_targetdev`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1264]
src/guestfs.rs:8625:103: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8625 |         let r = unsafe { guestfs_btrfs_replace(self.g, (&c_srcdev).as_ptr(), (&c_targetdev).as_ptr(), (&c_mntpoint).as_ptr()) };
#       |                                                                                                       ^^^^^^^^^^^^^ help: change this to: `c_mntpoint`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1265]
src/guestfs.rs:8640:69: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8640 |         let r = unsafe { guestfs_btrfs_rescue_chunk_recover(self.g, (&c_device).as_ptr()) };
#       |                                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1266]
src/guestfs.rs:8653:69: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8653 |         let r = unsafe { guestfs_btrfs_rescue_super_recover(self.g, (&c_device).as_ptr()) };
#       |                                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1267]
src/guestfs.rs:8666:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8666 |         let r = unsafe { guestfs_btrfs_scrub_cancel(self.g, (&c_path).as_ptr()) };
#       |                                                             ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1268]
src/guestfs.rs:8680:64: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8680 | ...   let r = unsafe { guestfs_btrfs_scrub_full_argv(self.g, (&c_path).as_ptr(), &(RawBtrfsScrubFullOptArgs::from(&optargs_cexpr)) as *co...
#       |                                                              ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1269]
src/guestfs.rs:8685:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  8685 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprBtrfsScrubFullOptArgs`
#      --> src/guestfs.rs:8685:14
#       |
#  8685 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1270]
src/guestfs.rs:8694:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8694 |         let r = unsafe { guestfs_btrfs_scrub_resume(self.g, (&c_path).as_ptr()) };
#       |                                                             ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1271]
src/guestfs.rs:8707:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8707 |         let r = unsafe { guestfs_btrfs_scrub_start(self.g, (&c_path).as_ptr()) };
#       |                                                            ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1272]
src/guestfs.rs:8720:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8720 |         let r = unsafe { guestfs_btrfs_scrub_status(self.g, (&c_path).as_ptr()) };
#       |                                                             ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1273]
src/guestfs.rs:8738:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8738 |         let r = unsafe { guestfs_btrfs_set_seeding(self.g, (&c_device).as_ptr(), seeding) };
#       |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1274]
src/guestfs.rs:8752:75: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8752 | ...   let r = unsafe { guestfs_btrfs_subvolume_create_opts_argv(self.g, (&c_dest).as_ptr(), &(RawBtrfsSubvolumeCreateOptArgs::from(&optar...
#       |                                                                         ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1275]
src/guestfs.rs:8766:65: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8766 |         let r = unsafe { guestfs_btrfs_subvolume_delete(self.g, (&c_subvolume).as_ptr()) };
#       |                                                                 ^^^^^^^^^^^^^^ help: change this to: `c_subvolume`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1276]
src/guestfs.rs:8779:70: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8779 |         let r = unsafe { guestfs_btrfs_subvolume_get_default(self.g, (&c_fs).as_ptr()) };
#       |                                                                      ^^^^^^^ help: change this to: `c_fs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1277]
src/guestfs.rs:8792:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8792 |         let r = unsafe { guestfs_btrfs_subvolume_list(self.g, (&c_fs).as_ptr()) };
#       |                                                               ^^^^^^^ help: change this to: `c_fs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1278]
src/guestfs.rs:8809:74: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8809 |         let r = unsafe { guestfs_btrfs_subvolume_set_default(self.g, id, (&c_fs).as_ptr()) };
#       |                                                                          ^^^^^^^ help: change this to: `c_fs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1279]
src/guestfs.rs:8822:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8822 |         let r = unsafe { guestfs_btrfs_subvolume_show(self.g, (&c_subvolume).as_ptr()) };
#       |                                                               ^^^^^^^^^^^^^^ help: change this to: `c_subvolume`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1280]
src/guestfs.rs:8841:77: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8841 | ...   let r = unsafe { guestfs_btrfs_subvolume_snapshot_opts_argv(self.g, (&c_source).as_ptr(), (&c_dest).as_ptr(), &(RawBtrfsSubvolumeSn...
#       |                                                                           ^^^^^^^^^^^ help: change this to: `c_source`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1281]
src/guestfs.rs:8841:99: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8841 | ...apshot_opts_argv(self.g, (&c_source).as_ptr(), (&c_dest).as_ptr(), &(RawBtrfsSubvolumeSnapshotOptArgs::from(&optargs_cexpr)) as *const...
#       |                                                   ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1282]
src/guestfs.rs:8856:79: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8856 |         let r = unsafe { guestfs_btrfstune_enable_extended_inode_refs(self.g, (&c_device).as_ptr()) };
#       |                                                                               ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1283]
src/guestfs.rs:8869:87: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8869 |         let r = unsafe { guestfs_btrfstune_enable_skinny_metadata_extent_refs(self.g, (&c_device).as_ptr()) };
#       |                                                                                       ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1284]
src/guestfs.rs:8883:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8883 |         let r = unsafe { guestfs_btrfstune_seeding(self.g, (&c_device).as_ptr(), seeding) };
#       |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1285]
src/guestfs.rs:8907:64: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8907 |         let r = unsafe { guestfs_canonical_device_name(self.g, (&c_device).as_ptr()) };
#       |                                                                ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1286]
src/guestfs.rs:8923:55: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8923 |         let r = unsafe { guestfs_cap_get_file(self.g, (&c_path).as_ptr()) };
#       |                                                       ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1287]
src/guestfs.rs:8940:55: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8940 |         let r = unsafe { guestfs_cap_set_file(self.g, (&c_path).as_ptr(), (&c_cap).as_ptr()) };
#       |                                                       ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1288]
src/guestfs.rs:8940:75: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8940 |         let r = unsafe { guestfs_cap_set_file(self.g, (&c_path).as_ptr(), (&c_cap).as_ptr()) };
#       |                                                                           ^^^^^^^^ help: change this to: `c_cap`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1289]
src/guestfs.rs:8954:62: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8954 |         let r = unsafe { guestfs_case_sensitive_path(self.g, (&c_path).as_ptr()) };
#       |                                                              ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1290]
src/guestfs.rs:8970:46: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8970 |         let r = unsafe { guestfs_cat(self.g, (&c_path).as_ptr()) };
#       |                                              ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1291]
src/guestfs.rs:8987:51: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8987 |         let r = unsafe { guestfs_checksum(self.g, (&c_csumtype).as_ptr(), (&c_path).as_ptr()) };
#       |                                                   ^^^^^^^^^^^^^ help: change this to: `c_csumtype`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1292]
src/guestfs.rs:8987:75: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  8987 |         let r = unsafe { guestfs_checksum(self.g, (&c_csumtype).as_ptr(), (&c_path).as_ptr()) };
#       |                                                                           ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1293]
src/guestfs.rs:9005:58: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9005 |         let r = unsafe { guestfs_checksum_device(self.g, (&c_csumtype).as_ptr(), (&c_device).as_ptr()) };
#       |                                                          ^^^^^^^^^^^^^ help: change this to: `c_csumtype`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1294]
src/guestfs.rs:9005:82: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9005 |         let r = unsafe { guestfs_checksum_device(self.g, (&c_csumtype).as_ptr(), (&c_device).as_ptr()) };
#       |                                                                                  ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1295]
src/guestfs.rs:9024:56: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9024 |         let r = unsafe { guestfs_checksums_out(self.g, (&c_csumtype).as_ptr(), (&c_directory).as_ptr(), (&c_sumsfile).as_ptr()) };
#       |                                                        ^^^^^^^^^^^^^ help: change this to: `c_csumtype`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1296]
src/guestfs.rs:9024:80: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9024 |         let r = unsafe { guestfs_checksums_out(self.g, (&c_csumtype).as_ptr(), (&c_directory).as_ptr(), (&c_sumsfile).as_ptr()) };
#       |                                                                                ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1297]
src/guestfs.rs:9024:105: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9024 |         let r = unsafe { guestfs_checksums_out(self.g, (&c_csumtype).as_ptr(), (&c_directory).as_ptr(), (&c_sumsfile).as_ptr()) };
#       |                                                                                                         ^^^^^^^^^^^^^ help: change this to: `c_sumsfile`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1298]
src/guestfs.rs:9039:54: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9039 |         let r = unsafe { guestfs_chmod(self.g, mode, (&c_path).as_ptr()) };
#       |                                                      ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1299]
src/guestfs.rs:9052:62: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9052 |         let r = unsafe { guestfs_chown(self.g, owner, group, (&c_path).as_ptr()) };
#       |                                                              ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1300]
src/guestfs.rs:9065:64: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9065 |         let r = unsafe { guestfs_clear_backend_setting(self.g, (&c_name).as_ptr()) };
#       |                                                                ^^^^^^^^^ help: change this to: `c_name`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1301]
src/guestfs.rs:9079:61: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9079 |         let r = unsafe { guestfs_clevis_luks_unlock(self.g, (&c_device).as_ptr(), (&c_mapname).as_ptr()) };
#       |                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1302]
src/guestfs.rs:9079:83: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9079 |         let r = unsafe { guestfs_clevis_luks_unlock(self.g, (&c_device).as_ptr(), (&c_mapname).as_ptr()) };
#       |                                                                                   ^^^^^^^^^^^^ help: change this to: `c_mapname`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1303]
src/guestfs.rs:9092:48: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  9092 |         let mut c_arguments = (&c_arguments_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                                ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1304]
src/guestfs.rs:9095:50: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  9095 |         let r = unsafe { guestfs_command(self.g, (&c_arguments).as_ptr() as *const *const c_char) };
#       |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_arguments).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1305]
src/guestfs.rs:9095:50: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9095 |         let r = unsafe { guestfs_command(self.g, (&c_arguments).as_ptr() as *const *const c_char) };
#       |                                                  ^^^^^^^^^^^^^^ help: change this to: `c_arguments`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1306]
src/guestfs.rs:9111:48: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  9111 |         let mut c_arguments = (&c_arguments_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                                ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1307]
src/guestfs.rs:9114:56: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  9114 |         let r = unsafe { guestfs_command_lines(self.g, (&c_arguments).as_ptr() as *const *const c_char) };
#       |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_arguments).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1308]
src/guestfs.rs:9114:56: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9114 |         let r = unsafe { guestfs_command_lines(self.g, (&c_arguments).as_ptr() as *const *const c_char) };
#       |                                                        ^^^^^^^^^^^^^^ help: change this to: `c_arguments`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1309]
src/guestfs.rs:9131:48: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  9131 |         let mut c_arguments = (&c_arguments_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                                ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1310]
src/guestfs.rs:9135:54: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  9135 |         let r = unsafe { guestfs_command_out(self.g, (&c_arguments).as_ptr() as *const *const c_char, (&c_output).as_ptr()) };
#       |                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_arguments).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1311]
src/guestfs.rs:9135:54: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9135 |         let r = unsafe { guestfs_command_out(self.g, (&c_arguments).as_ptr() as *const *const c_char, (&c_output).as_ptr()) };
#       |                                                      ^^^^^^^^^^^^^^ help: change this to: `c_arguments`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1312]
src/guestfs.rs:9135:103: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9135 |         let r = unsafe { guestfs_command_out(self.g, (&c_arguments).as_ptr() as *const *const c_char, (&c_output).as_ptr()) };
#       |                                                                                                       ^^^^^^^^^^^ help: change this to: `c_output`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1313]
src/guestfs.rs:9153:67: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9153 | ...   let r = unsafe { guestfs_compress_device_out_argv(self.g, (&c_ctype).as_ptr(), (&c_device).as_ptr(), (&c_zdevice).as_ptr(), &(RawCo...
#       |                                                                 ^^^^^^^^^^ help: change this to: `c_ctype`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1314]
src/guestfs.rs:9153:88: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9153 | ...   let r = unsafe { guestfs_compress_device_out_argv(self.g, (&c_ctype).as_ptr(), (&c_device).as_ptr(), (&c_zdevice).as_ptr(), &(RawCo...
#       |                                                                                      ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1315]
src/guestfs.rs:9153:110: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9153 | ... (&c_ctype).as_ptr(), (&c_device).as_ptr(), (&c_zdevice).as_ptr(), &(RawCompressDeviceOutOptArgs::from(&optargs_cexpr)) as *const RawC...
#       |                                                ^^^^^^^^^^^^ help: change this to: `c_zdevice`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1316]
src/guestfs.rs:9160:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  9160 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprCompressDeviceOutOptArgs`
#      --> src/guestfs.rs:9160:14
#       |
#  9160 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1317]
src/guestfs.rs:9172:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9172 | ...   let r = unsafe { guestfs_compress_out_argv(self.g, (&c_ctype).as_ptr(), (&c_file).as_ptr(), (&c_zfile).as_ptr(), &(RawCompressOutOp...
#       |                                                          ^^^^^^^^^^ help: change this to: `c_ctype`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1318]
src/guestfs.rs:9172:81: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9172 | ...   let r = unsafe { guestfs_compress_out_argv(self.g, (&c_ctype).as_ptr(), (&c_file).as_ptr(), (&c_zfile).as_ptr(), &(RawCompressOutOp...
#       |                                                                               ^^^^^^^^^ help: change this to: `c_file`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1319]
src/guestfs.rs:9172:101: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9172 | ...f.g, (&c_ctype).as_ptr(), (&c_file).as_ptr(), (&c_zfile).as_ptr(), &(RawCompressOutOptArgs::from(&optargs_cexpr)) as *const RawCompres...
#       |                                                  ^^^^^^^^^^ help: change this to: `c_zfile`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1320]
src/guestfs.rs:9179:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  9179 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprCompressOutOptArgs`
#      --> src/guestfs.rs:9179:14
#       |
#  9179 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1321]
src/guestfs.rs:9187:37: warning: redundant closure
#       |
#  9187 |         let c_hvvalue = hvvalue.map(|s| ffi::CString::new(s)).transpose()?;
#       |                                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1322]
src/guestfs.rs:9189:49: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9189 |         let r = unsafe { guestfs_config(self.g, (&c_hvparam).as_ptr(), match &c_hvvalue { Some(ref s) => s.as_ptr(), None => ptr::null() }
#       |                                                 ^^^^^^^^^^^^ help: change this to: `c_hvparam`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1323]
src/guestfs.rs:9206:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9206 | ...   let r = unsafe { guestfs_copy_attributes_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyAttributesOptArgs::from(&opta...
#       |                                                             ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1324]
src/guestfs.rs:9206:82: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9206 | ...   let r = unsafe { guestfs_copy_attributes_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyAttributesOptArgs::from(&opta...
#       |                                                                                ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1325]
src/guestfs.rs:9212:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  9212 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprCopyAttributesOptArgs`
#      --> src/guestfs.rs:9212:14
#       |
#  9212 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1326]
src/guestfs.rs:9223:69: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9223 | ...   let r = unsafe { guestfs_copy_device_to_device_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyDeviceToDeviceOptArgs::...
#       |                                                                   ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1327]
src/guestfs.rs:9223:88: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9223 | ...   let r = unsafe { guestfs_copy_device_to_device_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyDeviceToDeviceOptArgs::...
#       |                                                                                      ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1328]
src/guestfs.rs:9229:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  9229 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprCopyDeviceToDeviceOptArgs`
#      --> src/guestfs.rs:9229:14
#       |
#  9229 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1329]
src/guestfs.rs:9240:67: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9240 | ...   let r = unsafe { guestfs_copy_device_to_file_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyDeviceToFileOptArgs::from...
#       |                                                                 ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1330]
src/guestfs.rs:9240:86: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9240 | ...   let r = unsafe { guestfs_copy_device_to_file_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyDeviceToFileOptArgs::from...
#       |                                                                                    ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1331]
src/guestfs.rs:9246:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  9246 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprCopyDeviceToFileOptArgs`
#      --> src/guestfs.rs:9246:14
#       |
#  9246 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1332]
src/guestfs.rs:9257:67: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9257 | ...   let r = unsafe { guestfs_copy_file_to_device_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyFileToDeviceOptArgs::from...
#       |                                                                 ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1333]
src/guestfs.rs:9257:86: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9257 | ...   let r = unsafe { guestfs_copy_file_to_device_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyFileToDeviceOptArgs::from...
#       |                                                                                    ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1334]
src/guestfs.rs:9263:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  9263 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprCopyFileToDeviceOptArgs`
#      --> src/guestfs.rs:9263:14
#       |
#  9263 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1335]
src/guestfs.rs:9274:65: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9274 | ...   let r = unsafe { guestfs_copy_file_to_file_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyFileToFileOptArgs::from(&op...
#       |                                                               ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1336]
src/guestfs.rs:9274:84: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9274 | ...   let r = unsafe { guestfs_copy_file_to_file_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawCopyFileToFileOptArgs::from(&op...
#       |                                                                                  ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1337]
src/guestfs.rs:9280:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  9280 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprCopyFileToFileOptArgs`
#      --> src/guestfs.rs:9280:14
#       |
#  9280 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1338]
src/guestfs.rs:9290:50: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9290 |         let r = unsafe { guestfs_copy_in(self.g, (&c_localpath).as_ptr(), (&c_remotedir).as_ptr()) };
#       |                                                  ^^^^^^^^^^^^^^ help: change this to: `c_localpath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1339]
src/guestfs.rs:9290:75: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9290 |         let r = unsafe { guestfs_copy_in(self.g, (&c_localpath).as_ptr(), (&c_remotedir).as_ptr()) };
#       |                                                                           ^^^^^^^^^^^^^^ help: change this to: `c_remotedir`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1340]
src/guestfs.rs:9305:51: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9305 |         let r = unsafe { guestfs_copy_out(self.g, (&c_remotepath).as_ptr(), (&c_localdir).as_ptr()) };
#       |                                                   ^^^^^^^^^^^^^^^ help: change this to: `c_remotepath`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1341]
src/guestfs.rs:9305:77: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9305 |         let r = unsafe { guestfs_copy_out(self.g, (&c_remotepath).as_ptr(), (&c_localdir).as_ptr()) };
#       |                                                                             ^^^^^^^^^^^^^ help: change this to: `c_localdir`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1342]
src/guestfs.rs:9320:52: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9320 |         let r = unsafe { guestfs_copy_size(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), size) };
#       |                                                    ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1343]
src/guestfs.rs:9320:71: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9320 |         let r = unsafe { guestfs_copy_size(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), size) };
#       |                                                                       ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1344]
src/guestfs.rs:9335:45: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9335 |         let r = unsafe { guestfs_cp(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                             ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1345]
src/guestfs.rs:9335:64: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9335 |         let r = unsafe { guestfs_cp(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                                                ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1346]
src/guestfs.rs:9350:47: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9350 |         let r = unsafe { guestfs_cp_a(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                               ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1347]
src/guestfs.rs:9350:66: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9350 |         let r = unsafe { guestfs_cp_a(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                                                  ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1348]
src/guestfs.rs:9365:47: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9365 |         let r = unsafe { guestfs_cp_r(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                               ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1349]
src/guestfs.rs:9365:66: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9365 |         let r = unsafe { guestfs_cp_r(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                                                  ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1350]
src/guestfs.rs:9381:56: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9381 | ...   let r = unsafe { guestfs_cpio_out_argv(self.g, (&c_directory).as_ptr(), (&c_cpiofile).as_ptr(), &(RawCpioOutOptArgs::from(&optargs_...
#       |                                                      ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1351]
src/guestfs.rs:9381:81: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9381 | ...   let r = unsafe { guestfs_cpio_out_argv(self.g, (&c_directory).as_ptr(), (&c_cpiofile).as_ptr(), &(RawCpioOutOptArgs::from(&optargs_...
#       |                                                                               ^^^^^^^^^^^^^ help: change this to: `c_cpiofile`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1352]
src/guestfs.rs:9396:59: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9396 |         let r = unsafe { guestfs_cryptsetup_close(self.g, (&c_device).as_ptr()) };
#       |                                                           ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1353]
src/guestfs.rs:9412:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9412 | ...   let r = unsafe { guestfs_cryptsetup_open_argv(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_mapname).as_ptr(), &(RawCryptset...
#       |                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1354]
src/guestfs.rs:9412:85: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9412 | ...   let r = unsafe { guestfs_cryptsetup_open_argv(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_mapname).as_ptr(), &(RawCryptset...
#       |                                                                                   ^^^^^^^^ help: change this to: `c_key`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1355]
src/guestfs.rs:9412:104: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9412 | ...g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_mapname).as_ptr(), &(RawCryptsetupOpenOptArgs::from(&optargs_cexpr)) as *const RawCryp...
#       |                                                ^^^^^^^^^^^^ help: change this to: `c_mapname`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1356]
src/guestfs.rs:9429:45: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9429 |         let r = unsafe { guestfs_dd(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                             ^^^^^^^^ help: change this to: `c_src`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1357]
src/guestfs.rs:9429:64: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9429 |         let r = unsafe { guestfs_dd(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#       |                                                                ^^^^^^^^^ help: change this to: `c_dest`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1358]
src/guestfs.rs:9443:48: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  9443 |         let mut c_extraargs = (&c_extraargs_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                                ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1359]
src/guestfs.rs:9446:48: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9446 |         let r = unsafe { guestfs_debug(self.g, (&c_subcmd).as_ptr(), (&c_extraargs).as_ptr() as *const *const c_char) };
#       |                                                ^^^^^^^^^^^ help: change this to: `c_subcmd`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1360]
src/guestfs.rs:9446:70: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  9446 |         let r = unsafe { guestfs_debug(self.g, (&c_subcmd).as_ptr(), (&c_extraargs).as_ptr() as *const *const c_char) };
#       |                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_extraargs).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1361]
src/guestfs.rs:9446:70: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9446 |         let r = unsafe { guestfs_debug(self.g, (&c_subcmd).as_ptr(), (&c_extraargs).as_ptr() as *const *const c_char) };
#       |                                                                      ^^^^^^^^^^^^^^ help: change this to: `c_extraargs`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1362]
src/guestfs.rs:9480:55: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9480 |         let r = unsafe { guestfs_debug_upload(self.g, (&c_filename).as_ptr(), (&c_tmpname).as_ptr(), mode) };
#       |                                                       ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1363]
src/guestfs.rs:9480:79: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9480 |         let r = unsafe { guestfs_debug_upload(self.g, (&c_filename).as_ptr(), (&c_tmpname).as_ptr(), mode) };
#       |                                                                               ^^^^^^^^^^^^ help: change this to: `c_tmpname`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1364]
src/guestfs.rs:9494:55: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9494 |         let r = unsafe { guestfs_device_index(self.g, (&c_device).as_ptr()) };
#       |                                                       ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1365]
src/guestfs.rs:9551:59: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9551 | ...   let r = unsafe { guestfs_disk_create_argv(self.g, (&c_filename).as_ptr(), (&c_format).as_ptr(), size, &(RawDiskCreateOptArgs::from(...
#       |                                                         ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1366]
src/guestfs.rs:9551:83: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9551 | ...   let r = unsafe { guestfs_disk_create_argv(self.g, (&c_filename).as_ptr(), (&c_format).as_ptr(), size, &(RawDiskCreateOptArgs::from(...
#       |                                                                                 ^^^^^^^^^^^ help: change this to: `c_format`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1367]
src/guestfs.rs:9566:54: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9566 |         let r = unsafe { guestfs_disk_format(self.g, (&c_filename).as_ptr()) };
#       |                                                      ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1368]
src/guestfs.rs:9582:64: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9582 |         let r = unsafe { guestfs_disk_has_backing_file(self.g, (&c_filename).as_ptr()) };
#       |                                                                ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1369]
src/guestfs.rs:9595:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9595 |         let r = unsafe { guestfs_disk_virtual_size(self.g, (&c_filename).as_ptr()) };
#       |                                                            ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1370]
src/guestfs.rs:9623:51: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9623 |         let r = unsafe { guestfs_download(self.g, (&c_remotefilename).as_ptr(), (&c_filename).as_ptr()) };
#       |                                                   ^^^^^^^^^^^^^^^^^^^ help: change this to: `c_remotefilename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1371]
src/guestfs.rs:9623:81: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9623 |         let r = unsafe { guestfs_download(self.g, (&c_remotefilename).as_ptr(), (&c_filename).as_ptr()) };
#       |                                                                                 ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1372]
src/guestfs.rs:9639:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9639 | ...   let r = unsafe { guestfs_download_blocks_argv(self.g, (&c_device).as_ptr(), start, stop, (&c_filename).as_ptr(), &(RawDownloadBlock...
#       |                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1373]
src/guestfs.rs:9639:98: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9639 | ...self.g, (&c_device).as_ptr(), start, stop, (&c_filename).as_ptr(), &(RawDownloadBlocksOptArgs::from(&optargs_cexpr)) as *const RawDown...
#       |                                               ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1374]
src/guestfs.rs:9645:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  9645 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprDownloadBlocksOptArgs`
#      --> src/guestfs.rs:9645:14
#       |
#  9645 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1375]
src/guestfs.rs:9655:57: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9655 |         let r = unsafe { guestfs_download_inode(self.g, (&c_device).as_ptr(), inode, (&c_filename).as_ptr()) };
#       |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1376]
src/guestfs.rs:9655:86: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9655 |         let r = unsafe { guestfs_download_inode(self.g, (&c_device).as_ptr(), inode, (&c_filename).as_ptr()) };
#       |                                                                                      ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1377]
src/guestfs.rs:9670:58: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9670 |         let r = unsafe { guestfs_download_offset(self.g, (&c_remotefilename).as_ptr(), (&c_filename).as_ptr(), offset, size) };
#       |                                                          ^^^^^^^^^^^^^^^^^^^ help: change this to: `c_remotefilename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1378]
src/guestfs.rs:9670:88: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9670 |         let r = unsafe { guestfs_download_offset(self.g, (&c_remotefilename).as_ptr(), (&c_filename).as_ptr(), offset, size) };
#       |                                                                                        ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1379]
src/guestfs.rs:9695:45: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9695 |         let r = unsafe { guestfs_du(self.g, (&c_path).as_ptr()) };
#       |                                             ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1380]
src/guestfs.rs:9709:54: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9709 | ...   let r = unsafe { guestfs_e2fsck_argv(self.g, (&c_device).as_ptr(), &(RawE2fsckOptArgs::from(&optargs_cexpr)) as *const RawE2fsckOpt...
#       |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1381]
src/guestfs.rs:9714:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#       |
#  9714 |         drop(optargs_cexpr);
#       |         ^^^^^^^^^^^^^^^^^^^
#       |
#  note: argument has type `guestfs::CExprE2fsckOptArgs`
#      --> src/guestfs.rs:9714:14
#       |
#  9714 |         drop(optargs_cexpr);
#       |              ^^^^^^^^^^^^^
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1382]
src/guestfs.rs:9723:51: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9723 |         let r = unsafe { guestfs_e2fsck_f(self.g, (&c_device).as_ptr()) };
#       |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1383]
src/guestfs.rs:9735:40: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  9735 |         let mut c_words = (&c_words_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                        ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1384]
src/guestfs.rs:9738:54: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  9738 |         let r = unsafe { guestfs_echo_daemon(self.g, (&c_words).as_ptr() as *const *const c_char) };
#       |                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_words).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1385]
src/guestfs.rs:9738:54: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9738 |         let r = unsafe { guestfs_echo_daemon(self.g, (&c_words).as_ptr() as *const *const c_char) };
#       |                                                      ^^^^^^^^^^ help: change this to: `c_words`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1386]
src/guestfs.rs:9756:48: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9756 |         let r = unsafe { guestfs_egrep(self.g, (&c_regex).as_ptr(), (&c_path).as_ptr()) };
#       |                                                ^^^^^^^^^^ help: change this to: `c_regex`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1387]
src/guestfs.rs:9756:69: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9756 |         let r = unsafe { guestfs_egrep(self.g, (&c_regex).as_ptr(), (&c_path).as_ptr()) };
#       |                                                                     ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1388]
src/guestfs.rs:9775:49: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9775 |         let r = unsafe { guestfs_egrepi(self.g, (&c_regex).as_ptr(), (&c_path).as_ptr()) };
#       |                                                 ^^^^^^^^^^ help: change this to: `c_regex`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1389]
src/guestfs.rs:9775:70: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9775 |         let r = unsafe { guestfs_egrepi(self.g, (&c_regex).as_ptr(), (&c_path).as_ptr()) };
#       |                                                                      ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1390]
src/guestfs.rs:9794:48: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9794 |         let r = unsafe { guestfs_equal(self.g, (&c_file1).as_ptr(), (&c_file2).as_ptr()) };
#       |                                                ^^^^^^^^^^ help: change this to: `c_file1`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1391]
src/guestfs.rs:9794:69: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9794 |         let r = unsafe { guestfs_equal(self.g, (&c_file1).as_ptr(), (&c_file2).as_ptr()) };
#       |                                                                     ^^^^^^^^^^ help: change this to: `c_file2`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1392]
src/guestfs.rs:9808:49: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9808 |         let r = unsafe { guestfs_exists(self.g, (&c_path).as_ptr()) };
#       |                                                 ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1393]
src/guestfs.rs:9821:51: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9821 |         let r = unsafe { guestfs_extlinux(self.g, (&c_directory).as_ptr()) };
#       |                                                   ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1394]
src/guestfs.rs:9834:54: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9834 |         let r = unsafe { guestfs_f2fs_expand(self.g, (&c_device).as_ptr()) };
#       |                                                      ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1395]
src/guestfs.rs:9847:52: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9847 |         let r = unsafe { guestfs_fallocate(self.g, (&c_path).as_ptr(), len) };
#       |                                                    ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1396]
src/guestfs.rs:9860:54: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9860 |         let r = unsafe { guestfs_fallocate64(self.g, (&c_path).as_ptr(), len) };
#       |                                                      ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1397]
src/guestfs.rs:9872:42: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#       |
#  9872 |         let mut c_groups = (&c_groups_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#       |                                          ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1398]
src/guestfs.rs:9875:60: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#       |
#  9875 |         let r = unsafe { guestfs_feature_available(self.g, (&c_groups).as_ptr() as *const *const c_char) };
#       |                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_groups).as_ptr()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1399]
src/guestfs.rs:9875:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9875 |         let r = unsafe { guestfs_feature_available(self.g, (&c_groups).as_ptr() as *const *const c_char) };
#       |                                                            ^^^^^^^^^^^ help: change this to: `c_groups`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1400]
src/guestfs.rs:9890:48: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9890 |         let r = unsafe { guestfs_fgrep(self.g, (&c_pattern).as_ptr(), (&c_path).as_ptr()) };
#       |                                                ^^^^^^^^^^^^ help: change this to: `c_pattern`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1401]
src/guestfs.rs:9890:71: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9890 |         let r = unsafe { guestfs_fgrep(self.g, (&c_pattern).as_ptr(), (&c_path).as_ptr()) };
#       |                                                                       ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1402]
src/guestfs.rs:9909:49: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9909 |         let r = unsafe { guestfs_fgrepi(self.g, (&c_pattern).as_ptr(), (&c_path).as_ptr()) };
#       |                                                 ^^^^^^^^^^^^ help: change this to: `c_pattern`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1403]
src/guestfs.rs:9909:72: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9909 |         let r = unsafe { guestfs_fgrepi(self.g, (&c_pattern).as_ptr(), (&c_path).as_ptr()) };
#       |                                                                        ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1404]
src/guestfs.rs:9927:47: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9927 |         let r = unsafe { guestfs_file(self.g, (&c_path).as_ptr()) };
#       |                                               ^^^^^^^^^ help: change this to: `c_path`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1405]
src/guestfs.rs:9943:60: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9943 |         let r = unsafe { guestfs_file_architecture(self.g, (&c_filename).as_ptr()) };
#       |                                                            ^^^^^^^^^^^^^ help: change this to: `c_filename`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1406]
src/guestfs.rs:9959:51: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9959 |         let r = unsafe { guestfs_filesize(self.g, (&c_file).as_ptr()) };
#       |                                                   ^^^^^^^^^ help: change this to: `c_file`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1407]
src/guestfs.rs:9972:63: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9972 |         let r = unsafe { guestfs_filesystem_available(self.g, (&c_filesystem).as_ptr()) };
#       |                                                               ^^^^^^^^^^^^^^^ help: change this to: `c_filesystem`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1408]
src/guestfs.rs:9985:58: warning: this expression borrows a value the compiler would automatically borrow
#       |
#  9985 |         let r = unsafe { guestfs_filesystem_walk(self.g, (&c_device).as_ptr()) };
#       |                                                          ^^^^^^^^^^^ help: change this to: `c_device`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1409]
src/guestfs.rs:10002:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10002 |         let r = unsafe { guestfs_fill(self.g, c, len, (&c_path).as_ptr()) };
#        |                                                       ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1410]
src/guestfs.rs:10015:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10015 |         let r = unsafe { guestfs_fill_dir(self.g, (&c_dir).as_ptr(), nr) };
#        |                                                   ^^^^^^^^ help: change this to: `c_dir`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1411]
src/guestfs.rs:10029:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10029 |         let r = unsafe { guestfs_fill_pattern(self.g, (&c_pattern).as_ptr(), len, (&c_path).as_ptr()) };
#        |                                                       ^^^^^^^^^^^^ help: change this to: `c_pattern`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1412]
src/guestfs.rs:10029:83: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10029 |         let r = unsafe { guestfs_fill_pattern(self.g, (&c_pattern).as_ptr(), len, (&c_path).as_ptr()) };
#        |                                                                                   ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1413]
src/guestfs.rs:10043:47: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10043 |         let r = unsafe { guestfs_find(self.g, (&c_directory).as_ptr()) };
#        |                                               ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1414]
src/guestfs.rs:10061:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10061 |         let r = unsafe { guestfs_find0(self.g, (&c_directory).as_ptr(), (&c_files).as_ptr()) };
#        |                                                ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1415]
src/guestfs.rs:10061:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10061 |         let r = unsafe { guestfs_find0(self.g, (&c_directory).as_ptr(), (&c_files).as_ptr()) };
#        |                                                                         ^^^^^^^^^^ help: change this to: `c_files`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1416]
src/guestfs.rs:10075:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10075 |         let r = unsafe { guestfs_find_inode(self.g, (&c_device).as_ptr(), inode) };
#        |                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1417]
src/guestfs.rs:10092:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10092 |         let r = unsafe { guestfs_findfs_label(self.g, (&c_label).as_ptr()) };
#        |                                                       ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1418]
src/guestfs.rs:10108:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10108 |         let r = unsafe { guestfs_findfs_partlabel(self.g, (&c_label).as_ptr()) };
#        |                                                           ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1419]
src/guestfs.rs:10124:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10124 |         let r = unsafe { guestfs_findfs_partuuid(self.g, (&c_uuid).as_ptr()) };
#        |                                                          ^^^^^^^^^ help: change this to: `c_uuid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1420]
src/guestfs.rs:10140:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10140 |         let r = unsafe { guestfs_findfs_uuid(self.g, (&c_uuid).as_ptr()) };
#        |                                                      ^^^^^^^^^ help: change this to: `c_uuid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1421]
src/guestfs.rs:10157:47: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10157 |         let r = unsafe { guestfs_fsck(self.g, (&c_fstype).as_ptr(), (&c_device).as_ptr()) };
#        |                                               ^^^^^^^^^^^ help: change this to: `c_fstype`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1422]
src/guestfs.rs:10157:69: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10157 |         let r = unsafe { guestfs_fsck(self.g, (&c_fstype).as_ptr(), (&c_device).as_ptr()) };
#        |                                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1423]
src/guestfs.rs:10172:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10172 | ...   let r = unsafe { guestfs_fstrim_argv(self.g, (&c_mountpoint).as_ptr(), &(RawFstrimOptArgs::from(&optargs_cexpr)) as *const RawFstri...
#        |                                                    ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1424]
src/guestfs.rs:10177:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  10177 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprFstrimOptArgs`
#       --> src/guestfs.rs:10177:14
#        |
#  10177 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1425]
src/guestfs.rs:10237:62: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10237 |         let r = unsafe { guestfs_get_backend_setting(self.g, (&c_name).as_ptr()) };
#        |                                                              ^^^^^^^^^ help: change this to: `c_name`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1426]
src/guestfs.rs:10293:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10293 |         let r = unsafe { guestfs_get_e2attrs(self.g, (&c_file).as_ptr()) };
#        |                                                      ^^^^^^^^^ help: change this to: `c_file`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1427]
src/guestfs.rs:10309:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10309 |         let r = unsafe { guestfs_get_e2generation(self.g, (&c_file).as_ptr()) };
#        |                                                           ^^^^^^^^^ help: change this to: `c_file`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1428]
src/guestfs.rs:10322:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10322 |         let r = unsafe { guestfs_get_e2label(self.g, (&c_device).as_ptr()) };
#        |                                                      ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1429]
src/guestfs.rs:10338:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10338 |         let r = unsafe { guestfs_get_e2uuid(self.g, (&c_device).as_ptr()) };
#        |                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1430]
src/guestfs.rs:10634:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10634 |         let r = unsafe { guestfs_getxattr(self.g, (&c_path).as_ptr(), (&c_name).as_ptr(), &mut size as *mut usize) };
#        |                                                   ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1431]
src/guestfs.rs:10634:71: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10634 |         let r = unsafe { guestfs_getxattr(self.g, (&c_path).as_ptr(), (&c_name).as_ptr(), &mut size as *mut usize) };
#        |                                                                       ^^^^^^^^^ help: change this to: `c_name`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1432]
src/guestfs.rs:10652:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10652 |         let r = unsafe { guestfs_getxattrs(self.g, (&c_path).as_ptr()) };
#        |                                                    ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1433]
src/guestfs.rs:10670:64: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10670 | ...   let r = unsafe { guestfs_glob_expand_opts_argv(self.g, (&c_pattern).as_ptr(), &(RawGlobExpandOptArgs::from(&optargs_cexpr)) as *con...
#        |                                                              ^^^^^^^^^^^^ help: change this to: `c_pattern`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1434]
src/guestfs.rs:10675:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  10675 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprGlobExpandOptArgs`
#       --> src/guestfs.rs:10675:14
#        |
#  10675 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1435]
src/guestfs.rs:10690:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10690 | ...   let r = unsafe { guestfs_grep_opts_argv(self.g, (&c_regex).as_ptr(), (&c_path).as_ptr(), &(RawGrepOptArgs::from(&optargs_cexpr)) as...
#        |                                                       ^^^^^^^^^^ help: change this to: `c_regex`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1436]
src/guestfs.rs:10690:78: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10690 | ...   let r = unsafe { guestfs_grep_opts_argv(self.g, (&c_regex).as_ptr(), (&c_path).as_ptr(), &(RawGrepOptArgs::from(&optargs_cexpr)) as...
#        |                                                                            ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1437]
src/guestfs.rs:10696:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  10696 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprGrepOptArgs`
#       --> src/guestfs.rs:10696:14
#        |
#  10696 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1438]
src/guestfs.rs:10710:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10710 |         let r = unsafe { guestfs_grepi(self.g, (&c_regex).as_ptr(), (&c_path).as_ptr()) };
#        |                                                ^^^^^^^^^^ help: change this to: `c_regex`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1439]
src/guestfs.rs:10710:69: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10710 |         let r = unsafe { guestfs_grepi(self.g, (&c_regex).as_ptr(), (&c_path).as_ptr()) };
#        |                                                                     ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1440]
src/guestfs.rs:10729:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10729 |         let r = unsafe { guestfs_grub_install(self.g, (&c_root).as_ptr(), (&c_device).as_ptr()) };
#        |                                                       ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1441]
src/guestfs.rs:10729:75: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10729 |         let r = unsafe { guestfs_grub_install(self.g, (&c_root).as_ptr(), (&c_device).as_ptr()) };
#        |                                                                           ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1442]
src/guestfs.rs:10743:47: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10743 |         let r = unsafe { guestfs_head(self.g, (&c_path).as_ptr()) };
#        |                                               ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1443]
src/guestfs.rs:10760:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10760 |         let r = unsafe { guestfs_head_n(self.g, nrlines, (&c_path).as_ptr()) };
#        |                                                          ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1444]
src/guestfs.rs:10777:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10777 |         let r = unsafe { guestfs_hexdump(self.g, (&c_path).as_ptr()) };
#        |                                                  ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1445]
src/guestfs.rs:10802:39: warning: redundant closure
#        |
#  10802 |         let c_filename = filename.map(|s| ffi::CString::new(s)).transpose()?;
#        |                                       ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1446]
src/guestfs.rs:10818:71: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10818 |         let r = unsafe { guestfs_hivex_node_add_child(self.g, parent, (&c_name).as_ptr()) };
#        |                                                                       ^^^^^^^^^ help: change this to: `c_name`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1447]
src/guestfs.rs:10857:70: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10857 |         let r = unsafe { guestfs_hivex_node_get_child(self.g, nodeh, (&c_name).as_ptr()) };
#        |                                                                      ^^^^^^^^^ help: change this to: `c_name`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1448]
src/guestfs.rs:10870:70: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10870 |         let r = unsafe { guestfs_hivex_node_get_value(self.g, nodeh, (&c_key).as_ptr()) };
#        |                                                                      ^^^^^^^^ help: change this to: `c_key`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1449]
src/guestfs.rs:10910:70: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10910 |         let r = unsafe { guestfs_hivex_node_set_value(self.g, nodeh, (&c_key).as_ptr(), t, (&c_val).as_ptr(), c_val_len) };
#        |                                                                      ^^^^^^^^ help: change this to: `c_key`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1450]
src/guestfs.rs:10910:92: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10910 |         let r = unsafe { guestfs_hivex_node_set_value(self.g, nodeh, (&c_key).as_ptr(), t, (&c_val).as_ptr(), c_val_len) };
#        |                                                                                            ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1451]
src/guestfs.rs:10940:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  10940 | ...   let r = unsafe { guestfs_hivex_open_argv(self.g, (&c_filename).as_ptr(), &(RawHivexOpenOptArgs::from(&optargs_cexpr)) as *const Raw...
#        |                                                        ^^^^^^^^^^^^^ help: change this to: `c_filename`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1452]
src/guestfs.rs:10945:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  10945 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprHivexOpenOptArgs`
#       --> src/guestfs.rs:10945:14
#        |
#  10945 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1453]
src/guestfs.rs:11036:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11036 |         let r = unsafe { guestfs_initrd_cat(self.g, (&c_initrdpath).as_ptr(), (&c_filename).as_ptr(), &mut size as *mut usize) };
#        |                                                     ^^^^^^^^^^^^^^^ help: change this to: `c_initrdpath`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1454]
src/guestfs.rs:11036:79: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11036 |         let r = unsafe { guestfs_initrd_cat(self.g, (&c_initrdpath).as_ptr(), (&c_filename).as_ptr(), &mut size as *mut usize) };
#        |                                                                               ^^^^^^^^^^^^^ help: change this to: `c_filename`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1455]
src/guestfs.rs:11054:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11054 |         let r = unsafe { guestfs_initrd_list(self.g, (&c_path).as_ptr()) };
#        |                                                      ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1456]
src/guestfs.rs:11071:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11071 |         let r = unsafe { guestfs_inotify_add_watch(self.g, (&c_path).as_ptr(), mask) };
#        |                                                            ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1457]
src/guestfs.rs:11147:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11147 |         let r = unsafe { guestfs_inspect_get_arch(self.g, (&c_root).as_ptr()) };
#        |                                                           ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1458]
src/guestfs.rs:11163:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11163 |         let r = unsafe { guestfs_inspect_get_build_id(self.g, (&c_root).as_ptr()) };
#        |                                                               ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1459]
src/guestfs.rs:11179:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11179 |         let r = unsafe { guestfs_inspect_get_distro(self.g, (&c_root).as_ptr()) };
#        |                                                             ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1460]
src/guestfs.rs:11195:69: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11195 |         let r = unsafe { guestfs_inspect_get_drive_mappings(self.g, (&c_root).as_ptr()) };
#        |                                                                     ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1461]
src/guestfs.rs:11212:66: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11212 |         let r = unsafe { guestfs_inspect_get_filesystems(self.g, (&c_root).as_ptr()) };
#        |                                                                  ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1462]
src/guestfs.rs:11229:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11229 |         let r = unsafe { guestfs_inspect_get_format(self.g, (&c_root).as_ptr()) };
#        |                                                             ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1463]
src/guestfs.rs:11245:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11245 |         let r = unsafe { guestfs_inspect_get_hostname(self.g, (&c_root).as_ptr()) };
#        |                                                               ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1464]
src/guestfs.rs:11263:64: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11263 | ...   let r = unsafe { guestfs_inspect_get_icon_argv(self.g, (&c_root).as_ptr(), &mut size as *mut usize, &(RawInspectGetIconOptArgs::fro...
#        |                                                              ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1465]
src/guestfs.rs:11268:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  11268 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprInspectGetIconOptArgs`
#       --> src/guestfs.rs:11268:14
#        |
#  11268 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1466]
src/guestfs.rs:11281:68: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11281 |         let r = unsafe { guestfs_inspect_get_major_version(self.g, (&c_root).as_ptr()) };
#        |                                                                    ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1467]
src/guestfs.rs:11294:68: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11294 |         let r = unsafe { guestfs_inspect_get_minor_version(self.g, (&c_root).as_ptr()) };
#        |                                                                    ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1468]
src/guestfs.rs:11307:66: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11307 |         let r = unsafe { guestfs_inspect_get_mountpoints(self.g, (&c_root).as_ptr()) };
#        |                                                                  ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1469]
src/guestfs.rs:11324:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11324 |         let r = unsafe { guestfs_inspect_get_osinfo(self.g, (&c_root).as_ptr()) };
#        |                                                             ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1470]
src/guestfs.rs:11340:69: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11340 |         let r = unsafe { guestfs_inspect_get_package_format(self.g, (&c_root).as_ptr()) };
#        |                                                                     ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1471]
src/guestfs.rs:11356:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11356 |         let r = unsafe { guestfs_inspect_get_package_management(self.g, (&c_root).as_ptr()) };
#        |                                                                         ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1472]
src/guestfs.rs:11372:67: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11372 |         let r = unsafe { guestfs_inspect_get_product_name(self.g, (&c_root).as_ptr()) };
#        |                                                                   ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1473]
src/guestfs.rs:11388:70: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11388 |         let r = unsafe { guestfs_inspect_get_product_variant(self.g, (&c_root).as_ptr()) };
#        |                                                                      ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1474]
src/guestfs.rs:11419:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11419 |         let r = unsafe { guestfs_inspect_get_type(self.g, (&c_root).as_ptr()) };
#        |                                                           ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1475]
src/guestfs.rs:11435:82: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11435 |         let r = unsafe { guestfs_inspect_get_windows_current_control_set(self.g, (&c_root).as_ptr()) };
#        |                                                                                  ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1476]
src/guestfs.rs:11451:75: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11451 |         let r = unsafe { guestfs_inspect_get_windows_group_policy(self.g, (&c_root).as_ptr()) };
#        |                                                                           ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1477]
src/guestfs.rs:11464:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11464 |         let r = unsafe { guestfs_inspect_get_windows_software_hive(self.g, (&c_root).as_ptr()) };
#        |                                                                            ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1478]
src/guestfs.rs:11480:74: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11480 |         let r = unsafe { guestfs_inspect_get_windows_system_hive(self.g, (&c_root).as_ptr()) };
#        |                                                                          ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1479]
src/guestfs.rs:11496:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11496 |         let r = unsafe { guestfs_inspect_get_windows_systemroot(self.g, (&c_root).as_ptr()) };
#        |                                                                         ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1480]
src/guestfs.rs:11512:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11512 |         let r = unsafe { guestfs_inspect_is_live(self.g, (&c_root).as_ptr()) };
#        |                                                          ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1481]
src/guestfs.rs:11525:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11525 |         let r = unsafe { guestfs_inspect_is_multipart(self.g, (&c_root).as_ptr()) };
#        |                                                               ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1482]
src/guestfs.rs:11538:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11538 |         let r = unsafe { guestfs_inspect_is_netinst(self.g, (&c_root).as_ptr()) };
#        |                                                             ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1483]
src/guestfs.rs:11551:68: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11551 |         let r = unsafe { guestfs_inspect_list_applications(self.g, (&c_root).as_ptr()) };
#        |                                                                    ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1484]
src/guestfs.rs:11568:69: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11568 |         let r = unsafe { guestfs_inspect_list_applications2(self.g, (&c_root).as_ptr()) };
#        |                                                                     ^^^^^^^^^ help: change this to: `c_root`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1485]
src/guestfs.rs:11608:5: warning: this function has too many arguments (11/7)
#        |
#  11608 |     pub fn internal_test(&self, str: &str, optstr: Option<&str>, strlist: &[&str], b: bool, integer: i32, integer64: i64, filein: &str, fileout: &str, bufferin: &[u8], optargs: InternalTestOptArgs) -> Result<(), Error> {
#        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#too_many_arguments
#        = note: `#[warn(clippy::too_many_arguments)]` on by default

Error: CLIPPY_WARNING: [#def1486]
src/guestfs.rs:11610:35: warning: redundant closure
#        |
#  11610 |         let c_optstr = optstr.map(|s| ffi::CString::new(s)).transpose()?;
#        |                                   ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1487]
src/guestfs.rs:11612:44: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  11612 |         let mut c_strlist = (&c_strlist_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                            ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1488]
src/guestfs.rs:11621:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11621 | ...   let r = unsafe { guestfs_internal_test_argv(self.g, (&c_str).as_ptr(), match &c_optstr { Some(ref s) => s.as_ptr(), None => ptr::nu...
#        |                                                           ^^^^^^^^ help: change this to: `c_str`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1489]
src/guestfs.rs:11622:3: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  11622 | , (&c_strlist).as_ptr() as *const *const c_char, b, integer, integer64, (&c_filein).as_ptr(), (&c_fileout).as_ptr(), (&c_bufferin).as_ptr...
#        |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_strlist).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1490]
src/guestfs.rs:11622:3: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11622 | , (&c_strlist).as_ptr() as *const *const c_char, b, integer, integer64, (&c_filein).as_ptr(), (&c_fileout).as_ptr(), (&c_bufferin).as_ptr...
#        |   ^^^^^^^^^^^^ help: change this to: `c_strlist`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1491]
src/guestfs.rs:11622:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11622 | , (&c_strlist).as_ptr() as *const *const c_char, b, integer, integer64, (&c_filein).as_ptr(), (&c_fileout).as_ptr(), (&c_bufferin).as_ptr...
#        |                                                                         ^^^^^^^^^^^ help: change this to: `c_filein`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1492]
src/guestfs.rs:11622:95: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11622 | ..., integer, integer64, (&c_filein).as_ptr(), (&c_fileout).as_ptr(), (&c_bufferin).as_ptr(), c_bufferin_len, &(RawInternalTestOptArgs::f...
#        |                                                ^^^^^^^^^^^^ help: change this to: `c_fileout`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1493]
src/guestfs.rs:11622:118: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11622 | ...c_filein).as_ptr(), (&c_fileout).as_ptr(), (&c_bufferin).as_ptr(), c_bufferin_len, &(RawInternalTestOptArgs::from(&optargs_cexpr)) as ...
#        |                                               ^^^^^^^^^^^^^ help: change this to: `c_bufferin`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1494]
src/guestfs.rs:11646:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  11646 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprInternalTest63OptargsOptArgs`
#       --> src/guestfs.rs:11646:14
#        |
#  11646 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1495]
src/guestfs.rs:11670:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  11670 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprInternalTestOnlyOptargsOptArgs`
#       --> src/guestfs.rs:11670:14
#        |
#  11670 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1496]
src/guestfs.rs:11679:62: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11679 |         let r = unsafe { guestfs_internal_test_rbool(self.g, (&c_val).as_ptr()) };
#        |                                                              ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1497]
src/guestfs.rs:11704:67: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11704 |         let r = unsafe { guestfs_internal_test_rbufferout(self.g, (&c_val).as_ptr(), &mut size as *mut usize) };
#        |                                                                   ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1498]
src/guestfs.rs:11737:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11737 |         let r = unsafe { guestfs_internal_test_rconstoptstring(self.g, (&c_val).as_ptr()) };
#        |                                                                        ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1499]
src/guestfs.rs:11763:69: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11763 |         let r = unsafe { guestfs_internal_test_rconststring(self.g, (&c_val).as_ptr()) };
#        |                                                                     ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1500]
src/guestfs.rs:11787:67: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11787 |         let r = unsafe { guestfs_internal_test_rhashtable(self.g, (&c_val).as_ptr()) };
#        |                                                                   ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1501]
src/guestfs.rs:11819:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11819 |         let r = unsafe { guestfs_internal_test_rint(self.g, (&c_val).as_ptr()) };
#        |                                                             ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1502]
src/guestfs.rs:11832:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11832 |         let r = unsafe { guestfs_internal_test_rint64(self.g, (&c_val).as_ptr()) };
#        |                                                               ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1503]
src/guestfs.rs:11867:64: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11867 |         let r = unsafe { guestfs_internal_test_rstring(self.g, (&c_val).as_ptr()) };
#        |                                                                ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1504]
src/guestfs.rs:11897:68: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11897 |         let r = unsafe { guestfs_internal_test_rstringlist(self.g, (&c_val).as_ptr()) };
#        |                                                                    ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1505]
src/guestfs.rs:11929:64: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11929 |         let r = unsafe { guestfs_internal_test_rstruct(self.g, (&c_val).as_ptr()) };
#        |                                                                ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1506]
src/guestfs.rs:11961:68: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11961 |         let r = unsafe { guestfs_internal_test_rstructlist(self.g, (&c_val).as_ptr()) };
#        |                                                                    ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1507]
src/guestfs.rs:11993:67: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  11993 |         let r = unsafe { guestfs_internal_test_set_output(self.g, (&c_filename).as_ptr()) };
#        |                                                                   ^^^^^^^^^^^^^ help: change this to: `c_filename`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1508]
src/guestfs.rs:12007:64: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12007 | ...   let r = unsafe { guestfs_is_blockdev_opts_argv(self.g, (&c_path).as_ptr(), &(RawIsBlockdevOptArgs::from(&optargs_cexpr)) as *const ...
#        |                                                              ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1509]
src/guestfs.rs:12012:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  12012 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprIsBlockdevOptArgs`
#       --> src/guestfs.rs:12012:14
#        |
#  12012 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1510]
src/guestfs.rs:12033:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12033 | ...   let r = unsafe { guestfs_is_chardev_opts_argv(self.g, (&c_path).as_ptr(), &(RawIsChardevOptArgs::from(&optargs_cexpr)) as *const Ra...
#        |                                                             ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1511]
src/guestfs.rs:12038:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  12038 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprIsChardevOptArgs`
#       --> src/guestfs.rs:12038:14
#        |
#  12038 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1512]
src/guestfs.rs:12059:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12059 | ...   let r = unsafe { guestfs_is_dir_opts_argv(self.g, (&c_path).as_ptr(), &(RawIsDirOptArgs::from(&optargs_cexpr)) as *const RawIsDirOp...
#        |                                                         ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1513]
src/guestfs.rs:12064:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  12064 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprIsDirOptArgs`
#       --> src/guestfs.rs:12064:14
#        |
#  12064 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1514]
src/guestfs.rs:12074:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12074 | ...   let r = unsafe { guestfs_is_fifo_opts_argv(self.g, (&c_path).as_ptr(), &(RawIsFifoOptArgs::from(&optargs_cexpr)) as *const RawIsFif...
#        |                                                          ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1515]
src/guestfs.rs:12079:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  12079 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprIsFifoOptArgs`
#       --> src/guestfs.rs:12079:14
#        |
#  12079 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1516]
src/guestfs.rs:12089:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12089 | ...   let r = unsafe { guestfs_is_file_opts_argv(self.g, (&c_path).as_ptr(), &(RawIsFileOptArgs::from(&optargs_cexpr)) as *const RawIsFil...
#        |                                                          ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1517]
src/guestfs.rs:12094:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  12094 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprIsFileOptArgs`
#       --> src/guestfs.rs:12094:14
#        |
#  12094 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1518]
src/guestfs.rs:12114:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12114 |         let r = unsafe { guestfs_is_lv(self.g, (&c_mountable).as_ptr()) };
#        |                                                ^^^^^^^^^^^^^^ help: change this to: `c_mountable`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1519]
src/guestfs.rs:12139:62: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12139 | ...   let r = unsafe { guestfs_is_socket_opts_argv(self.g, (&c_path).as_ptr(), &(RawIsSocketOptArgs::from(&optargs_cexpr)) as *const RawI...
#        |                                                            ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1520]
src/guestfs.rs:12144:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  12144 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprIsSocketOptArgs`
#       --> src/guestfs.rs:12144:14
#        |
#  12144 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1521]
src/guestfs.rs:12153:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12153 |         let r = unsafe { guestfs_is_symlink(self.g, (&c_path).as_ptr()) };
#        |                                                     ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1522]
src/guestfs.rs:12166:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12166 |         let r = unsafe { guestfs_is_whole_device(self.g, (&c_device).as_ptr()) };
#        |                                                          ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1523]
src/guestfs.rs:12179:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12179 |         let r = unsafe { guestfs_is_zero(self.g, (&c_path).as_ptr()) };
#        |                                                  ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1524]
src/guestfs.rs:12192:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12192 |         let r = unsafe { guestfs_is_zero_device(self.g, (&c_device).as_ptr()) };
#        |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1525]
src/guestfs.rs:12205:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12205 |         let r = unsafe { guestfs_isoinfo(self.g, (&c_isofile).as_ptr()) };
#        |                                                  ^^^^^^^^^^^^ help: change this to: `c_isofile`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1526]
src/guestfs.rs:12222:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12222 |         let r = unsafe { guestfs_isoinfo_device(self.g, (&c_device).as_ptr()) };
#        |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1527]
src/guestfs.rs:12298:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12298 |         let r = unsafe { guestfs_journal_open(self.g, (&c_directory).as_ptr()) };
#        |                                                       ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1528]
src/guestfs.rs:12355:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12355 |         let r = unsafe { guestfs_lchown(self.g, owner, group, (&c_path).as_ptr()) };
#        |                                                               ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1529]
src/guestfs.rs:12379:66: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12379 |         let r = unsafe { guestfs_ldmtool_diskgroup_disks(self.g, (&c_diskgroup).as_ptr()) };
#        |                                                                  ^^^^^^^^^^^^^^ help: change this to: `c_diskgroup`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1530]
src/guestfs.rs:12396:65: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12396 |         let r = unsafe { guestfs_ldmtool_diskgroup_name(self.g, (&c_diskgroup).as_ptr()) };
#        |                                                                 ^^^^^^^^^^^^^^ help: change this to: `c_diskgroup`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1531]
src/guestfs.rs:12412:68: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12412 |         let r = unsafe { guestfs_ldmtool_diskgroup_volumes(self.g, (&c_diskgroup).as_ptr()) };
#        |                                                                    ^^^^^^^^^^^^^^ help: change this to: `c_diskgroup`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1532]
src/guestfs.rs:12454:44: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  12454 |         let mut c_devices = (&c_devices_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                            ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1533]
src/guestfs.rs:12457:63: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  12457 |         let r = unsafe { guestfs_ldmtool_scan_devices(self.g, (&c_devices).as_ptr() as *const *const c_char) };
#        |                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_devices).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1534]
src/guestfs.rs:12457:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12457 |         let r = unsafe { guestfs_ldmtool_scan_devices(self.g, (&c_devices).as_ptr() as *const *const c_char) };
#        |                                                               ^^^^^^^^^^^^ help: change this to: `c_devices`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1535]
src/guestfs.rs:12476:62: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12476 |         let r = unsafe { guestfs_ldmtool_volume_hint(self.g, (&c_diskgroup).as_ptr(), (&c_volume).as_ptr()) };
#        |                                                              ^^^^^^^^^^^^^^ help: change this to: `c_diskgroup`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1536]
src/guestfs.rs:12476:87: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12476 |         let r = unsafe { guestfs_ldmtool_volume_hint(self.g, (&c_diskgroup).as_ptr(), (&c_volume).as_ptr()) };
#        |                                                                                       ^^^^^^^^^^^ help: change this to: `c_volume`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1537]
src/guestfs.rs:12494:68: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12494 |         let r = unsafe { guestfs_ldmtool_volume_partitions(self.g, (&c_diskgroup).as_ptr(), (&c_volume).as_ptr()) };
#        |                                                                    ^^^^^^^^^^^^^^ help: change this to: `c_diskgroup`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1538]
src/guestfs.rs:12494:93: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12494 |         let r = unsafe { guestfs_ldmtool_volume_partitions(self.g, (&c_diskgroup).as_ptr(), (&c_volume).as_ptr()) };
#        |                                                                                             ^^^^^^^^^^^ help: change this to: `c_volume`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1539]
src/guestfs.rs:12513:62: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12513 |         let r = unsafe { guestfs_ldmtool_volume_type(self.g, (&c_diskgroup).as_ptr(), (&c_volume).as_ptr()) };
#        |                                                              ^^^^^^^^^^^^^^ help: change this to: `c_diskgroup`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1540]
src/guestfs.rs:12513:87: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12513 |         let r = unsafe { guestfs_ldmtool_volume_type(self.g, (&c_diskgroup).as_ptr(), (&c_volume).as_ptr()) };
#        |                                                                                       ^^^^^^^^^^^ help: change this to: `c_volume`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1541]
src/guestfs.rs:12532:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12532 |         let r = unsafe { guestfs_lgetxattr(self.g, (&c_path).as_ptr(), (&c_name).as_ptr(), &mut size as *mut usize) };
#        |                                                    ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1542]
src/guestfs.rs:12532:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12532 |         let r = unsafe { guestfs_lgetxattr(self.g, (&c_path).as_ptr(), (&c_name).as_ptr(), &mut size as *mut usize) };
#        |                                                                        ^^^^^^^^^ help: change this to: `c_name`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1543]
src/guestfs.rs:12550:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12550 |         let r = unsafe { guestfs_lgetxattrs(self.g, (&c_path).as_ptr()) };
#        |                                                     ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1544]
src/guestfs.rs:12702:45: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12702 |         let r = unsafe { guestfs_ll(self.g, (&c_directory).as_ptr()) };
#        |                                             ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1545]
src/guestfs.rs:12718:46: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12718 |         let r = unsafe { guestfs_llz(self.g, (&c_directory).as_ptr()) };
#        |                                              ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1546]
src/guestfs.rs:12735:45: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12735 |         let r = unsafe { guestfs_ln(self.g, (&c_target).as_ptr(), (&c_linkname).as_ptr()) };
#        |                                             ^^^^^^^^^^^ help: change this to: `c_target`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1547]
src/guestfs.rs:12735:67: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12735 |         let r = unsafe { guestfs_ln(self.g, (&c_target).as_ptr(), (&c_linkname).as_ptr()) };
#        |                                                                   ^^^^^^^^^^^^^ help: change this to: `c_linkname`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1548]
src/guestfs.rs:12750:47: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12750 |         let r = unsafe { guestfs_ln_f(self.g, (&c_target).as_ptr(), (&c_linkname).as_ptr()) };
#        |                                               ^^^^^^^^^^^ help: change this to: `c_target`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1549]
src/guestfs.rs:12750:69: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12750 |         let r = unsafe { guestfs_ln_f(self.g, (&c_target).as_ptr(), (&c_linkname).as_ptr()) };
#        |                                                                     ^^^^^^^^^^^^^ help: change this to: `c_linkname`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1550]
src/guestfs.rs:12765:47: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12765 |         let r = unsafe { guestfs_ln_s(self.g, (&c_target).as_ptr(), (&c_linkname).as_ptr()) };
#        |                                               ^^^^^^^^^^^ help: change this to: `c_target`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1551]
src/guestfs.rs:12765:69: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12765 |         let r = unsafe { guestfs_ln_s(self.g, (&c_target).as_ptr(), (&c_linkname).as_ptr()) };
#        |                                                                     ^^^^^^^^^^^^^ help: change this to: `c_linkname`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1552]
src/guestfs.rs:12780:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12780 |         let r = unsafe { guestfs_ln_sf(self.g, (&c_target).as_ptr(), (&c_linkname).as_ptr()) };
#        |                                                ^^^^^^^^^^^ help: change this to: `c_target`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1553]
src/guestfs.rs:12780:70: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12780 |         let r = unsafe { guestfs_ln_sf(self.g, (&c_target).as_ptr(), (&c_linkname).as_ptr()) };
#        |                                                                      ^^^^^^^^^^^^^ help: change this to: `c_linkname`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1554]
src/guestfs.rs:12795:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12795 |         let r = unsafe { guestfs_lremovexattr(self.g, (&c_xattr).as_ptr(), (&c_path).as_ptr()) };
#        |                                                       ^^^^^^^^^^ help: change this to: `c_xattr`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1555]
src/guestfs.rs:12795:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12795 |         let r = unsafe { guestfs_lremovexattr(self.g, (&c_xattr).as_ptr(), (&c_path).as_ptr()) };
#        |                                                                            ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1556]
src/guestfs.rs:12809:45: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12809 |         let r = unsafe { guestfs_ls(self.g, (&c_directory).as_ptr()) };
#        |                                             ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1557]
src/guestfs.rs:12827:46: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12827 |         let r = unsafe { guestfs_ls0(self.g, (&c_dir).as_ptr(), (&c_filenames).as_ptr()) };
#        |                                              ^^^^^^^^ help: change this to: `c_dir`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1558]
src/guestfs.rs:12827:65: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12827 |         let r = unsafe { guestfs_ls0(self.g, (&c_dir).as_ptr(), (&c_filenames).as_ptr()) };
#        |                                                                 ^^^^^^^^^^^^^^ help: change this to: `c_filenames`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1559]
src/guestfs.rs:12843:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12843 |         let r = unsafe { guestfs_lsetxattr(self.g, (&c_xattr).as_ptr(), (&c_val).as_ptr(), vallen, (&c_path).as_ptr()) };
#        |                                                    ^^^^^^^^^^ help: change this to: `c_xattr`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1560]
src/guestfs.rs:12843:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12843 |         let r = unsafe { guestfs_lsetxattr(self.g, (&c_xattr).as_ptr(), (&c_val).as_ptr(), vallen, (&c_path).as_ptr()) };
#        |                                                                         ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1561]
src/guestfs.rs:12843:100: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12843 |         let r = unsafe { guestfs_lsetxattr(self.g, (&c_xattr).as_ptr(), (&c_val).as_ptr(), vallen, (&c_path).as_ptr()) };
#        |                                                                                                    ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1562]
src/guestfs.rs:12858:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12858 |         let r = unsafe { guestfs_lstat(self.g, (&c_path).as_ptr()) };
#        |                                                ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1563]
src/guestfs.rs:12875:40: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  12875 |         let mut c_names = (&c_names_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                        ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1564]
src/guestfs.rs:12878:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12878 |         let r = unsafe { guestfs_lstatlist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                    ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1565]
src/guestfs.rs:12878:72: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  12878 |         let r = unsafe { guestfs_lstatlist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_names).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1566]
src/guestfs.rs:12878:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12878 |         let r = unsafe { guestfs_lstatlist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                                        ^^^^^^^^^^ help: change this to: `c_names`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1567]
src/guestfs.rs:12897:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12897 |         let r = unsafe { guestfs_lstatns(self.g, (&c_path).as_ptr()) };
#        |                                                  ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1568]
src/guestfs.rs:12914:40: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  12914 |         let mut c_names = (&c_names_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                        ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1569]
src/guestfs.rs:12917:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12917 |         let r = unsafe { guestfs_lstatnslist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                      ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1570]
src/guestfs.rs:12917:74: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  12917 |         let r = unsafe { guestfs_lstatnslist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_names).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1571]
src/guestfs.rs:12917:74: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12917 |         let r = unsafe { guestfs_lstatnslist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                                          ^^^^^^^^^^ help: change this to: `c_names`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1572]
src/guestfs.rs:12938:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12938 |         let r = unsafe { guestfs_luks_add_key(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_newkey).as_ptr(), keyslot) };
#        |                                                       ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1573]
src/guestfs.rs:12938:77: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12938 |         let r = unsafe { guestfs_luks_add_key(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_newkey).as_ptr(), keyslot) };
#        |                                                                             ^^^^^^^^ help: change this to: `c_key`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1574]
src/guestfs.rs:12938:96: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12938 |         let r = unsafe { guestfs_luks_add_key(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_newkey).as_ptr(), keyslot) };
#        |                                                                                                ^^^^^^^^^^^ help: change this to: `c_newkey`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1575]
src/guestfs.rs:12953:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12953 |         let r = unsafe { guestfs_luks_close(self.g, (&c_device).as_ptr()) };
#        |                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1576]
src/guestfs.rs:12967:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12967 |         let r = unsafe { guestfs_luks_format(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), keyslot) };
#        |                                                      ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1577]
src/guestfs.rs:12967:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12967 |         let r = unsafe { guestfs_luks_format(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), keyslot) };
#        |                                                                            ^^^^^^^^ help: change this to: `c_key`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1578]
src/guestfs.rs:12983:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12983 |         let r = unsafe { guestfs_luks_format_cipher(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), keyslot, (&c_cipher).as_ptr()) };
#        |                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1579]
src/guestfs.rs:12983:83: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12983 |         let r = unsafe { guestfs_luks_format_cipher(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), keyslot, (&c_cipher).as_ptr()) };
#        |                                                                                   ^^^^^^^^ help: change this to: `c_key`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1580]
src/guestfs.rs:12983:111: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12983 |         let r = unsafe { guestfs_luks_format_cipher(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), keyslot, (&c_cipher).as_ptr()) };
#        |                                                                                                               ^^^^^^^^^^^ help: change this to: `c_cipher`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1581]
src/guestfs.rs:12999:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12999 |         let r = unsafe { guestfs_luks_kill_slot(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), keyslot) };
#        |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1582]
src/guestfs.rs:12999:79: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  12999 |         let r = unsafe { guestfs_luks_kill_slot(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), keyslot) };
#        |                                                                               ^^^^^^^^ help: change this to: `c_key`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1583]
src/guestfs.rs:13015:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13015 |         let r = unsafe { guestfs_luks_open(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_mapname).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1584]
src/guestfs.rs:13015:74: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13015 |         let r = unsafe { guestfs_luks_open(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_mapname).as_ptr()) };
#        |                                                                          ^^^^^^^^ help: change this to: `c_key`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1585]
src/guestfs.rs:13015:93: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13015 |         let r = unsafe { guestfs_luks_open(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_mapname).as_ptr()) };
#        |                                                                                             ^^^^^^^^^^^^ help: change this to: `c_mapname`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1586]
src/guestfs.rs:13032:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13032 |         let r = unsafe { guestfs_luks_open_ro(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_mapname).as_ptr()) };
#        |                                                       ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1587]
src/guestfs.rs:13032:77: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13032 |         let r = unsafe { guestfs_luks_open_ro(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_mapname).as_ptr()) };
#        |                                                                             ^^^^^^^^ help: change this to: `c_key`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1588]
src/guestfs.rs:13032:96: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13032 |         let r = unsafe { guestfs_luks_open_ro(self.g, (&c_device).as_ptr(), (&c_key).as_ptr(), (&c_mapname).as_ptr()) };
#        |                                                                                                ^^^^^^^^^^^^ help: change this to: `c_mapname`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1589]
src/guestfs.rs:13047:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13047 |         let r = unsafe { guestfs_luks_uuid(self.g, (&c_device).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1590]
src/guestfs.rs:13064:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13064 |         let r = unsafe { guestfs_lvcreate(self.g, (&c_logvol).as_ptr(), (&c_volgroup).as_ptr(), mbytes) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_logvol`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1591]
src/guestfs.rs:13064:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13064 |         let r = unsafe { guestfs_lvcreate(self.g, (&c_logvol).as_ptr(), (&c_volgroup).as_ptr(), mbytes) };
#        |                                                                         ^^^^^^^^^^^^^ help: change this to: `c_volgroup`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1592]
src/guestfs.rs:13079:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13079 |         let r = unsafe { guestfs_lvcreate_free(self.g, (&c_logvol).as_ptr(), (&c_volgroup).as_ptr(), percent) };
#        |                                                        ^^^^^^^^^^^ help: change this to: `c_logvol`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1593]
src/guestfs.rs:13079:78: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13079 |         let r = unsafe { guestfs_lvcreate_free(self.g, (&c_logvol).as_ptr(), (&c_volgroup).as_ptr(), percent) };
#        |                                                                              ^^^^^^^^^^^^^ help: change this to: `c_volgroup`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1594]
src/guestfs.rs:13093:64: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13093 |         let r = unsafe { guestfs_lvm_canonical_lv_name(self.g, (&c_lvname).as_ptr()) };
#        |                                                                ^^^^^^^^^^^ help: change this to: `c_lvname`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1595]
src/guestfs.rs:13142:44: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  13142 |         let mut c_devices = (&c_devices_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                            ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1596]
src/guestfs.rs:13145:57: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  13145 |         let r = unsafe { guestfs_lvm_set_filter(self.g, (&c_devices).as_ptr() as *const *const c_char) };
#        |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_devices).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1597]
src/guestfs.rs:13145:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13145 |         let r = unsafe { guestfs_lvm_set_filter(self.g, (&c_devices).as_ptr() as *const *const c_char) };
#        |                                                         ^^^^^^^^^^^^ help: change this to: `c_devices`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1598]
src/guestfs.rs:13159:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13159 |         let r = unsafe { guestfs_lvremove(self.g, (&c_device).as_ptr()) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1599]
src/guestfs.rs:13173:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13173 |         let r = unsafe { guestfs_lvrename(self.g, (&c_logvol).as_ptr(), (&c_newlogvol).as_ptr()) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_logvol`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1600]
src/guestfs.rs:13173:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13173 |         let r = unsafe { guestfs_lvrename(self.g, (&c_logvol).as_ptr(), (&c_newlogvol).as_ptr()) };
#        |                                                                         ^^^^^^^^^^^^^^ help: change this to: `c_newlogvol`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1601]
src/guestfs.rs:13187:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13187 |         let r = unsafe { guestfs_lvresize(self.g, (&c_device).as_ptr(), mbytes) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1602]
src/guestfs.rs:13200:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13200 |         let r = unsafe { guestfs_lvresize_free(self.g, (&c_lv).as_ptr(), percent) };
#        |                                                        ^^^^^^^ help: change this to: `c_lv`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1603]
src/guestfs.rs:13243:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13243 |         let r = unsafe { guestfs_lvuuid(self.g, (&c_device).as_ptr()) };
#        |                                                 ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1604]
src/guestfs.rs:13259:40: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  13259 |         let mut c_names = (&c_names_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                        ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1605]
src/guestfs.rs:13262:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13262 |         let r = unsafe { guestfs_lxattrlist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                     ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1606]
src/guestfs.rs:13262:73: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  13262 |         let r = unsafe { guestfs_lxattrlist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_names).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1607]
src/guestfs.rs:13262:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13262 |         let r = unsafe { guestfs_lxattrlist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                                         ^^^^^^^^^^ help: change this to: `c_names`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1608]
src/guestfs.rs:13292:44: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  13292 |         let mut c_devices = (&c_devices_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                            ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1609]
src/guestfs.rs:13296:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13296 | ...   let r = unsafe { guestfs_md_create_argv(self.g, (&c_name).as_ptr(), (&c_devices).as_ptr() as *const *const c_char, &(RawMdCreateOpt...
#        |                                                       ^^^^^^^^^ help: change this to: `c_name`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1610]
src/guestfs.rs:13296:77: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  13296 | ...elf.g, (&c_name).as_ptr(), (&c_devices).as_ptr() as *const *const c_char, &(RawMdCreateOptArgs::from(&optargs_cexpr)) as *const RawMdC...
#        |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_devices).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1611]
src/guestfs.rs:13296:77: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13296 | ...   let r = unsafe { guestfs_md_create_argv(self.g, (&c_name).as_ptr(), (&c_devices).as_ptr() as *const *const c_char, &(RawMdCreateOpt...
#        |                                                                           ^^^^^^^^^^^^ help: change this to: `c_devices`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1612]
src/guestfs.rs:13312:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13312 |         let r = unsafe { guestfs_md_detail(self.g, (&c_md).as_ptr()) };
#        |                                                    ^^^^^^^ help: change this to: `c_md`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1613]
src/guestfs.rs:13329:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13329 |         let r = unsafe { guestfs_md_stat(self.g, (&c_md).as_ptr()) };
#        |                                                  ^^^^^^^ help: change this to: `c_md`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1614]
src/guestfs.rs:13346:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13346 |         let r = unsafe { guestfs_md_stop(self.g, (&c_md).as_ptr()) };
#        |                                                  ^^^^^^^ help: change this to: `c_md`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1615]
src/guestfs.rs:13359:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13359 |         let r = unsafe { guestfs_mkdir(self.g, (&c_path).as_ptr()) };
#        |                                                ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1616]
src/guestfs.rs:13372:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13372 |         let r = unsafe { guestfs_mkdir_mode(self.g, (&c_path).as_ptr(), mode) };
#        |                                                     ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1617]
src/guestfs.rs:13385:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13385 |         let r = unsafe { guestfs_mkdir_p(self.g, (&c_path).as_ptr()) };
#        |                                                  ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1618]
src/guestfs.rs:13398:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13398 |         let r = unsafe { guestfs_mkdtemp(self.g, (&c_tmpl).as_ptr()) };
#        |                                                  ^^^^^^^^^ help: change this to: `c_tmpl`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1619]
src/guestfs.rs:13415:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13415 | ...   let r = unsafe { guestfs_mke2fs_argv(self.g, (&c_device).as_ptr(), &(RawMke2fsOptArgs::from(&optargs_cexpr)) as *const RawMke2fsOpt...
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1620]
src/guestfs.rs:13431:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13431 |         let r = unsafe { guestfs_mke2fs_J(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr(), (&c_journal).as_ptr()) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_fstype`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1621]
src/guestfs.rs:13431:84: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13431 |         let r = unsafe { guestfs_mke2fs_J(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr(), (&c_journal).as_ptr()) };
#        |                                                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1622]
src/guestfs.rs:13431:106: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13431 |         let r = unsafe { guestfs_mke2fs_J(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr(), (&c_journal).as_ptr()) };
#        |                                                                                                          ^^^^^^^^^^^^ help: change this to: `c_journal`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1623]
src/guestfs.rs:13448:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13448 |         let r = unsafe { guestfs_mke2fs_JL(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr(), (&c_label).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_fstype`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1624]
src/guestfs.rs:13448:85: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13448 |         let r = unsafe { guestfs_mke2fs_JL(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr(), (&c_label).as_ptr()) };
#        |                                                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1625]
src/guestfs.rs:13448:107: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13448 |         let r = unsafe { guestfs_mke2fs_JL(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr(), (&c_label).as_ptr()) };
#        |                                                                                                           ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1626]
src/guestfs.rs:13465:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13465 |         let r = unsafe { guestfs_mke2fs_JU(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr(), (&c_uuid).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_fstype`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1627]
src/guestfs.rs:13465:85: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13465 |         let r = unsafe { guestfs_mke2fs_JU(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr(), (&c_uuid).as_ptr()) };
#        |                                                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1628]
src/guestfs.rs:13465:107: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13465 |         let r = unsafe { guestfs_mke2fs_JU(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr(), (&c_uuid).as_ptr()) };
#        |                                                                                                           ^^^^^^^^^ help: change this to: `c_uuid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1629]
src/guestfs.rs:13480:65: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13480 |         let r = unsafe { guestfs_mke2journal(self.g, blocksize, (&c_device).as_ptr()) };
#        |                                                                 ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1630]
src/guestfs.rs:13494:67: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13494 |         let r = unsafe { guestfs_mke2journal_L(self.g, blocksize, (&c_label).as_ptr(), (&c_device).as_ptr()) };
#        |                                                                   ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1631]
src/guestfs.rs:13494:88: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13494 |         let r = unsafe { guestfs_mke2journal_L(self.g, blocksize, (&c_label).as_ptr(), (&c_device).as_ptr()) };
#        |                                                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1632]
src/guestfs.rs:13509:67: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13509 |         let r = unsafe { guestfs_mke2journal_U(self.g, blocksize, (&c_uuid).as_ptr(), (&c_device).as_ptr()) };
#        |                                                                   ^^^^^^^^^ help: change this to: `c_uuid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1633]
src/guestfs.rs:13509:87: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13509 |         let r = unsafe { guestfs_mke2journal_U(self.g, blocksize, (&c_uuid).as_ptr(), (&c_device).as_ptr()) };
#        |                                                                                       ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1634]
src/guestfs.rs:13523:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13523 |         let r = unsafe { guestfs_mkfifo(self.g, mode, (&c_path).as_ptr()) };
#        |                                                       ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1635]
src/guestfs.rs:13538:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13538 | ...   let r = unsafe { guestfs_mkfs_opts_argv(self.g, (&c_fstype).as_ptr(), (&c_device).as_ptr(), &(RawMkfsOptArgs::from(&optargs_cexpr))...
#        |                                                       ^^^^^^^^^^^ help: change this to: `c_fstype`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1636]
src/guestfs.rs:13538:79: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13538 | ...   let r = unsafe { guestfs_mkfs_opts_argv(self.g, (&c_fstype).as_ptr(), (&c_device).as_ptr(), &(RawMkfsOptArgs::from(&optargs_cexpr))...
#        |                                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1637]
src/guestfs.rs:13554:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13554 |         let r = unsafe { guestfs_mkfs_b(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr()) };
#        |                                                 ^^^^^^^^^^^ help: change this to: `c_fstype`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1638]
src/guestfs.rs:13554:82: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13554 |         let r = unsafe { guestfs_mkfs_b(self.g, (&c_fstype).as_ptr(), blocksize, (&c_device).as_ptr()) };
#        |                                                                                  ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1639]
src/guestfs.rs:13567:44: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  13567 |         let mut c_devices = (&c_devices_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                            ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1640]
src/guestfs.rs:13571:58: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  13571 | ...fs_mkfs_btrfs_argv(self.g, (&c_devices).as_ptr() as *const *const c_char, &(RawMkfsBtrfsOptArgs::from(&optargs_cexpr)) as *const RawMk...
#        |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_devices).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1641]
src/guestfs.rs:13571:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13571 | ...   let r = unsafe { guestfs_mkfs_btrfs_argv(self.g, (&c_devices).as_ptr() as *const *const c_char, &(RawMkfsBtrfsOptArgs::from(&optarg...
#        |                                                        ^^^^^^^^^^^^ help: change this to: `c_devices`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1642]
src/guestfs.rs:13586:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13586 |         let r = unsafe { guestfs_mklost_and_found(self.g, (&c_mountpoint).as_ptr()) };
#        |                                                           ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1643]
src/guestfs.rs:13599:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13599 |         let r = unsafe { guestfs_mkmountpoint(self.g, (&c_exemptpath).as_ptr()) };
#        |                                                       ^^^^^^^^^^^^^^^ help: change this to: `c_exemptpath`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1644]
src/guestfs.rs:13612:74: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13612 |         let r = unsafe { guestfs_mknod(self.g, mode, devmajor, devminor, (&c_path).as_ptr()) };
#        |                                                                          ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1645]
src/guestfs.rs:13625:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13625 |         let r = unsafe { guestfs_mknod_b(self.g, mode, devmajor, devminor, (&c_path).as_ptr()) };
#        |                                                                            ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1646]
src/guestfs.rs:13638:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13638 |         let r = unsafe { guestfs_mknod_c(self.g, mode, devmajor, devminor, (&c_path).as_ptr()) };
#        |                                                                            ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1647]
src/guestfs.rs:13653:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13653 | ...   let r = unsafe { guestfs_mksquashfs_argv(self.g, (&c_path).as_ptr(), (&c_filename).as_ptr(), &(RawMksquashfsOptArgs::from(&optargs_...
#        |                                                        ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1648]
src/guestfs.rs:13653:78: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13653 | ...   let r = unsafe { guestfs_mksquashfs_argv(self.g, (&c_path).as_ptr(), (&c_filename).as_ptr(), &(RawMksquashfsOptArgs::from(&optargs_...
#        |                                                                            ^^^^^^^^^^^^^ help: change this to: `c_filename`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1649]
src/guestfs.rs:13669:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13669 | ...   let r = unsafe { guestfs_mkswap_opts_argv(self.g, (&c_device).as_ptr(), &(RawMkswapOptArgs::from(&optargs_cexpr)) as *const RawMksw...
#        |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1650]
src/guestfs.rs:13684:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13684 |         let r = unsafe { guestfs_mkswap_L(self.g, (&c_label).as_ptr(), (&c_device).as_ptr()) };
#        |                                                   ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1651]
src/guestfs.rs:13684:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13684 |         let r = unsafe { guestfs_mkswap_L(self.g, (&c_label).as_ptr(), (&c_device).as_ptr()) };
#        |                                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1652]
src/guestfs.rs:13699:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13699 |         let r = unsafe { guestfs_mkswap_U(self.g, (&c_uuid).as_ptr(), (&c_device).as_ptr()) };
#        |                                                   ^^^^^^^^^ help: change this to: `c_uuid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1653]
src/guestfs.rs:13699:71: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13699 |         let r = unsafe { guestfs_mkswap_U(self.g, (&c_uuid).as_ptr(), (&c_device).as_ptr()) };
#        |                                                                       ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1654]
src/guestfs.rs:13713:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13713 |         let r = unsafe { guestfs_mkswap_file(self.g, (&c_path).as_ptr()) };
#        |                                                      ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1655]
src/guestfs.rs:13727:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13727 | ...   let r = unsafe { guestfs_mktemp_argv(self.g, (&c_tmpl).as_ptr(), &(RawMktempOptArgs::from(&optargs_cexpr)) as *const RawMktempOptAr...
#        |                                                    ^^^^^^^^^ help: change this to: `c_tmpl`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1656]
src/guestfs.rs:13744:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13744 |         let r = unsafe { guestfs_modprobe(self.g, (&c_modulename).as_ptr()) };
#        |                                                   ^^^^^^^^^^^^^^^ help: change this to: `c_modulename`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1657]
src/guestfs.rs:13758:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13758 |         let r = unsafe { guestfs_mount(self.g, (&c_mountable).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                                ^^^^^^^^^^^^^^ help: change this to: `c_mountable`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1658]
src/guestfs.rs:13758:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13758 |         let r = unsafe { guestfs_mount(self.g, (&c_mountable).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                                                         ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1659]
src/guestfs.rs:13774:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13774 | ...   let r = unsafe { guestfs_mount_9p_argv(self.g, (&c_mounttag).as_ptr(), (&c_mountpoint).as_ptr(), &(RawMount9pOptArgs::from(&optargs...
#        |                                                      ^^^^^^^^^^^^^ help: change this to: `c_mounttag`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1660]
src/guestfs.rs:13774:80: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13774 | ...   let r = unsafe { guestfs_mount_9p_argv(self.g, (&c_mounttag).as_ptr(), (&c_mountpoint).as_ptr(), &(RawMount9pOptArgs::from(&optargs...
#        |                                                                              ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1661]
src/guestfs.rs:13790:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13790 | ...   let r = unsafe { guestfs_mount_local_argv(self.g, (&c_localmountpoint).as_ptr(), &(RawMountLocalOptArgs::from(&optargs_cexpr)) as *...
#        |                                                         ^^^^^^^^^^^^^^^^^^^^ help: change this to: `c_localmountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1662]
src/guestfs.rs:13816:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13816 |         let r = unsafe { guestfs_mount_loop(self.g, (&c_file).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                                     ^^^^^^^^^ help: change this to: `c_file`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1663]
src/guestfs.rs:13816:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13816 |         let r = unsafe { guestfs_mount_loop(self.g, (&c_file).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                                                         ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1664]
src/guestfs.rs:13832:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13832 |         let r = unsafe { guestfs_mount_options(self.g, (&c_options).as_ptr(), (&c_mountable).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                                        ^^^^^^^^^^^^ help: change this to: `c_options`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1665]
src/guestfs.rs:13832:79: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13832 |         let r = unsafe { guestfs_mount_options(self.g, (&c_options).as_ptr(), (&c_mountable).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                                                               ^^^^^^^^^^^^^^ help: change this to: `c_mountable`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1666]
src/guestfs.rs:13832:104: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13832 |         let r = unsafe { guestfs_mount_options(self.g, (&c_options).as_ptr(), (&c_mountable).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                                                                                        ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1667]
src/guestfs.rs:13848:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13848 |         let r = unsafe { guestfs_mount_ro(self.g, (&c_mountable).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                                   ^^^^^^^^^^^^^^ help: change this to: `c_mountable`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1668]
src/guestfs.rs:13848:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13848 |         let r = unsafe { guestfs_mount_ro(self.g, (&c_mountable).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                                                            ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1669]
src/guestfs.rs:13865:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13865 | ...   let r = unsafe { guestfs_mount_vfs(self.g, (&c_options).as_ptr(), (&c_vfstype).as_ptr(), (&c_mountable).as_ptr(), (&c_mountpoint).a...
#        |                                                  ^^^^^^^^^^^^ help: change this to: `c_options`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1670]
src/guestfs.rs:13865:75: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13865 | ...   let r = unsafe { guestfs_mount_vfs(self.g, (&c_options).as_ptr(), (&c_vfstype).as_ptr(), (&c_mountable).as_ptr(), (&c_mountpoint).a...
#        |                                                                         ^^^^^^^^^^^^ help: change this to: `c_vfstype`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1671]
src/guestfs.rs:13865:98: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13865 | ...options).as_ptr(), (&c_vfstype).as_ptr(), (&c_mountable).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                              ^^^^^^^^^^^^^^ help: change this to: `c_mountable`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1672]
src/guestfs.rs:13865:123: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13865 | ...type).as_ptr(), (&c_mountable).as_ptr(), (&c_mountpoint).as_ptr()) };
#        |                                             ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1673]
src/guestfs.rs:13881:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13881 |         let r = unsafe { guestfs_mountable_device(self.g, (&c_mountable).as_ptr()) };
#        |                                                           ^^^^^^^^^^^^^^ help: change this to: `c_mountable`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1674]
src/guestfs.rs:13897:62: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13897 |         let r = unsafe { guestfs_mountable_subvolume(self.g, (&c_mountable).as_ptr()) };
#        |                                                              ^^^^^^^^^^^^^^ help: change this to: `c_mountable`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1675]
src/guestfs.rs:13944:45: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13944 |         let r = unsafe { guestfs_mv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#        |                                             ^^^^^^^^ help: change this to: `c_src`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1676]
src/guestfs.rs:13944:64: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13944 |         let r = unsafe { guestfs_mv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr()) };
#        |                                                                ^^^^^^^^^ help: change this to: `c_dest`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1677]
src/guestfs.rs:13970:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13970 |         let r = unsafe { guestfs_ntfs_3g_probe(self.g, rw, (&c_device).as_ptr()) };
#        |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1678]
src/guestfs.rs:13985:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13985 | ...   let r = unsafe { guestfs_ntfs_chmod_argv(self.g, (&c_device).as_ptr(), mode, (&c_path).as_ptr(), &(RawNtfsChmodOptArgs::from(&optar...
#        |                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1679]
src/guestfs.rs:13985:86: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  13985 | ...   let r = unsafe { guestfs_ntfs_chmod_argv(self.g, (&c_device).as_ptr(), mode, (&c_path).as_ptr(), &(RawNtfsChmodOptArgs::from(&optar...
#        |                                                                                    ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1680]
src/guestfs.rs:13991:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  13991 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprNtfsChmodOptArgs`
#       --> src/guestfs.rs:13991:14
#        |
#  13991 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1681]
src/guestfs.rs:14001:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14001 |         let r = unsafe { guestfs_ntfscat_i(self.g, (&c_device).as_ptr(), inode, (&c_filename).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1682]
src/guestfs.rs:14001:81: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14001 |         let r = unsafe { guestfs_ntfscat_i(self.g, (&c_device).as_ptr(), inode, (&c_filename).as_ptr()) };
#        |                                                                                 ^^^^^^^^^^^^^ help: change this to: `c_filename`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1683]
src/guestfs.rs:14016:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14016 |         let r = unsafe { guestfs_ntfsclone_in(self.g, (&c_backupfile).as_ptr(), (&c_device).as_ptr()) };
#        |                                                       ^^^^^^^^^^^^^^^ help: change this to: `c_backupfile`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1684]
src/guestfs.rs:14016:81: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14016 |         let r = unsafe { guestfs_ntfsclone_in(self.g, (&c_backupfile).as_ptr(), (&c_device).as_ptr()) };
#        |                                                                                 ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1685]
src/guestfs.rs:14032:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14032 | ...   let r = unsafe { guestfs_ntfsclone_out_argv(self.g, (&c_device).as_ptr(), (&c_backupfile).as_ptr(), &(RawNtfscloneOutOptArgs::from(...
#        |                                                           ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1686]
src/guestfs.rs:14032:83: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14032 | ...   let r = unsafe { guestfs_ntfsclone_out_argv(self.g, (&c_device).as_ptr(), (&c_backupfile).as_ptr(), &(RawNtfscloneOutOptArgs::from(...
#        |                                                                                 ^^^^^^^^^^^^^^^ help: change this to: `c_backupfile`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1687]
src/guestfs.rs:14038:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  14038 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprNtfscloneOutOptArgs`
#       --> src/guestfs.rs:14038:14
#        |
#  14038 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1688]
src/guestfs.rs:14048:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14048 | ...   let r = unsafe { guestfs_ntfsfix_argv(self.g, (&c_device).as_ptr(), &(RawNtfsfixOptArgs::from(&optargs_cexpr)) as *const RawNtfsfix...
#        |                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1689]
src/guestfs.rs:14053:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  14053 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprNtfsfixOptArgs`
#       --> src/guestfs.rs:14053:14
#        |
#  14053 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1690]
src/guestfs.rs:14063:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14063 | ...   let r = unsafe { guestfs_ntfsresize_opts_argv(self.g, (&c_device).as_ptr(), &(RawNtfsresizeOptArgs::from(&optargs_cexpr)) as *const...
#        |                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1691]
src/guestfs.rs:14068:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  14068 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprNtfsresizeOptArgs`
#       --> src/guestfs.rs:14068:14
#        |
#  14068 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1692]
src/guestfs.rs:14077:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14077 |         let r = unsafe { guestfs_ntfsresize_size(self.g, (&c_device).as_ptr(), size) };
#        |                                                          ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1693]
src/guestfs.rs:14100:52: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  14100 |         let mut c_environment = (&c_environment_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                                    ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1694]
src/guestfs.rs:14103:65: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  14103 |         let r = unsafe { guestfs_parse_environment_list(self.g, (&c_environment).as_ptr() as *const *const c_char) };
#        |                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_environment).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1695]
src/guestfs.rs:14103:65: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14103 |         let r = unsafe { guestfs_parse_environment_list(self.g, (&c_environment).as_ptr() as *const *const c_char) };
#        |                                                                 ^^^^^^^^^^^^^^^^ help: change this to: `c_environment`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1696]
src/guestfs.rs:14118:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14118 |         let r = unsafe { guestfs_part_add(self.g, (&c_device).as_ptr(), (&c_prlogex).as_ptr(), startsect, endsect) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1697]
src/guestfs.rs:14118:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14118 |         let r = unsafe { guestfs_part_add(self.g, (&c_device).as_ptr(), (&c_prlogex).as_ptr(), startsect, endsect) };
#        |                                                                         ^^^^^^^^^^^^ help: change this to: `c_prlogex`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1698]
src/guestfs.rs:14132:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14132 |         let r = unsafe { guestfs_part_del(self.g, (&c_device).as_ptr(), partnum) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1699]
src/guestfs.rs:14146:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14146 |         let r = unsafe { guestfs_part_disk(self.g, (&c_device).as_ptr(), (&c_parttype).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1700]
src/guestfs.rs:14146:74: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14146 |         let r = unsafe { guestfs_part_disk(self.g, (&c_device).as_ptr(), (&c_parttype).as_ptr()) };
#        |                                                                          ^^^^^^^^^^^^^ help: change this to: `c_parttype`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1701]
src/guestfs.rs:14160:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14160 |         let r = unsafe { guestfs_part_expand_gpt(self.g, (&c_device).as_ptr()) };
#        |                                                          ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1702]
src/guestfs.rs:14173:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14173 |         let r = unsafe { guestfs_part_get_bootable(self.g, (&c_device).as_ptr(), partnum) };
#        |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1703]
src/guestfs.rs:14186:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14186 |         let r = unsafe { guestfs_part_get_disk_guid(self.g, (&c_device).as_ptr()) };
#        |                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1704]
src/guestfs.rs:14202:66: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14202 |         let r = unsafe { guestfs_part_get_gpt_attributes(self.g, (&c_device).as_ptr(), partnum) };
#        |                                                                  ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1705]
src/guestfs.rs:14215:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14215 |         let r = unsafe { guestfs_part_get_gpt_guid(self.g, (&c_device).as_ptr(), partnum) };
#        |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1706]
src/guestfs.rs:14231:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14231 |         let r = unsafe { guestfs_part_get_gpt_type(self.g, (&c_device).as_ptr(), partnum) };
#        |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1707]
src/guestfs.rs:14247:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14247 |         let r = unsafe { guestfs_part_get_mbr_id(self.g, (&c_device).as_ptr(), partnum) };
#        |                                                          ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1708]
src/guestfs.rs:14260:65: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14260 |         let r = unsafe { guestfs_part_get_mbr_part_type(self.g, (&c_device).as_ptr(), partnum) };
#        |                                                                 ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1709]
src/guestfs.rs:14276:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14276 |         let r = unsafe { guestfs_part_get_name(self.g, (&c_device).as_ptr(), partnum) };
#        |                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1710]
src/guestfs.rs:14292:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14292 |         let r = unsafe { guestfs_part_get_parttype(self.g, (&c_device).as_ptr()) };
#        |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1711]
src/guestfs.rs:14309:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14309 |         let r = unsafe { guestfs_part_init(self.g, (&c_device).as_ptr(), (&c_parttype).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1712]
src/guestfs.rs:14309:74: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14309 |         let r = unsafe { guestfs_part_init(self.g, (&c_device).as_ptr(), (&c_parttype).as_ptr()) };
#        |                                                                          ^^^^^^^^^^^^^ help: change this to: `c_parttype`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1713]
src/guestfs.rs:14323:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14323 |         let r = unsafe { guestfs_part_list(self.g, (&c_device).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1714]
src/guestfs.rs:14340:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14340 |         let r = unsafe { guestfs_part_resize(self.g, (&c_device).as_ptr(), partnum, endsect) };
#        |                                                      ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1715]
src/guestfs.rs:14354:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14354 |         let r = unsafe { guestfs_part_set_bootable(self.g, (&c_device).as_ptr(), partnum, bootable) };
#        |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1716]
src/guestfs.rs:14368:61: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14368 |         let r = unsafe { guestfs_part_set_disk_guid(self.g, (&c_device).as_ptr(), (&c_guid).as_ptr()) };
#        |                                                             ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1717]
src/guestfs.rs:14368:83: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14368 |         let r = unsafe { guestfs_part_set_disk_guid(self.g, (&c_device).as_ptr(), (&c_guid).as_ptr()) };
#        |                                                                                   ^^^^^^^^^ help: change this to: `c_guid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1718]
src/guestfs.rs:14382:68: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14382 |         let r = unsafe { guestfs_part_set_disk_guid_random(self.g, (&c_device).as_ptr()) };
#        |                                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1719]
src/guestfs.rs:14395:66: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14395 |         let r = unsafe { guestfs_part_set_gpt_attributes(self.g, (&c_device).as_ptr(), partnum, attributes) };
#        |                                                                  ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1720]
src/guestfs.rs:14409:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14409 |         let r = unsafe { guestfs_part_set_gpt_guid(self.g, (&c_device).as_ptr(), partnum, (&c_guid).as_ptr()) };
#        |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1721]
src/guestfs.rs:14409:91: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14409 |         let r = unsafe { guestfs_part_set_gpt_guid(self.g, (&c_device).as_ptr(), partnum, (&c_guid).as_ptr()) };
#        |                                                                                           ^^^^^^^^^ help: change this to: `c_guid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1722]
src/guestfs.rs:14424:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14424 |         let r = unsafe { guestfs_part_set_gpt_type(self.g, (&c_device).as_ptr(), partnum, (&c_guid).as_ptr()) };
#        |                                                            ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1723]
src/guestfs.rs:14424:91: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14424 |         let r = unsafe { guestfs_part_set_gpt_type(self.g, (&c_device).as_ptr(), partnum, (&c_guid).as_ptr()) };
#        |                                                                                           ^^^^^^^^^ help: change this to: `c_guid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1724]
src/guestfs.rs:14438:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14438 |         let r = unsafe { guestfs_part_set_mbr_id(self.g, (&c_device).as_ptr(), partnum, idbyte) };
#        |                                                          ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1725]
src/guestfs.rs:14452:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14452 |         let r = unsafe { guestfs_part_set_name(self.g, (&c_device).as_ptr(), partnum, (&c_name).as_ptr()) };
#        |                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1726]
src/guestfs.rs:14452:87: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14452 |         let r = unsafe { guestfs_part_set_name(self.g, (&c_device).as_ptr(), partnum, (&c_name).as_ptr()) };
#        |                                                                                       ^^^^^^^^^ help: change this to: `c_name`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1727]
src/guestfs.rs:14466:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14466 |         let r = unsafe { guestfs_part_to_dev(self.g, (&c_partition).as_ptr()) };
#        |                                                      ^^^^^^^^^^^^^^ help: change this to: `c_partition`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1728]
src/guestfs.rs:14482:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14482 |         let r = unsafe { guestfs_part_to_partnum(self.g, (&c_partition).as_ptr()) };
#        |                                                          ^^^^^^^^^^^^^^ help: change this to: `c_partition`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1729]
src/guestfs.rs:14507:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14507 |         let r = unsafe { guestfs_pread(self.g, (&c_path).as_ptr(), count, offset, &mut size as *mut usize) };
#        |                                                ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1730]
src/guestfs.rs:14525:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14525 |         let r = unsafe { guestfs_pread_device(self.g, (&c_device).as_ptr(), count, offset, &mut size as *mut usize) };
#        |                                                       ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1731]
src/guestfs.rs:14542:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14542 |         let r = unsafe { guestfs_pvchange_uuid(self.g, (&c_device).as_ptr()) };
#        |                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1732]
src/guestfs.rs:14566:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14566 |         let r = unsafe { guestfs_pvcreate(self.g, (&c_device).as_ptr()) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1733]
src/guestfs.rs:14579:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14579 |         let r = unsafe { guestfs_pvremove(self.g, (&c_device).as_ptr()) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1734]
src/guestfs.rs:14592:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14592 |         let r = unsafe { guestfs_pvresize(self.g, (&c_device).as_ptr()) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1735]
src/guestfs.rs:14605:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14605 |         let r = unsafe { guestfs_pvresize_size(self.g, (&c_device).as_ptr(), size) };
#        |                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1736]
src/guestfs.rs:14648:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14648 |         let r = unsafe { guestfs_pvuuid(self.g, (&c_device).as_ptr()) };
#        |                                                 ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1737]
src/guestfs.rs:14666:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14666 |         let r = unsafe { guestfs_pwrite(self.g, (&c_path).as_ptr(), (&c_content).as_ptr(), c_content_len, offset) };
#        |                                                 ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1738]
src/guestfs.rs:14666:69: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14666 |         let r = unsafe { guestfs_pwrite(self.g, (&c_path).as_ptr(), (&c_content).as_ptr(), c_content_len, offset) };
#        |                                                                     ^^^^^^^^^^^^ help: change this to: `c_content`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1739]
src/guestfs.rs:14682:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14682 |         let r = unsafe { guestfs_pwrite_device(self.g, (&c_device).as_ptr(), (&c_content).as_ptr(), c_content_len, offset) };
#        |                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1740]
src/guestfs.rs:14682:78: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14682 |         let r = unsafe { guestfs_pwrite_device(self.g, (&c_device).as_ptr(), (&c_content).as_ptr(), c_content_len, offset) };
#        |                                                                              ^^^^^^^^^^^^ help: change this to: `c_content`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1741]
src/guestfs.rs:14697:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14697 |         let r = unsafe { guestfs_read_file(self.g, (&c_path).as_ptr(), &mut size as *mut usize) };
#        |                                                    ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1742]
src/guestfs.rs:14714:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14714 |         let r = unsafe { guestfs_read_lines(self.g, (&c_path).as_ptr()) };
#        |                                                     ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1743]
src/guestfs.rs:14731:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14731 |         let r = unsafe { guestfs_readdir(self.g, (&c_dir).as_ptr()) };
#        |                                                  ^^^^^^^^ help: change this to: `c_dir`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1744]
src/guestfs.rs:14748:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14748 |         let r = unsafe { guestfs_readlink(self.g, (&c_path).as_ptr()) };
#        |                                                   ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1745]
src/guestfs.rs:14764:40: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  14764 |         let mut c_names = (&c_names_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                        ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1746]
src/guestfs.rs:14767:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14767 |         let r = unsafe { guestfs_readlinklist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                       ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1747]
src/guestfs.rs:14767:75: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  14767 |         let r = unsafe { guestfs_readlinklist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_names).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1748]
src/guestfs.rs:14767:75: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14767 |         let r = unsafe { guestfs_readlinklist(self.g, (&c_path).as_ptr(), (&c_names).as_ptr() as *const *const c_char) };
#        |                                                                           ^^^^^^^^^^ help: change this to: `c_names`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1749]
src/guestfs.rs:14786:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14786 |         let r = unsafe { guestfs_realpath(self.g, (&c_path).as_ptr()) };
#        |                                                   ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1750]
src/guestfs.rs:14803:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14803 | ...   let r = unsafe { guestfs_remount_argv(self.g, (&c_mountpoint).as_ptr(), &(RawRemountOptArgs::from(&optargs_cexpr)) as *const RawRem...
#        |                                                     ^^^^^^^^^^^^^^^ help: change this to: `c_mountpoint`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1751]
src/guestfs.rs:14808:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  14808 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprRemountOptArgs`
#       --> src/guestfs.rs:14808:14
#        |
#  14808 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1752]
src/guestfs.rs:14817:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14817 |         let r = unsafe { guestfs_remove_drive(self.g, (&c_label).as_ptr()) };
#        |                                                       ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1753]
src/guestfs.rs:14831:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14831 |         let r = unsafe { guestfs_removexattr(self.g, (&c_xattr).as_ptr(), (&c_path).as_ptr()) };
#        |                                                      ^^^^^^^^^^ help: change this to: `c_xattr`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1754]
src/guestfs.rs:14831:75: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14831 |         let r = unsafe { guestfs_removexattr(self.g, (&c_xattr).as_ptr(), (&c_path).as_ptr()) };
#        |                                                                           ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1755]
src/guestfs.rs:14846:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14846 |         let r = unsafe { guestfs_rename(self.g, (&c_oldpath).as_ptr(), (&c_newpath).as_ptr()) };
#        |                                                 ^^^^^^^^^^^^ help: change this to: `c_oldpath`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1756]
src/guestfs.rs:14846:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14846 |         let r = unsafe { guestfs_rename(self.g, (&c_oldpath).as_ptr(), (&c_newpath).as_ptr()) };
#        |                                                                        ^^^^^^^^^^^^ help: change this to: `c_newpath`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1757]
src/guestfs.rs:14860:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14860 |         let r = unsafe { guestfs_resize2fs(self.g, (&c_device).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1758]
src/guestfs.rs:14873:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14873 |         let r = unsafe { guestfs_resize2fs_M(self.g, (&c_device).as_ptr()) };
#        |                                                      ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1759]
src/guestfs.rs:14886:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14886 |         let r = unsafe { guestfs_resize2fs_size(self.g, (&c_device).as_ptr(), size) };
#        |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1760]
src/guestfs.rs:14899:45: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14899 |         let r = unsafe { guestfs_rm(self.g, (&c_path).as_ptr()) };
#        |                                             ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1761]
src/guestfs.rs:14912:47: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14912 |         let r = unsafe { guestfs_rm_f(self.g, (&c_path).as_ptr()) };
#        |                                               ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1762]
src/guestfs.rs:14925:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14925 |         let r = unsafe { guestfs_rm_rf(self.g, (&c_path).as_ptr()) };
#        |                                                ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1763]
src/guestfs.rs:14938:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14938 |         let r = unsafe { guestfs_rmdir(self.g, (&c_path).as_ptr()) };
#        |                                                ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1764]
src/guestfs.rs:14951:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14951 |         let r = unsafe { guestfs_rmmountpoint(self.g, (&c_exemptpath).as_ptr()) };
#        |                                                       ^^^^^^^^^^^^^^^ help: change this to: `c_exemptpath`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1765]
src/guestfs.rs:14966:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14966 | ...   let r = unsafe { guestfs_rsync_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawRsyncOptArgs::from(&optargs_cexpr)) as *con...
#        |                                                   ^^^^^^^^ help: change this to: `c_src`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1766]
src/guestfs.rs:14966:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14966 | ...   let r = unsafe { guestfs_rsync_argv(self.g, (&c_src).as_ptr(), (&c_dest).as_ptr(), &(RawRsyncOptArgs::from(&optargs_cexpr)) as *con...
#        |                                                                      ^^^^^^^^^ help: change this to: `c_dest`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1767]
src/guestfs.rs:14972:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  14972 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprRsyncOptArgs`
#       --> src/guestfs.rs:14972:14
#        |
#  14972 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1768]
src/guestfs.rs:14983:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14983 | ...   let r = unsafe { guestfs_rsync_in_argv(self.g, (&c_remote).as_ptr(), (&c_dest).as_ptr(), &(RawRsyncInOptArgs::from(&optargs_cexpr))...
#        |                                                      ^^^^^^^^^^^ help: change this to: `c_remote`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1769]
src/guestfs.rs:14983:78: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  14983 | ...   let r = unsafe { guestfs_rsync_in_argv(self.g, (&c_remote).as_ptr(), (&c_dest).as_ptr(), &(RawRsyncInOptArgs::from(&optargs_cexpr))...
#        |                                                                            ^^^^^^^^^ help: change this to: `c_dest`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1770]
src/guestfs.rs:14989:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  14989 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprRsyncInOptArgs`
#       --> src/guestfs.rs:14989:14
#        |
#  14989 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1771]
src/guestfs.rs:15000:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15000 | ...   let r = unsafe { guestfs_rsync_out_argv(self.g, (&c_src).as_ptr(), (&c_remote).as_ptr(), &(RawRsyncOutOptArgs::from(&optargs_cexpr)...
#        |                                                       ^^^^^^^^ help: change this to: `c_src`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1772]
src/guestfs.rs:15000:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15000 | ...   let r = unsafe { guestfs_rsync_out_argv(self.g, (&c_src).as_ptr(), (&c_remote).as_ptr(), &(RawRsyncOutOptArgs::from(&optargs_cexpr)...
#        |                                                                          ^^^^^^^^^^^ help: change this to: `c_remote`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1773]
src/guestfs.rs:15006:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  15006 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprRsyncOutOptArgs`
#       --> src/guestfs.rs:15006:14
#        |
#  15006 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1774]
src/guestfs.rs:15015:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15015 |         let r = unsafe { guestfs_scrub_device(self.g, (&c_device).as_ptr()) };
#        |                                                       ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1775]
src/guestfs.rs:15028:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15028 |         let r = unsafe { guestfs_scrub_file(self.g, (&c_file).as_ptr()) };
#        |                                                     ^^^^^^^^^ help: change this to: `c_file`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1776]
src/guestfs.rs:15041:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15041 |         let r = unsafe { guestfs_scrub_freespace(self.g, (&c_dir).as_ptr()) };
#        |                                                          ^^^^^^^^ help: change this to: `c_dir`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1777]
src/guestfs.rs:15056:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15056 | ...   let r = unsafe { guestfs_selinux_relabel_argv(self.g, (&c_specfile).as_ptr(), (&c_path).as_ptr(), &(RawSelinuxRelabelOptArgs::from(...
#        |                                                             ^^^^^^^^^^^^^ help: change this to: `c_specfile`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1778]
src/guestfs.rs:15056:87: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15056 | ...   let r = unsafe { guestfs_selinux_relabel_argv(self.g, (&c_specfile).as_ptr(), (&c_path).as_ptr(), &(RawSelinuxRelabelOptArgs::from(...
#        |                                                                                     ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1779]
src/guestfs.rs:15062:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  15062 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprSelinuxRelabelOptArgs`
#       --> src/guestfs.rs:15062:14
#        |
#  15062 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1780]
src/guestfs.rs:15069:35: warning: redundant closure
#        |
#  15069 |         let c_append = append.map(|s| ffi::CString::new(s)).transpose()?;
#        |                                   ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1781]
src/guestfs.rs:15085:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15085 |         let r = unsafe { guestfs_set_attach_method(self.g, (&c_backend).as_ptr()) };
#        |                                                            ^^^^^^^^^^^^ help: change this to: `c_backend`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1782]
src/guestfs.rs:15110:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15110 |         let r = unsafe { guestfs_set_backend(self.g, (&c_backend).as_ptr()) };
#        |                                                      ^^^^^^^^^^^^ help: change this to: `c_backend`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1783]
src/guestfs.rs:15124:62: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15124 |         let r = unsafe { guestfs_set_backend_setting(self.g, (&c_name).as_ptr(), (&c_val).as_ptr()) };
#        |                                                              ^^^^^^^^^ help: change this to: `c_name`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1784]
src/guestfs.rs:15124:82: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15124 |         let r = unsafe { guestfs_set_backend_setting(self.g, (&c_name).as_ptr(), (&c_val).as_ptr()) };
#        |                                                                                  ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1785]
src/guestfs.rs:15137:46: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  15137 |         let mut c_settings = (&c_settings_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                              ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1786]
src/guestfs.rs:15140:63: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  15140 |         let r = unsafe { guestfs_set_backend_settings(self.g, (&c_settings).as_ptr() as *const *const c_char) };
#        |                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_settings).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1787]
src/guestfs.rs:15140:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15140 |         let r = unsafe { guestfs_set_backend_settings(self.g, (&c_settings).as_ptr() as *const *const c_char) };
#        |                                                               ^^^^^^^^^^^^^ help: change this to: `c_settings`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1788]
src/guestfs.rs:15152:39: warning: redundant closure
#        |
#  15152 |         let c_cachedir = cachedir.map(|s| ffi::CString::new(s)).transpose()?;
#        |                                       ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1789]
src/guestfs.rs:15182:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15182 | ...   let r = unsafe { guestfs_set_e2attrs_argv(self.g, (&c_file).as_ptr(), (&c_attrs).as_ptr(), &(RawSetE2attrsOptArgs::from(&optargs_ce...
#        |                                                         ^^^^^^^^^ help: change this to: `c_file`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1790]
src/guestfs.rs:15182:79: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15182 | ...   let r = unsafe { guestfs_set_e2attrs_argv(self.g, (&c_file).as_ptr(), (&c_attrs).as_ptr(), &(RawSetE2attrsOptArgs::from(&optargs_ce...
#        |                                                                             ^^^^^^^^^^ help: change this to: `c_attrs`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1791]
src/guestfs.rs:15188:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  15188 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprSetE2attrsOptArgs`
#       --> src/guestfs.rs:15188:14
#        |
#  15188 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1792]
src/guestfs.rs:15197:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15197 |         let r = unsafe { guestfs_set_e2generation(self.g, (&c_file).as_ptr(), generation) };
#        |                                                           ^^^^^^^^^ help: change this to: `c_file`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1793]
src/guestfs.rs:15211:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15211 |         let r = unsafe { guestfs_set_e2label(self.g, (&c_device).as_ptr(), (&c_label).as_ptr()) };
#        |                                                      ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1794]
src/guestfs.rs:15211:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15211 |         let r = unsafe { guestfs_set_e2label(self.g, (&c_device).as_ptr(), (&c_label).as_ptr()) };
#        |                                                                            ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1795]
src/guestfs.rs:15226:53: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15226 |         let r = unsafe { guestfs_set_e2uuid(self.g, (&c_device).as_ptr(), (&c_uuid).as_ptr()) };
#        |                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1796]
src/guestfs.rs:15226:75: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15226 |         let r = unsafe { guestfs_set_e2uuid(self.g, (&c_device).as_ptr(), (&c_uuid).as_ptr()) };
#        |                                                                           ^^^^^^^^^ help: change this to: `c_uuid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1797]
src/guestfs.rs:15240:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15240 |         let r = unsafe { guestfs_set_hv(self.g, (&c_hv).as_ptr()) };
#        |                                                 ^^^^^^^ help: change this to: `c_hv`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1798]
src/guestfs.rs:15253:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15253 |         let r = unsafe { guestfs_set_identifier(self.g, (&c_identifier).as_ptr()) };
#        |                                                         ^^^^^^^^^^^^^^^ help: change this to: `c_identifier`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1799]
src/guestfs.rs:15267:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15267 |         let r = unsafe { guestfs_set_label(self.g, (&c_mountable).as_ptr(), (&c_label).as_ptr()) };
#        |                                                    ^^^^^^^^^^^^^^ help: change this to: `c_mountable`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1800]
src/guestfs.rs:15267:77: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15267 |         let r = unsafe { guestfs_set_label(self.g, (&c_mountable).as_ptr(), (&c_label).as_ptr()) };
#        |                                                                             ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1801]
src/guestfs.rs:15282:82: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15282 |         let r = unsafe { guestfs_set_libvirt_requested_credential(self.g, index, (&c_cred).as_ptr(), c_cred_len) };
#        |                                                                                  ^^^^^^^^^ help: change this to: `c_cred`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1802]
src/guestfs.rs:15294:40: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  15294 |         let mut c_creds = (&c_creds_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                        ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1803]
src/guestfs.rs:15297:76: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  15297 |         let r = unsafe { guestfs_set_libvirt_supported_credentials(self.g, (&c_creds).as_ptr() as *const *const c_char) };
#        |                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_creds).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1804]
src/guestfs.rs:15297:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15297 |         let r = unsafe { guestfs_set_libvirt_supported_credentials(self.g, (&c_creds).as_ptr() as *const *const c_char) };
#        |                                                                            ^^^^^^^^^^ help: change this to: `c_creds`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1805]
src/guestfs.rs:15332:43: warning: redundant closure
#        |
#  15332 |         let c_searchpath = searchpath.map(|s| ffi::CString::new(s)).transpose()?;
#        |                                           ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1806]
src/guestfs.rs:15360:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15360 |         let r = unsafe { guestfs_set_program(self.g, (&c_program).as_ptr()) };
#        |                                                      ^^^^^^^^^^^^ help: change this to: `c_program`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1807]
src/guestfs.rs:15371:27: warning: redundant closure
#        |
#  15371 |         let c_hv = hv.map(|s| ffi::CString::new(s)).transpose()?;
#        |                           ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1808]
src/guestfs.rs:15420:35: warning: redundant closure
#        |
#  15420 |         let c_tmpdir = tmpdir.map(|s| ffi::CString::new(s)).transpose()?;
#        |                                   ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ffi::CString::new`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure

Error: CLIPPY_WARNING: [#def1809]
src/guestfs.rs:15449:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15449 |         let r = unsafe { guestfs_set_uuid(self.g, (&c_device).as_ptr(), (&c_uuid).as_ptr()) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1810]
src/guestfs.rs:15449:73: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15449 |         let r = unsafe { guestfs_set_uuid(self.g, (&c_device).as_ptr(), (&c_uuid).as_ptr()) };
#        |                                                                         ^^^^^^^^^ help: change this to: `c_uuid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1811]
src/guestfs.rs:15463:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15463 |         let r = unsafe { guestfs_set_uuid_random(self.g, (&c_device).as_ptr()) };
#        |                                                          ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1812]
src/guestfs.rs:15488:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15488 |         let r = unsafe { guestfs_setcon(self.g, (&c_context).as_ptr()) };
#        |                                                 ^^^^^^^^^^^^ help: change this to: `c_context`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1813]
src/guestfs.rs:15501:40: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  15501 |         let mut c_paths = (&c_paths_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                        ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1814]
src/guestfs.rs:15505:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15505 | ...   let r = unsafe { guestfs_setfiles_argv(self.g, (&c_specfile).as_ptr(), (&c_paths).as_ptr() as *const *const c_char, &(RawSetfilesOp...
#        |                                                      ^^^^^^^^^^^^^ help: change this to: `c_specfile`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1815]
src/guestfs.rs:15505:80: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  15505 | ...f.g, (&c_specfile).as_ptr(), (&c_paths).as_ptr() as *const *const c_char, &(RawSetfilesOptArgs::from(&optargs_cexpr)) as *const RawSet...
#        |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_paths).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1816]
src/guestfs.rs:15505:80: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15505 | ...   let r = unsafe { guestfs_setfiles_argv(self.g, (&c_specfile).as_ptr(), (&c_paths).as_ptr() as *const *const c_char, &(RawSetfilesOp...
#        |                                                                              ^^^^^^^^^^ help: change this to: `c_paths`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1817]
src/guestfs.rs:15512:9: warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
#        |
#  15512 |         drop(optargs_cexpr);
#        |         ^^^^^^^^^^^^^^^^^^^
#        |
#  note: argument has type `guestfs::CExprSetfilesOptArgs`
#       --> src/guestfs.rs:15512:14
#        |
#  15512 |         drop(optargs_cexpr);
#        |              ^^^^^^^^^^^^^
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop

Error: CLIPPY_WARNING: [#def1818]
src/guestfs.rs:15523:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15523 |         let r = unsafe { guestfs_setxattr(self.g, (&c_xattr).as_ptr(), (&c_val).as_ptr(), vallen, (&c_path).as_ptr()) };
#        |                                                   ^^^^^^^^^^ help: change this to: `c_xattr`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1819]
src/guestfs.rs:15523:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15523 |         let r = unsafe { guestfs_setxattr(self.g, (&c_xattr).as_ptr(), (&c_val).as_ptr(), vallen, (&c_path).as_ptr()) };
#        |                                                                        ^^^^^^^^ help: change this to: `c_val`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1820]
src/guestfs.rs:15523:99: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15523 |         let r = unsafe { guestfs_setxattr(self.g, (&c_xattr).as_ptr(), (&c_val).as_ptr(), vallen, (&c_path).as_ptr()) };
#        |                                                                                                   ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1821]
src/guestfs.rs:15538:40: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  15538 |         let mut c_lines = (&c_lines_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                        ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1822]
src/guestfs.rs:15541:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15541 |         let r = unsafe { guestfs_sfdisk(self.g, (&c_device).as_ptr(), cyls, heads, sectors, (&c_lines).as_ptr() as *const *const c_char) };
#        |                                                 ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1823]
src/guestfs.rs:15541:93: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  15541 |         let r = unsafe { guestfs_sfdisk(self.g, (&c_device).as_ptr(), cyls, heads, sectors, (&c_lines).as_ptr() as *const *const c_char) };
#        |                                                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_lines).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1824]
src/guestfs.rs:15541:93: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15541 |         let r = unsafe { guestfs_sfdisk(self.g, (&c_device).as_ptr(), cyls, heads, sectors, (&c_lines).as_ptr() as *const *const c_char) };
#        |                                                                                             ^^^^^^^^^^ help: change this to: `c_lines`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1825]
src/guestfs.rs:15556:40: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
#        |
#  15556 |         let mut c_lines = (&c_lines_v).into_iter().map(|v| v.as_ptr()).collect::<Vec<_>>();
#        |                                        ^^^^^^^^^ help: call directly: `iter`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref

Error: CLIPPY_WARNING: [#def1826]
src/guestfs.rs:15559:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15559 |         let r = unsafe { guestfs_sfdiskM(self.g, (&c_device).as_ptr(), (&c_lines).as_ptr() as *const *const c_char) };
#        |                                                  ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1827]
src/guestfs.rs:15559:72: warning: casting raw pointers to the same type and constness is unnecessary (`*const *const i8` -> `*const *const i8`)
#        |
#  15559 |         let r = unsafe { guestfs_sfdiskM(self.g, (&c_device).as_ptr(), (&c_lines).as_ptr() as *const *const c_char) };
#        |                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&c_lines).as_ptr()`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def1828]
src/guestfs.rs:15559:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15559 |         let r = unsafe { guestfs_sfdiskM(self.g, (&c_device).as_ptr(), (&c_lines).as_ptr() as *const *const c_char) };
#        |                                                                        ^^^^^^^^^^ help: change this to: `c_lines`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1829]
src/guestfs.rs:15575:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15575 |         let r = unsafe { guestfs_sfdisk_N(self.g, (&c_device).as_ptr(), partnum, cyls, heads, sectors, (&c_line).as_ptr()) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1830]
src/guestfs.rs:15575:104: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15575 |         let r = unsafe { guestfs_sfdisk_N(self.g, (&c_device).as_ptr(), partnum, cyls, heads, sectors, (&c_line).as_ptr()) };
#        |                                                                                                        ^^^^^^^^^ help: change this to: `c_line`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1831]
src/guestfs.rs:15589:63: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15589 |         let r = unsafe { guestfs_sfdisk_disk_geometry(self.g, (&c_device).as_ptr()) };
#        |                                                               ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1832]
src/guestfs.rs:15605:65: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15605 |         let r = unsafe { guestfs_sfdisk_kernel_geometry(self.g, (&c_device).as_ptr()) };
#        |                                                                 ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1833]
src/guestfs.rs:15621:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15621 |         let r = unsafe { guestfs_sfdisk_l(self.g, (&c_device).as_ptr()) };
#        |                                                   ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1834]
src/guestfs.rs:15637:45: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15637 |         let r = unsafe { guestfs_sh(self.g, (&c_command).as_ptr()) };
#        |                                             ^^^^^^^^^^^^ help: change this to: `c_command`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1835]
src/guestfs.rs:15653:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15653 |         let r = unsafe { guestfs_sh_lines(self.g, (&c_command).as_ptr()) };
#        |                                                   ^^^^^^^^^^^^ help: change this to: `c_command`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1836]
src/guestfs.rs:15671:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15671 |         let r = unsafe { guestfs_sh_out(self.g, (&c_command).as_ptr(), (&c_output).as_ptr()) };
#        |                                                 ^^^^^^^^^^^^ help: change this to: `c_command`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1837]
src/guestfs.rs:15671:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15671 |         let r = unsafe { guestfs_sh_out(self.g, (&c_command).as_ptr(), (&c_output).as_ptr()) };
#        |                                                                        ^^^^^^^^^^^ help: change this to: `c_output`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1838]
src/guestfs.rs:15707:47: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15707 |         let r = unsafe { guestfs_stat(self.g, (&c_path).as_ptr()) };
#        |                                               ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1839]
src/guestfs.rs:15724:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15724 |         let r = unsafe { guestfs_statns(self.g, (&c_path).as_ptr()) };
#        |                                                 ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1840]
src/guestfs.rs:15741:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15741 |         let r = unsafe { guestfs_statvfs(self.g, (&c_path).as_ptr()) };
#        |                                                  ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1841]
src/guestfs.rs:15758:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15758 |         let r = unsafe { guestfs_strings(self.g, (&c_path).as_ptr()) };
#        |                                                  ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1842]
src/guestfs.rs:15776:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15776 |         let r = unsafe { guestfs_strings_e(self.g, (&c_encoding).as_ptr(), (&c_path).as_ptr()) };
#        |                                                    ^^^^^^^^^^^^^ help: change this to: `c_encoding`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1843]
src/guestfs.rs:15776:76: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15776 |         let r = unsafe { guestfs_strings_e(self.g, (&c_encoding).as_ptr(), (&c_path).as_ptr()) };
#        |                                                                            ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1844]
src/guestfs.rs:15794:57: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15794 |         let r = unsafe { guestfs_swapoff_device(self.g, (&c_device).as_ptr()) };
#        |                                                         ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1845]
src/guestfs.rs:15807:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15807 |         let r = unsafe { guestfs_swapoff_file(self.g, (&c_file).as_ptr()) };
#        |                                                       ^^^^^^^^^ help: change this to: `c_file`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1846]
src/guestfs.rs:15820:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15820 |         let r = unsafe { guestfs_swapoff_label(self.g, (&c_label).as_ptr()) };
#        |                                                        ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1847]
src/guestfs.rs:15833:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15833 |         let r = unsafe { guestfs_swapoff_uuid(self.g, (&c_uuid).as_ptr()) };
#        |                                                       ^^^^^^^^^ help: change this to: `c_uuid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1848]
src/guestfs.rs:15846:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15846 |         let r = unsafe { guestfs_swapon_device(self.g, (&c_device).as_ptr()) };
#        |                                                        ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1849]
src/guestfs.rs:15859:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15859 |         let r = unsafe { guestfs_swapon_file(self.g, (&c_file).as_ptr()) };
#        |                                                      ^^^^^^^^^ help: change this to: `c_file`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1850]
src/guestfs.rs:15872:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15872 |         let r = unsafe { guestfs_swapon_label(self.g, (&c_label).as_ptr()) };
#        |                                                       ^^^^^^^^^^ help: change this to: `c_label`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1851]
src/guestfs.rs:15885:54: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15885 |         let r = unsafe { guestfs_swapon_uuid(self.g, (&c_uuid).as_ptr()) };
#        |                                                      ^^^^^^^^^ help: change this to: `c_uuid`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1852]
src/guestfs.rs:15910:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15910 | ...   let r = unsafe { guestfs_syslinux_argv(self.g, (&c_device).as_ptr(), &(RawSyslinuxOptArgs::from(&optargs_cexpr)) as *const RawSysli...
#        |                                                      ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1853]
src/guestfs.rs:15924:47: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15924 |         let r = unsafe { guestfs_tail(self.g, (&c_path).as_ptr()) };
#        |                                               ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1854]
src/guestfs.rs:15941:58: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15941 |         let r = unsafe { guestfs_tail_n(self.g, nrlines, (&c_path).as_ptr()) };
#        |                                                          ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1855]
src/guestfs.rs:15960:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15960 | ...   let r = unsafe { guestfs_tar_in_opts_argv(self.g, (&c_tarfile).as_ptr(), (&c_directory).as_ptr(), &(RawTarInOptArgs::from(&optargs_...
#        |                                                         ^^^^^^^^^^^^ help: change this to: `c_tarfile`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1856]
src/guestfs.rs:15960:82: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15960 | ...   let r = unsafe { guestfs_tar_in_opts_argv(self.g, (&c_tarfile).as_ptr(), (&c_directory).as_ptr(), &(RawTarInOptArgs::from(&optargs_...
#        |                                                                                ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1857]
src/guestfs.rs:15977:60: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15977 | ...   let r = unsafe { guestfs_tar_out_opts_argv(self.g, (&c_directory).as_ptr(), (&c_tarfile).as_ptr(), &(RawTarOutOptArgs::from(&optarg...
#        |                                                          ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1858]
src/guestfs.rs:15977:85: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15977 | ...   let r = unsafe { guestfs_tar_out_opts_argv(self.g, (&c_directory).as_ptr(), (&c_tarfile).as_ptr(), &(RawTarOutOptArgs::from(&optarg...
#        |                                                                                   ^^^^^^^^^^^^ help: change this to: `c_tarfile`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1859]
src/guestfs.rs:15993:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15993 |         let r = unsafe { guestfs_tgz_in(self.g, (&c_tarball).as_ptr(), (&c_directory).as_ptr()) };
#        |                                                 ^^^^^^^^^^^^ help: change this to: `c_tarball`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1860]
src/guestfs.rs:15993:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  15993 |         let r = unsafe { guestfs_tgz_in(self.g, (&c_tarball).as_ptr(), (&c_directory).as_ptr()) };
#        |                                                                        ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1861]
src/guestfs.rs:16008:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16008 |         let r = unsafe { guestfs_tgz_out(self.g, (&c_directory).as_ptr(), (&c_tarball).as_ptr()) };
#        |                                                  ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1862]
src/guestfs.rs:16008:75: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16008 |         let r = unsafe { guestfs_tgz_out(self.g, (&c_directory).as_ptr(), (&c_tarball).as_ptr()) };
#        |                                                                           ^^^^^^^^^^^^ help: change this to: `c_tarball`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1863]
src/guestfs.rs:16022:48: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16022 |         let r = unsafe { guestfs_touch(self.g, (&c_path).as_ptr()) };
#        |                                                ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1864]
src/guestfs.rs:16035:51: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16035 |         let r = unsafe { guestfs_truncate(self.g, (&c_path).as_ptr()) };
#        |                                                   ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1865]
src/guestfs.rs:16048:56: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16048 |         let r = unsafe { guestfs_truncate_size(self.g, (&c_path).as_ptr(), size) };
#        |                                                        ^^^^^^^^^ help: change this to: `c_path`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1866]
src/guestfs.rs:16062:55: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16062 | ...   let r = unsafe { guestfs_tune2fs_argv(self.g, (&c_device).as_ptr(), &(RawTune2fsOptArgs::from(&optargs_cexpr)) as *const RawTune2fs...
#        |                                                     ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1867]
src/guestfs.rs:16076:52: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16076 |         let r = unsafe { guestfs_tune2fs_l(self.g, (&c_device).as_ptr()) };
#        |                                                    ^^^^^^^^^^^ help: change this to: `c_device`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1868]
src/guestfs.rs:16094:49: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16094 |         let r = unsafe { guestfs_txz_in(self.g, (&c_tarball).as_ptr(), (&c_directory).as_ptr()) };
#        |                                                 ^^^^^^^^^^^^ help: change this to: `c_tarball`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1869]
src/guestfs.rs:16094:72: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16094 |         let r = unsafe { guestfs_txz_in(self.g, (&c_tarball).as_ptr(), (&c_directory).as_ptr()) };
#        |                                                                        ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1870]
src/guestfs.rs:16109:50: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16109 |         let r = unsafe { guestfs_txz_out(self.g, (&c_directory).as_ptr(), (&c_tarball).as_ptr()) };
#        |                                                  ^^^^^^^^^^^^^^ help: change this to: `c_directory`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1871]
src/guestfs.rs:16109:75: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16109 |         let r = unsafe { guestfs_txz_out(self.g, (&c_directory).as_ptr(), (&c_tarball).as_ptr()) };
#        |                                                                           ^^^^^^^^^^^^ help: change this to: `c_tarball`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

Error: CLIPPY_WARNING: [#def1872]
src/guestfs.rs:16135:59: warning: this expression borrows a value the compiler would automatically borrow
#        |
#  16135 | ...   let r = unsafe { guestfs_umount_opts_argv(self.g, (&c_pathordevice).as_ptr(), &(RawUmountOptArgs::from(&optargs_cexpr)) as *const R...
#        |                                                         ^^^^^^^^^^^^^^^^^ help: change this to: `c_pathordevice`
#        |
#        = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow

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-23.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-namelibguestfs-1.58.0-1.fc44
store-results-to/tmp/tmpsr5sqsne/libguestfs-1.58.0-1.fc44.tar.xz
time-created2026-01-08 19:05:44
time-finished2026-01-08 19:17:28
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpsr5sqsne/libguestfs-1.58.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsr5sqsne/libguestfs-1.58.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9