nbdkit-1.45.12-1.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-457): [#def1]
/usr/share/doc/nbdkit-devel/assemble.sh:18:11: warning[SC2154]: tmpdir is referenced but not assigned.
#   16|   
#   17|   # Check we're being run from nbdkit.
#   18|-> if [ ! -d $tmpdir ] || [ "x$1" = "x" ]; then
#   19|       echo "$0: this script must be run from nbdkit" >&2
#   20|       echo "Use ‘nbdkit sh $0’" >&2

Error: SHELLCHECK_WARNING (CWE-457): [#def2]
/usr/share/doc/nbdkit-devel/example.sh:45:11: warning[SC2154]: tmpdir is referenced but not assigned.
#   43|   #
#   44|   # - $1 is set (to a method name).
#   45|-> if [ ! -d $tmpdir ] || [ "x$1" = "x" ]; then
#   46|       echo "$0: this script must be run from nbdkit" >&2
#   47|       echo "Use ‘nbdkit sh $0’" >&2

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
nbdkit-1.45.12/common/allocators/allocator.c:111:7: warning[-Wanalyzer-malloc-leak]: leak of 'kv.key'
nbdkit-1.45.12/common/allocators/allocator.c:86:23: branch_true: following 'true' branch...
nbdkit-1.45.12/common/allocators/allocator.c:89:5: branch_true: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:91:8: branch_false: following 'false' branch (when 'len != 0')...
nbdkit-1.45.12/common/allocators/allocator.c:96:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:97:8: branch_false: following 'false' branch (when 'j != 0')...
nbdkit-1.45.12/common/allocators/allocator.c:102:8: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:107:16: acquire_memory: allocated here
nbdkit-1.45.12/common/allocators/allocator.c:110:8: branch_false: following 'false' branch (when '<unknown>' is non-NULL)...
nbdkit-1.45.12/common/allocators/allocator.c:110:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:110:9: branch_true: following 'true' branch (when '<unknown>' is NULL)...
nbdkit-1.45.12/common/allocators/allocator.c:111:7: branch_true: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:111:7: danger: 'kv.key' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  109|       }
#  110|       if (kv.key == NULL || kv.value == NULL) {
#  111|->       nbdkit_error ("strdup: %m");
#  112|         free (kv.key);
#  113|         free (kv.value);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
nbdkit-1.45.12/common/allocators/allocator.c:111:7: warning[-Wanalyzer-malloc-leak]: leak of 'kv.value'
nbdkit-1.45.12/common/allocators/allocator.c:86:23: branch_true: following 'true' branch...
nbdkit-1.45.12/common/allocators/allocator.c:89:5: branch_true: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:91:8: branch_false: following 'false' branch (when 'len != 0')...
nbdkit-1.45.12/common/allocators/allocator.c:96:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:97:8: branch_false: following 'false' branch (when 'j != 0')...
nbdkit-1.45.12/common/allocators/allocator.c:102:8: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:102:8: branch_false: following 'false' branch (when 'len <= j')...
nbdkit-1.45.12/common/allocators/allocator.c:107:16: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:108:18: acquire_memory: allocated here
nbdkit-1.45.12/common/allocators/allocator.c:110:8: branch_true: following 'true' branch (when '<unknown>' is NULL)...
nbdkit-1.45.12/common/allocators/allocator.c:111:7: branch_true: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:111:7: danger: 'kv.value' leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  109|       }
#  110|       if (kv.key == NULL || kv.value == NULL) {
#  111|->       nbdkit_error ("strdup: %m");
#  112|         free (kv.key);
#  113|         free (kv.value);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
nbdkit-1.45.12/common/allocators/allocator.c:118:5: warning[-Wanalyzer-malloc-leak]: leak of 'kv.key'
nbdkit-1.45.12/common/allocators/allocator.c:86:23: branch_true: following 'true' branch...
nbdkit-1.45.12/common/allocators/allocator.c:89:5: branch_true: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:91:8: branch_false: following 'false' branch (when 'len != 0')...
nbdkit-1.45.12/common/allocators/allocator.c:96:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:97:8: branch_false: following 'false' branch (when 'j != 0')...
nbdkit-1.45.12/common/allocators/allocator.c:102:8: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:102:8: branch_false: following 'false' branch (when 'len <= j')...
nbdkit-1.45.12/common/allocators/allocator.c:107:16: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:107:16: acquire_memory: allocated here
nbdkit-1.45.12/common/allocators/allocator.c:110:8: branch_false: following 'false' branch...
nbdkit-1.45.12/common/allocators/allocator.c:118:5: danger: 'kv.key' leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  116|       }
#  117|   
#  118|->     nbdkit_debug ("allocator parameter: %s=%s", kv.key, kv.value);
#  119|       if (allocator_parameters_append (params, kv) == -1) {
#  120|         nbdkit_error ("realloc: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
nbdkit-1.45.12/common/allocators/allocator.c:118:5: warning[-Wanalyzer-malloc-leak]: leak of 'kv.value'
nbdkit-1.45.12/common/allocators/allocator.c:86:23: branch_true: following 'true' branch...
nbdkit-1.45.12/common/allocators/allocator.c:89:5: branch_true: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:91:8: branch_false: following 'false' branch (when 'len != 0')...
nbdkit-1.45.12/common/allocators/allocator.c:96:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:97:8: branch_false: following 'false' branch (when 'j != 0')...
nbdkit-1.45.12/common/allocators/allocator.c:102:8: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:102:8: branch_false: following 'false' branch (when 'len <= j')...
nbdkit-1.45.12/common/allocators/allocator.c:107:16: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:108:18: acquire_memory: allocated here
nbdkit-1.45.12/common/allocators/allocator.c:110:8: branch_false: following 'false' branch (when '<unknown>' is non-NULL)...
nbdkit-1.45.12/common/allocators/allocator.c:110:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:110:9: branch_false: following 'false' branch (when '<unknown>' is non-NULL)...
nbdkit-1.45.12/common/allocators/allocator.c:118:5: branch_false: ...to here
nbdkit-1.45.12/common/allocators/allocator.c:118:5: danger: 'kv.value' leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  116|       }
#  117|   
#  118|->     nbdkit_debug ("allocator parameter: %s=%s", kv.key, kv.value);
#  119|       if (allocator_parameters_append (params, kv) == -1) {
#  120|         nbdkit_error ("realloc: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
nbdkit-1.45.12/common/allocators/sparse.c:124:1: warning[-Wanalyzer-malloc-leak]: leak of 'new_entry.l2_dir'
nbdkit-1.45.12/common/allocators/sparse.c:489:1: enter_function: entry to 'sparse_array_blit'
nbdkit-1.45.12/common/allocators/sparse.c:496:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/common/allocators/sparse.c:501:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:501:3: branch_true: following 'true' branch (when 'a2 != a1')...
nbdkit-1.45.12/common/allocators/sparse.c:502:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:502:3: branch_true: following 'true' branch (when the strings are equal)...
 branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:504:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/common/allocators/sparse.c:505:9: branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:505:9: call_function: calling 'lookup' from 'sparse_array_blit'
#  122|   };
#  123|   
#  124|-> DEFINE_VECTOR_TYPE (l1_dir, struct l1_entry);
#  125|   
#  126|   struct sparse_array {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
nbdkit-1.45.12/common/allocators/sparse.c:202:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_entry.l2_dir'
nbdkit-1.45.12/common/allocators/sparse.c:489:1: enter_function: entry to 'sparse_array_blit'
nbdkit-1.45.12/common/allocators/sparse.c:496:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/common/allocators/sparse.c:501:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:501:3: branch_true: following 'true' branch (when 'a2 != a1')...
nbdkit-1.45.12/common/allocators/sparse.c:502:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:502:3: branch_true: following 'true' branch (when the strings are equal)...
 branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:504:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/common/allocators/sparse.c:505:9: branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:505:9: call_function: calling 'lookup' from 'sparse_array_blit'
#  200|         /* Insert new entry before i'th directory entry. */
#  201|         if (l1_dir_insert (&sa->l1_dir, *entry, i) == -1) {
#  202|->         nbdkit_error ("realloc: %m");
#  203|           return -1;
#  204|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
nbdkit-1.45.12/common/allocators/sparse.c:220:5: warning[-Wanalyzer-malloc-leak]: leak of 'new_entry.l2_dir'
nbdkit-1.45.12/common/allocators/sparse.c:489:1: enter_function: entry to 'sparse_array_blit'
nbdkit-1.45.12/common/allocators/sparse.c:496:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/common/allocators/sparse.c:501:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:501:3: branch_true: following 'true' branch (when 'a2 != a1')...
nbdkit-1.45.12/common/allocators/sparse.c:502:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:502:3: branch_true: following 'true' branch (when the strings are equal)...
 branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:504:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/common/allocators/sparse.c:505:9: branch_true: ...to here
nbdkit-1.45.12/common/allocators/sparse.c:505:9: call_function: calling 'lookup' from 'sparse_array_blit'
#  218|     /* Insert new entry at the end. */
#  219|     if (l1_dir_append (&sa->l1_dir, *entry) == -1) {
#  220|->     nbdkit_error ("realloc: %m");
#  221|       return -1;
#  222|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
nbdkit-1.45.12/common/allocators/zstd.c:88:1: warning[-Wanalyzer-malloc-leak]: leak of 'new_entry.l2_dir'
nbdkit-1.45.12/common/allocators/zstd.c:507:1: enter_function: entry to 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:513:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/common/allocators/zstd.c:514:22: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:518:3: branch_true: following 'true' branch (when 'a2 != a1')...
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: following 'true' branch (when the strings are equal)...
nbdkit-1.45.12/common/allocators/zstd.c:521:10: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:522:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:527:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/common/allocators/zstd.c:528:9: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:528:9: call_function: calling 'lookup_decompress' from 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:528:9: return_function: returning to 'zstd_array_blit' from 'lookup_decompress'
nbdkit-1.45.12/common/allocators/zstd.c:536:8: branch_false: following 'false' branch...
nbdkit-1.45.12/common/allocators/zstd.c:539:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:539:9: call_function: calling 'compress' from 'zstd_array_blit'
#   86|   };
#   87|   
#   88|-> DEFINE_VECTOR_TYPE (l1_dir, struct l1_entry);
#   89|   
#   90|   struct zstd_array {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
nbdkit-1.45.12/common/allocators/zstd.c:177:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_entry.l2_dir'
nbdkit-1.45.12/common/allocators/zstd.c:507:1: enter_function: entry to 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:513:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/common/allocators/zstd.c:514:22: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:518:3: branch_true: following 'true' branch (when 'a2 != a1')...
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: following 'true' branch (when the strings are equal)...
nbdkit-1.45.12/common/allocators/zstd.c:521:10: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:522:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:527:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/common/allocators/zstd.c:528:9: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:528:9: call_function: calling 'lookup_decompress' from 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:528:9: return_function: returning to 'zstd_array_blit' from 'lookup_decompress'
nbdkit-1.45.12/common/allocators/zstd.c:536:8: branch_false: following 'false' branch...
nbdkit-1.45.12/common/allocators/zstd.c:539:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:539:9: call_function: calling 'compress' from 'zstd_array_blit'
#  175|         /* Insert new entry before i'th directory entry. */
#  176|         if (l1_dir_insert (&za->l1_dir, *entry, i) == -1) {
#  177|->         nbdkit_error ("realloc: %m");
#  178|           return -1;
#  179|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
nbdkit-1.45.12/common/allocators/zstd.c:195:5: warning[-Wanalyzer-malloc-leak]: leak of 'new_entry.l2_dir'
nbdkit-1.45.12/common/allocators/zstd.c:507:1: enter_function: entry to 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:513:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/common/allocators/zstd.c:514:22: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:518:3: branch_true: following 'true' branch (when 'a2 != a1')...
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: following 'true' branch (when the strings are equal)...
nbdkit-1.45.12/common/allocators/zstd.c:521:10: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:522:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:527:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/common/allocators/zstd.c:528:9: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:528:9: call_function: calling 'lookup_decompress' from 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:528:9: return_function: returning to 'zstd_array_blit' from 'lookup_decompress'
nbdkit-1.45.12/common/allocators/zstd.c:536:8: branch_false: following 'false' branch...
nbdkit-1.45.12/common/allocators/zstd.c:539:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:539:9: call_function: calling 'compress' from 'zstd_array_blit'
#  193|     /* Insert new entry at the end. */
#  194|     if (l1_dir_append (&za->l1_dir, *entry) == -1) {
#  195|->     nbdkit_error ("realloc: %m");
#  196|       return -1;
#  197|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
nbdkit-1.45.12/common/allocators/zstd.c:322:9: warning[-Wanalyzer-malloc-leak]: leak of 'page'
nbdkit-1.45.12/common/allocators/zstd.c:507:1: enter_function: entry to 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:513:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/common/allocators/zstd.c:514:22: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:518:3: branch_true: following 'true' branch (when 'a2 != a1')...
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: following 'true' branch (when the strings are equal)...
nbdkit-1.45.12/common/allocators/zstd.c:521:10: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:522:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:527:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/common/allocators/zstd.c:528:9: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:528:9: call_function: calling 'lookup_decompress' from 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:528:9: return_function: returning to 'zstd_array_blit' from 'lookup_decompress'
nbdkit-1.45.12/common/allocators/zstd.c:536:8: branch_false: following 'false' branch...
nbdkit-1.45.12/common/allocators/zstd.c:539:9: branch_false: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:539:9: call_function: calling 'compress' from 'zstd_array_blit'
#  320|         return -1;
#  321|       }
#  322|->     n = ZSTD_compressCCtx (za->zcctx, page, n,
#  323|                              buf, ZSTD_PAGE, ZSTD_CLEVEL_DEFAULT);
#  324|       if (ZSTD_isError (n)) {

Error: CPPCHECK_WARNING (CWE-401): [#def14]
nbdkit-1.45.12/common/allocators/zstd.c:328: error[memleakOnRealloc]: Common realloc mistake: 'page' nulled but not freed upon failure
#  326|         return -1;
#  327|       }
#  328|->     page = realloc (page, n);
#  329|       assert (page != NULL);
#  330|       l2_dir[o].page = page;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
nbdkit-1.45.12/common/allocators/zstd.c:536:9: warning[-Wanalyzer-malloc-leak]: leak of 'tbuf'
nbdkit-1.45.12/common/allocators/zstd.c:507:1: enter_function: entry to 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:513:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/common/allocators/zstd.c:514:22: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:518:3: branch_true: following 'true' branch (when 'a2 != a1')...
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:519:3: branch_true: following 'true' branch (when the strings are equal)...
nbdkit-1.45.12/common/allocators/zstd.c:521:10: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:521:10: acquire_memory: allocated here
nbdkit-1.45.12/common/allocators/zstd.c:522:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:527:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/common/allocators/zstd.c:528:9: branch_true: ...to here
nbdkit-1.45.12/common/allocators/zstd.c:528:9: call_function: calling 'lookup_decompress' from 'zstd_array_blit'
nbdkit-1.45.12/common/allocators/zstd.c:528:9: return_function: returning to 'zstd_array_blit' from 'lookup_decompress'
nbdkit-1.45.12/common/allocators/zstd.c:536:9: danger: 'tbuf' leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  534|        * the right place in za2.
#  535|        */
#  536|->     if (a1->f->read (a1, p, n, offset1) == -1)
#  537|         return -1;
#  538|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def16]
nbdkit-1.45.12/common/include/tvdiff.h:48:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*start_t.tv_sec'
nbdkit-1.45.12/plugins/vddk/vddk.c:713:1: enter_function: entry to 'vddk_open'
nbdkit-1.45.12/plugins/vddk/vddk.c:715:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/plugins/vddk/vddk.c:722:7: branch_true: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:723:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/vddk/vddk.c:727:3: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:770:3: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:772:3: branch_true: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:775:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:780:7: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:816:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:817:5: branch_true: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:817:5: call_function: calling 'update_stats' from 'vddk_open'
nbdkit-1.45.12/plugins/vddk/vddk.c:817:5: return_function: returning to 'vddk_open' from 'update_stats'
nbdkit-1.45.12/plugins/vddk/vddk.c:914:3: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:914:3: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:916:3: call_function: calling 'update_stats' from 'vddk_open'
#   46|     int64_t usec;
#   47|   
#   48|->   usec = (y->tv_sec - x->tv_sec) * 1000000;
#   49|     usec += y->tv_usec - x->tv_usec;
#   50|     return usec;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def17]
nbdkit-1.45.12/common/regions/regions.c:97:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nbdkit-1.45.12/common/regions/regions.c:176:1: enter_function: entry to 'append_region_end'
nbdkit-1.45.12/common/regions/regions.c:185:3: acquire_resource: 'va_start' called here
nbdkit-1.45.12/common/regions/regions.c:187:7: call_function: calling 'append_region_va' from 'append_region_end'
#   95|   
#   96|     if (regions_append (rs, region) == -1) {
#   97|->     nbdkit_error ("realloc: %m");
#   98|       return -1;
#   99|     }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def18]
nbdkit-1.45.12/common/regions/regions.h:76:1: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nbdkit-1.45.12/common/regions/regions.c:176:1: enter_function: entry to 'append_region_end'
nbdkit-1.45.12/common/regions/regions.c:185:3: acquire_resource: 'va_start' called here
nbdkit-1.45.12/common/regions/regions.c:187:7: call_function: calling 'append_region_va' from 'append_region_end'
#   74|   
#   75|   /* Vector of struct region. */
#   76|-> DEFINE_VECTOR_TYPE (regions, struct region);
#   77|   
#   78|   extern void init_regions (regions *regions)

Error: CPPCHECK_WARNING (CWE-476): [#def19]
nbdkit-1.45.12/common/utils/const-string-vector.h:40: error[ctunullpointer]: Null pointer dereference: key
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_VECTOR_TYPE (const_string_vector, const char *);
#   41|   
#   42|   /* This frees only the array. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
nbdkit-1.45.12/common/utils/environ.c:66:7: warning[-Wanalyzer-malloc-leak]: leak of 's'
nbdkit-1.45.12/common/utils/environ.c:50:1: enter_function: entry to 'copy_environ'
nbdkit-1.45.12/common/utils/environ.c:59:15: branch_true: following 'true' branch...
nbdkit-1.45.12/common/utils/environ.c:60:9: branch_true: ...to here
nbdkit-1.45.12/common/utils/environ.c:60:9: acquire_memory: allocated here
nbdkit-1.45.12/common/utils/environ.c:61:8: branch_false: following 'false' branch...
nbdkit-1.45.12/common/utils/environ.c:65:9: branch_false: ...to here
nbdkit-1.45.12/common/utils/environ.c:65:9: call_function: calling 'string_vector_append' from 'copy_environ'
nbdkit-1.45.12/common/utils/environ.c:65:9: return_function: returning to 'copy_environ' from 'string_vector_append'
nbdkit-1.45.12/common/utils/environ.c:65:8: branch_true: following 'true' branch...
nbdkit-1.45.12/common/utils/environ.c:66:7: branch_true: ...to here
nbdkit-1.45.12/common/utils/environ.c:66:7: danger: 's' leaks here; was allocated at [(4)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/3)
#   64|       }
#   65|       if (string_vector_append (&ret, s) == -1) {
#   66|->       nbdkit_error ("realloc: %m");
#   67|         goto error;
#   68|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def21]
nbdkit-1.45.12/common/utils/environ.c:76:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nbdkit-1.45.12/common/utils/environ.c:59:15: branch_false: following 'false' branch...
nbdkit-1.45.12/common/utils/environ.c:72:3: branch_false: ...to here
nbdkit-1.45.12/common/utils/environ.c:72:3: acquire_resource: 'va_start' called here
nbdkit-1.45.12/common/utils/environ.c:73:10: branch_true: following 'true' branch (when 'key' is non-NULL)...
nbdkit-1.45.12/common/utils/environ.c:74:5: branch_true: ...to here
nbdkit-1.45.12/common/utils/environ.c:75:8: branch_true: following 'true' branch...
nbdkit-1.45.12/common/utils/environ.c:76:7: branch_true: ...to here
nbdkit-1.45.12/common/utils/environ.c:76:7: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   74|       value = va_arg (argp, const char *);
#   75|       if (asprintf (&s, "%s=%s", key, value) == -1) {
#   76|->       nbdkit_error ("asprintf: %m");
#   77|         va_end (argp);
#   78|         goto error;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def22]
nbdkit-1.45.12/common/utils/environ.c:94:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nbdkit-1.45.12/common/utils/environ.c:50:1: enter_function: entry to 'copy_environ'
nbdkit-1.45.12/common/utils/environ.c:59:15: branch_false: following 'false' branch...
nbdkit-1.45.12/common/utils/environ.c:72:3: branch_false: ...to here
nbdkit-1.45.12/common/utils/environ.c:72:3: acquire_resource: 'va_start' called here
nbdkit-1.45.12/common/utils/environ.c:73:10: branch_true: following 'true' branch (when 'key' is non-NULL)...
nbdkit-1.45.12/common/utils/environ.c:74:5: branch_true: ...to here
nbdkit-1.45.12/common/utils/environ.c:75:8: branch_false: following 'false' branch...
nbdkit-1.45.12/common/utils/environ.c:82:11: branch_false: ...to here
nbdkit-1.45.12/common/utils/environ.c:83:17: branch_false: following 'false' branch...
nbdkit-1.45.12/common/utils/environ.c:93:9: branch_false: ...to here
nbdkit-1.45.12/common/utils/environ.c:93:9: call_function: calling 'string_vector_append' from 'copy_environ'
nbdkit-1.45.12/common/utils/environ.c:93:9: return_function: returning to 'copy_environ' from 'string_vector_append'
nbdkit-1.45.12/common/utils/environ.c:93:8: branch_true: following 'true' branch...
nbdkit-1.45.12/common/utils/environ.c:94:7: branch_true: ...to here
nbdkit-1.45.12/common/utils/environ.c:94:7: danger: missing call to 'va_end' to match 'va_start' at [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3)
#   92|       /* Else, append a new key. */
#   93|       if (string_vector_append (&ret, s) == -1) {
#   94|->       nbdkit_error ("realloc: %m");
#   95|         va_end (argp);
#   96|         free (s);

Error: CPPCHECK_WARNING (CWE-476): [#def23]
nbdkit-1.45.12/common/utils/nbdkit-string.h:40: error[ctunullpointer]: Null pointer dereference: key
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_VECTOR_TYPE (string, char);
#   41|   #define CLEANUP_FREE_STRING __attribute__ ((cleanup (string_reset)))
#   42|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
nbdkit-1.45.12/common/utils/nbdkit-string.h:40:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&cmdline_file, 524288)'
nbdkit-1.45.12/plugins/vddk/reexec.c:63:1: enter_function: entry to 'perform_reexec'
nbdkit-1.45.12/plugins/vddk/reexec.c:82:8: acquire_resource: opened here
nbdkit-1.45.12/plugins/vddk/reexec.c:83:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/reexec.c:92:9: call_function: inlined call to 'string_reserve' from 'perform_reexec'
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_VECTOR_TYPE (string, char);
#   41|   #define CLEANUP_FREE_STRING __attribute__ ((cleanup (string_reset)))
#   42|   

Error: CPPCHECK_WARNING (CWE-476): [#def25]
nbdkit-1.45.12/common/utils/string-vector.h:40: error[ctunullpointer]: Null pointer dereference: key
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_POINTER_VECTOR_TYPE (string_vector, char *);
#   41|   
#   42|   /* This frees both the array and the strings. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
nbdkit-1.45.12/common/utils/string-vector.h:40:1: warning[-Wanalyzer-malloc-leak]: leak of 's'
nbdkit-1.45.12/common/utils/environ.c:50:1: enter_function: entry to 'copy_environ'
nbdkit-1.45.12/common/utils/environ.c:59:15: branch_true: following 'true' branch...
nbdkit-1.45.12/common/utils/environ.c:60:9: branch_true: ...to here
nbdkit-1.45.12/common/utils/environ.c:60:9: acquire_memory: allocated here
nbdkit-1.45.12/common/utils/environ.c:61:8: branch_false: following 'false' branch...
nbdkit-1.45.12/common/utils/environ.c:65:9: branch_false: ...to here
nbdkit-1.45.12/common/utils/environ.c:65:9: call_function: calling 'string_vector_append' from 'copy_environ'
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_POINTER_VECTOR_TYPE (string_vector, char *);
#   41|   
#   42|   /* This frees both the array and the strings. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
nbdkit-1.45.12/common/utils/string-vector.h:40:1: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
nbdkit-1.45.12/server/public.c:1156:1: enter_function: entry to ‘nbdkit_strdup_intern’
nbdkit-1.45.12/server/public.c:1160:6: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nbdkit-1.45.12/server/public.c:1166:10: branch_false: ...to here
nbdkit-1.45.12/server/public.c:1166:10: acquire_memory: allocated here
nbdkit-1.45.12/server/public.c:1167:6: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
nbdkit-1.45.12/server/public.c:1172:10: branch_false: ...to here
nbdkit-1.45.12/server/public.c:1172:10: call_function: calling ‘add_intern’ from ‘nbdkit_strdup_intern’
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_POINTER_VECTOR_TYPE (string_vector, char *);
#   41|   
#   42|   /* This frees both the array and the strings. */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def28]
nbdkit-1.45.12/common/utils/string-vector.h:40:1: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nbdkit-1.45.12/common/utils/environ.c:50:1: enter_function: entry to 'copy_environ'
nbdkit-1.45.12/common/utils/environ.c:59:15: branch_false: following 'false' branch...
nbdkit-1.45.12/common/utils/environ.c:72:3: branch_false: ...to here
nbdkit-1.45.12/common/utils/environ.c:72:3: acquire_resource: 'va_start' called here
nbdkit-1.45.12/common/utils/environ.c:73:10: branch_true: following 'true' branch (when 'key' is non-NULL)...
nbdkit-1.45.12/common/utils/environ.c:74:5: branch_true: ...to here
nbdkit-1.45.12/common/utils/environ.c:75:8: branch_false: following 'false' branch...
nbdkit-1.45.12/common/utils/environ.c:82:11: branch_false: ...to here
nbdkit-1.45.12/common/utils/environ.c:83:17: branch_false: following 'false' branch...
nbdkit-1.45.12/common/utils/environ.c:93:9: branch_false: ...to here
nbdkit-1.45.12/common/utils/environ.c:93:9: call_function: calling 'string_vector_append' from 'copy_environ'
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_POINTER_VECTOR_TYPE (string_vector, char *);
#   41|   
#   42|   /* This frees both the array and the strings. */

Error: CPPCHECK_WARNING (CWE-457): [#def29]
nbdkit-1.45.12/common/utils/vector.c:72: error[uninitvar]: Uninitialized variable: newbytes
#   70|         ADD_OVERFLOW (v->cap, t/2, &newcap) ||
#   71|         MUL_OVERFLOW (newcap, itemsize, &newbytes) ||
#   72|->       newbytes < reqbytes) {
#   73|       /* If that either overflows or is less than the minimum requested,
#   74|        * fall back to the requested capacity.

Error: CPPCHECK_WARNING (CWE-457): [#def30]
nbdkit-1.45.12/common/utils/vector.c:72: error[uninitvar]: Uninitialized variable: reqbytes
#   70|         ADD_OVERFLOW (v->cap, t/2, &newcap) ||
#   71|         MUL_OVERFLOW (newcap, itemsize, &newbytes) ||
#   72|->       newbytes < reqbytes) {
#   73|       /* If that either overflows or is less than the minimum requested,
#   74|        * fall back to the requested capacity.

Error: CPPCHECK_WARNING (CWE-457): [#def31]
nbdkit-1.45.12/common/utils/vector.c:76: error[uninitvar]: Uninitialized variable: reqcap
#   74|        * fall back to the requested capacity.
#   75|        */
#   76|->     newcap = reqcap;
#   77|       newbytes = reqbytes;
#   78|     }

Error: CPPCHECK_WARNING (CWE-457): [#def32]
nbdkit-1.45.12/common/utils/vector.c:80: warning[uninitvar]: Uninitialized variable: newcap
#   78|     }
#   79|   
#   80|->   *newcap_r = newcap;
#   81|     *newbytes_r = newbytes;
#   82|     return 0;

Error: CPPCHECK_WARNING (CWE-476): [#def33]
nbdkit-1.45.12/contrib/sparseloadtest.c:364: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  362|   
#  363|       data = malloc (sizeof *data); /* freed in callback */
#  364|->     data->count = count;
#  365|   
#  366|       if (pc_read_actual < pc_read) { /* read op */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
nbdkit-1.45.12/contrib/sparseloadtest.c:364:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
nbdkit-1.45.12/contrib/sparseloadtest.c:339:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
nbdkit-1.45.12/contrib/sparseloadtest.c:363:12: acquire_memory: this call could return NULL
nbdkit-1.45.12/contrib/sparseloadtest.c:364:5: danger: ‘data’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  362|   
#  363|       data = malloc (sizeof *data); /* freed in callback */
#  364|->     data->count = count;
#  365|   
#  366|       if (pc_read_actual < pc_read) { /* read op */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
nbdkit-1.45.12/contrib/sparseloadtest.c:368:11: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
nbdkit-1.45.12/contrib/sparseloadtest.c:339:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
nbdkit-1.45.12/contrib/sparseloadtest.c:363:12: acquire_memory: allocated here
nbdkit-1.45.12/contrib/sparseloadtest.c:366:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/contrib/sparseloadtest.c:367:21: branch_true: ...to here
nbdkit-1.45.12/contrib/sparseloadtest.c:368:11: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  366|       if (pc_read_actual < pc_read) { /* read op */
#  367|         data->stats = &thread_data->read_stats;
#  368|->       r = nbd_aio_pread (nbd, sink, count, offset,
#  369|                            (nbd_completion_callback) {
#  370|                              .callback = cb,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
nbdkit-1.45.12/contrib/sparseloadtest.c:377:13: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
nbdkit-1.45.12/contrib/sparseloadtest.c:339:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
nbdkit-1.45.12/contrib/sparseloadtest.c:363:12: acquire_memory: allocated here
nbdkit-1.45.12/contrib/sparseloadtest.c:366:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/contrib/sparseloadtest.c:375:11: branch_false: ...to here
nbdkit-1.45.12/contrib/sparseloadtest.c:375:10: branch_true: following ‘true’ branch...
nbdkit-1.45.12/contrib/sparseloadtest.c:376:23: branch_true: ...to here
nbdkit-1.45.12/contrib/sparseloadtest.c:377:13: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  375|         if (xrandom (&thread_data->state) & 1) { /* write op */
#  376|           data->stats = &thread_data->write_stats;
#  377|->         r = nbd_aio_pwrite (nbd, wrbuf, count, offset,
#  378|                               (nbd_completion_callback) {
#  379|                                 .callback = cb,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
nbdkit-1.45.12/contrib/sparseloadtest.c:385:13: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
nbdkit-1.45.12/contrib/sparseloadtest.c:339:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
nbdkit-1.45.12/contrib/sparseloadtest.c:363:12: acquire_memory: allocated here
nbdkit-1.45.12/contrib/sparseloadtest.c:366:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/contrib/sparseloadtest.c:375:11: branch_false: ...to here
nbdkit-1.45.12/contrib/sparseloadtest.c:375:10: branch_false: following ‘false’ branch...
nbdkit-1.45.12/contrib/sparseloadtest.c:384:23: branch_false: ...to here
nbdkit-1.45.12/contrib/sparseloadtest.c:385:13: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  383|         else {                    /* trim op */
#  384|           data->stats = &thread_data->trim_stats;
#  385|->         r = nbd_aio_trim (nbd, count, offset,
#  386|                             (nbd_completion_callback) {
#  387|                               .callback = cb,

Error: CPPCHECK_WARNING (CWE-401): [#def38]
nbdkit-1.45.12/filters/bzip2/bzip2.c:198: error[memleak]: Memory leak: in_block
#  196|     if (!out_block) {
#  197|       nbdkit_error ("malloc: %m");
#  198|->     return -1;
#  199|     }
#  200|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
nbdkit-1.45.12/filters/bzip2/bzip2.c:209:11: warning[-Wanalyzer-malloc-leak]: leak of 'in_block'
nbdkit-1.45.12/filters/bzip2/bzip2.c:140:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:143:21: branch_true: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:144:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:148:12: branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:172:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:177:3: branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:185:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:190:14: branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:190:14: acquire_memory: allocated here
nbdkit-1.45.12/filters/bzip2/bzip2.c:191:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:195:15: branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:196:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:205:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:209:11: danger: 'in_block' leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  207|         int err = 0;
#  208|   
#  209|->       if (next->pread (next, in_block, (uint32_t)n, total, 0,
#  210|                          &err) == -1) {
#  211|           errno = err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
nbdkit-1.45.12/filters/bzip2/bzip2.c:209:11: warning[-Wanalyzer-malloc-leak]: leak of 'out_block'
nbdkit-1.45.12/filters/bzip2/bzip2.c:140:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:143:21: branch_true: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:144:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:148:12: branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:172:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:177:3: branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:185:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:190:14: branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:191:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:195:15: branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:195:15: acquire_memory: allocated here
nbdkit-1.45.12/filters/bzip2/bzip2.c:196:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/bzip2/bzip2.c:205:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/bzip2/bzip2.c:209:11: danger: 'out_block' leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  207|         int err = 0;
#  208|   
#  209|->       if (next->pread (next, in_block, (uint32_t)n, total, 0,
#  210|                          &err) == -1) {
#  211|           errno = err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
nbdkit-1.45.12/filters/cache/cache.c:457:8: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/cache/cache.c:437:1: enter_function: entry to 'cache_pwrite'
nbdkit-1.45.12/filters/cache/cache.c:446:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cache/cache.c:447:13: branch_true: ...to here
nbdkit-1.45.12/filters/cache/cache.c:447:13: acquire_memory: allocated here
nbdkit-1.45.12/filters/cache/cache.c:448:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cache/cache.c:455:7: branch_false: ...to here
nbdkit-1.45.12/filters/cache/cache.c:455:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cache/cache.c:456:8: branch_true: ...to here
nbdkit-1.45.12/filters/cache/cache.c:455:7: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cache/cache.c:457:8: branch_false: ...to here
nbdkit-1.45.12/filters/cache/cache.c:457:8: danger: 'block' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  455|     if ((flags & NBDKIT_FLAG_FUA) &&
#  456|         (cache_mode == CACHE_MODE_UNSAFE ||
#  457|->        next->can_fua (next) == NBDKIT_FUA_EMULATE)) {
#  458|       flags &= ~NBDKIT_FLAG_FUA;
#  459|       need_flush = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
nbdkit-1.45.12/filters/cache/cache.c:548:8: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/cache/cache.c:533:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cache/cache.c:538:11: branch_false: ...to here
nbdkit-1.45.12/filters/cache/cache.c:538:11: acquire_memory: allocated here
nbdkit-1.45.12/filters/cache/cache.c:539:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cache/cache.c:545:3: branch_false: ...to here
nbdkit-1.45.12/filters/cache/cache.c:546:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cache/cache.c:547:8: branch_true: ...to here
nbdkit-1.45.12/filters/cache/cache.c:546:7: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cache/cache.c:548:8: branch_false: ...to here
nbdkit-1.45.12/filters/cache/cache.c:548:8: danger: 'block' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  546|     if ((flags & NBDKIT_FLAG_FUA) &&
#  547|         (cache_mode == CACHE_MODE_UNSAFE ||
#  548|->        next->can_fua (next) == NBDKIT_FUA_EMULATE)) {
#  549|       flags &= ~NBDKIT_FLAG_FUA;
#  550|       need_flush = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
nbdkit-1.45.12/filters/cache/cache.c:623:25: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/cache/cache.c:628:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cache/cache.c:631:3: branch_false: ...to here
nbdkit-1.45.12/filters/cache/cache.c:631:3: branch_true: following 'true' branch (when 'flags == 0')...
nbdkit-1.45.12/filters/cache/cache.c:634:11: branch_true: ...to here
nbdkit-1.45.12/filters/cache/cache.c:634:11: acquire_memory: allocated here
nbdkit-1.45.12/filters/cache/cache.c:635:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cache/cache.c:640:3: branch_false: ...to here
nbdkit-1.45.12/filters/cache/cache.c:648:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/filters/cache/cache.c:649:5: branch_true: ...to here
nbdkit-1.45.12/filters/cache/cache.c:623:25: danger: 'block' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  621|                uint32_t flags, int *err)
#  622|   {
#  623|->   CLEANUP_FREE uint8_t *block = NULL;
#  624|     struct flush_data data =
#  625|       { .errors = 0, .first_errno = 0, .next = next };

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
nbdkit-1.45.12/filters/cache/cache.c:693:25: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/cache/cache.c:689:1: enter_function: entry to 'cache_cache'
nbdkit-1.45.12/filters/cache/cache.c:698:3: branch_true: following 'true' branch (when 'flags == 0')...
nbdkit-1.45.12/filters/cache/cache.c:699:11: branch_true: ...to here
nbdkit-1.45.12/filters/cache/cache.c:699:11: acquire_memory: allocated here
nbdkit-1.45.12/filters/cache/cache.c:700:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cache/cache.c:706:3: branch_false: ...to here
nbdkit-1.45.12/filters/cache/cache.c:717:10: branch_false: following 'false' branch (when 'remaining == 0')...
nbdkit-1.45.12/filters/cache/cache.c:693:25: branch_false: ...to here
nbdkit-1.45.12/filters/cache/cache.c:693:25: danger: 'block' leaks here; was allocated at [(4)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/3)
#  691|                uint32_t flags, int *err)
#  692|   {
#  693|->   CLEANUP_FREE uint8_t *block = NULL;
#  694|     uint64_t blknum, blkoffs;
#  695|     int r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:136:7: warning[-Wanalyzer-malloc-leak]: leak of 'expected'
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:128:14: acquire_memory: allocated here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:129:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:136:7: branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:136:7: danger: 'expected' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  134|   
#  135|     /* Read underlying plugin data into the buffer. */
#  136|->   if (next->pread (next, expected, count, offset, 0, err) == -1)
#  137|       return -1;
#  138|   

Error: CPPCHECK_WARNING (CWE-401): [#def46]
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:137: error[memleak]: Memory leak: expected
#  135|     /* Read underlying plugin data into the buffer. */
#  136|     if (next->pread (next, expected, count, offset, 0, err) == -1)
#  137|->     return -1;
#  138|   
#  139|     /* If data written doesn't match data expected, inject EIO. */

Error: CPPCHECK_WARNING (CWE-401): [#def47]
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:141: error[memleak]: Memory leak: expected
#  139|     /* If data written doesn't match data expected, inject EIO. */
#  140|     if (memcmp (buf, expected, count) != 0)
#  141|->     return data_does_not_match (err);
#  142|   
#  143|     return 0;

Error: CPPCHECK_WARNING (CWE-401): [#def48]
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:143: error[memleak]: Memory leak: expected
#  141|       return data_does_not_match (err);
#  142|   
#  143|->   return 0;
#  144|   }
#  145|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:206:13: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:169:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:172:7: branch_true: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:173:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:176:9: branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:177:17: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:178:38: branch_true: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:182:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:191:11: branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:191:10: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:195:14: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:196:25: branch_true: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:199:34: acquire_memory: allocated here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:200:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:206:13: branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:206:13: danger: 'buf' leaks here; was allocated at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#  204|           }
#  205|   
#  206|->         if (next->pread (next, buf, buflen, offset, 0, err) == -1)
#  207|             return -1;
#  208|           if (! is_zero (buf, buflen))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:228:24: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:169:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:230:9: branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:230:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:234:19: branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:234:11: acquire_memory: allocated here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:235:8: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:241:12: branch_false: following 'false' branch (when 'count == 0')...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:228:24: branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:228:24: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  226|      */
#  227|     else {
#  228|->     CLEANUP_FREE char *buf;
#  229|   
#  230|       if (flags & NBDKIT_FLAG_FAST_ZERO) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:244:11: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:169:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:230:9: branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:230:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:234:19: branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:234:11: acquire_memory: allocated here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:235:8: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:241:12: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:242:20: branch_true: ...to here
nbdkit-1.45.12/filters/checkwrite/checkwrite.c:244:11: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  242|         uint32_t n = MIN (MAX_REQUEST_SIZE, count);
#  243|   
#  244|->       if (next->pread (next, buf, n, offset, 0, err) == -1)
#  245|           return -1;
#  246|         if (! is_zero (buf, n))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
nbdkit-1.45.12/filters/cow/blk.c:188:13: warning[-Wanalyzer-malloc-leak]: leak of 'filename'
nbdkit-1.45.12/filters/cow/blk.c:165:1: enter_function: entry to 'blk_create'
nbdkit-1.45.12/filters/cow/blk.c:171:6: branch_false: following 'false' branch (when 'blk' is non-NULL)...
nbdkit-1.45.12/filters/cow/blk.c:176:3: branch_false: ...to here
nbdkit-1.45.12/filters/cow/blk.c:178:3: call_function: calling 'bitmap_init' from 'blk_create'
nbdkit-1.45.12/filters/cow/blk.c:178:3: return_function: returning to 'blk_create' from 'bitmap_init'
nbdkit-1.45.12/filters/cow/blk.c:180:14: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/blk.c:181:6: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nbdkit-1.45.12/filters/cow/blk.c:188:13: branch_false: ...to here
nbdkit-1.45.12/filters/cow/blk.c:188:13: danger: 'filename' leaks here; was allocated at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
#  186|   
#  187|   #ifdef HAVE_MKOSTEMP
#  188|->   blk->fd = mkostemp (filename, O_CLOEXEC);
#  189|   #else
#  190|     /* Not atomic, but this is only invoked during .load, so the race

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
nbdkit-1.45.12/filters/cow/cow.c:191:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/cow/cow.c:181:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/cow.c:182:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:192:17: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cow/cow.c:193:19: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:200:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:191:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  189|       size_t i;
#  190|   
#  191|->     ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&blk_list_lock);
#  192|       for (i = 0; i < blks.len; ++i) {
#  193|         if (strcmp (blks.ptr[i].exportname, exportname) == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
nbdkit-1.45.12/filters/cow/cow.c:209:32: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(exportname)'
nbdkit-1.45.12/filters/cow/cow.c:182:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:200:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cow/cow.c:203:30: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:203:30: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/cow.c:204:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:209:32: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:209:32: danger: 'strdup(exportname)' leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  207|           return NULL;
#  208|         }
#  209|->       h->blk = new_entry.blk = blk_create ();
#  210|         if (new_entry.blk == NULL) {
#  211|           free (new_entry.exportname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
nbdkit-1.45.12/filters/cow/cow.c:227:6: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/cow/cow.c:181:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/cow.c:182:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:192:17: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cow/cow.c:193:19: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:200:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:227:6: branch_true: following 'true' branch...
 branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:227:6: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  225|   
#  226|     /* Always pass readonly=1 to the underlying plugin. */
#  227|->   if (next (nxdata, 1, exportname) == -1)
#  228|       return NULL;
#  229|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
nbdkit-1.45.12/filters/cow/cow.c:227:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/cow/cow.c:181:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/cow.c:182:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:192:17: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cow/cow.c:193:19: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:200:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:191:5: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:227:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  225|   
#  226|     /* Always pass readonly=1 to the underlying plugin. */
#  227|->   if (next (nxdata, 1, exportname) == -1)
#  228|       return NULL;
#  229|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
nbdkit-1.45.12/filters/cow/cow.c:370:25: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/cow/cow.c:365:1: enter_function: entry to 'cow_pread'
nbdkit-1.45.12/filters/cow/cow.c:374:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cow/cow.c:375:13: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:375:13: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/cow.c:376:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:383:3: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:387:6: branch_false: following 'false' branch (when 'blkoffs == 0')...
nbdkit-1.45.12/filters/cow/cow.c:404:14: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:418:6: branch_false: following 'false' branch (when 'count == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:370:25: danger: 'block' leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  368|   {
#  369|     struct handle *h = handle;
#  370|->   CLEANUP_FREE uint8_t *block = NULL;
#  371|     uint64_t blknum, blkoffs, nrblocks;
#  372|     int r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
nbdkit-1.45.12/filters/cow/cow.c:437:25: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/cow/cow.c:432:1: enter_function: entry to 'cow_pwrite'
nbdkit-1.45.12/filters/cow/cow.c:441:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cow/cow.c:442:13: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:442:13: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/cow.c:443:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:450:3: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:454:6: branch_false: following 'false' branch (when 'blkoffs == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:489:6: branch_false: following 'false' branch (when 'count == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:437:25: danger: 'block' leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  435|   {
#  436|     struct handle *h = handle;
#  437|->   CLEANUP_FREE uint8_t *block = NULL;
#  438|     uint64_t blknum, blkoffs;
#  439|     int r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
nbdkit-1.45.12/filters/cow/cow.c:513:25: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/cow/cow.c:520:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:525:11: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:525:11: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/cow.c:526:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:532:3: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:536:6: branch_false: following 'false' branch (when 'blkoffs == 0')...
nbdkit-1.45.12/filters/cow/cow.c:557:7: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:573:6: branch_false: following 'false' branch (when 'count == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:513:25: danger: 'block' leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  511|   {
#  512|     struct handle *h = handle;
#  513|->   CLEANUP_FREE uint8_t *block = NULL;
#  514|     uint64_t blknum, blkoffs;
#  515|     int r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
nbdkit-1.45.12/filters/cow/cow.c:596:25: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/cow/cow.c:591:1: enter_function: entry to 'cow_trim'
nbdkit-1.45.12/filters/cow/cow.c:600:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cow/cow.c:601:13: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:601:13: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/cow.c:602:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:609:3: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:613:6: branch_false: following 'false' branch (when 'blkoffs == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:645:6: branch_false: following 'false' branch (when 'count == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:596:25: danger: 'block' leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  594|   {
#  595|     struct handle *h = handle;
#  596|->   CLEANUP_FREE uint8_t *block = NULL;
#  597|     uint64_t blknum, blkoffs;
#  598|     int r;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def61]
nbdkit-1.45.12/filters/cow/cow.c:620:9: warning[-Wanalyzer-null-argument]: use of NULL 'block' where non-null expected
nbdkit-1.45.12/filters/cow/cow.c:591:1: enter_function: entry to 'cow_trim'
nbdkit-1.45.12/filters/cow/cow.c:596:25: release_memory: 'block' is NULL
nbdkit-1.45.12/filters/cow/cow.c:600:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:609:3: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:613:6: branch_true: following 'true' branch (when 'blkoffs != 0')...
nbdkit-1.45.12/filters/cow/cow.c:614:18: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:619:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/filters/cow/cow.c:620:9: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:620:9: release_memory: 'block' is NULL
nbdkit-1.45.12/filters/cow/cow.c:620:9: danger: argument 4 ('block') NULL where non-null expected
#  618|        */
#  619|       ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&rmw_lock);
#  620|->     r = blk_read (h->blk, next, blknum, block, cow_on_read (), err);
#  621|       if (r != -1) {
#  622|         memset (&block[blkoffs], 0, n);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def62]
nbdkit-1.45.12/filters/cow/cow.c:647:9: warning[-Wanalyzer-null-argument]: use of NULL 'block' where non-null expected
nbdkit-1.45.12/filters/cow/cow.c:591:1: enter_function: entry to 'cow_trim'
nbdkit-1.45.12/filters/cow/cow.c:596:25: release_memory: 'block' is NULL
nbdkit-1.45.12/filters/cow/cow.c:600:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:609:3: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:613:6: branch_false: following 'false' branch (when 'blkoffs == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:645:6: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/filters/cow/cow.c:646:5: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:646:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/filters/cow/cow.c:647:9: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:647:9: release_memory: 'block' is NULL
nbdkit-1.45.12/filters/cow/cow.c:647:9: danger: argument 4 ('block') NULL where non-null expected
#  645|     if (count) {
#  646|       ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&rmw_lock);
#  647|->     r = blk_read (h->blk, next, blknum, block, cow_on_read (), err);
#  648|       if (r != -1) {
#  649|         memset (block, 0, count);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
nbdkit-1.45.12/filters/cow/cow.c:675:25: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/cow/cow.c:670:1: enter_function: entry to 'cow_cache'
 branch_true: following 'true' branch...
nbdkit-1.45.12/filters/cow/cow.c:694:7: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:697:3: branch_true: following 'true' branch (when 'flags == 0')...
nbdkit-1.45.12/filters/cow/cow.c:698:11: branch_true: ...to here
nbdkit-1.45.12/filters/cow/cow.c:698:11: acquire_memory: allocated here
nbdkit-1.45.12/filters/cow/cow.c:699:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/cow/cow.c:705:3: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:716:10: branch_false: following 'false' branch (when 'remaining == 0')...
nbdkit-1.45.12/filters/cow/cow.c:675:25: branch_false: ...to here
nbdkit-1.45.12/filters/cow/cow.c:675:25: danger: 'block' leaks here; was allocated at [(6)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/5)
#  673|   {
#  674|     struct handle *h = handle;
#  675|->   CLEANUP_FREE uint8_t *block = NULL;
#  676|     uint64_t blknum, blkoffs;
#  677|     int r;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:84:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'event.u.fd'
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:358:1: enter_function: entry to 'exitwhen_config'
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:365:11: branch_false: following 'false' branch (when the strings are non-equal)...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:366:7: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:365:12: branch_false: following 'false' branch (when the strings are non-equal)...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:383:12: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:383:11: branch_false: following 'false' branch (when the strings are non-equal)...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:384:12: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:383:12: branch_false: following 'false' branch (when the strings are non-equal)...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:392:12: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:400:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:404:9: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:404:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:408:18: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:408:18: acquire_resource: opened here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:409:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:416:5: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:377:9: call_function: calling 'event_list_append' from 'exitwhen_config'
#   82|     } u;
#   83|   };
#   84|-> DEFINE_VECTOR_TYPE (event_list, struct event);
#   85|   static event_list events = empty_vector;
#   86|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:396:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'event.u.fd'
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:365:11: branch_false: following 'false' branch (when the strings are non-equal)...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:366:7: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:365:12: branch_false: following 'false' branch (when the strings are non-equal)...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:383:12: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:383:11: branch_false: following 'false' branch (when the strings are non-equal)...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:384:12: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:383:12: branch_false: following 'false' branch (when the strings are non-equal)...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:392:12: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:400:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:404:9: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:404:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:408:18: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:408:18: acquire_resource: opened here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:409:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:416:5: branch_false: ...to here
nbdkit-1.45.12/filters/exitwhen/exitwhen.c:396:24: danger: 'event.u.fd' leaks here; was opened at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#  394|       uint64_t pid;
#  395|   #ifdef __linux__
#  396|->     CLEANUP_FREE char *str = NULL;
#  397|   #endif
#  398|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
nbdkit-1.45.12/filters/exportname/exportname.c:200:5: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "r")'
nbdkit-1.45.12/filters/exportname/exportname.c:179:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/exportname/exportname.c:183:3: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:186:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exportname/exportname.c:190:3: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:191:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/exportname/exportname.c:192:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exportname/exportname.c:198:7: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:199:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/exportname/exportname.c:200:5: danger: 'popen(cmd, "r")' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  198|     r = fread (buf, 1, sizeof buf, fp);
#  199|     if (r == 0 && ferror (fp)) {
#  200|->     nbdkit_debug ("fread: %m");
#  201|       pclose (fp);
#  202|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
nbdkit-1.45.12/filters/exportname/exportname.c:201:5: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "r")'
nbdkit-1.45.12/filters/exportname/exportname.c:179:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/exportname/exportname.c:183:3: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:186:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exportname/exportname.c:190:3: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:191:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/exportname/exportname.c:192:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exportname/exportname.c:198:7: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:199:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/exportname/exportname.c:201:5: danger: 'popen(cmd, "r")' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  199|     if (r == 0 && ferror (fp)) {
#  200|       nbdkit_debug ("fread: %m");
#  201|->     pclose (fp);
#  202|       return NULL;
#  203|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
nbdkit-1.45.12/filters/exportname/exportname.c:204:3: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "r")'
nbdkit-1.45.12/filters/exportname/exportname.c:179:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/exportname/exportname.c:183:3: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:186:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exportname/exportname.c:190:3: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:191:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/exportname/exportname.c:192:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exportname/exportname.c:198:7: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:204:3: danger: 'popen(cmd, "r")' leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  202|       return NULL;
#  203|     }
#  204|->   pclose (fp);
#  205|     if (r && buf[r-1] == '\n')
#  206|       r--;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
nbdkit-1.45.12/filters/exportname/exportname.c:302:13: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/exportname/exportname.c:296:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/exportname/exportname.c:297:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/exportname/exportname.c:302:13: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:302:13: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  300|     }
#  301|   
#  302|->   h->name = nbdkit_strdup_intern (exportname);
#  303|     if (h->name == NULL) {
#  304|       free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
nbdkit-1.45.12/filters/exportname/exportname.c:307:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/exportname/exportname.c:296:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/exportname/exportname.c:297:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/exportname/exportname.c:302:13: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:303:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/exportname/exportname.c:307:7: branch_false: ...to here
nbdkit-1.45.12/filters/exportname/exportname.c:307:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  305|       return NULL;
#  306|     }
#  307|->   if (next (nxdata, readonly, exportname) == -1) {
#  308|       free (h);
#  309|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
nbdkit-1.45.12/filters/ext2/ext2.c:250:19: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/ext2/ext2.c:243:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/ext2/ext2.c:244:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/ext2/ext2.c:250:19: branch_false: ...to here
nbdkit-1.45.12/filters/ext2/ext2.c:250:19: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  248|   
#  249|     /* Save the client exportname in the handle. */
#  250|->   h->exportname = nbdkit_strdup_intern (exportname);
#  251|     if (h->exportname == NULL) {
#  252|       free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
nbdkit-1.45.12/filters/ext2/io.c:213:29: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/filters/ext2/io.c:172:1: enter_function: entry to 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:180:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/ext2/io.c:183:12: call_function: inlined call to 'ext2fs_get_mem' from 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:186:3: branch_false: ...to here
nbdkit-1.45.12/filters/ext2/io.c:188:12: call_function: inlined call to 'ext2fs_get_mem' from 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:192:3: branch_false: ...to here
nbdkit-1.45.12/filters/ext2/io.c:193:12: call_function: inlined call to 'ext2fs_get_mem' from 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:213:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/ext2/io.c:213:29: branch_true: ...to here
nbdkit-1.45.12/filters/ext2/io.c:213:29: danger: '<unknown>' leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  211|        io->flags |= CHANNEL_FLAGS_DISCARD_ZEROES; */
#  212|   
#  213|->   if (flags & IO_FLAG_RW && next->can_write (next) != 1) {
#  214|       retval = EPERM;
#  215|       goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
nbdkit-1.45.12/filters/ext2/io.c:213:29: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(192)'
nbdkit-1.45.12/filters/ext2/io.c:172:1: enter_function: entry to 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:180:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/ext2/io.c:183:12: call_function: inlined call to 'ext2fs_get_mem' from 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:186:3: branch_false: ...to here
nbdkit-1.45.12/filters/ext2/io.c:188:12: call_function: inlined call to 'ext2fs_get_mem' from 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:192:3: branch_false: ...to here
nbdkit-1.45.12/filters/ext2/io.c:193:12: call_function: inlined call to 'ext2fs_get_mem' from 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:213:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/ext2/io.c:213:29: branch_true: ...to here
nbdkit-1.45.12/filters/ext2/io.c:213:29: danger: 'malloc(192)' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  211|        io->flags |= CHANNEL_FLAGS_DISCARD_ZEROES; */
#  212|   
#  213|->   if (flags & IO_FLAG_RW && next->can_write (next) != 1) {
#  214|       retval = EPERM;
#  215|       goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
nbdkit-1.45.12/filters/ext2/io.c:213:29: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(64)'
nbdkit-1.45.12/filters/ext2/io.c:172:1: enter_function: entry to 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:180:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/ext2/io.c:183:12: call_function: inlined call to 'ext2fs_get_mem' from 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:186:3: branch_false: ...to here
nbdkit-1.45.12/filters/ext2/io.c:188:12: call_function: inlined call to 'ext2fs_get_mem' from 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:192:3: branch_false: ...to here
nbdkit-1.45.12/filters/ext2/io.c:193:12: call_function: inlined call to 'ext2fs_get_mem' from 'io_open'
nbdkit-1.45.12/filters/ext2/io.c:213:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/ext2/io.c:213:29: branch_true: ...to here
nbdkit-1.45.12/filters/ext2/io.c:213:29: danger: 'malloc(64)' leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  211|        io->flags |= CHANNEL_FLAGS_DISCARD_ZEROES; */
#  212|   
#  213|->   if (flags & IO_FLAG_RW && next->can_write (next) != 1) {
#  214|       retval = EPERM;
#  215|       goto cleanup;

Error: CPPCHECK_WARNING (CWE-401): [#def75]
nbdkit-1.45.12/filters/gzip/gzip.c:197: error[memleak]: Memory leak: in_block
#  195|     if (!out_block) {
#  196|       nbdkit_error ("malloc: %m");
#  197|->     return -1;
#  198|     }
#  199|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
nbdkit-1.45.12/filters/gzip/gzip.c:206:11: warning[-Wanalyzer-malloc-leak]: leak of 'in_block'
nbdkit-1.45.12/filters/gzip/gzip.c:137:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:140:21: branch_true: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:141:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:145:12: branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:169:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:174:3: branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:184:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:189:14: branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:189:14: acquire_memory: allocated here
nbdkit-1.45.12/filters/gzip/gzip.c:190:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:194:15: branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:195:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:202:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:206:11: danger: 'in_block' leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  204|         int err = 0;
#  205|   
#  206|->       if (next->pread (next, in_block, (uint32_t)n, strm.total_in, 0,
#  207|                          &err) == -1) {
#  208|           errno = err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
nbdkit-1.45.12/filters/gzip/gzip.c:206:11: warning[-Wanalyzer-malloc-leak]: leak of 'out_block'
nbdkit-1.45.12/filters/gzip/gzip.c:137:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:140:21: branch_true: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:141:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:145:12: branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:169:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:174:3: branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:184:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:189:14: branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:190:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:194:15: branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:194:15: acquire_memory: allocated here
nbdkit-1.45.12/filters/gzip/gzip.c:195:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/gzip/gzip.c:202:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/gzip/gzip.c:206:11: danger: 'out_block' leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  204|         int err = 0;
#  205|   
#  206|->       if (next->pread (next, in_block, (uint32_t)n, strm.total_in, 0,
#  207|                          &err) == -1) {
#  208|           errno = err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:74:13: warning[-Wanalyzer-malloc-leak]: leak of 'index'
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:44:35: acquire_memory: allocated here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:45:8: branch_false: following 'false' branch (when 'index' is non-NULL)...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:47:5: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:73:12: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:74:13: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:74:13: danger: 'index' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   72|           float new_progress = (float)totin / (float)h->compressed_size;
#   73|           if (new_progress - decompression_progress > progress_print_threshold) {
#   74|->             nbdkit_debug("ig_deflate_index_extract: "
#   75|                            "total_in=%ld, compressed_size=%" PRIu64 ", "
#   76|                            "progress=%f",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:86:13: warning[-Wanalyzer-malloc-leak]: leak of 'index'
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:44:35: acquire_memory: allocated here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:45:8: branch_false: following 'false' branch (when 'index' is non-NULL)...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:47:5: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:83:12: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:85:24: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:86:13: danger: 'index' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   84|               // The final block is unlikely to align to the buf size, so carefully read the remainder
#   85|               size_t n = MIN (sizeof(buf), h->compressed_size - index->strm.total_in);
#   86|->             nbdkit_debug("ig_deflate_index_build: reading %zu bytes at offset %lu",
#   87|                            n, index->strm.total_in);
#   88|               // ORIGINAL:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:90:17: warning[-Wanalyzer-malloc-leak]: leak of 'index'
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:44:35: acquire_memory: allocated here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:45:8: branch_false: following 'false' branch (when 'index' is non-NULL)...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:47:5: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:83:12: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:85:24: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:90:17: danger: 'index' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   88|               // ORIGINAL:
#   89|               // index->strm.avail_in = fread(buf, 1, sizeof(buf), in);
#   90|->             if (next->pread (next, buf, (uint32_t)n, index->strm.total_in, 0, nbdkit_err) == -1) {
#   91|                   nbdkit_error("ig_deflate_index_build: pread failed, nbdkit_err=%d", *nbdkit_err);
#   92|                   return Z_NBDKIT_ERROR;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:91:17: warning[-Wanalyzer-malloc-leak]: leak of 'index'
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:44:35: acquire_memory: allocated here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:45:8: branch_false: following 'false' branch (when 'index' is non-NULL)...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:47:5: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:83:12: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:85:24: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:90:16: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:91:17: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:91:17: danger: 'index' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   89|               // index->strm.avail_in = fread(buf, 1, sizeof(buf), in);
#   90|               if (next->pread (next, buf, (uint32_t)n, index->strm.total_in, 0, nbdkit_err) == -1) {
#   91|->                 nbdkit_error("ig_deflate_index_build: pread failed, nbdkit_err=%d", *nbdkit_err);
#   92|                   return Z_NBDKIT_ERROR;
#   93|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:116:17: warning[-Wanalyzer-malloc-leak]: leak of 'index'
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:44:35: acquire_memory: allocated here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:45:8: branch_false: following 'false' branch (when 'index' is non-NULL)...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:47:5: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:83:12: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:85:24: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:90:16: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:94:13: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:106:16: branch_true: following 'true' branch (when 'mode == 0')...
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:112:24: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/ig_zran.c:116:17: danger: 'index' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  114|                          index->strm.next_in[0] == 0x1f ? GZIP :
#  115|                          /* else */ RAW;
#  116|->                 nbdkit_debug("ig_deflate_index_build: detected compression mode: %s (%d)",
#  117|                                mode == RAW ? "RAW" : mode == ZLIB ? "ZLIB" : "GZIP", mode);
#  118|                   index->strm.zalloc = Z_NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:195:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(gzip_index_path, "wb")'
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:158:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:160:9: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:163:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:191:9: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:194:35: acquire_resource: opened here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:195:13: danger: 'fopen(gzip_index_path, "wb")' leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  193|           // Write out newly generated index
#  194|           FILE* new_index_file_fp = fopen(gzip_index_path, "wb");
#  195|->         if (deflate_index_serialize(h->index, new_index_file_fp) < 0) {
#  196|               nbdkit_error(FILTER_NAME ": failed to write the index with %d access points to file\n", len);
#  197|               fclose(new_index_file_fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:195:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(gzip_index_path, "wb")'
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:158:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:160:9: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:163:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:191:9: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:194:35: acquire_memory: allocated here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:195:13: danger: 'fopen(gzip_index_path, "wb")' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  193|           // Write out newly generated index
#  194|           FILE* new_index_file_fp = fopen(gzip_index_path, "wb");
#  195|->         if (deflate_index_serialize(h->index, new_index_file_fp) < 0) {
#  196|               nbdkit_error(FILTER_NAME ": failed to write the index with %d access points to file\n", len);
#  197|               fclose(new_index_file_fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def85]
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:202:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(gzip_index_path, "rb")'
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:157:27: acquire_resource: opened here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:158:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:202:9: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:202:9: danger: 'fopen(gzip_index_path, "rb")' leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  200|           fclose(new_index_file_fp);
#  201|       } else {
#  202|->         nbdkit_debug(FILTER_NAME ": Trying existing index file: %s: %m", gzip_index_path);
#  203|           h->index = deflate_index_deserialize(input_file_fp);
#  204|           fclose(input_file_fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:202:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(gzip_index_path, "rb")'
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:157:27: acquire_memory: allocated here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:158:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:202:9: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:202:9: danger: 'fopen(gzip_index_path, "rb")' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  200|           fclose(new_index_file_fp);
#  201|       } else {
#  202|->         nbdkit_debug(FILTER_NAME ": Trying existing index file: %s: %m", gzip_index_path);
#  203|           h->index = deflate_index_deserialize(input_file_fp);
#  204|           fclose(input_file_fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def87]
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:203:20: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(gzip_index_path, "rb")'
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:157:27: acquire_resource: opened here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:158:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:202:9: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:203:20: danger: 'fopen(gzip_index_path, "rb")' leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  201|       } else {
#  202|           nbdkit_debug(FILTER_NAME ": Trying existing index file: %s: %m", gzip_index_path);
#  203|->         h->index = deflate_index_deserialize(input_file_fp);
#  204|           fclose(input_file_fp);
#  205|           if (h->index == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:203:20: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(gzip_index_path, "rb")'
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:157:27: acquire_memory: allocated here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:158:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:202:9: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/indexed_gzip.c:203:20: danger: 'fopen(gzip_index_path, "rb")' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  201|       } else {
#  202|           nbdkit_debug(FILTER_NAME ": Trying existing index file: %s: %m", gzip_index_path);
#  203|->         h->index = deflate_index_deserialize(input_file_fp);
#  204|           fclose(input_file_fp);
#  205|           if (h->index == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def89]
nbdkit-1.45.12/filters/indexed-gzip/zran.c:233:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'point'
nbdkit-1.45.12/filters/indexed-gzip/zran.c:163:8: branch_false: following 'false' branch (when 'in' is non-NULL)...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:167:35: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:168:8: branch_false: following 'false' branch (when 'index' is non-NULL)...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:173:5: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:181:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:187:15: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:187:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:188:15: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:187:9: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:189:15: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:187:9: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:195:9: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:195:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:196:10: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:195:9: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:203:8: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:203:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:204:9: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:204:9: release_memory: using NULL here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:215:17: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:216:27: branch_true: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:216:27: release_memory: using NULL here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:216:18: release_memory: 'point' is NULL
nbdkit-1.45.12/filters/indexed-gzip/zran.c:219:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:220:19: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:219:13: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:221:19: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:219:13: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:222:19: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:219:13: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/indexed-gzip/zran.c:233:13: branch_false: ...to here
nbdkit-1.45.12/filters/indexed-gzip/zran.c:233:13: danger: dereference of NULL 'point'
#  231|   
#  232|           // Validate point data
#  233|->         if (point->out < 0 || point->in < 0 ||
#  234|               point->bits < 0 || point->bits > 7 ||
#  235|               point->dict > WINSIZE) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
nbdkit-1.45.12/filters/log/log.c:225:19: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/log/log.c:212:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/log/log.c:215:7: branch_false: ...to here
nbdkit-1.45.12/filters/log/log.c:215:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/log/log.c:216:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/log/log.c:225:19: branch_false: ...to here
nbdkit-1.45.12/filters/log/log.c:225:19: danger: 'h' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  223|      * short lifetime.
#  224|      */
#  225|->   h->exportname = nbdkit_strdup_intern (exportname);
#  226|     if (h->exportname == NULL) {
#  227|       free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
nbdkit-1.45.12/filters/log/log.c:232:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/log/log.c:212:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/log/log.c:215:7: branch_false: ...to here
nbdkit-1.45.12/filters/log/log.c:215:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/log/log.c:216:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/log/log.c:225:19: branch_false: ...to here
nbdkit-1.45.12/filters/log/log.c:226:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/log/log.c:230:3: branch_false: ...to here
nbdkit-1.45.12/filters/log/log.c:232:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/filters/log/log.c:233:19: branch_true: ...to here
nbdkit-1.45.12/filters/log/log.c:232:3: danger: 'h' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  230|     h->tls = is_tls;
#  231|   
#  232|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock);
#  233|     h->connection = ++connections;
#  234|     h->id = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
nbdkit-1.45.12/filters/log/log.c:249:22: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
nbdkit-1.45.12/filters/log/log.c:266:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/log/log.c:266:7: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/log/log.c:270:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/log/log.c:271:6: branch_true: following 'true' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/log/log.c:272:5: branch_true: ...to here
nbdkit-1.45.12/filters/log/log.c:249:22: danger: 'fp' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  247|   {
#  248|     FILE *fp;
#  249|->   CLEANUP_FREE char *str = NULL;
#  250|     size_t len = 0;
#  251|     struct handle *h = handle;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
nbdkit-1.45.12/filters/log/log.c:401:24: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
nbdkit-1.45.12/filters/log/log.c:384:1: enter_function: entry to 'log_extents'
nbdkit-1.45.12/filters/log/log.c:389:17: call_function: calling 'get_id' from 'log_extents'
nbdkit-1.45.12/filters/log/log.c:389:17: return_function: returning to 'log_extents' from 'get_id'
nbdkit-1.45.12/filters/log/log.c:392:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/log/log.c:395:25: branch_true: ...to here
nbdkit-1.45.12/filters/log/log.c:397:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/log/log.c:401:24: branch_false: ...to here
nbdkit-1.45.12/filters/log/log.c:404:10: acquire_memory: allocated here
nbdkit-1.45.12/filters/log/log.c:405:8: branch_true: following 'true' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/log/log.c:406:7: branch_true: ...to here
nbdkit-1.45.12/filters/log/log.c:401:24: danger: 'fp' leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  399|     else {
#  400|       FILE *fp;
#  401|->     CLEANUP_FREE char *str = NULL;
#  402|       size_t i, n, len = 0;
#  403|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def94]
nbdkit-1.45.12/filters/log/output.c:101:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nbdkit-1.45.12/filters/log/output.c:166:1: enter_function: entry to 'leave'
nbdkit-1.45.12/filters/log/output.c:171:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/log/output.c:172:5: branch_true: ...to here
nbdkit-1.45.12/filters/log/output.c:172:5: acquire_resource: 'va_start' called here
nbdkit-1.45.12/filters/log/output.c:173:5: call_function: calling 'to_file' from 'leave'
#   99|   
#  100|     fputc ('\n', logfile);
#  101|->   fflush (logfile);
#  102|   #ifdef HAVE_FUNLOCKFILE
#  103|     funlockfile (logfile);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def95]
nbdkit-1.45.12/filters/log/output.c:113:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nbdkit-1.45.12/filters/log/output.c:184:1: enter_function: entry to 'print'
nbdkit-1.45.12/filters/log/output.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/log/output.c:193:7: branch_false: ...to here
nbdkit-1.45.12/filters/log/output.c:193:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/log/output.c:194:5: branch_true: ...to here
nbdkit-1.45.12/filters/log/output.c:194:5: acquire_resource: 'va_start' called here
nbdkit-1.45.12/filters/log/output.c:195:5: call_function: calling 'to_script' from 'print'
#  111|   {
#  112|     FILE *fp;
#  113|->   CLEANUP_FREE char *str = NULL;
#  114|     size_t len = 0;
#  115|     int r;

Error: CPPCHECK_WARNING (CWE-476): [#def96]
nbdkit-1.45.12/filters/luks/luks-encryption.c:489: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in2
#  487|   
#  488|     for (i = 0; i < len; ++i)
#  489|->     out[i] = in1[i] ^ in2[i];
#  490|   }
#  491|   

Error: CPPCHECK_WARNING (CWE-476): [#def97]
nbdkit-1.45.12/filters/luks/luks-encryption.c:489: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out
#  487|   
#  488|     for (i = 0; i < len; ++i)
#  489|->     out[i] = in1[i] ^ in2[i];
#  490|   }
#  491|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def98]
nbdkit-1.45.12/filters/luks/luks-encryption.c:489:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'block'
nbdkit-1.45.12/filters/luks/luks-encryption.c:536:1: enter_function: entry to 'afmerge'
nbdkit-1.45.12/filters/luks/luks-encryption.c:539:33: acquire_memory: this call could return NULL
nbdkit-1.45.12/filters/luks/luks-encryption.c:545:15: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:550:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:550:3: call_function: inlined call to 'xor' from 'afmerge'
#  487|   
#  488|     for (i = 0; i < len; ++i)
#  489|->     out[i] = in1[i] ^ in2[i];
#  490|   }
#  491|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
nbdkit-1.45.12/filters/luks/luks-encryption.c:500:25: warning[-Wanalyzer-malloc-leak]: leak of 'temp'
nbdkit-1.45.12/filters/luks/luks-encryption.c:502:10: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks-encryption.c:503:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:508:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:500:25: danger: 'temp' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  498|     int r;
#  499|     gnutls_hash_hd_t hash;
#  500|->   CLEANUP_FREE uint8_t *temp;
#  501|   
#  502|     temp = malloc (digest_bytes);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
nbdkit-1.45.12/filters/luks/luks-encryption.c:539:25: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/filters/luks/luks-encryption.c:536:1: enter_function: entry to 'afmerge'
nbdkit-1.45.12/filters/luks/luks-encryption.c:539:33: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks-encryption.c:545:15: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:550:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:550:3: call_function: inlined call to 'xor' from 'afmerge'
nbdkit-1.45.12/filters/luks/luks-encryption.c:539:25: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:539:25: danger: 'block' leaks here; was allocated at [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1)
#  537|            const uint8_t *in, uint8_t *out, size_t outlen)
#  538|   {
#  539|->   CLEANUP_FREE uint8_t *block = calloc (1, outlen);
#  540|     size_t i;
#  541|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
nbdkit-1.45.12/filters/luks/luks-encryption.c:584:25: warning[-Wanalyzer-malloc-leak]: leak of 'split_key'
nbdkit-1.45.12/filters/luks/luks-encryption.c:598:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:601:19: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:602:15: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks-encryption.c:603:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:607:15: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:608:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:614:40: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:616:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:617:5: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:584:25: danger: 'split_key' leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  582|     struct luks_keyslot *ks = &h->phdr.keyslot[i];
#  583|     size_t split_key_len;
#  584|->   CLEANUP_FREE uint8_t *split_key = NULL;
#  585|     CLEANUP_FREE uint8_t *masterkey = NULL;
#  586|     const gnutls_datum_t key =

Error: CPPCHECK_WARNING (CWE-401): [#def102]
nbdkit-1.45.12/filters/luks/luks-encryption.c:610: error[memleak]: Memory leak: split_key
#  608|     if (masterkey == NULL) {
#  609|       nbdkit_error ("malloc: %m");
#  610|->     return -1;
#  611|     }
#  612|   

Error: CPPCHECK_WARNING (CWE-401): [#def103]
nbdkit-1.45.12/filters/luks/luks-encryption.c:618: error[memleak]: Memory leak: split_key
#  616|     if (r != 0) {
#  617|       nbdkit_error ("gnutls_pbkdf2: %s", gnutls_strerror (r));
#  618|->     return -1;
#  619|     }
#  620|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
nbdkit-1.45.12/filters/luks/luks-encryption.c:623:7: warning[-Wanalyzer-malloc-leak]: leak of 'split_key'
nbdkit-1.45.12/filters/luks/luks-encryption.c:598:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:601:19: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:602:15: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks-encryption.c:603:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:607:15: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:608:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:614:40: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:616:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:622:22: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:623:7: danger: 'split_key' leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  621|     /* Read master key material from plugin. */
#  622|     start = (uint64_t) ks->key_material_offset * LUKS_SECTOR_SIZE;
#  623|->   if (next->pread (next, split_key, split_key_len, start, 0, &err) == -1) {
#  624|       errno = err;
#  625|       return -1;

Error: CPPCHECK_WARNING (CWE-401): [#def105]
nbdkit-1.45.12/filters/luks/luks-encryption.c:625: error[memleak]: Memory leak: split_key
#  623|     if (next->pread (next, split_key, split_key_len, start, 0, &err) == -1) {
#  624|       errno = err;
#  625|->     return -1;
#  626|     }
#  627|   

Error: CPPCHECK_WARNING (CWE-401): [#def106]
nbdkit-1.45.12/filters/luks/luks-encryption.c:634: error[memleak]: Memory leak: split_key
#  632|     if (r != 0) {
#  633|       nbdkit_error ("gnutls_cipher_init: %s", gnutls_strerror (r));
#  634|->     return -1;
#  635|     }
#  636|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
nbdkit-1.45.12/filters/luks/luks-encryption.c:693:10: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/luks/luks-encryption.c:683:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks-encryption.c:684:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/luks/luks-encryption.c:693:10: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:693:10: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  691|   
#  692|     /* Check this is a LUKSv1 disk. */
#  693|->   size = next->get_size (next);
#  694|     if (size == -1) {
#  695|       free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
nbdkit-1.45.12/filters/luks/luks-encryption.c:699:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/luks/luks-encryption.c:683:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks-encryption.c:684:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/luks/luks-encryption.c:693:10: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:694:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:698:6: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:698:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:699:5: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:699:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  697|     }
#  698|     if (size < 16384) {
#  699|->     nbdkit_error ("disk is too small to be LUKS-encrypted");
#  700|       free (h);
#  701|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
nbdkit-1.45.12/filters/luks/luks-encryption.c:705:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/luks/luks-encryption.c:683:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks-encryption.c:684:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/luks/luks-encryption.c:693:10: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:694:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:698:6: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:698:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks-encryption.c:705:7: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:705:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  703|   
#  704|     /* Read the phdr. */
#  705|->   if (next->pread (next, &h->phdr, sizeof h->phdr, 0, 0, &err) == -1) {
#  706|       free (h);
#  707|       errno = err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
nbdkit-1.45.12/filters/luks/luks-encryption.c:900:25: warning[-Wanalyzer-malloc-leak]: leak of 'iv'
nbdkit-1.45.12/filters/luks/luks-encryption.c:895:1: enter_function: entry to 'do_decrypt'
nbdkit-1.45.12/filters/luks/luks-encryption.c:899:24: call_function: inlined call to 'cipher_alg_iv_len' from 'do_decrypt'
nbdkit-1.45.12/filters/luks/luks-encryption.c:902:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks-encryption.c:903:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:908:10: branch_false: following 'false' branch (when 'nr_sectors == 0')...
nbdkit-1.45.12/filters/luks/luks-encryption.c:900:25: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:900:25: danger: 'iv' leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  898|     int r;
#  899|     const size_t ivlen = cipher_alg_iv_len (h->cipher_alg, h->cipher_mode);
#  900|->   CLEANUP_FREE uint8_t *iv;
#  901|   
#  902|     iv = malloc (ivlen);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
nbdkit-1.45.12/filters/luks/luks-encryption.c:934:25: warning[-Wanalyzer-malloc-leak]: leak of 'iv'
nbdkit-1.45.12/filters/luks/luks-encryption.c:929:1: enter_function: entry to 'do_encrypt'
nbdkit-1.45.12/filters/luks/luks-encryption.c:933:24: call_function: inlined call to 'cipher_alg_iv_len' from 'do_encrypt'
nbdkit-1.45.12/filters/luks/luks-encryption.c:936:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks-encryption.c:937:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:942:10: branch_false: following 'false' branch (when 'nr_sectors == 0')...
nbdkit-1.45.12/filters/luks/luks-encryption.c:934:25: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks-encryption.c:934:25: danger: 'iv' leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  932|     int r;
#  933|     const size_t ivlen = cipher_alg_iv_len (h->cipher_alg, h->cipher_mode);
#  934|->   CLEANUP_FREE uint8_t *iv;
#  935|   
#  936|     iv = malloc (ivlen);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
nbdkit-1.45.12/filters/luks/luks.c:235:25: warning[-Wanalyzer-malloc-leak]: leak of 'sector'
nbdkit-1.45.12/filters/luks/luks.c:239:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:244:8: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:244:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/luks/luks.c:245:14: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:245:14: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks.c:246:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:253:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:257:6: branch_true: following 'true' branch...
 branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:235:25: danger: 'sector' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  233|     struct handle *h = handle;
#  234|     const uint64_t payload_offset = get_payload_offset (h->h) * LUKS_SECTOR_SIZE;
#  235|->   CLEANUP_FREE uint8_t *sector = NULL;
#  236|     uint64_t sectnum, sectoffs;
#  237|     gnutls_cipher_hd_t cipher;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
nbdkit-1.45.12/filters/luks/luks.c:265:9: warning[-Wanalyzer-malloc-leak]: leak of 'sector'
nbdkit-1.45.12/filters/luks/luks.c:239:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:244:8: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:244:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/luks/luks.c:245:14: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:245:14: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks.c:246:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:253:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:261:6: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:261:6: branch_true: following 'true' branch (when 'sectoffs != 0')...
nbdkit-1.45.12/filters/luks/luks.c:262:18: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:264:5: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/luks/luks.c:265:9: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:265:9: danger: 'sector' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  263|   
#  264|       assert (sector);
#  265|->     if (next->pread (next, sector, LUKS_SECTOR_SIZE,
#  266|                        sectnum * LUKS_SECTOR_SIZE + payload_offset,
#  267|                        flags, err) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
nbdkit-1.45.12/filters/luks/luks.c:282:9: warning[-Wanalyzer-malloc-leak]: leak of 'sector'
nbdkit-1.45.12/filters/luks/luks.c:239:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:244:8: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:244:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/luks/luks.c:245:14: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:245:14: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks.c:246:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:253:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:261:6: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:261:6: branch_false: following 'false' branch (when 'sectoffs == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:281:10: branch_true: following 'true' branch (when 'count > 511')...
nbdkit-1.45.12/filters/luks/luks.c:282:9: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:282:9: danger: 'sector' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  280|     /* Aligned body */
#  281|     while (count >= LUKS_SECTOR_SIZE) {
#  282|->     if (next->pread (next, buf, LUKS_SECTOR_SIZE,
#  283|                        sectnum * LUKS_SECTOR_SIZE + payload_offset,
#  284|                        flags, err) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
nbdkit-1.45.12/filters/luks/luks.c:298:9: warning[-Wanalyzer-malloc-leak]: leak of 'sector'
nbdkit-1.45.12/filters/luks/luks.c:239:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:244:8: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:244:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/luks/luks.c:245:14: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:245:14: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks.c:246:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:253:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:261:6: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:261:6: branch_false: following 'false' branch (when 'sectoffs == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:296:6: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/filters/luks/luks.c:297:5: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:297:5: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/luks/luks.c:298:9: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:298:9: danger: 'sector' leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  296|     if (count) {
#  297|       assert (sector);
#  298|->     if (next->pread (next, sector, LUKS_SECTOR_SIZE,
#  299|                        sectnum * LUKS_SECTOR_SIZE + payload_offset,
#  300|                        flags, err) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
nbdkit-1.45.12/filters/luks/luks.c:328:25: warning[-Wanalyzer-malloc-leak]: leak of 'sector'
nbdkit-1.45.12/filters/luks/luks.c:332:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:337:12: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:337:12: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks.c:338:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:344:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:328:25: danger: 'sector' leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  326|     struct handle *h = handle;
#  327|     const uint64_t payload_offset = get_payload_offset (h->h) * LUKS_SECTOR_SIZE;
#  328|->   CLEANUP_FREE uint8_t *sector = NULL;
#  329|     uint64_t sectnum, sectoffs;
#  330|     gnutls_cipher_hd_t cipher;

Error: CPPCHECK_WARNING (CWE-401): [#def117]
nbdkit-1.45.12/filters/luks/luks.c:349: error[memleak]: Memory leak: sector
#  347|     cipher = create_cipher (h->h);
#  348|     if (!cipher)
#  349|->     return -1;
#  350|   
#  351|     /* Unaligned head */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
nbdkit-1.45.12/filters/luks/luks.c:357:9: warning[-Wanalyzer-malloc-leak]: leak of 'sector'
nbdkit-1.45.12/filters/luks/luks.c:332:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:337:12: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:337:12: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks.c:338:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:344:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:348:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:352:6: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:352:6: branch_true: following 'true' branch (when 'sectoffs != 0')...
nbdkit-1.45.12/filters/luks/luks.c:353:5: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:353:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/filters/luks/luks.c:355:18: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:357:9: danger: 'sector' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  355|       uint64_t n = MIN (LUKS_SECTOR_SIZE - sectoffs, count);
#  356|   
#  357|->     if (next->pread (next, sector, LUKS_SECTOR_SIZE,
#  358|                        sectnum * LUKS_SECTOR_SIZE + payload_offset,
#  359|                        flags, err) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
nbdkit-1.45.12/filters/luks/luks.c:398:9: warning[-Wanalyzer-malloc-leak]: leak of 'sector'
nbdkit-1.45.12/filters/luks/luks.c:332:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:337:12: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:337:12: acquire_memory: allocated here
nbdkit-1.45.12/filters/luks/luks.c:338:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:344:3: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:348:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/luks/luks.c:352:6: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:352:6: branch_false: following 'false' branch (when 'sectoffs == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:378:10: branch_false: following 'false' branch (when 'count <= 511')...
nbdkit-1.45.12/filters/luks/luks.c:395:6: branch_false: ...to here
nbdkit-1.45.12/filters/luks/luks.c:395:6: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/filters/luks/luks.c:396:5: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:396:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/filters/luks/luks.c:398:9: branch_true: ...to here
nbdkit-1.45.12/filters/luks/luks.c:398:9: danger: 'sector' leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  396|       ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&read_modify_write_lock);
#  397|   
#  398|->     if (next->pread (next, sector, LUKS_SECTOR_SIZE,
#  399|                        sectnum * LUKS_SECTOR_SIZE + payload_offset,
#  400|                        flags, err) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
nbdkit-1.45.12/filters/lzip/blkcache.c:71:5: warning[-Wanalyzer-malloc-leak]: leak of 'c'
nbdkit-1.45.12/filters/lzip/blkcache.c:63:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/blkcache.c:64:6: branch_false: following 'false' branch (when 'c' is non-NULL)...
nbdkit-1.45.12/filters/lzip/blkcache.c:69:15: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/blkcache.c:70:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/blkcache.c:71:5: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/blkcache.c:71:5: danger: 'c' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   69|     c->blocks = calloc (maxdepth, sizeof (struct block));
#   70|     if (!c->blocks) {
#   71|->     nbdkit_error ("calloc: %m");
#   72|       free (c);
#   73|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
nbdkit-1.45.12/filters/lzip/lzip.c:101:10: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/lzip/lzip.c:92:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/lzip/lzip.c:95:7: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzip.c:95:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzip.c:96:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzip.c:101:10: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzip.c:101:10: danger: 'h' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   99|     }
#  100|   
#  101|->   h->c = new_blkcache (maxdepth);
#  102|     if (!h->c) {
#  103|       free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
nbdkit-1.45.12/filters/lzip/lzipfile.c:82:5: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:82:5: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:82:5: danger: 'lz' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   80|     /* Check file magic. */
#   81|     if (!check_header_magic (next, 0)) {
#   82|->     nbdkit_error ("lzip: not an lzip file");
#   83|       goto err1;
#   84|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
nbdkit-1.45.12/filters/lzip/lzipfile.c:116:7: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: call_function: calling 'check_header_magic' from 'lzipfile_open'
#  114|     int err;
#  115|   
#  116|->   if (next->get_size (next) < (LZIP_HEADER_SIZE + LZIP_FOOTER_SIZE)) {
#  117|       nbdkit_error ("lzip: file too short");
#  118|       return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
nbdkit-1.45.12/filters/lzip/lzipfile.c:117:5: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: call_function: calling 'check_header_magic' from 'lzipfile_open'
#  115|   
#  116|     if (next->get_size (next) < (LZIP_HEADER_SIZE + LZIP_FOOTER_SIZE)) {
#  117|->     nbdkit_error ("lzip: file too short");
#  118|       return false;
#  119|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
nbdkit-1.45.12/filters/lzip/lzipfile.c:120:7: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: call_function: calling 'check_header_magic' from 'lzipfile_open'
#  118|       return false;
#  119|     }
#  120|->   if (next->pread (next, buf, LZIP_HEADER_MAGIC_LEN, offset, 0, &err) == -1) {
#  121|       nbdkit_error ("lzip: could not read header magic: error %d", err);
#  122|       return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
nbdkit-1.45.12/filters/lzip/lzipfile.c:121:5: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: call_function: calling 'check_header_magic' from 'lzipfile_open'
#  119|     }
#  120|     if (next->pread (next, buf, LZIP_HEADER_MAGIC_LEN, offset, 0, &err) == -1) {
#  121|->     nbdkit_error ("lzip: could not read header magic: error %d", err);
#  122|       return false;
#  123|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
nbdkit-1.45.12/filters/lzip/lzipfile.c:139:15: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:27: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:8: call_function: calling 'setup_index' from 'lzipfile_open'
#  137|     *idx = (lzip_index) {};
#  138|   
#  139|->   file_size = next->get_size (next);
#  140|     if (file_size == -1) {
#  141|       nbdkit_error ("lzip: get_size: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
nbdkit-1.45.12/filters/lzip/lzipfile.c:141:5: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:27: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:8: call_function: calling 'setup_index' from 'lzipfile_open'
#  139|     file_size = next->get_size (next);
#  140|     if (file_size == -1) {
#  141|->     nbdkit_error ("lzip: get_size: %m");
#  142|       goto err;
#  143|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
nbdkit-1.45.12/filters/lzip/lzipfile.c:148:5: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:27: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:8: call_function: calling 'setup_index' from 'lzipfile_open'
#  146|   
#  147|     while (pos > 0) {
#  148|->     nbdkit_debug ("lzip: looping through members: pos = %" PRIu64, pos);
#  149|   
#  150|       if (pos < (LZIP_HEADER_SIZE + LZIP_FOOTER_SIZE)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
nbdkit-1.45.12/filters/lzip/lzipfile.c:151:7: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:27: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:8: call_function: calling 'setup_index' from 'lzipfile_open'
#  149|   
#  150|       if (pos < (LZIP_HEADER_SIZE + LZIP_FOOTER_SIZE)) {
#  151|->       nbdkit_error ("lzip: corrupted file at %" PRIu64, pos);
#  152|         goto err;
#  153|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
nbdkit-1.45.12/filters/lzip/lzipfile.c:155:9: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:27: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:8: call_function: calling 'setup_index' from 'lzipfile_open'
#  153|       }
#  154|   
#  155|->     if (next->pread (next, footer, LZIP_FOOTER_SIZE,
#  156|                        pos - LZIP_FOOTER_SIZE, 0, &err) == -1) {
#  157|         nbdkit_error ("lzip: read member footer: error %d", err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
nbdkit-1.45.12/filters/lzip/lzipfile.c:157:7: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:27: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:8: call_function: calling 'setup_index' from 'lzipfile_open'
#  155|       if (next->pread (next, footer, LZIP_FOOTER_SIZE,
#  156|                        pos - LZIP_FOOTER_SIZE, 0, &err) == -1) {
#  157|->       nbdkit_error ("lzip: read member footer: error %d", err);
#  158|         goto err;
#  159|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
nbdkit-1.45.12/filters/lzip/lzipfile.c:161:5: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:27: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:8: call_function: calling 'setup_index' from 'lzipfile_open'
#  159|       }
#  160|   
#  161|->     nbdkit_debug ("lzip: decode member footer at pos = %" PRIu64, pos);
#  162|   
#  163|       memcpy (&data_size, &footer[4], sizeof (data_size));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
nbdkit-1.45.12/filters/lzip/lzipfile.c:169:5: warning[-Wanalyzer-malloc-leak]: leak of 'lz'
nbdkit-1.45.12/filters/lzip/lzipfile.c:69:1: enter_function: entry to 'lzipfile_open'
nbdkit-1.45.12/filters/lzip/lzipfile.c:74:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:75:6: branch_false: following 'false' branch (when 'lz' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:8: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:81:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:27: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:87:8: call_function: calling 'setup_index' from 'lzipfile_open'
#  167|       member_size = le64toh (member_size);
#  168|   
#  169|->     nbdkit_debug ("lzip: member_size = %" PRIu64, member_size);
#  170|   
#  171|       if (member_size < (LZIP_HEADER_SIZE + LZIP_FOOTER_SIZE)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
nbdkit-1.45.12/filters/lzip/lzipfile.c:287:5: warning[-Wanalyzer-malloc-leak]: leak of 'data'
nbdkit-1.45.12/filters/lzip/lzipfile.c:259:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:264:16: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:271:6: branch_false: following 'false' branch (when 'ret == 0')...
nbdkit-1.45.12/filters/lzip/lzipfile.c:276:18: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:276:10: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:277:6: branch_false: following 'false' branch (when 'data' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:285:12: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:286:6: branch_true: following 'true' branch (when 'buffer' is NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:287:5: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:287:5: danger: 'data' leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  285|     buffer = malloc (BUFFER_SIZE);
#  286|     if (buffer == NULL) {
#  287|->     nbdkit_error ("malloc: %m");
#  288|       goto err;
#  289|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
nbdkit-1.45.12/filters/lzip/lzipfile.c:306:13: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
nbdkit-1.45.12/filters/lzip/lzipfile.c:259:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:264:16: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:271:6: branch_false: following 'false' branch (when 'ret == 0')...
nbdkit-1.45.12/filters/lzip/lzipfile.c:276:18: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:277:6: branch_false: following 'false' branch (when 'data' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:285:12: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:285:12: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:286:6: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:291:3: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:297:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:298:7: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:304:10: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:305:9: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:306:13: danger: 'buffer' leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  304|         if (strm.avail_in > 0) {
#  305|           strm.next_in = (uint8_t *) buffer;
#  306|->         if (next->pread (next, buffer, strm.avail_in, member->member_offset + pos, 0, err) == -1) {
#  307|             nbdkit_error ("lzip: read: error %d", *err);
#  308|             goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
nbdkit-1.45.12/filters/lzip/lzipfile.c:306:13: warning[-Wanalyzer-malloc-leak]: leak of 'data'
nbdkit-1.45.12/filters/lzip/lzipfile.c:259:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:264:16: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:271:6: branch_false: following 'false' branch (when 'ret == 0')...
nbdkit-1.45.12/filters/lzip/lzipfile.c:276:18: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:276:10: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:277:6: branch_false: following 'false' branch (when 'data' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:285:12: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:286:6: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:291:3: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:297:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:298:7: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:304:10: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:305:9: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:306:13: danger: 'data' leaks here; was allocated at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
#  304|         if (strm.avail_in > 0) {
#  305|           strm.next_in = (uint8_t *) buffer;
#  306|->         if (next->pread (next, buffer, strm.avail_in, member->member_offset + pos, 0, err) == -1) {
#  307|             nbdkit_error ("lzip: read: error %d", *err);
#  308|             goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
nbdkit-1.45.12/filters/lzip/lzipfile.c:319:5: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
nbdkit-1.45.12/filters/lzip/lzipfile.c:259:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:264:16: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:271:6: branch_false: following 'false' branch (when 'ret == 0')...
nbdkit-1.45.12/filters/lzip/lzipfile.c:276:18: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:277:6: branch_false: following 'false' branch (when 'data' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:285:12: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:285:12: acquire_memory: allocated here
nbdkit-1.45.12/filters/lzip/lzipfile.c:286:6: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
nbdkit-1.45.12/filters/lzip/lzipfile.c:291:3: branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:297:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/lzip/lzipfile.c:298:7: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:304:10: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:318:6: branch_true: following 'true' branch (when 'ret != 1')...
nbdkit-1.45.12/filters/lzip/lzipfile.c:319:5: branch_true: ...to here
nbdkit-1.45.12/filters/lzip/lzipfile.c:319:5: danger: 'buffer' leaks here; was allocated at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
#  317|   
#  318|     if (ret != LZMA_OK && ret != LZMA_STREAM_END) {
#  319|->     nbdkit_error ("lzip: could not decompress member (error %d)", ret);
#  320|       goto err;
#  321|     }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def139]
nbdkit-1.45.12/filters/map/map.c:149:1: warning[-Wanalyzer-null-argument]: use of NULL 'bounds.ptr' where non-null expected
nbdkit-1.45.12/filters/map/map.c:178:1: enter_function: entry to 'convert_to_regions'
nbdkit-1.45.12/filters/map/map.c:182:14: release_memory: 'bounds.ptr' is NULL
nbdkit-1.45.12/filters/map/map.c:190:15: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/map/map.c:197:3: call_function: inlined call to 'boundaries_sort' from 'convert_to_regions'
#  147|   }
#  148|   
#  149|-> DEFINE_VECTOR_TYPE (boundaries, uint64_t);
#  150|   
#  151|   static int

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:181:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:169:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:173:7: branch_false: ...to here
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:173:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:174:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:178:7: branch_false: ...to here
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:178:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:179:15: branch_true: ...to here
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:180:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:181:7: branch_true: ...to here
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:181:7: danger: 'h' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  179|       h->name = strdup (exportname);
#  180|       if (h->name == NULL) {
#  181|->       nbdkit_error ("strdup: %m");
#  182|         free (h);
#  183|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:215:3: warning[-Wanalyzer-malloc-leak]: leak of 'g'
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:190:1: enter_function: entry to 'multi_conn_prepare'
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:215:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:216:7: branch_true: ...to here
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:228:9: acquire_memory: allocated here
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:229:8: branch_false: following 'false' branch (when 'g' is non-NULL)...
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:233:9: branch_false: ...to here
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:233:9: call_function: calling 'group_vector_append' from 'multi_conn_prepare'
nbdkit-1.45.12/filters/multi-conn/multi-conn.c:215:3: danger: 'g' leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
#  213|     }
#  214|   
#  215|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock);
#  216|     if (byname) {
#  217|       g = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/openonce/openonce.c:86:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/openonce/openonce.c:87:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:97:17: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:98:11: branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:107:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   91|   
#   92|     {
#   93|->     ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&export_list_lock);
#   94|       size_t i;
#   95|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
nbdkit-1.45.12/filters/openonce/openonce.c:120:9: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(exportname)'
nbdkit-1.45.12/filters/openonce/openonce.c:87:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:107:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:110:30: branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:110:30: acquire_memory: allocated here
nbdkit-1.45.12/filters/openonce/openonce.c:111:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:116:7: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:120:9: danger: 'strdup(exportname)' leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  118|   
#  119|         h->next = new_entry.context =
#  120|->         nbdkit_next_context_open (nbdkit_context_get_backend (nxdata),
#  121|                                     readonly, exportname, /* shared= */ 1);
#  122|         if (new_entry.context == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
nbdkit-1.45.12/filters/openonce/openonce.c:129:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/openonce/openonce.c:86:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/openonce/openonce.c:87:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:107:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:110:30: branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:111:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:116:7: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:122:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:129:11: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:129:11: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  127|   
#  128|         /* Open this new plugin context. */
#  129|->       if (h->next->prepare (h->next) == -1) {
#  130|           h->next->finalize (h->next);
#  131|           free (new_entry.exportname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
nbdkit-1.45.12/filters/openonce/openonce.c:129:11: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(exportname)'
nbdkit-1.45.12/filters/openonce/openonce.c:87:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:107:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:110:30: branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:110:30: acquire_memory: allocated here
nbdkit-1.45.12/filters/openonce/openonce.c:111:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:116:7: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:122:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:129:11: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:129:11: danger: 'strdup(exportname)' leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  127|   
#  128|         /* Open this new plugin context. */
#  129|->       if (h->next->prepare (h->next) == -1) {
#  130|           h->next->finalize (h->next);
#  131|           free (new_entry.exportname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
nbdkit-1.45.12/filters/openonce/openonce.c:130:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/openonce/openonce.c:86:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/openonce/openonce.c:87:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:107:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:110:30: branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:111:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:116:7: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:122:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:129:11: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:129:10: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:130:9: branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:130:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  128|         /* Open this new plugin context. */
#  129|         if (h->next->prepare (h->next) == -1) {
#  130|->         h->next->finalize (h->next);
#  131|           free (new_entry.exportname);
#  132|           nbdkit_next_context_close (h->next);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
nbdkit-1.45.12/filters/openonce/openonce.c:130:9: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(exportname)'
nbdkit-1.45.12/filters/openonce/openonce.c:87:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:93:5: branch_true: following 'true' branch (when '_r == 0')...
 branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:107:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:110:30: branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:110:30: acquire_memory: allocated here
nbdkit-1.45.12/filters/openonce/openonce.c:111:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:116:7: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:122:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:129:11: branch_false: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:129:10: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/openonce/openonce.c:130:9: branch_true: ...to here
nbdkit-1.45.12/filters/openonce/openonce.c:130:9: danger: 'strdup(exportname)' leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  128|         /* Open this new plugin context. */
#  129|         if (h->next->prepare (h->next) == -1) {
#  130|->         h->next->finalize (h->next);
#  131|           free (new_entry.exportname);
#  132|           nbdkit_next_context_close (h->next);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
nbdkit-1.45.12/filters/protect/protect.c:292:11: warning[-Wanalyzer-malloc-leak]: leak of 'expected'
nbdkit-1.45.12/filters/protect/protect.c:262:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/filters/protect/protect.c:268:14: branch_true: ...to here
nbdkit-1.45.12/filters/protect/protect.c:269:5: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/protect/protect.c:270:5: branch_true: ...to here
nbdkit-1.45.12/filters/protect/protect.c:270:5: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/protect/protect.c:272:17: branch_true: ...to here
nbdkit-1.45.12/filters/protect/protect.c:274:5: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/protect/protect.c:276:9: branch_true: ...to here
nbdkit-1.45.12/filters/protect/protect.c:282:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/protect/protect.c:284:37: branch_true: ...to here
nbdkit-1.45.12/filters/protect/protect.c:284:37: acquire_memory: allocated here
nbdkit-1.45.12/filters/protect/protect.c:285:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/protect/protect.c:292:11: branch_false: ...to here
nbdkit-1.45.12/filters/protect/protect.c:292:11: danger: 'expected' leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  290|   
#  291|         /* Read the underlying plugin. */
#  292|->       r = next->pread (next, expected, len, offset, 0, err);
#  293|         if (r == -1)
#  294|           return -1;              /* read error */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:445:25: warning[-Wanalyzer-malloc-leak]: leak of 'cluster'
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:439:1: enter_function: entry to 'qcow2dec_pread'
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:448:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:449:15: branch_true: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:449:15: acquire_memory: allocated here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:450:8: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:457:3: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:460:6: branch_false: following 'false' branch (when 'cloffs == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:474:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:484:6: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:484:6: branch_false: following 'false' branch (when 'count == 0')...
 branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:445:25: danger: 'cluster' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  443|                   int *err)
#  444|   {
#  445|->   CLEANUP_FREE uint8_t *cluster = NULL;
#  446|     uint64_t cloffs;
#  447|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:611:11: warning[-Wanalyzer-malloc-leak]: leak of 'l2_table'
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:558:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:561:14: branch_true: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:563:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:565:22: branch_true: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:566:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:575:3: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:579:6: branch_false: following 'false' branch (when 'l2_offset != 0')...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:583:3: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:587:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:589:21: branch_true: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:592:8: branch_true: following 'true' branch (when 'l2_table' is NULL)...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:594:11: branch_true: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:594:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:595:27: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:594:11: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:596:26: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:594:11: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:604:18: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:604:18: acquire_memory: allocated here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:605:10: branch_false: following 'false' branch (when 'l2_table' is non-NULL)...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:611:11: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:611:11: danger: 'l2_table' leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
#  609|         }
#  610|   
#  611|->       if (next->pread (next, l2_table, cluster_size, l2_offset,
#  612|                          flags, err) == -1)
#  613|           return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:846:7: warning[-Wanalyzer-malloc-leak]: leak of 'compressed_cluster'
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:791:6: branch_false: following 'false' branch (when 'file_offset <= 72057594037927935')...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:806:3: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:810:6: branch_false: following 'false' branch (when 'file_offset > 511')...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:810:7: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:810:7: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:812:10: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:810:7: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:831:14: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:832:6: branch_false: following 'false' branch (when 'compressed_size <= max_read')...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:840:24: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:840:24: acquire_memory: allocated here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:841:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:846:7: branch_false: ...to here
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:846:7: danger: 'compressed_cluster' leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  844|       return -1;
#  845|     }
#  846|->   if (next->pread (next, compressed_cluster, compressed_size, file_offset,
#  847|                      flags, err) == -1)
#  848|       return -1;

Error: CPPCHECK_WARNING (CWE-401): [#def152]
nbdkit-1.45.12/filters/qcow2dec/qcow2dec.c:848: error[memleak]: Memory leak: compressed_cluster
#  846|     if (next->pread (next, compressed_cluster, compressed_size, file_offset,
#  847|                      flags, err) == -1)
#  848|->     return -1;
#  849|   
#  850|     /* This is the time to find out if we support this type of

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
nbdkit-1.45.12/filters/rate/rate.c:187:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/rate/rate.c:178:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/rate/rate.c:181:7: branch_false: ...to here
nbdkit-1.45.12/filters/rate/rate.c:181:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/rate/rate.c:182:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/rate/rate.c:187:3: branch_false: ...to here
nbdkit-1.45.12/filters/rate/rate.c:187:3: danger: 'h' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  185|     }
#  186|   
#  187|->   bucket_init (&h->read_bucket, connection_rate, bucket_capacity);
#  188|     bucket_init (&h->write_bucket, connection_rate, bucket_capacity);
#  189|     pthread_mutex_init (&h->read_bucket_lock, NULL);

Error: CPPCHECK_WARNING (CWE-476): [#def154]
nbdkit-1.45.12/filters/readahead/readahead.h:49: error[ctunullpointer]: Null pointer dereference: key
#   47|     uint32_t count;
#   48|   };
#   49|-> DEFINE_VECTOR_TYPE (command_queue, struct command);
#   50|   
#   51|   struct bgthread_ctrl {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
nbdkit-1.45.12/filters/retry/retry.c:152:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:234:19: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  150|    again:
#  151|     if (data->retry >= retries) {
#  152|->     nbdkit_debug ("could not recover after %d retries", retries);
#  153|       return false;
#  154|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
nbdkit-1.45.12/filters/retry/retry.c:152:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:227:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  150|    again:
#  151|     if (data->retry >= retries) {
#  152|->     nbdkit_debug ("could not recover after %d retries", retries);
#  153|       return false;
#  154|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
nbdkit-1.45.12/filters/retry/retry.c:157:3: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:234:19: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  155|   
#  156|     /* Since we will retry, log the original errno otherwise it will be lost. */
#  157|->   nbdkit_debug ("%s failed: original errno = %d", method, *err);
#  158|   
#  159|     nbdkit_debug ("retry %d: waiting %u sec %u nsec before retrying",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
nbdkit-1.45.12/filters/retry/retry.c:157:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:227:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  155|   
#  156|     /* Since we will retry, log the original errno otherwise it will be lost. */
#  157|->   nbdkit_debug ("%s failed: original errno = %d", method, *err);
#  158|   
#  159|     nbdkit_debug ("retry %d: waiting %u sec %u nsec before retrying",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
nbdkit-1.45.12/filters/retry/retry.c:159:3: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:234:19: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  157|     nbdkit_debug ("%s failed: original errno = %d", method, *err);
#  158|   
#  159|->   nbdkit_debug ("retry %d: waiting %u sec %u nsec before retrying",
#  160|                   data->retry+1, data->delay_sec, data->delay_nsec);
#  161|     if (nbdkit_nanosleep (data->delay_sec, data->delay_nsec) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
nbdkit-1.45.12/filters/retry/retry.c:159:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:227:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  157|     nbdkit_debug ("%s failed: original errno = %d", method, *err);
#  158|   
#  159|->   nbdkit_debug ("retry %d: waiting %u sec %u nsec before retrying",
#  160|                   data->retry+1, data->delay_sec, data->delay_nsec);
#  161|     if (nbdkit_nanosleep (data->delay_sec, data->delay_nsec) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
nbdkit-1.45.12/filters/retry/retry.c:161:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:234:19: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  159|     nbdkit_debug ("retry %d: waiting %u sec %u nsec before retrying",
#  160|                   data->retry+1, data->delay_sec, data->delay_nsec);
#  161|->   if (nbdkit_nanosleep (data->delay_sec, data->delay_nsec) == -1) {
#  162|       /* We could do this but it would overwrite the more important
#  163|        * errno from the underlying data call.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
nbdkit-1.45.12/filters/retry/retry.c:161:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:227:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  159|     nbdkit_debug ("retry %d: waiting %u sec %u nsec before retrying",
#  160|                   data->retry+1, data->delay_sec, data->delay_nsec);
#  161|->   if (nbdkit_nanosleep (data->delay_sec, data->delay_nsec) == -1) {
#  162|       /* We could do this but it would overwrite the more important
#  163|        * errno from the underlying data call.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
nbdkit-1.45.12/filters/retry/retry.c:198:14: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:234:19: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  196|     }
#  197|     /* Open a new connection. */
#  198|->   new_next = nbdkit_next_context_open (nbdkit_context_get_backend (h->context),
#  199|                                          h->readonly || force_readonly,
#  200|                                          h->exportname, false);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
nbdkit-1.45.12/filters/retry/retry.c:198:14: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/retry/retry.c:221:1: enter_function: entry to 'retry_open'
nbdkit-1.45.12/filters/retry/retry.c:227:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:252:18: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:12: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:256:25: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:256:25: call_function: calling 'do_retry' from 'retry_open'
#  196|     }
#  197|     /* Open a new connection. */
#  198|->   new_next = nbdkit_next_context_open (nbdkit_context_get_backend (h->context),
#  199|                                          h->readonly || force_readonly,
#  200|                                          h->exportname, false);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
nbdkit-1.45.12/filters/retry/retry.c:237:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/retry/retry.c:227:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/retry/retry.c:237:5: branch_true: ...to here
nbdkit-1.45.12/filters/retry/retry.c:237:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  235|     h->context = nxdata;
#  236|     if (h->exportname == NULL) {
#  237|->     nbdkit_error ("strdup: %m");
#  238|       free (h);
#  239|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
nbdkit-1.45.12/filters/retry/retry.c:243:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:234:19: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:7: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  241|     h->reopens = 0;
#  242|   
#  243|->   if (next (nxdata, readonly, exportname) != -1)
#  244|       h->open = true;
#  245|     else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
nbdkit-1.45.12/filters/retry/retry.c:243:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/retry/retry.c:227:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/retry/retry.c:228:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/retry/retry.c:233:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:236:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/retry/retry.c:241:3: branch_false: ...to here
nbdkit-1.45.12/filters/retry/retry.c:243:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  241|     h->reopens = 0;
#  242|   
#  243|->   if (next (nxdata, readonly, exportname) != -1)
#  244|       h->open = true;
#  245|     else {

Error: CPPCHECK_WARNING (CWE-476): [#def168]
nbdkit-1.45.12/filters/scan/scan.h:52: error[ctunullpointer]: Null pointer dereference: key
#   50|     uint64_t offset;
#   51|   };
#   52|-> DEFINE_VECTOR_TYPE (command_queue, struct command);
#   53|   
#   54|   struct bgthread_ctrl {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def169]
nbdkit-1.45.12/filters/spinning/spinning.c:349:3: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#  347|     /* Find which head is responsible for this part of the disk. */
#  348|     head = heads_vector_search (&h->heads, &new_pos, find_range);
#  349|->   assert (head->start <= new_pos && new_pos < head->end);
#  350|   
#  351|     /* Offset of new_pos relative to the start of this head's range. */

Error: GCC_ANALYZER_WARNING (CWE-131): [#def170]
nbdkit-1.45.12/filters/swab/swab.c:184:3: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
nbdkit-1.45.12/filters/swab/swab.c:176:1: enter_function: entry to 'swab_pwrite'
nbdkit-1.45.12/filters/swab/swab.c:182:8: call_function: calling 'is_aligned' from 'swab_pwrite'
nbdkit-1.45.12/filters/swab/swab.c:182:8: return_function: returning to 'swab_pwrite' from 'is_aligned'
nbdkit-1.45.12/filters/swab/swab.c:182:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/swab/swab.c:184:11: branch_true: ...to here
nbdkit-1.45.12/filters/swab/swab.c:184:3: danger: assigned to 'uint16_t *' {{aka 'short unsigned int *'}} here; 'sizeof (uint16_t {{aka short unsigned int}})' is '2'
#  182|     if (!is_aligned (count, offset, err)) return -1;
#  183|   
#  184|->   block = malloc (count);
#  185|     if (block == NULL) {
#  186|       *err = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
nbdkit-1.45.12/filters/tar/tar.c:199:14: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nbdkit-1.45.12/filters/tar/tar.c:158:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:161:8: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:162:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:166:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:170:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/tar/tar.c:175:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:194:9: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:194:9: acquire_memory: allocated here
nbdkit-1.45.12/filters/tar/tar.c:195:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:199:14: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:199:14: danger: 'buf' leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  197|       return -1;
#  198|     }
#  199|->   copysize = next->get_size (next);
#  200|     if (copysize == -1)
#  201|       return -1;

Error: CPPCHECK_WARNING (CWE-401): [#def172]
nbdkit-1.45.12/filters/tar/tar.c:201: error[memleak]: Memory leak: buf
#  199|     copysize = next->get_size (next);
#  200|     if (copysize == -1)
#  201|->     return -1;
#  202|     if (tar_limit > 0 && copysize > tar_limit)
#  203|       copysize = tar_limit;

Error: CPPCHECK_WARNING (CWE-401): [#def173]
nbdkit-1.45.12/filters/tar/tar.c:210: error[memleak]: Memory leak: buf
#  208|     if (fp == NULL) {
#  209|       nbdkit_error ("tar: %m");
#  210|->     return -1;
#  211|     }
#  212|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
nbdkit-1.45.12/filters/tar/tar.c:219:31: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "w")'
nbdkit-1.45.12/filters/tar/tar.c:158:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:161:8: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:162:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:166:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:170:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/tar/tar.c:175:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:194:9: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:195:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:199:14: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:200:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:202:7: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:207:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/tar/tar.c:208:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:15: branch_true: following 'true' branch (when 'i < copysize')...
nbdkit-1.45.12/filters/tar/tar.c:221:27: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:226:8: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:15: branch_true: following 'true' branch (when 'i < copysize')...
nbdkit-1.45.12/filters/tar/tar.c:221:27: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:31: danger: 'popen(cmd, "w")' leaks here; was allocated at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#  217|      * files.
#  218|      */
#  219|->   for (i = 0; i < copysize; i += bufsize) {
#  220|       int err, r;
#  221|       const int64_t count = MIN (bufsize, copysize-i);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
nbdkit-1.45.12/filters/tar/tar.c:225:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nbdkit-1.45.12/filters/tar/tar.c:158:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:161:8: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:162:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:166:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:170:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/tar/tar.c:175:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:194:9: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:194:9: acquire_memory: allocated here
nbdkit-1.45.12/filters/tar/tar.c:195:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:199:14: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:200:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:202:7: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:208:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:15: branch_true: following 'true' branch (when 'i < copysize')...
nbdkit-1.45.12/filters/tar/tar.c:221:27: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:225:9: danger: 'buf' leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
#  223|       struct stat statbuf;
#  224|   
#  225|->     r = next->pread (next, buf, count, i, 0, &err);
#  226|       if (r == -1) {
#  227|         errno = err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
nbdkit-1.45.12/filters/tar/tar.c:225:9: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "w")'
nbdkit-1.45.12/filters/tar/tar.c:158:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:161:8: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:162:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:166:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:170:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/tar/tar.c:175:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:194:9: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:195:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:199:14: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:200:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:202:7: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:207:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/tar/tar.c:208:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:15: branch_true: following 'true' branch (when 'i < copysize')...
nbdkit-1.45.12/filters/tar/tar.c:221:27: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:225:9: danger: 'popen(cmd, "w")' leaks here; was allocated at [(13)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/12)
#  223|       struct stat statbuf;
#  224|   
#  225|->     r = next->pread (next, buf, count, i, 0, &err);
#  226|       if (r == -1) {
#  227|         errno = err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
nbdkit-1.45.12/filters/tar/tar.c:228:7: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "w")'
nbdkit-1.45.12/filters/tar/tar.c:158:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:161:8: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:162:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:166:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:170:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/tar/tar.c:175:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:194:9: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:195:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:199:14: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:200:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:202:7: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:207:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/tar/tar.c:208:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:15: branch_true: following 'true' branch (when 'i < copysize')...
nbdkit-1.45.12/filters/tar/tar.c:221:27: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:226:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:227:7: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:228:7: danger: 'popen(cmd, "w")' leaks here; was allocated at [(13)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/12)
#  226|       if (r == -1) {
#  227|         errno = err;
#  228|->       nbdkit_error ("pread: %m");
#  229|         pclose (fp);
#  230|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
nbdkit-1.45.12/filters/tar/tar.c:229:7: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "w")'
nbdkit-1.45.12/filters/tar/tar.c:158:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:161:8: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:162:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:166:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:170:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/tar/tar.c:175:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:194:9: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:195:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:199:14: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:200:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:202:7: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:207:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/tar/tar.c:208:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:15: branch_true: following 'true' branch (when 'i < copysize')...
nbdkit-1.45.12/filters/tar/tar.c:221:27: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:226:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:227:7: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:229:7: danger: 'popen(cmd, "w")' leaks here; was allocated at [(13)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/12)
#  227|         errno = err;
#  228|         nbdkit_error ("pread: %m");
#  229|->       pclose (fp);
#  230|         return -1;
#  231|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
nbdkit-1.45.12/filters/tar/tar.c:233:44: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "w")'
nbdkit-1.45.12/filters/tar/tar.c:158:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:161:8: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:162:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:166:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:170:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/tar/tar.c:175:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:194:9: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:195:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:199:14: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:200:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:202:7: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:207:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/tar/tar.c:208:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:15: branch_true: following 'true' branch (when 'i < copysize')...
nbdkit-1.45.12/filters/tar/tar.c:221:27: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:226:8: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:232:17: branch_true: following 'true' branch (when 'j < count')...
nbdkit-1.45.12/filters/tar/tar.c:233:44: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:233:44: danger: 'popen(cmd, "w")' leaks here; was allocated at [(13)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/12)
#  231|       }
#  232|       for (j = 0; j < count;) {
#  233|->       size_t written = fwrite (&buf[j], 1, count-j, fp);
#  234|         if (written == 0) {
#  235|           nbdkit_error ("tar: error writing to subprocess");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
nbdkit-1.45.12/filters/tar/tar.c:243:41: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "w")'
nbdkit-1.45.12/filters/tar/tar.c:158:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:161:8: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:162:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:166:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:170:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/tar/tar.c:175:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:194:9: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:195:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:199:14: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:200:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:202:7: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:207:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/tar/tar.c:208:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:15: branch_true: following 'true' branch (when 'i < copysize')...
nbdkit-1.45.12/filters/tar/tar.c:221:27: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:226:8: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:243:41: danger: 'popen(cmd, "w")' leaks here; was allocated at [(13)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/12)
#  241|   
#  242|       /* Did we get something in the output file yet? */
#  243|->     if (stat (output, &statbuf) == 0 && statbuf.st_size > 0)
#  244|         break;
#  245|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
nbdkit-1.45.12/filters/tar/tar.c:246:3: warning[-Wanalyzer-malloc-leak]: leak of 'popen(cmd, "w")'
nbdkit-1.45.12/filters/tar/tar.c:158:3: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/tar/tar.c:161:8: branch_true: ...to here
nbdkit-1.45.12/filters/tar/tar.c:162:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:166:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:170:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/filters/tar/tar.c:175:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:188:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:194:9: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:195:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:199:14: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:200:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/tar/tar.c:202:7: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:207:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/tar/tar.c:208:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:219:15: branch_false: following 'false' branch (when 'i >= copysize')...
nbdkit-1.45.12/filters/tar/tar.c:246:3: branch_false: ...to here
nbdkit-1.45.12/filters/tar/tar.c:246:3: danger: 'popen(cmd, "w")' leaks here; was allocated at [(13)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/12)
#  244|         break;
#  245|     }
#  246|->   pclose (fp);
#  247|   
#  248|     /* Open the tar output and try to parse it. */

Error: CPPCHECK_WARNING (CWE-401): [#def182]
nbdkit-1.45.12/filters/time-limit/time-limit.c:101: error[memleak]: Memory leak: h
#   99|   
#  100|     if (next (nxdata, readonly, exportname) == -1)
#  101|->     return NULL;
#  102|   
#  103|     return h;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
nbdkit-1.45.12/filters/xz/blkcache.c:71:5: warning[-Wanalyzer-malloc-leak]: leak of 'c'
nbdkit-1.45.12/filters/xz/blkcache.c:63:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/blkcache.c:64:6: branch_false: following 'false' branch (when 'c' is non-NULL)...
nbdkit-1.45.12/filters/xz/blkcache.c:69:15: branch_false: ...to here
nbdkit-1.45.12/filters/xz/blkcache.c:70:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/blkcache.c:71:5: branch_true: ...to here
nbdkit-1.45.12/filters/xz/blkcache.c:71:5: danger: 'c' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   69|     c->blocks = calloc (maxdepth, sizeof (struct block));
#   70|     if (!c->blocks) {
#   71|->     nbdkit_error ("calloc: %m");
#   72|       free (c);
#   73|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
nbdkit-1.45.12/filters/xz/xz.c:108:10: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/filters/xz/xz.c:99:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xz.c:102:7: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xz.c:102:7: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xz.c:103:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/filters/xz/xz.c:108:10: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xz.c:108:10: danger: 'h' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  106|     }
#  107|   
#  108|->   h->c = new_blkcache (maxdepth);
#  109|     if (!h->c) {
#  110|       free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
nbdkit-1.45.12/filters/xz/xzfile.c:85:5: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:85:5: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:85:5: danger: 'xz' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   83|     /* Check file magic. */
#   84|     if (!check_header_magic (next)) {
#   85|->     nbdkit_error ("xz: not an xz file");
#   86|       goto err1;
#   87|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
nbdkit-1.45.12/filters/xz/xzfile.c:120:7: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: call_function: calling 'check_header_magic' from 'xzfile_open'
#  118|     int err;
#  119|   
#  120|->   if (next->get_size (next) < XZ_HEADER_MAGIC_LEN) {
#  121|       nbdkit_error ("xz: file too short");
#  122|       return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
nbdkit-1.45.12/filters/xz/xzfile.c:121:5: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: call_function: calling 'check_header_magic' from 'xzfile_open'
#  119|   
#  120|     if (next->get_size (next) < XZ_HEADER_MAGIC_LEN) {
#  121|->     nbdkit_error ("xz: file too short");
#  122|       return false;
#  123|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
nbdkit-1.45.12/filters/xz/xzfile.c:124:7: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: call_function: calling 'check_header_magic' from 'xzfile_open'
#  122|       return false;
#  123|     }
#  124|->   if (next->pread (next, buf, XZ_HEADER_MAGIC_LEN, 0, 0, &err) == -1) {
#  125|       nbdkit_error ("xz: could not read header magic: error %d", err);
#  126|       return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
nbdkit-1.45.12/filters/xz/xzfile.c:125:5: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: call_function: calling 'check_header_magic' from 'xzfile_open'
#  123|     }
#  124|     if (next->pread (next, buf, XZ_HEADER_MAGIC_LEN, 0, 0, &err) == -1) {
#  125|->     nbdkit_error ("xz: could not read header magic: error %d", err);
#  126|       return false;
#  127|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
nbdkit-1.45.12/filters/xz/xzfile.c:155:16: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: call_function: calling 'parse_indexes' from 'xzfile_open'
#  153|   
#  154|     /* Check file size is a multiple of 4 bytes. */
#  155|->   pos = size = next->get_size (next);
#  156|     if (pos == -1) {
#  157|       nbdkit_error ("xz: get_size: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
nbdkit-1.45.12/filters/xz/xzfile.c:157:5: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: call_function: calling 'parse_indexes' from 'xzfile_open'
#  155|     pos = size = next->get_size (next);
#  156|     if (pos == -1) {
#  157|->     nbdkit_error ("xz: get_size: %m");
#  158|       goto err;
#  159|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
nbdkit-1.45.12/filters/xz/xzfile.c:161:5: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: call_function: calling 'parse_indexes' from 'xzfile_open'
#  159|     }
#  160|     if ((pos & 3) != 0) {
#  161|->     nbdkit_error ("xz: not an xz file: size is not a multiple of 4 bytes");
#  162|       goto err;
#  163|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
nbdkit-1.45.12/filters/xz/xzfile.c:167:5: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: call_function: calling 'parse_indexes' from 'xzfile_open'
#  165|     /* Jump backwards through the file identifying each stream. */
#  166|     while (pos > 0) {
#  167|->     nbdkit_debug ("looping through streams: pos = %" PRIi64, pos);
#  168|   
#  169|       if (pos < LZMA_STREAM_HEADER_SIZE) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
nbdkit-1.45.12/filters/xz/xzfile.c:170:7: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: call_function: calling 'parse_indexes' from 'xzfile_open'
#  168|   
#  169|       if (pos < LZMA_STREAM_HEADER_SIZE) {
#  170|->       nbdkit_error ("xz: corrupted file at %" PRIi64, pos);
#  171|         goto err;
#  172|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
nbdkit-1.45.12/filters/xz/xzfile.c:174:9: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: call_function: calling 'parse_indexes' from 'xzfile_open'
#  172|       }
#  173|   
#  174|->     if (next->pread (next, footer, LZMA_STREAM_HEADER_SIZE,
#  175|                        pos - LZMA_STREAM_HEADER_SIZE, 0, &err) == -1) {
#  176|         nbdkit_error ("xz: read stream footer: error %d", err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
nbdkit-1.45.12/filters/xz/xzfile.c:176:7: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: call_function: calling 'parse_indexes' from 'xzfile_open'
#  174|       if (next->pread (next, footer, LZMA_STREAM_HEADER_SIZE,
#  175|                        pos - LZMA_STREAM_HEADER_SIZE, 0, &err) == -1) {
#  176|->       nbdkit_error ("xz: read stream footer: error %d", err);
#  177|         goto err;
#  178|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
nbdkit-1.45.12/filters/xz/xzfile.c:190:5: warning[-Wanalyzer-malloc-leak]: leak of 'xz'
nbdkit-1.45.12/filters/xz/xzfile.c:72:1: enter_function: entry to 'xzfile_open'
nbdkit-1.45.12/filters/xz/xzfile.c:77:8: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:78:6: branch_false: following 'false' branch (when 'xz' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:84:8: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:84:6: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:90:13: call_function: calling 'parse_indexes' from 'xzfile_open'
#  188|       (*nr_streams)++;
#  189|   
#  190|->     nbdkit_debug ("decode stream footer at pos = %" PRIi64, pos);
#  191|   
#  192|       /* Does the stream footer look reasonable? */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
nbdkit-1.45.12/filters/xz/xzfile.c:364:31: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nbdkit-1.45.12/filters/xz/xzfile.c:372:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:378:32: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:379:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:384:16: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:395:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:399:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:401:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:406:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:412:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:418:11: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:421:6: branch_false: following 'false' branch (when 'r == 0')...
nbdkit-1.45.12/filters/xz/xzfile.c:429:7: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:430:6: branch_false: following 'false' branch (when 'r == 0')...
nbdkit-1.45.12/filters/xz/xzfile.c:436:7: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:437:6: branch_false: following 'false' branch (when 'r == 0')...
nbdkit-1.45.12/filters/xz/xzfile.c:442:10: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:443:6: branch_false: following 'false' branch (when 'data' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:452:9: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:452:9: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:453:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:458:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:463:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:464:7: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:465:10: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:466:25: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:467:10: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:480:6: branch_false: following 'false' branch (when 'r == 1')...
nbdkit-1.45.12/filters/xz/xzfile.c:485:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:487:15: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:364:31: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:364:31: danger: 'buf' leaks here; was allocated at [(19)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/18)
#  362|     lzma_stream strm = LZMA_STREAM_INIT;
#  363|     const size_t bufsize = 1024 * 1024;
#  364|->   CLEANUP_FREE unsigned char *buf = NULL;
#  365|     char *data = NULL;
#  366|     size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
nbdkit-1.45.12/filters/xz/xzfile.c:469:13: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nbdkit-1.45.12/filters/xz/xzfile.c:372:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:378:32: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:379:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:384:16: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:395:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:399:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:401:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:406:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:412:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:418:11: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:421:6: branch_false: following 'false' branch (when 'r == 0')...
nbdkit-1.45.12/filters/xz/xzfile.c:429:7: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:430:6: branch_false: following 'false' branch (when 'r == 0')...
nbdkit-1.45.12/filters/xz/xzfile.c:436:7: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:437:6: branch_false: following 'false' branch (when 'r == 0')...
nbdkit-1.45.12/filters/xz/xzfile.c:442:10: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:443:6: branch_false: following 'false' branch (when 'data' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:452:9: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:452:9: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:453:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:458:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:463:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:464:7: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:465:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:467:11: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:467:10: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:468:9: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:469:13: danger: 'buf' leaks here; was allocated at [(19)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/18)
#  467|         if (strm.avail_in > 0) {
#  468|           strm.next_in = buf;
#  469|->         if (next->pread (next, buf, strm.avail_in, offs, 0, err) == -1) {
#  470|             nbdkit_error ("xz: read: error %d", *err);
#  471|             goto err2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
nbdkit-1.45.12/filters/xz/xzfile.c:469:13: warning[-Wanalyzer-malloc-leak]: leak of 'data'
nbdkit-1.45.12/filters/xz/xzfile.c:372:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:378:32: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:379:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:384:16: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:395:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:399:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:401:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:406:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:412:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:418:11: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:421:6: branch_false: following 'false' branch (when 'r == 0')...
nbdkit-1.45.12/filters/xz/xzfile.c:429:7: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:430:6: branch_false: following 'false' branch (when 'r == 0')...
nbdkit-1.45.12/filters/xz/xzfile.c:436:7: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:437:6: branch_false: following 'false' branch (when 'r == 0')...
nbdkit-1.45.12/filters/xz/xzfile.c:442:10: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:442:10: acquire_memory: allocated here
nbdkit-1.45.12/filters/xz/xzfile.c:443:6: branch_false: following 'false' branch (when 'data' is non-NULL)...
nbdkit-1.45.12/filters/xz/xzfile.c:452:9: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:453:6: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:458:3: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:463:8: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:464:7: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:465:10: branch_false: following 'false' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:467:11: branch_false: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:467:10: branch_true: following 'true' branch...
nbdkit-1.45.12/filters/xz/xzfile.c:468:9: branch_true: ...to here
nbdkit-1.45.12/filters/xz/xzfile.c:469:13: danger: 'data' leaks here; was allocated at [(17)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/16)
#  467|         if (strm.avail_in > 0) {
#  468|           strm.next_in = buf;
#  469|->         if (next->pread (next, buf, strm.avail_in, offs, 0, err) == -1) {
#  470|             nbdkit_error ("xz: read: error %d", *err);
#  471|             goto err2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
nbdkit-1.45.12/plugins/blkio/blkio.c:186:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/blkio/blkio.c:180:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/blkio/blkio.c:181:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/blkio/blkio.c:186:7: branch_false: ...to here
nbdkit-1.45.12/plugins/blkio/blkio.c:186:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  184|     }
#  185|   
#  186|->   r = blkio_create (driver, &h->b);
#  187|     if (r < 0) {
#  188|       nbdkit_error ("blkio_create: error opening driver: %s: %s", driver,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
nbdkit-1.45.12/plugins/curl/config.c:595:11: warning[-Wanalyzer-malloc-leak]: leak of 'ch'
nbdkit-1.45.12/plugins/curl/config.c:588:8: acquire_memory: allocated here
nbdkit-1.45.12/plugins/curl/config.c:589:6: branch_false: following 'false' branch (when 'ch' is non-NULL)...
nbdkit-1.45.12/plugins/curl/config.c:595:11: branch_false: ...to here
nbdkit-1.45.12/plugins/curl/config.c:595:11: danger: 'ch' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  593|     }
#  594|   
#  595|->   ch->c = curl_easy_init ();
#  596|     if (ch->c == NULL) {
#  597|       nbdkit_error ("curl_easy_init: failed: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
nbdkit-1.45.12/plugins/curl/config.c:597:5: warning[-Wanalyzer-malloc-leak]: leak of 'ch'
nbdkit-1.45.12/plugins/curl/config.c:588:8: acquire_memory: allocated here
nbdkit-1.45.12/plugins/curl/config.c:589:6: branch_false: following 'false' branch (when 'ch' is non-NULL)...
nbdkit-1.45.12/plugins/curl/config.c:595:11: branch_false: ...to here
nbdkit-1.45.12/plugins/curl/config.c:596:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/curl/config.c:597:5: branch_true: ...to here
nbdkit-1.45.12/plugins/curl/config.c:597:5: danger: 'ch' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  595|     ch->c = curl_easy_init ();
#  596|     if (ch->c == NULL) {
#  597|->     nbdkit_error ("curl_easy_init: failed: %m");
#  598|       goto err;
#  599|     }

Error: CPPCHECK_WARNING (CWE-758): [#def204]
nbdkit-1.45.12/plugins/data/format.c:1750: warning[objectIndex]: The address of variable 'root' might be accessed at non-zero index.
# 1748|   
# 1749|     for (i = 0; i < list.len; ++i) {
# 1750|->     const expr_t e = get_node (list.ptr[i]);
# 1751|   
# 1752|       switch (e.t) {

Error: CPPCHECK_WARNING (CWE-404): [#def205]
nbdkit-1.45.12/plugins/data/format.c:2019: error[resourceLeak]: Resource leak: fp
# 2017|     if (fseek (fp, skip, SEEK_SET) == -1) {
# 2018|       nbdkit_error ("%s: fseek: %m", filename);
# 2019|->     return -1;
# 2020|     }
# 2021|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
nbdkit-1.45.12/plugins/eval/call.c:66:22: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
nbdkit-1.45.12/plugins/eval/call.c:70:8: acquire_memory: allocated here
nbdkit-1.45.12/plugins/eval/call.c:71:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/plugins/eval/call.c:74:3: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/call.c:75:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/eval/call.c:76:5: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/call.c:66:22: danger: 'fp' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   64|   debug_call (const char **argv)
#   65|   {
#   66|->   CLEANUP_FREE char *debug = NULL;
#   67|     size_t i, len = 0;
#   68|     FILE *fp;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def207]
nbdkit-1.45.12/plugins/eval/eval.c:190:7: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(script, "w")'
nbdkit-1.45.12/plugins/eval/eval.c:222:1: enter_function: entry to 'eval_load'
nbdkit-1.45.12/plugins/eval/eval.c:230:13: call_function: calling 'create_script' from 'eval_load'
#  188|       if (fwrite (value, len, 1, fp) != 1 ||
#  189|           (value[len - 1] != '\n' && fputc ('\n', fp) == EOF)) {
#  190|->       nbdkit_error ("fwrite: %s: %m", script);
#  191|         fclose (fp);
#  192|         free (script);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
nbdkit-1.45.12/plugins/eval/eval.c:190:7: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(script, "w")'
nbdkit-1.45.12/plugins/eval/eval.c:222:1: enter_function: entry to 'eval_load'
nbdkit-1.45.12/plugins/eval/eval.c:230:13: call_function: calling 'create_script' from 'eval_load'
#  188|       if (fwrite (value, len, 1, fp) != 1 ||
#  189|           (value[len - 1] != '\n' && fputc ('\n', fp) == EOF)) {
#  190|->       nbdkit_error ("fwrite: %s: %m", script);
#  191|         fclose (fp);
#  192|         free (script);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def209]
nbdkit-1.45.12/plugins/eval/eval.c:198:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(script, "w")'
nbdkit-1.45.12/plugins/eval/eval.c:334:1: enter_function: entry to 'create_can_wrapper'
nbdkit-1.45.12/plugins/eval/eval.c:341:18: call_function: calling 'create_script' from 'create_can_wrapper'
#  196|   
#  197|     if (fchmod (fileno (fp), 0500) == -1) {
#  198|->     nbdkit_error ("fchmod: %s: %m", script);
#  199|       fclose (fp);
#  200|       free (script);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
nbdkit-1.45.12/plugins/eval/eval.c:198:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(script, "w")'
nbdkit-1.45.12/plugins/eval/eval.c:334:1: enter_function: entry to 'create_can_wrapper'
nbdkit-1.45.12/plugins/eval/eval.c:341:18: call_function: calling 'create_script' from 'create_can_wrapper'
#  196|   
#  197|     if (fchmod (fileno (fp), 0500) == -1) {
#  198|->     nbdkit_error ("fchmod: %s: %m", script);
#  199|       fclose (fp);
#  200|       free (script);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
nbdkit-1.45.12/plugins/eval/methods.c:252:26: warning[-Wanalyzer-malloc-leak]: leak of 'name'
nbdkit-1.45.12/plugins/eval/methods.c:240:1: enter_function: entry to 'parse_exports'
nbdkit-1.45.12/plugins/eval/methods.c:248:12: call_function: calling 'skip_prefix' from 'parse_exports'
nbdkit-1.45.12/plugins/eval/methods.c:248:12: return_function: returning to 'parse_exports' from 'skip_prefix'
nbdkit-1.45.12/plugins/eval/methods.c:248:6: branch_true: following 'true' branch...
 branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:250:12: branch_true: following 'true' branch (when 'd' is non-NULL)...
nbdkit-1.45.12/plugins/eval/methods.c:251:11: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:251:11: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/eval/methods.c:252:45: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:252:33: acquire_memory: allocated here
nbdkit-1.45.12/plugins/eval/methods.c:254:10: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/eval/methods.c:254:11: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:252:26: danger: 'name' leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  250|       while ((d = strchr (n, '\n')) != NULL) {
#  251|         p = strchr (d + 1, '\n') ?: d + 1;
#  252|->       CLEANUP_FREE char *name = strndup (n, d - n);
#  253|         CLEANUP_FREE char *desc = strndup (d + 1, p - d - 1);
#  254|         if (!name || !desc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
nbdkit-1.45.12/plugins/eval/methods.c:278:26: warning[-Wanalyzer-malloc-leak]: leak of 'desc'
nbdkit-1.45.12/plugins/eval/methods.c:240:1: enter_function: entry to 'parse_exports'
nbdkit-1.45.12/plugins/eval/methods.c:248:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/eval/methods.c:263:17: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:263:17: call_function: calling 'skip_prefix' from 'parse_exports'
nbdkit-1.45.12/plugins/eval/methods.c:263:17: return_function: returning to 'parse_exports' from 'skip_prefix'
nbdkit-1.45.12/plugins/eval/methods.c:263:11: branch_true: following 'true' branch...
 branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:268:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/eval/methods.c:268:22: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:268:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/eval/methods.c:269:11: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:270:10: branch_false: following 'false' branch (when 'p' is NULL)...
nbdkit-1.45.12/plugins/eval/methods.c:272:11: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:268:12: branch_false: following 'false' branch (when 'p' is NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:275:12: branch_true: following 'true' branch (when 'n < d')...
nbdkit-1.45.12/plugins/eval/methods.c:276:11: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:279:33: acquire_memory: allocated here
nbdkit-1.45.12/plugins/eval/methods.c:280:10: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/eval/methods.c:280:11: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:280:11: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/eval/methods.c:284:11: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:284:10: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/eval/methods.c:279:26: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:278:26: danger: 'desc' leaks here; was allocated at [(26)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/25)
#  276|         p = strchr (n, '\n');
#  277|         q = strchr (d, '\n') ?: d;
#  278|->       CLEANUP_FREE char *name = strndup (n, p - n);
#  279|         CLEANUP_FREE char *desc = strndup (d, q - d);
#  280|         if (!name || !desc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
nbdkit-1.45.12/plugins/eval/methods.c:278:26: warning[-Wanalyzer-malloc-leak]: leak of 'name'
nbdkit-1.45.12/plugins/eval/methods.c:240:1: enter_function: entry to 'parse_exports'
nbdkit-1.45.12/plugins/eval/methods.c:248:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/eval/methods.c:263:17: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:263:17: call_function: calling 'skip_prefix' from 'parse_exports'
nbdkit-1.45.12/plugins/eval/methods.c:263:17: return_function: returning to 'parse_exports' from 'skip_prefix'
nbdkit-1.45.12/plugins/eval/methods.c:263:11: branch_true: following 'true' branch...
 branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:268:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/eval/methods.c:268:22: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:268:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/eval/methods.c:269:11: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:270:10: branch_false: following 'false' branch (when 'p' is NULL)...
nbdkit-1.45.12/plugins/eval/methods.c:272:11: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:268:12: branch_false: following 'false' branch (when 'p' is NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:275:12: branch_true: following 'true' branch (when 'n < d')...
nbdkit-1.45.12/plugins/eval/methods.c:276:11: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:278:33: acquire_memory: allocated here
nbdkit-1.45.12/plugins/eval/methods.c:280:10: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/eval/methods.c:280:11: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:278:26: danger: 'name' leaks here; was allocated at [(26)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/25)
#  276|         p = strchr (n, '\n');
#  277|         q = strchr (d, '\n') ?: d;
#  278|->       CLEANUP_FREE char *name = strndup (n, p - n);
#  279|         CLEANUP_FREE char *desc = strndup (d, q - d);
#  280|         if (!name || !desc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
nbdkit-1.45.12/plugins/eval/methods.c:293:26: warning[-Wanalyzer-malloc-leak]: leak of 'name'
nbdkit-1.45.12/plugins/eval/methods.c:248:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/eval/methods.c:263:17: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:263:11: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/eval/methods.c:291:9: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:291:9: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:292:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/eval/methods.c:293:45: branch_true: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:293:33: acquire_memory: allocated here
nbdkit-1.45.12/plugins/eval/methods.c:294:10: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/eval/methods.c:298:11: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:293:26: danger: 'name' leaks here; was allocated at [(10)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/9)
#  291|       n = skip_prefix (s, "NAMES\n") ?: s;
#  292|       while ((p = strchr (n, '\n')) != NULL) {
#  293|->       CLEANUP_FREE char *name = strndup (n, p - n);
#  294|         if (!name) {
#  295|           nbdkit_error ("%s: strndup: %m", script);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
nbdkit-1.45.12/plugins/eval/methods.c:396:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/eval/methods.c:386:25: acquire_memory: allocated here
nbdkit-1.45.12/plugins/eval/methods.c:388:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/eval/methods.c:392:3: branch_false: ...to here
nbdkit-1.45.12/plugins/eval/methods.c:396:11: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  394|   
#  395|     /* We store the string returned by open in the handle. */
#  396|->   switch (sub.call_read (&h->h, args)) {
#  397|     case OK:
#  398|       /* Remove final newline if present. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
nbdkit-1.45.12/plugins/example2/example2.c:136:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/example2/example2.c:130:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/example2/example2.c:131:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/example2/example2.c:136:11: branch_false: ...to here
nbdkit-1.45.12/plugins/example2/example2.c:136:11: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  134|     }
#  135|   
#  136|->   h->fd = open (filename, O_RDONLY|O_CLOEXEC);
#  137|     if (h->fd == -1) {
#  138|       nbdkit_error ("open: %s: %m", filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
nbdkit-1.45.12/plugins/example2/example2.c:138:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/example2/example2.c:130:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/example2/example2.c:131:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/example2/example2.c:136:11: branch_false: ...to here
nbdkit-1.45.12/plugins/example2/example2.c:137:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/example2/example2.c:138:5: branch_true: ...to here
nbdkit-1.45.12/plugins/example2/example2.c:138:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  136|     h->fd = open (filename, O_RDONLY|O_CLOEXEC);
#  137|     if (h->fd == -1) {
#  138|->     nbdkit_error ("open: %s: %m", filename);
#  139|       free (h);
#  140|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
nbdkit-1.45.12/plugins/example3/example3.c:118:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/example3/example3.c:112:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/example3/example3.c:113:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/example3/example3.c:118:11: branch_false: ...to here
nbdkit-1.45.12/plugins/example3/example3.c:118:11: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  116|     }
#  117|   
#  118|->   h->fd = mkstemp (template);
#  119|     if (h->fd == -1) {
#  120|       nbdkit_error ("mkstemp: %s: %m", template);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
nbdkit-1.45.12/plugins/example3/example3.c:120:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/example3/example3.c:112:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/example3/example3.c:113:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/example3/example3.c:118:11: branch_false: ...to here
nbdkit-1.45.12/plugins/example3/example3.c:119:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/example3/example3.c:120:5: branch_true: ...to here
nbdkit-1.45.12/plugins/example3/example3.c:120:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  118|     h->fd = mkstemp (template);
#  119|     if (h->fd == -1) {
#  120|->     nbdkit_error ("mkstemp: %s: %m", template);
#  121|       free (h);
#  122|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
nbdkit-1.45.12/plugins/example3/example3.c:129:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/example3/example3.c:112:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/example3/example3.c:113:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/example3/example3.c:118:11: branch_false: ...to here
nbdkit-1.45.12/plugins/example3/example3.c:119:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/example3/example3.c:125:3: branch_false: ...to here
nbdkit-1.45.12/plugins/example3/example3.c:128:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/example3/example3.c:129:5: branch_true: ...to here
nbdkit-1.45.12/plugins/example3/example3.c:129:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  127|     /* This creates a raw-format sparse file of the required size. */
#  128|     if (ftruncate (h->fd, size) == -1) {
#  129|->     nbdkit_error ("ftruncate: %m");
#  130|       close (h->fd);
#  131|       free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
nbdkit-1.45.12/plugins/example3/example3.c:130:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/example3/example3.c:112:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/example3/example3.c:113:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/example3/example3.c:118:11: branch_false: ...to here
nbdkit-1.45.12/plugins/example3/example3.c:119:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/example3/example3.c:125:3: branch_false: ...to here
nbdkit-1.45.12/plugins/example3/example3.c:128:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/example3/example3.c:129:5: branch_true: ...to here
nbdkit-1.45.12/plugins/example3/example3.c:130:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  128|     if (ftruncate (h->fd, size) == -1) {
#  129|       nbdkit_error ("ftruncate: %m");
#  130|->     close (h->fd);
#  131|       free (h);
#  132|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
nbdkit-1.45.12/plugins/file/file.c:432:19: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(dfd)'
nbdkit-1.45.12/plugins/file/file.c:460:1: enter_function: entry to 'file_list_exports'
nbdkit-1.45.12/plugins/file/file.c:484:8: branch_false: following 'false' branch (when 'dfd != -1')...
nbdkit-1.45.12/plugins/file/file.c:488:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:488:11: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:489:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:493:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:493:9: call_function: calling 'list_exports_of_directory' from 'file_list_exports'
#  430|   
#  431|     errno = 0;
#  432|->   while ((entry = readdir (dir)) != NULL) {
#  433|       int r = -1;
#  434|       struct stat sb;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
nbdkit-1.45.12/plugins/file/file.c:432:19: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(directory)'
nbdkit-1.45.12/plugins/file/file.c:460:1: enter_function: entry to 'file_list_exports'
nbdkit-1.45.12/plugins/file/file.c:473:11: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:474:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:478:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:478:9: call_function: calling 'list_exports_of_directory' from 'file_list_exports'
#  430|   
#  431|     errno = 0;
#  432|->   while ((entry = readdir (dir)) != NULL) {
#  433|       int r = -1;
#  434|       struct stat sb;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def224]
nbdkit-1.45.12/plugins/file/file.c:488:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dfd'
nbdkit-1.45.12/plugins/file/file.c:483:11: acquire_resource: opened here
nbdkit-1.45.12/plugins/file/file.c:484:8: branch_false: following 'false' branch (when 'dfd != -1')...
nbdkit-1.45.12/plugins/file/file.c:488:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:488:11: danger: 'dfd' leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  486|         return -1;
#  487|       }
#  488|->     dir = fdopendir (dfd);
#  489|       if (dir == NULL) {
#  490|         nbdkit_error ("fdopendir: %m");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def225]
nbdkit-1.45.12/plugins/file/file.c:530:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dfd'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:656:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:656:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:662:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:662:11: acquire_resource: opened here
nbdkit-1.45.12/plugins/file/file.c:663:8: branch_false: following 'false' branch (when 'dfd != -1')...
nbdkit-1.45.12/plugins/file/file.c:667:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:667:9: call_function: calling 'open_file_by_name' from 'file_open'
#  528|   
#  529|     if (file[0] == '\0') {
#  530|->     nbdkit_error ("open: cannot use empty file name or export name (\"\")");
#  531|       errno = ENOENT;
#  532|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def226]
nbdkit-1.45.12/plugins/file/file.c:530:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(directory, 589824)'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:600:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:600:11: acquire_resource: opened here
nbdkit-1.45.12/plugins/file/file.c:601:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:605:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:605:9: call_function: calling 'open_file_by_name' from 'file_open'
#  528|   
#  529|     if (file[0] == '\0') {
#  530|->     nbdkit_error ("open: cannot use empty file name or export name (\"\")");
#  531|       errno = ENOENT;
#  532|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
nbdkit-1.45.12/plugins/file/file.c:530:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:574:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:579:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:579:9: call_function: calling 'open_file_by_name' from 'file_open'
#  528|   
#  529|     if (file[0] == '\0') {
#  530|->     nbdkit_error ("open: cannot use empty file name or export name (\"\")");
#  531|       errno = ENOENT;
#  532|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
nbdkit-1.45.12/plugins/file/file.c:530:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:579:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:579:9: call_function: calling 'open_file_by_name' from 'file_open'
#  528|   
#  529|     if (file[0] == '\0') {
#  530|->     nbdkit_error ("open: cannot use empty file name or export name (\"\")");
#  531|       errno = ENOENT;
#  532|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def229]
nbdkit-1.45.12/plugins/file/file.c:541:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dfd'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:656:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:656:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:662:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:662:11: acquire_resource: opened here
nbdkit-1.45.12/plugins/file/file.c:663:8: branch_false: following 'false' branch (when 'dfd != -1')...
nbdkit-1.45.12/plugins/file/file.c:667:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:667:9: call_function: calling 'open_file_by_name' from 'file_open'
#  539|       flags |= O_RDWR;
#  540|   
#  541|->   h->fd = openat (dfd, file, flags);
#  542|     if (h->fd == -1 && !readonly) {
#  543|       nbdkit_debug ("open O_RDWR failed, falling back to read-only: %s: %m",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def230]
nbdkit-1.45.12/plugins/file/file.c:541:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(directory, 589824)'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:600:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:600:11: acquire_resource: opened here
nbdkit-1.45.12/plugins/file/file.c:601:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:605:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:605:9: call_function: calling 'open_file_by_name' from 'file_open'
#  539|       flags |= O_RDWR;
#  540|   
#  541|->   h->fd = openat (dfd, file, flags);
#  542|     if (h->fd == -1 && !readonly) {
#  543|       nbdkit_debug ("open O_RDWR failed, falling back to read-only: %s: %m",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
nbdkit-1.45.12/plugins/file/file.c:541:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:574:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:579:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:579:9: call_function: calling 'open_file_by_name' from 'file_open'
#  539|       flags |= O_RDWR;
#  540|   
#  541|->   h->fd = openat (dfd, file, flags);
#  542|     if (h->fd == -1 && !readonly) {
#  543|       nbdkit_debug ("open O_RDWR failed, falling back to read-only: %s: %m",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
nbdkit-1.45.12/plugins/file/file.c:541:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:579:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:579:9: call_function: calling 'open_file_by_name' from 'file_open'
#  539|       flags |= O_RDWR;
#  540|   
#  541|->   h->fd = openat (dfd, file, flags);
#  542|     if (h->fd == -1 && !readonly) {
#  543|       nbdkit_debug ("open O_RDWR failed, falling back to read-only: %s: %m",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
nbdkit-1.45.12/plugins/file/file.c:543:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:574:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:579:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:579:9: call_function: calling 'open_file_by_name' from 'file_open'
#  541|     h->fd = openat (dfd, file, flags);
#  542|     if (h->fd == -1 && !readonly) {
#  543|->     nbdkit_debug ("open O_RDWR failed, falling back to read-only: %s: %m",
#  544|                     file);
#  545|       flags = (flags & ~O_ACCMODE) | O_RDONLY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
nbdkit-1.45.12/plugins/file/file.c:543:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:579:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:579:9: call_function: calling 'open_file_by_name' from 'file_open'
#  541|     h->fd = openat (dfd, file, flags);
#  542|     if (h->fd == -1 && !readonly) {
#  543|->     nbdkit_debug ("open O_RDWR failed, falling back to read-only: %s: %m",
#  544|                     file);
#  545|       flags = (flags & ~O_ACCMODE) | O_RDONLY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
nbdkit-1.45.12/plugins/file/file.c:546:13: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:579:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:579:9: call_function: calling 'open_file_by_name' from 'file_open'
#  544|                     file);
#  545|       flags = (flags & ~O_ACCMODE) | O_RDONLY;
#  546|->     h->fd = openat (dfd, file, flags);
#  547|       h->can_write = false;
#  548|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
nbdkit-1.45.12/plugins/file/file.c:550:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:574:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:579:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:579:9: call_function: calling 'open_file_by_name' from 'file_open'
#  548|     }
#  549|     if (h->fd == -1) {
#  550|->     nbdkit_error ("open: %s: %m", file);
#  551|       return -1;
#  552|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def237]
nbdkit-1.45.12/plugins/file/file.c:550:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:579:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:579:9: call_function: calling 'open_file_by_name' from 'file_open'
#  548|     }
#  549|     if (h->fd == -1) {
#  550|->     nbdkit_error ("open: %s: %m", file);
#  551|       return -1;
#  552|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
nbdkit-1.45.12/plugins/file/file.c:576:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:575:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:576:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:576:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  574|       h->name = strdup (filename);
#  575|       if (h->name == NULL) {
#  576|->       nbdkit_error ("strdup: %m");
#  577|         goto err;
#  578|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
nbdkit-1.45.12/plugins/file/file.c:585:31: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:585:31: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  583|     case mode_directory: {
#  584|       int dfd;
#  585|->     const char *export_name = nbdkit_export_name ();
#  586|   
#  587|       if (export_name == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
nbdkit-1.45.12/plugins/file/file.c:592:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:592:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:592:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  590|       h->name = strdup (export_name);
#  591|       if (h->name == NULL) {
#  592|->       nbdkit_error ("strdup: %m");
#  593|         goto err;
#  594|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
nbdkit-1.45.12/plugins/file/file.c:596:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:590:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:596:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:596:7: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/6)
#  594|       }
#  595|       if (strchr (h->name, '/')) {
#  596|->       nbdkit_error ("%s: exportname cannot contain /", h->name);
#  597|         errno = EINVAL;
#  598|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def242]
nbdkit-1.45.12/plugins/file/file.c:596:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:596:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:596:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  594|       }
#  595|       if (strchr (h->name, '/')) {
#  596|->       nbdkit_error ("%s: exportname cannot contain /", h->name);
#  597|         errno = EINVAL;
#  598|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def243]
nbdkit-1.45.12/plugins/file/file.c:600:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:590:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:600:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:600:11: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/6)
#  598|         goto err;
#  599|       }
#  600|->     dfd = open (directory, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
#  601|       if (dfd == -1) {
#  602|         nbdkit_error ("open %s: %m", directory);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def244]
nbdkit-1.45.12/plugins/file/file.c:600:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:600:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:600:11: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  598|         goto err;
#  599|       }
#  600|->     dfd = open (directory, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
#  601|       if (dfd == -1) {
#  602|         nbdkit_error ("open %s: %m", directory);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
nbdkit-1.45.12/plugins/file/file.c:602:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:590:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:600:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:601:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:602:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:602:7: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/6)
#  600|       dfd = open (directory, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
#  601|       if (dfd == -1) {
#  602|->       nbdkit_error ("open %s: %m", directory);
#  603|         goto err;
#  604|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
nbdkit-1.45.12/plugins/file/file.c:602:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:600:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:601:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:602:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:602:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  600|       dfd = open (directory, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
#  601|       if (dfd == -1) {
#  602|->       nbdkit_error ("open %s: %m", directory);
#  603|         goto err;
#  604|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
nbdkit-1.45.12/plugins/file/file.c:606:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:600:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:601:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:605:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:605:9: call_function: calling 'open_file_by_name' from 'file_open'
nbdkit-1.45.12/plugins/file/file.c:605:9: return_function: returning to 'file_open' from 'open_file_by_name'
nbdkit-1.45.12/plugins/file/file.c:605:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:606:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:606:7: danger: 'h' leaks here; was allocated at [(2)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/1)
#  604|       }
#  605|       if (open_file_by_name (h, readonly, dfd, h->name) == -1) {
#  606|->       close (dfd);
#  607|         goto err;
#  608|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def248]
nbdkit-1.45.12/plugins/file/file.c:609:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:590:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:600:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:601:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:605:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:605:9: call_function: calling 'open_file_by_name' from 'file_open'
nbdkit-1.45.12/plugins/file/file.c:605:9: return_function: returning to 'file_open' from 'open_file_by_name'
nbdkit-1.45.12/plugins/file/file.c:605:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:609:5: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:609:5: danger: '<unknown>' leaks here; was allocated at [(8)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/7)
#  607|         goto err;
#  608|       }
#  609|->     close (dfd);
#  610|       break;
#  611|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
nbdkit-1.45.12/plugins/file/file.c:609:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:587:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:590:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:591:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:595:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:595:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:600:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:601:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:605:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:605:9: call_function: calling 'open_file_by_name' from 'file_open'
nbdkit-1.45.12/plugins/file/file.c:605:9: return_function: returning to 'file_open' from 'open_file_by_name'
nbdkit-1.45.12/plugins/file/file.c:605:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:609:5: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:609:5: danger: 'h' leaks here; was allocated at [(2)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/1)
#  607|         goto err;
#  608|       }
#  609|->     close (dfd);
#  610|       break;
#  611|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
nbdkit-1.45.12/plugins/file/file.c:646:31: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:646:31: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
#  644|     case mode_dirfd: {
#  645|       int dfd;
#  646|->     const char *export_name = nbdkit_export_name ();
#  647|   
#  648|       if (export_name == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
nbdkit-1.45.12/plugins/file/file.c:653:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:653:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:653:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#  651|       h->name = strdup (export_name);
#  652|       if (h->name == NULL) {
#  653|->       nbdkit_error ("strdup: %m");
#  654|         goto err;
#  655|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
nbdkit-1.45.12/plugins/file/file.c:657:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:651:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:656:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:656:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:657:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:657:7: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/6)
#  655|       }
#  656|       if (strchr (h->name, '/')) {
#  657|->       nbdkit_error ("%s: exportname cannot contain /", h->name);
#  658|         errno = EINVAL;
#  659|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
nbdkit-1.45.12/plugins/file/file.c:657:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:656:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:656:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:657:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:657:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0)
#  655|       }
#  656|       if (strchr (h->name, '/')) {
#  657|->       nbdkit_error ("%s: exportname cannot contain /", h->name);
#  658|         errno = EINVAL;
#  659|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
nbdkit-1.45.12/plugins/file/file.c:664:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:651:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:656:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:656:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:662:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:663:8: branch_true: following 'true' branch (when 'dfd == -1')...
nbdkit-1.45.12/plugins/file/file.c:664:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:664:7: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/6)
#  662|       dfd = dup (filedesc);
#  663|       if (dfd == -1) {
#  664|->       nbdkit_error ("dup: dirfd=%d: %m", filedesc);
#  665|         goto err;
#  666|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
nbdkit-1.45.12/plugins/file/file.c:664:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:656:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:656:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:662:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:663:8: branch_true: following 'true' branch (when 'dfd == -1')...
nbdkit-1.45.12/plugins/file/file.c:664:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:664:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
#  662|       dfd = dup (filedesc);
#  663|       if (dfd == -1) {
#  664|->       nbdkit_error ("dup: dirfd=%d: %m", filedesc);
#  665|         goto err;
#  666|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
nbdkit-1.45.12/plugins/file/file.c:668:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:656:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:656:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:662:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:663:8: branch_false: following 'false' branch (when 'dfd != -1')...
nbdkit-1.45.12/plugins/file/file.c:667:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:667:9: call_function: calling 'open_file_by_name' from 'file_open'
nbdkit-1.45.12/plugins/file/file.c:667:9: return_function: returning to 'file_open' from 'open_file_by_name'
nbdkit-1.45.12/plugins/file/file.c:667:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/file/file.c:668:7: branch_true: ...to here
nbdkit-1.45.12/plugins/file/file.c:668:7: danger: 'h' leaks here; was allocated at [(2)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/1)
#  666|       }
#  667|       if (open_file_by_name (h, readonly, dfd, h->name) == -1) {
#  668|->       close (dfd);
#  669|         goto err;
#  670|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
nbdkit-1.45.12/plugins/file/file.c:671:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:651:15: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:656:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:656:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:662:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:663:8: branch_false: following 'false' branch (when 'dfd != -1')...
nbdkit-1.45.12/plugins/file/file.c:667:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:667:9: call_function: calling 'open_file_by_name' from 'file_open'
nbdkit-1.45.12/plugins/file/file.c:667:9: return_function: returning to 'file_open' from 'open_file_by_name'
nbdkit-1.45.12/plugins/file/file.c:667:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:671:5: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:671:5: danger: '<unknown>' leaks here; was allocated at [(8)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/7)
#  669|         goto err;
#  670|       }
#  671|->     close (dfd);
#  672|       break;
#  673|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
nbdkit-1.45.12/plugins/file/file.c:671:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/file/file.c:559:1: enter_function: entry to 'file_open'
nbdkit-1.45.12/plugins/file/file.c:563:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/file/file.c:564:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/file/file.c:568:3: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:648:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:651:15: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:652:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:656:9: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:656:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:662:11: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:663:8: branch_false: following 'false' branch (when 'dfd != -1')...
nbdkit-1.45.12/plugins/file/file.c:667:46: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:667:9: call_function: calling 'open_file_by_name' from 'file_open'
nbdkit-1.45.12/plugins/file/file.c:667:9: return_function: returning to 'file_open' from 'open_file_by_name'
nbdkit-1.45.12/plugins/file/file.c:667:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/file/file.c:671:5: branch_false: ...to here
nbdkit-1.45.12/plugins/file/file.c:671:5: danger: 'h' leaks here; was allocated at [(2)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/1)
#  669|         goto err;
#  670|       }
#  671|->     close (dfd);
#  672|       break;
#  673|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:470:8: warning[-Wanalyzer-malloc-leak]: leak of 'lfns'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:83:1: enter_function: entry to 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: call_function: calling 'add_volume_label' from 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: return_function: returning to 'create_directory' from 'add_volume_label'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:111:6: branch_false: following 'false' branch (when 'lfns' is non-NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:115:15: branch_false: following 'false' branch (when 'i >= nr_subdirs')...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:122:15: branch_false: following 'false' branch (when 'i >= nr_files')...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: call_function: calling 'convert_long_file_names' from 'create_directory'
#  468|   
#  469|     /* XXX Assumes current locale is UTF-8. */
#  470|->   ic = iconv_open (lfn_encoding, "UTF-8");
#  471|     if (ic == (iconv_t)-1) {
#  472|       nbdkit_error ("iconv: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:471:6: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(&lfn_encoding, "UTF-8")'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:470:8: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:471:6: danger: 'iconv_open(&lfn_encoding, "UTF-8")' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  469|     /* XXX Assumes current locale is UTF-8. */
#  470|     ic = iconv_open (lfn_encoding, "UTF-8");
#  471|->   if (ic == (iconv_t)-1) {
#  472|       nbdkit_error ("iconv: %m");
#  473|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:472:5: warning[-Wanalyzer-malloc-leak]: leak of 'lfns'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:83:1: enter_function: entry to 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: call_function: calling 'add_volume_label' from 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: return_function: returning to 'create_directory' from 'add_volume_label'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:111:6: branch_false: following 'false' branch (when 'lfns' is non-NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:115:15: branch_false: following 'false' branch (when 'i >= nr_subdirs')...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:122:15: branch_false: following 'false' branch (when 'i >= nr_files')...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: call_function: calling 'convert_long_file_names' from 'create_directory'
#  470|     ic = iconv_open (lfn_encoding, "UTF-8");
#  471|     if (ic == (iconv_t)-1) {
#  472|->     nbdkit_error ("iconv: %m");
#  473|       return -1;
#  474|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:482:5: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(&lfn_encoding, "UTF-8")'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:83:1: enter_function: entry to 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: call_function: calling 'add_volume_label' from 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: return_function: returning to 'create_directory' from 'add_volume_label'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:111:6: branch_false: following 'false' branch (when 'lfns' is non-NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:115:15: branch_false: following 'false' branch (when 'i >= nr_subdirs')...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:122:15: branch_false: following 'false' branch (when 'i >= nr_files')...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: call_function: calling 'convert_long_file_names' from 'create_directory'
#  480|     *out = malloc (outlen + 1);
#  481|     if (*out == NULL) {
#  482|->     nbdkit_error ("malloc: %m");
#  483|       iconv_close (ic);
#  484|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:482:5: warning[-Wanalyzer-malloc-leak]: leak of 'lfns'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:83:1: enter_function: entry to 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: call_function: calling 'add_volume_label' from 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: return_function: returning to 'create_directory' from 'add_volume_label'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:111:6: branch_false: following 'false' branch (when 'lfns' is non-NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:115:15: branch_false: following 'false' branch (when 'i >= nr_subdirs')...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:122:15: branch_false: following 'false' branch (when 'i >= nr_files')...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: call_function: calling 'convert_long_file_names' from 'create_directory'
#  480|     *out = malloc (outlen + 1);
#  481|     if (*out == NULL) {
#  482|->     nbdkit_error ("malloc: %m");
#  483|       iconv_close (ic);
#  484|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:483:5: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(&lfn_encoding, "UTF-8")'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:83:1: enter_function: entry to 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: call_function: calling 'add_volume_label' from 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: return_function: returning to 'create_directory' from 'add_volume_label'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:111:6: branch_false: following 'false' branch (when 'lfns' is non-NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:115:15: branch_false: following 'false' branch (when 'i >= nr_subdirs')...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:122:15: branch_false: following 'false' branch (when 'i >= nr_files')...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: call_function: calling 'convert_long_file_names' from 'create_directory'
#  481|     if (*out == NULL) {
#  482|       nbdkit_error ("malloc: %m");
#  483|->     iconv_close (ic);
#  484|       return -1;
#  485|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:483:5: warning[-Wanalyzer-malloc-leak]: leak of 'lfns'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:83:1: enter_function: entry to 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: call_function: calling 'add_volume_label' from 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: return_function: returning to 'create_directory' from 'add_volume_label'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:111:6: branch_false: following 'false' branch (when 'lfns' is non-NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:115:15: branch_false: following 'false' branch (when 'i >= nr_subdirs')...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:122:15: branch_false: following 'false' branch (when 'i >= nr_files')...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: call_function: calling 'convert_long_file_names' from 'create_directory'
#  481|     if (*out == NULL) {
#  482|       nbdkit_error ("malloc: %m");
#  483|->     iconv_close (ic);
#  484|       return -1;
#  485|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:489:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:83:1: enter_function: entry to 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: call_function: calling 'add_volume_label' from 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: return_function: returning to 'create_directory' from 'add_volume_label'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:111:6: branch_false: following 'false' branch (when 'lfns' is non-NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:115:15: branch_false: following 'false' branch (when 'i >= nr_subdirs')...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:122:15: branch_false: following 'false' branch (when 'i >= nr_files')...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: call_function: calling 'convert_long_file_names' from 'create_directory'
#  487|     outp = *out;
#  488|   
#  489|->   r = iconv (ic, (char **) &inp, &inlen, &outp, &outlen);
#  490|     if (r == (size_t)-1) {
#  491|       if (errno == E2BIG) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:489:7: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(&lfn_encoding, "UTF-8")'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:470:8: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:471:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:481:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:486:3: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:489:7: danger: 'iconv_open(&lfn_encoding, "UTF-8")' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  487|     outp = *out;
#  488|   
#  489|->   r = iconv (ic, (char **) &inp, &inlen, &outp, &outlen);
#  490|     if (r == (size_t)-1) {
#  491|       if (errno == E2BIG) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:489:7: warning[-Wanalyzer-malloc-leak]: leak of 'lfns'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:83:1: enter_function: entry to 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: call_function: calling 'add_volume_label' from 'create_directory'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:9: return_function: returning to 'create_directory' from 'add_volume_label'
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:97:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:110:10: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:111:6: branch_false: following 'false' branch (when 'lfns' is non-NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:115:15: branch_false: following 'false' branch (when 'i >= nr_subdirs')...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:122:15: branch_false: following 'false' branch (when 'i >= nr_files')...
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/directory-lfn.c:130:7: call_function: calling 'convert_long_file_names' from 'create_directory'
#  487|     outp = *out;
#  488|   
#  489|->   r = iconv (ic, (char **) &inp, &inlen, &outp, &outlen);
#  490|     if (r == (size_t)-1) {
#  491|       if (errno == E2BIG) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def269]
nbdkit-1.45.12/plugins/floppy/floppy.c:194:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(host_path, 524288)'
nbdkit-1.45.12/plugins/floppy/floppy.c:172:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/plugins/floppy/floppy.c:173:35: branch_true: ...to here
nbdkit-1.45.12/plugins/floppy/floppy.c:187:7: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/floppy/floppy.c:188:19: branch_true: ...to here
nbdkit-1.45.12/plugins/floppy/floppy.c:189:12: acquire_resource: opened here
nbdkit-1.45.12/plugins/floppy/floppy.c:190:10: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/floppy.c:194:41: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/floppy.c:194:11: danger: 'open(host_path, 524288)' leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  192|           return -1;
#  193|         }
#  194|->       r = pread (fd, buf, len, offset - region->start);
#  195|         if (r == -1) {
#  196|           nbdkit_error ("pread: %s: %m", host_path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:303:26: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(".")'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:262:1: enter_function: entry to 'visit'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:277:7: call_function: calling 'dirs_append' from 'visit'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:277:7: return_function: returning to 'visit' from 'dirs_append'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:277:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:287:13: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:288:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:292:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:292:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:297:9: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:297:9: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:298:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:303:26: danger: 'opendir(".")' leaks here; was allocated at [(18)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/17)
#  301|     }
#  302|   
#  303|->   while (errno = 0, (d = readdir (DIR)) != NULL) {
#  304|       if (strcmp (d->d_name, ".") == 0 ||
#  305|           strcmp (d->d_name, "..") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:439:5: warning[-Wanalyzer-malloc-leak]: leak of 'new_file.name'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:407:1: enter_function: entry to 'visit_file'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:415:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:420:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:420:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:428:3: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:429:19: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:430:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:435:3: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:438:7: call_function: calling 'files_append' from 'visit_file'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:438:7: return_function: returning to 'visit_file' from 'files_append'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:438:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:439:5: branch_true: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:439:5: danger: 'new_file.name' leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  437|     fi = floppy->files.len;
#  438|     if (files_append (&floppy->files, new_file) == -1) {
#  439|->     nbdkit_error ("realloc: %m");
#  440|       free (new_file.name);
#  441|       free (host_path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
nbdkit-1.45.12/plugins/floppy/virtual-floppy.h:114:1: warning[-Wanalyzer-malloc-leak]: leak of 'new_file.name'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:407:1: enter_function: entry to 'visit_file'
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:415:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:420:7: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:420:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:428:3: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:429:19: acquire_memory: allocated here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:430:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:435:3: branch_false: ...to here
nbdkit-1.45.12/plugins/floppy/virtual-floppy.c:438:7: call_function: calling 'files_append' from 'visit_file'
#  112|   };
#  113|   
#  114|-> DEFINE_VECTOR_TYPE (files, struct file);
#  115|   
#  116|   /* On disk directory entry (non-LFN). */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  241|     }
#  242|   
#  243|->   h->g = guestfs_create_flags (GUESTFS_CREATE_NO_ENVIRONMENT);
#  244|     if (!h->g) {
#  245|       nbdkit_error ("creating libguestfs handle: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:245:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:245:5: branch_true: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:245:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  243|     h->g = guestfs_create_flags (GUESTFS_CREATE_NO_ENVIRONMENT);
#  244|     if (!h->g) {
#  245|->     nbdkit_error ("creating libguestfs handle: %m");
#  246|       goto err1;
#  247|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  247|     }
#  248|   
#  249|->   guestfs_set_error_handler (h->g, NULL, NULL);
#  250|   
#  251|     if (trace)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:252:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:251:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:252:5: branch_true: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:252:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  250|   
#  251|     if (trace)
#  252|->     guestfs_set_trace (h->g, 1);
#  253|   
#  254|     if (debug)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:255:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:254:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:255:5: branch_true: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:255:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  253|   
#  254|     if (debug)
#  255|->     guestfs_set_verbose (h->g, 1);
#  256|   
#  257|     if (guestfs_parse_environment (h->g) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  255|       guestfs_set_verbose (h->g, 1);
#  256|   
#  257|->   if (guestfs_parse_environment (h->g) == -1) {
#  258|       GERROR (h->g, "guestfs_parse_environment");
#  259|       goto err2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:258:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:258:5: branch_true: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:258:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  256|   
#  257|     if (guestfs_parse_environment (h->g) == -1) {
#  258|->     GERROR (h->g, "guestfs_parse_environment");
#  259|       goto err2;
#  260|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  266|       goto err2;
#  267|   
#  268|->   if (guestfs_launch (h->g) == -1) {
#  269|       GERROR (h->g, "guestfs_launch");
#  270|       goto err2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:269:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:269:5: branch_true: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:269:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  267|   
#  268|     if (guestfs_launch (h->g) == -1) {
#  269|->     GERROR (h->g, "guestfs_launch");
#  270|       goto err2;
#  271|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:302:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:302:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  300|   
#  301|    err2:
#  302|->   guestfs_close (h->g);
#  303|    err1:
#  304|     free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:317:22: warning[-Wanalyzer-malloc-leak]: leak of 'sbuf'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:320:10: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:321:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:322:5: branch_true: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:317:22: danger: 'sbuf' leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  315|                  const uint64_t *array, size_t array_len)
#  316|   {
#  317|->   CLEANUP_FREE char *sbuf = NULL;
#  318|   
#  319|     /* Note the buffer may not be \0 terminated.  Hence this. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:332:8: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: call_function: calling 'set_up_logging' from 'plugin_guestfs_open'
#  330|       GUESTFS_EVENT_APPLIANCE | GUESTFS_EVENT_LIBRARY | GUESTFS_EVENT_TRACE;
#  331|   
#  332|->   eh = guestfs_set_event_callback (g, log_to_nbdkit, EVENTS, 0, NULL);
#  333|     if (eh == -1) {
#  334|       GERROR (g, "guestfs_set_event_callback");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:334:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: call_function: calling 'set_up_logging' from 'plugin_guestfs_open'
#  332|     eh = guestfs_set_event_callback (g, log_to_nbdkit, EVENTS, 0, NULL);
#  333|     if (eh == -1) {
#  334|->     GERROR (g, "guestfs_set_event_callback");
#  335|       return -1;
#  336|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:367:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: call_function: calling 'add_disks' from 'plugin_guestfs_open'
#  365|         domain_optargs.libvirturi = libvirt_uri;
#  366|       }
#  367|->     if (guestfs_add_domain_argv (g, drives->value, &domain_optargs) == -1) {
#  368|         GERROR (g, "domain %s", drives->value);
#  369|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:368:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: call_function: calling 'add_disks' from 'plugin_guestfs_open'
#  366|       }
#  367|       if (guestfs_add_domain_argv (g, drives->value, &domain_optargs) == -1) {
#  368|->       GERROR (g, "domain %s", drives->value);
#  369|         return -1;
#  370|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:380:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: call_function: calling 'add_disks' from 'plugin_guestfs_open'
#  378|         drive_optargs.format = drives->format;
#  379|       }
#  380|->     if (guestfs_add_drive_opts_argv (g, drives->value, &drive_optargs) == -1) {
#  381|         GERROR (g, "disk %s", drives->value);
#  382|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:381:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: call_function: calling 'add_disks' from 'plugin_guestfs_open'
#  379|       }
#  380|       if (guestfs_add_drive_opts_argv (g, drives->value, &drive_optargs) == -1) {
#  381|->       GERROR (g, "disk %s", drives->value);
#  382|         return -1;
#  383|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:402:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: call_function: calling 'mount_filesystems' from 'plugin_guestfs_open'
#  400|     int ret = -1;
#  401|   
#  402|->   roots = guestfs_inspect_os (g);
#  403|     if (roots == NULL) {
#  404|       GERROR (g, "mount=inspect: guestfs_inspect_os");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:404:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: call_function: calling 'mount_filesystems' from 'plugin_guestfs_open'
#  402|     roots = guestfs_inspect_os (g);
#  403|     if (roots == NULL) {
#  404|->     GERROR (g, "mount=inspect: guestfs_inspect_os");
#  405|       goto out;
#  406|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:409:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: call_function: calling 'mount_filesystems' from 'plugin_guestfs_open'
#  407|   
#  408|     if (roots[0] == NULL) {
#  409|->     nbdkit_error ("no operating system was found inside this disk image");
#  410|       goto out;
#  411|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:414:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: call_function: calling 'mount_filesystems' from 'plugin_guestfs_open'
#  412|   
#  413|     if (roots[1] != NULL) {
#  414|->     nbdkit_error ("multiple operating system were found.  "
#  415|                     "The plugin doesn't support that.");
#  416|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:470:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: call_function: calling 'mount_filesystems' from 'plugin_guestfs_open'
#  468|     switch (mounts->type) {
#  469|     case mount_fs:
#  470|->     if (guestfs_mount_options (g, options, mounts->dev, mounts->mp) == -1) {
#  471|         GERROR (g, "mount [%s] %s:%s", options, mounts->dev, mounts->mp);
#  472|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:471:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:232:1: enter_function: entry to 'plugin_guestfs_open'
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:237:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:238:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:243:10: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:244:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:249:3: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:257:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:262:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:265:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:268:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: branch_false: ...to here
nbdkit-1.45.12/plugins/guestfs/guestfs-plugin.c:273:7: call_function: calling 'mount_filesystems' from 'plugin_guestfs_open'
#  469|     case mount_fs:
#  470|       if (guestfs_mount_options (g, options, mounts->dev, mounts->mp) == -1) {
#  471|->       GERROR (g, "mount [%s] %s:%s", options, mounts->dev, mounts->mp);
#  472|         return -1;
#  473|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
nbdkit-1.45.12/plugins/info/info.c:177:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:282:1: enter_function: entry to 'info_open'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:300:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:304:23: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:306:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:317:11: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:317:11: call_function: calling 'decode_base64' from 'info_open'
#  175|     in.data = (unsigned char *) data;
#  176|     in.size = len;
#  177|->   err = gnutls_base64_decode2 (&in, &out);
#  178|     if (err != GNUTLS_E_SUCCESS) {
#  179|       nbdkit_error ("base64: %s", gnutls_strerror (err));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
nbdkit-1.45.12/plugins/info/info.c:179:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:282:1: enter_function: entry to 'info_open'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:300:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:304:23: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:306:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:317:11: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:317:11: call_function: calling 'decode_base64' from 'info_open'
#  177|     err = gnutls_base64_decode2 (&in, &out);
#  178|     if (err != GNUTLS_E_SUCCESS) {
#  179|->     nbdkit_error ("base64: %s", gnutls_strerror (err));
#  180|       /* We don't have to free out.data.  I verified that it is freed on
#  181|        * the error path of gnutls_base64_decode2.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
nbdkit-1.45.12/plugins/info/info.c:213:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:282:1: enter_function: entry to 'info_open'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:326:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:327:9: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:327:9: call_function: calling 'handle_address' from 'info_open'
#  211|       if (inet_ntop (AF_INET, &addr->sin_addr,
#  212|                      u.straddr, sizeof u.straddr) == NULL) {
#  213|->       nbdkit_error ("inet_ntop: %m");
#  214|         return -1;
#  215|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
nbdkit-1.45.12/plugins/info/info.c:218:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:282:1: enter_function: entry to 'info_open'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:326:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:327:9: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:327:9: call_function: calling 'handle_address' from 'info_open'
#  216|       r = asprintf (&str, "%s:%d", u.straddr, ntohs (addr->sin_port));
#  217|       if (r == -1) {
#  218|->       nbdkit_error ("asprintf: %m");
#  219|         return -1;
#  220|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
nbdkit-1.45.12/plugins/info/info.c:228:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:282:1: enter_function: entry to 'info_open'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:326:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:327:9: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:327:9: call_function: calling 'handle_address' from 'info_open'
#  226|       if (inet_ntop (AF_INET6, &addr6->sin6_addr,
#  227|                      u.straddr6, sizeof u.straddr6) == NULL) {
#  228|->       nbdkit_error ("inet_ntop: %m");
#  229|         return -1;
#  230|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
nbdkit-1.45.12/plugins/info/info.c:233:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:282:1: enter_function: entry to 'info_open'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:326:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:327:9: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:327:9: call_function: calling 'handle_address' from 'info_open'
#  231|       r = asprintf (&str, "[%s]:%d", u.straddr6, ntohs (addr6->sin6_port));
#  232|       if (r == -1) {
#  233|->       nbdkit_error ("asprintf: %m");
#  234|         return -1;
#  235|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
nbdkit-1.45.12/plugins/info/info.c:249:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:282:1: enter_function: entry to 'info_open'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:326:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:327:9: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:327:9: call_function: calling 'handle_address' from 'info_open'
#  247|       str = strdup ("unix");
#  248|       if (str == NULL) {
#  249|->       nbdkit_error ("strdup: %m");
#  250|         return -1;
#  251|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
nbdkit-1.45.12/plugins/info/info.c:257:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:282:1: enter_function: entry to 'info_open'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:326:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:327:9: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:327:9: call_function: calling 'handle_address' from 'info_open'
#  255|   
#  256|     default:
#  257|->     nbdkit_debug ("unsupported socket family %d", addr->sin_family);
#  258|       ret->data = NULL;
#  259|       ret->len = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
nbdkit-1.45.12/plugins/info/info.c:299:19: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:299:19: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  297|     case MODE_EXPORTNAME:
#  298|     case MODE_BASE64EXPORTNAME:
#  299|->     export_name = nbdkit_export_name ();
#  300|       if (export_name == NULL) {
#  301|         free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
nbdkit-1.45.12/plugins/info/info.c:310:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:300:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/info/info.c:304:23: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:306:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/info/info.c:307:7: branch_true: ...to here
nbdkit-1.45.12/plugins/info/info.c:309:10: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/info/info.c:310:9: branch_true: ...to here
nbdkit-1.45.12/plugins/info/info.c:310:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  308|         h->data = strdup (export_name);
#  309|         if (h->data == NULL) {
#  310|->         nbdkit_error ("strdup: %m");
#  311|           free (h);
#  312|           return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
nbdkit-1.45.12/plugins/info/info.c:326:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:326:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  324|     case MODE_ADDRESS:
#  325|       addrlen = sizeof addr;
#  326|->     if (nbdkit_peer_name ((struct sockaddr *) &addr, &addrlen) == -1 ||
#  327|           handle_address ((struct sockaddr *) &addr, addrlen, h) == -1) {
#  328|         free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
nbdkit-1.45.12/plugins/info/info.c:349:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/info/info.c:290:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/info/info.c:291:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/info/info.c:296:3: branch_false: ...to here
nbdkit-1.45.12/plugins/info/info.c:348:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/info/info.c:349:7: branch_true: ...to here
nbdkit-1.45.12/plugins/info/info.c:349:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  347|       h->data = strdup (NBDKIT_VERSION_STRING);
#  348|       if (h->data == NULL) {
#  349|->       nbdkit_error ("malloc: %m");
#  350|         free (h);
#  351|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:115:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:116:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  120|   
#  121|     /* Connect to libvirt. */
#  122|->   h->conn = virConnectOpen (libvirt_uri);
#  123|     if (!h->conn) {
#  124|       nbdkit_error ("virConnectOpen failed, see earlier error messages");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:124:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:115:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:116:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:123:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:124:5: branch_true: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:124:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  122|     h->conn = virConnectOpen (libvirt_uri);
#  123|     if (!h->conn) {
#  124|->     nbdkit_error ("virConnectOpen failed, see earlier error messages");
#  125|       goto err1;
#  126|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:129:12: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:115:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:116:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:123:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:129:12: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:129:12: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  127|   
#  128|     /* Open the domain. */
#  129|->   h->dom = virDomainLookupByName (h->conn, domain);
#  130|     if (!h->dom) {
#  131|       nbdkit_error ("virDomainLookupByName: "

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:131:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:115:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:116:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:123:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:129:12: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:130:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:131:5: branch_true: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:131:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  129|     h->dom = virDomainLookupByName (h->conn, domain);
#  130|     if (!h->dom) {
#  131|->     nbdkit_error ("virDomainLookupByName: "
#  132|                     "cannot open domain '%s'", domain);
#  133|       goto err2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:136:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:115:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:116:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:123:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:129:12: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:130:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:136:7: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:136:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  134|     }
#  135|   
#  136|->   if (virDomainGetBlockInfo (h->dom, disk, &info, 0) == -1) {
#  137|       nbdkit_error ("virDomainGetBlockInfo: "
#  138|                     "cannot read information about disk '%s' from domain '%s'",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:115:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:116:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:123:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:129:12: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:130:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:136:7: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:136:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:137:5: branch_true: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:137:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  135|   
#  136|     if (virDomainGetBlockInfo (h->dom, disk, &info, 0) == -1) {
#  137|->     nbdkit_error ("virDomainGetBlockInfo: "
#  138|                     "cannot read information about disk '%s' from domain '%s'",
#  139|                     disk, domain);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:147:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:115:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:116:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:123:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:129:12: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:130:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:136:7: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:136:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:137:5: branch_true: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:147:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  145|   
#  146|   err3:
#  147|->   virDomainFree (h->dom);
#  148|   err2:
#  149|     virConnectClose (h->conn);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:149:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:115:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:116:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:122:13: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:123:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:129:12: branch_false: ...to here
nbdkit-1.45.12/plugins/libvirt/libvirt-plugin.c:149:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  147|     virDomainFree (h->dom);
#  148|   err2:
#  149|->   virConnectClose (h->conn);
#  150|   err1:
#  151|     free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
nbdkit-1.45.12/plugins/lua/lua.c:216:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/lua/lua.c:210:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/lua/lua.c:211:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/lua/lua.c:216:3: branch_false: ...to here
nbdkit-1.45.12/plugins/lua/lua.c:216:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  214|     }
#  215|   
#  216|->   lua_getglobal (L, "open");
#  217|     lua_pushboolean (L, readonly);
#  218|     if (lua_pcall (L, 1, 1, 0) != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
nbdkit-1.45.12/plugins/lua/lua.c:217:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/lua/lua.c:210:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/lua/lua.c:211:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/lua/lua.c:216:3: branch_false: ...to here
nbdkit-1.45.12/plugins/lua/lua.c:217:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  215|   
#  216|     lua_getglobal (L, "open");
#  217|->   lua_pushboolean (L, readonly);
#  218|     if (lua_pcall (L, 1, 1, 0) != 0) {
#  219|       nbdkit_error ("open: %s", lua_tostring (L, -1));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
nbdkit-1.45.12/plugins/lua/lua.c:219:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/lua/lua.c:210:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/lua/lua.c:211:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/lua/lua.c:216:3: branch_false: ...to here
nbdkit-1.45.12/plugins/lua/lua.c:218:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/lua/lua.c:219:5: branch_true: ...to here
nbdkit-1.45.12/plugins/lua/lua.c:219:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  217|     lua_pushboolean (L, readonly);
#  218|     if (lua_pcall (L, 1, 1, 0) != 0) {
#  219|->     nbdkit_error ("open: %s", lua_tostring (L, -1));
#  220|       lua_pop (L, 1);
#  221|       free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
nbdkit-1.45.12/plugins/lua/lua.c:226:8: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/lua/lua.c:210:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/lua/lua.c:211:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/lua/lua.c:216:3: branch_false: ...to here
nbdkit-1.45.12/plugins/lua/lua.c:218:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/lua/lua.c:226:8: branch_false: ...to here
nbdkit-1.45.12/plugins/lua/lua.c:226:8: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  224|   
#  225|     /* Create a reference to the Lua handle returned by open(). */
#  226|->   *h = luaL_ref (L, LUA_REGISTRYINDEX);
#  227|   
#  228|     return h;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def320]
nbdkit-1.45.12/plugins/nbd/nbd.c:279:10: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_create()'
nbdkit-1.45.12/plugins/nbd/nbd.c:254:6: branch_false: following 'false' branch (when 'c <= 1')...
nbdkit-1.45.12/plugins/nbd/nbd.c:259:6: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:259:6: branch_false: following 'false' branch (when 'c != 0')...
nbdkit-1.45.12/plugins/nbd/nbd.c:266:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:272:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:273:30: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:273:30: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:275:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:279:10: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:279:10: danger: 'nbd_create()' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  277|         return -1;
#  278|       }
#  279|->     if (!nbd_supports_uri (nbd)) {
#  280|         nbdkit_error ("libnbd was compiled without uri support");
#  281|         nbd_close (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
nbdkit-1.45.12/plugins/nbd/nbd.c:360:10: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_create()'
nbdkit-1.45.12/plugins/nbd/nbd.c:254:6: branch_false: following 'false' branch (when 'c <= 1')...
nbdkit-1.45.12/plugins/nbd/nbd.c:259:6: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:259:6: branch_false: following 'false' branch (when 'c != 0')...
nbdkit-1.45.12/plugins/nbd/nbd.c:266:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:289:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:329:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:353:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:354:30: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:354:30: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:356:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:360:10: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:360:10: danger: 'nbd_create()' leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  358|         return -1;
#  359|       }
#  360|->     if (!nbd_supports_tls (nbd)) {
#  361|         nbdkit_error ("libnbd was compiled without tls support");
#  362|         nbd_close (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
nbdkit-1.45.12/plugins/nbd/nbd.c:415:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_create()'
nbdkit-1.45.12/plugins/nbd/nbd.c:409:28: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:411:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:415:3: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:415:3: danger: 'nbd_create()' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  413|       exit (EXIT_FAILURE);
#  414|     }
#  415|->   printf ("libnbd_version=%s\n", nbd_get_version (nbd));
#  416|     printf ("libnbd_tls=%d\n", nbd_supports_tls (nbd));
#  417|     printf ("libnbd_uri=%d\n", nbd_supports_uri (nbd));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def323]
nbdkit-1.45.12/plugins/nbd/nbd.c:573:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  571|   {
#  572|     if (tls_certificates &&
#  573|->       nbd_set_tls_certificates (nbd, tls_certificates) == -1)
#  574|       return -1;
#  575|     if (tls_verify >= 0 && nbd_set_tls_verify_peer (nbd, tls_verify) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def324]
nbdkit-1.45.12/plugins/nbd/nbd.c:573:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  571|   {
#  572|     if (tls_certificates &&
#  573|->       nbd_set_tls_certificates (nbd, tls_certificates) == -1)
#  574|       return -1;
#  575|     if (tls_verify >= 0 && nbd_set_tls_verify_peer (nbd, tls_verify) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def325]
nbdkit-1.45.12/plugins/nbd/nbd.c:575:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  573|         nbd_set_tls_certificates (nbd, tls_certificates) == -1)
#  574|       return -1;
#  575|->   if (tls_verify >= 0 && nbd_set_tls_verify_peer (nbd, tls_verify) == -1)
#  576|       return -1;
#  577|     if (tls_username && nbd_set_tls_username (nbd, tls_username) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
nbdkit-1.45.12/plugins/nbd/nbd.c:575:26: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  573|         nbd_set_tls_certificates (nbd, tls_certificates) == -1)
#  574|       return -1;
#  575|->   if (tls_verify >= 0 && nbd_set_tls_verify_peer (nbd, tls_verify) == -1)
#  576|       return -1;
#  577|     if (tls_username && nbd_set_tls_username (nbd, tls_username) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def327]
nbdkit-1.45.12/plugins/nbd/nbd.c:577:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  575|     if (tls_verify >= 0 && nbd_set_tls_verify_peer (nbd, tls_verify) == -1)
#  576|       return -1;
#  577|->   if (tls_username && nbd_set_tls_username (nbd, tls_username) == -1)
#  578|       return -1;
#  579|     if (tls_psk && nbd_set_tls_psk_file (nbd, tls_psk) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
nbdkit-1.45.12/plugins/nbd/nbd.c:577:23: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  575|     if (tls_verify >= 0 && nbd_set_tls_verify_peer (nbd, tls_verify) == -1)
#  576|       return -1;
#  577|->   if (tls_username && nbd_set_tls_username (nbd, tls_username) == -1)
#  578|       return -1;
#  579|     if (tls_psk && nbd_set_tls_psk_file (nbd, tls_psk) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def329]
nbdkit-1.45.12/plugins/nbd/nbd.c:579:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  577|     if (tls_username && nbd_set_tls_username (nbd, tls_username) == -1)
#  578|       return -1;
#  579|->   if (tls_psk && nbd_set_tls_psk_file (nbd, tls_psk) == -1)
#  580|       return -1;
#  581|     if (uri)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
nbdkit-1.45.12/plugins/nbd/nbd.c:579:18: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  577|     if (tls_username && nbd_set_tls_username (nbd, tls_username) == -1)
#  578|       return -1;
#  579|->   if (tls_psk && nbd_set_tls_psk_file (nbd, tls_psk) == -1)
#  580|       return -1;
#  581|     if (uri)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def331]
nbdkit-1.45.12/plugins/nbd/nbd.c:582:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  580|       return -1;
#  581|     if (uri)
#  582|->     return nbd_connect_uri (nbd, uri);
#  583|     else if (sockname)
#  584|       return nbd_connect_unix (nbd, sockname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
nbdkit-1.45.12/plugins/nbd/nbd.c:582:12: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  580|       return -1;
#  581|     if (uri)
#  582|->     return nbd_connect_uri (nbd, uri);
#  583|     else if (sockname)
#  584|       return nbd_connect_unix (nbd, sockname);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def333]
nbdkit-1.45.12/plugins/nbd/nbd.c:584:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  582|       return nbd_connect_uri (nbd, uri);
#  583|     else if (sockname)
#  584|->     return nbd_connect_unix (nbd, sockname);
#  585|     else if (hostname)
#  586|       return nbd_connect_tcp (nbd, hostname, port);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
nbdkit-1.45.12/plugins/nbd/nbd.c:584:12: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  582|       return nbd_connect_uri (nbd, uri);
#  583|     else if (sockname)
#  584|->     return nbd_connect_unix (nbd, sockname);
#  585|     else if (hostname)
#  586|       return nbd_connect_tcp (nbd, hostname, port);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def335]
nbdkit-1.45.12/plugins/nbd/nbd.c:586:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  584|       return nbd_connect_unix (nbd, sockname);
#  585|     else if (hostname)
#  586|->     return nbd_connect_tcp (nbd, hostname, port);
#  587|     else if (raw_cid)
#  588|   #if !USE_VSOCK

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
nbdkit-1.45.12/plugins/nbd/nbd.c:586:12: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  584|       return nbd_connect_unix (nbd, sockname);
#  585|     else if (hostname)
#  586|->     return nbd_connect_tcp (nbd, hostname, port);
#  587|     else if (raw_cid)
#  588|   #if !USE_VSOCK

Error: GCC_ANALYZER_WARNING (CWE-775): [#def337]
nbdkit-1.45.12/plugins/nbd/nbd.c:591:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  589|       abort ();
#  590|   #else
#  591|->     return nbd_connect_vsock (nbd, cid, vport);
#  592|   #endif
#  593|     else if (command.len > 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def338]
nbdkit-1.45.12/plugins/nbd/nbd.c:591:12: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:603:1: enter_function: entry to 'nbdplug_open_handle'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:676:7: call_function: calling 'nbdplug_connect' from 'nbdplug_open_handle'
#  589|       abort ();
#  590|   #else
#  591|->     return nbd_connect_vsock (nbd, cid, vport);
#  592|   #endif
#  593|     else if (command.len > 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
nbdkit-1.45.12/plugins/nbd/nbd.c:615:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:615:5: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:615:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  613|   #ifdef HAVE_PIPE2
#  614|     if (pipe2 (h->fds, O_NONBLOCK)) {
#  615|->     nbdkit_error ("pipe2: %m");
#  616|       free (h);
#  617|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def340]
nbdkit-1.45.12/plugins/nbd/nbd.c:646:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:646:12: danger: leaks here
#  644|   
#  645|    retry:
#  646|->   h->nbd = nbd_create ();
#  647|     if (!h->nbd)
#  648|       goto errnbd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
nbdkit-1.45.12/plugins/nbd/nbd.c:646:12: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:646:12: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  644|   
#  645|    retry:
#  646|->   h->nbd = nbd_create ();
#  647|     if (!h->nbd)
#  648|       goto errnbd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def342]
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: danger: leaks here
#  647|     if (!h->nbd)
#  648|       goto errnbd;
#  649|->   if (nbd_set_export_name (h->nbd, client_export) == -1)
#  650|       goto errnbd;
#  651|     if (nbd_add_meta_context (h->nbd, LIBNBD_CONTEXT_BASE_ALLOCATION) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:646:12: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: danger: '<unknown>' leaks here; was allocated at [(8)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/7)
#  647|     if (!h->nbd)
#  648|       goto errnbd;
#  649|->   if (nbd_set_export_name (h->nbd, client_export) == -1)
#  650|       goto errnbd;
#  651|     if (nbd_add_meta_context (h->nbd, LIBNBD_CONTEXT_BASE_ALLOCATION) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  647|     if (!h->nbd)
#  648|       goto errnbd;
#  649|->   if (nbd_set_export_name (h->nbd, client_export) == -1)
#  650|       goto errnbd;
#  651|     if (nbd_add_meta_context (h->nbd, LIBNBD_CONTEXT_BASE_ALLOCATION) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def345]
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: danger: leaks here
#  649|     if (nbd_set_export_name (h->nbd, client_export) == -1)
#  650|       goto errnbd;
#  651|->   if (nbd_add_meta_context (h->nbd, LIBNBD_CONTEXT_BASE_ALLOCATION) == -1)
#  652|       goto errnbd;
#  653|   #if LIBNBD_HAVE_NBD_SET_FULL_INFO

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  649|     if (nbd_set_export_name (h->nbd, client_export) == -1)
#  650|       goto errnbd;
#  651|->   if (nbd_add_meta_context (h->nbd, LIBNBD_CONTEXT_BASE_ALLOCATION) == -1)
#  652|       goto errnbd;
#  653|   #if LIBNBD_HAVE_NBD_SET_FULL_INFO

Error: GCC_ANALYZER_WARNING (CWE-775): [#def347]
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: danger: leaks here
#  652|       goto errnbd;
#  653|   #if LIBNBD_HAVE_NBD_SET_FULL_INFO
#  654|->   if (nbd_set_full_info (h->nbd, 1) == -1)
#  655|       goto errnbd;
#  656|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
#  652|       goto errnbd;
#  653|   #if LIBNBD_HAVE_NBD_SET_FULL_INFO
#  654|->   if (nbd_set_full_info (h->nbd, 1) == -1)
#  655|       goto errnbd;
#  656|   #endif

Error: GCC_ANALYZER_WARNING (CWE-775): [#def349]
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: danger: leaks here
#  661|      * are safe opting in to this libnbd speedup.
#  662|      */
#  663|->   if (nbd_set_pread_initialize (h->nbd, false) == -1)
#  664|       goto errnbd;
#  665|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
#  661|      * are safe opting in to this libnbd speedup.
#  662|      */
#  663|->   if (nbd_set_pread_initialize (h->nbd, false) == -1)
#  664|       goto errnbd;
#  665|   #endif

Error: GCC_ANALYZER_WARNING (CWE-775): [#def351]
nbdkit-1.45.12/plugins/nbd/nbd.c:668:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:666:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:668:9: danger: leaks here
#  666|     if (dynamic_export && uri) {
#  667|   #if LIBNBD_HAVE_NBD_SET_OPT_MODE
#  668|->     if (nbd_set_opt_mode (h->nbd, 1) == -1)
#  669|         goto errnbd;
#  670|   #else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
nbdkit-1.45.12/plugins/nbd/nbd.c:668:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:666:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:668:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
#  666|     if (dynamic_export && uri) {
#  667|   #if LIBNBD_HAVE_NBD_SET_OPT_MODE
#  668|->     if (nbd_set_opt_mode (h->nbd, 1) == -1)
#  669|         goto errnbd;
#  670|   #else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def353]
nbdkit-1.45.12/plugins/nbd/nbd.c:674:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:7: danger: leaks here
#  672|   #endif
#  673|     }
#  674|->   if (nbd_set_tls (h->nbd, tls) == -1)
#  675|       goto errnbd;
#  676|     if (nbdplug_connect (h->nbd) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
nbdkit-1.45.12/plugins/nbd/nbd.c:674:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:649:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:651:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:651:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:654:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:654:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:663:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:663:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:666:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:674:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
#  672|   #endif
#  673|     }
#  674|->   if (nbd_set_tls (h->nbd, tls) == -1)
#  675|       goto errnbd;
#  676|     if (nbdplug_connect (h->nbd) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def355]
nbdkit-1.45.12/plugins/nbd/nbd.c:708:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:648:5: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:708:3: danger: leaks here
#  706|   
#  707|    errnbd:
#  708|->   nbdkit_error ("%s", nbd_get_error ());
#  709|    err:
#  710|     close (h->fds[0]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
nbdkit-1.45.12/plugins/nbd/nbd.c:708:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:648:5: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:708:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
#  706|   
#  707|    errnbd:
#  708|->   nbdkit_error ("%s", nbd_get_error ());
#  709|    err:
#  710|     close (h->fds[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def357]
nbdkit-1.45.12/plugins/nbd/nbd.c:710:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:648:5: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:710:3: danger: leaks here
#  708|     nbdkit_error ("%s", nbd_get_error ());
#  709|    err:
#  710|->   close (h->fds[0]);
#  711|     close (h->fds[1]);
#  712|     if (h->nbd)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
nbdkit-1.45.12/plugins/nbd/nbd.c:710:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:648:5: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:710:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/0)
#  708|     nbdkit_error ("%s", nbd_get_error ());
#  709|    err:
#  710|->   close (h->fds[0]);
#  711|     close (h->fds[1]);
#  712|     if (h->nbd)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def359]
nbdkit-1.45.12/plugins/nbd/nbd.c:711:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:648:5: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:711:3: danger: leaks here
#  709|    err:
#  710|     close (h->fds[0]);
#  711|->   close (h->fds[1]);
#  712|     if (h->nbd)
#  713|       nbd_close (h->nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
nbdkit-1.45.12/plugins/nbd/nbd.c:711:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:648:5: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:711:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/0)
#  709|    err:
#  710|     close (h->fds[0]);
#  711|->   close (h->fds[1]);
#  712|     if (h->nbd)
#  713|       nbd_close (h->nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def361]
nbdkit-1.45.12/plugins/nbd/nbd.c:713:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/nbd/nbd.c:608:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:609:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:614:14: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:614:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:640:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:641:5: branch_true: following 'true' branch (when 'client_export' is non-NULL)...
nbdkit-1.45.12/plugins/nbd/nbd.c:645:2: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:647:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:649:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:712:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:713:5: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:713:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/0)
#  711|     close (h->fds[1]);
#  712|     if (h->nbd)
#  713|->     nbd_close (h->nbd);
#  714|     free (h);
#  715|     return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
nbdkit-1.45.12/plugins/nbd/nbd.c:741:9: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_create()'
nbdkit-1.45.12/plugins/nbd/nbd.c:736:30: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:739:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:741:9: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:741:9: danger: 'nbd_create()' leaks here; was allocated at [(1)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/0)
#  739|       if (!nbd)
#  740|         goto out;
#  741|->     if (nbd_set_opt_mode (nbd, 1) == -1)
#  742|         goto out;
#  743|       if (nbdplug_connect (nbd) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
nbdkit-1.45.12/plugins/nbd/nbd.c:783:7: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_create()'
nbdkit-1.45.12/plugins/nbd/nbd.c:772:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:779:28: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:779:28: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:781:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:783:7: branch_false: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:783:7: danger: 'nbd_create()' leaks here; was allocated at [(3)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/2)
#  781|     if (!nbd)
#  782|       return "";
#  783|->   if (nbd_set_full_info (nbd, 1) == -1)
#  784|       goto out;
#  785|     if (nbd_set_opt_mode (nbd, 1) == -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
nbdkit-1.45.12/plugins/nbd/nbd.c:846:22: warning[-Wanalyzer-malloc-leak]: leak of 'desc'
nbdkit-1.45.12/plugins/nbd/nbd.c:846:29: acquire_memory: allocated here
nbdkit-1.45.12/plugins/nbd/nbd.c:847:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/nbd/nbd.c:848:12: branch_true: ...to here
nbdkit-1.45.12/plugins/nbd/nbd.c:846:22: danger: 'desc' leaks here; was allocated at [(1)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/0)
#  844|   #if LIBNBD_HAVE_NBD_GET_EXPORT_DESCRIPTION
#  845|     struct handle *h = handle;
#  846|->   CLEANUP_FREE char *desc = nbd_get_export_description (h->nbd);
#  847|     if (desc)
#  848|       return nbdkit_strdup_intern (desc);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def365]
nbdkit-1.45.12/plugins/ondemand/ondemand.c:444:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ondemand/ondemand.c:442:1: enter_function: entry to 'ondemand_open'
nbdkit-1.45.12/plugins/ondemand/ondemand.c:444:3: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/plugins/ondemand/ondemand.c:446:22: branch_true: ...to here
nbdkit-1.45.12/plugins/ondemand/ondemand.c:449:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ondemand/ondemand.c:450:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ondemand/ondemand.c:454:3: branch_false: ...to here
nbdkit-1.45.12/plugins/ondemand/ondemand.c:462:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ondemand/ondemand.c:468:9: branch_false: ...to here
nbdkit-1.45.12/plugins/ondemand/ondemand.c:468:9: call_function: calling 'is_valid_exportname' from 'ondemand_open'
nbdkit-1.45.12/plugins/ondemand/ondemand.c:468:9: return_function: returning to 'ondemand_open' from 'is_valid_exportname'
nbdkit-1.45.12/plugins/ondemand/ondemand.c:468:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ondemand/ondemand.c:474:6: branch_true: ...to here
nbdkit-1.45.12/plugins/ondemand/ondemand.c:479:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ondemand/ondemand.c:502:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ondemand/ondemand.c:502:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ondemand/ondemand.c:508:13: branch_false: ...to here
nbdkit-1.45.12/plugins/ondemand/ondemand.c:509:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ondemand/ondemand.c:514:3: branch_false: ...to here
nbdkit-1.45.12/plugins/ondemand/ondemand.c:444:3: danger: 'h' leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  442|   ondemand_open (int readonly)
#  443|   {
#  444|->   ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_lock);
#  445|     struct handle *h;
#  446|     CLEANUP_FREE char *disk = NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def366]
nbdkit-1.45.12/plugins/partitioning/partitioning.c:144:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(value, 2)'
nbdkit-1.45.12/plugins/partitioning/partitioning.c:132:6: branch_true: following 'true' branch (when the strings are equal)...
nbdkit-1.45.12/plugins/partitioning/partitioning.c:134:5: branch_true: ...to here
nbdkit-1.45.12/plugins/partitioning/partitioning.c:138:15: acquire_resource: opened here
nbdkit-1.45.12/plugins/partitioning/partitioning.c:139:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/partitioning/partitioning.c:144:17: branch_false: ...to here
nbdkit-1.45.12/plugins/partitioning/partitioning.c:144:17: danger: 'open(value, 2)' leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  142|       }
#  143|   
#  144|->     file.size = device_size (file.fd, NULL);
#  145|       if (file.size == -1) {
#  146|         err = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
nbdkit-1.45.12/plugins/perl/perl.c:116:24: warning[-Wanalyzer-malloc-leak]: leak of 'err_copy'
nbdkit-1.45.12/plugins/perl/perl.c:109:1: enter_function: entry to 'check_perl_failure'
nbdkit-1.45.12/plugins/perl/perl.c:113:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/perl/perl.c:116:24: branch_true: ...to here
nbdkit-1.45.12/plugins/perl/perl.c:118:11: call_function: calling 'Perl_SvPV_helper' from 'check_perl_failure'
nbdkit-1.45.12/plugins/perl/perl.c:118:11: return_function: returning to 'check_perl_failure' from 'Perl_SvPV_helper'
nbdkit-1.45.12/plugins/perl/perl.c:123:16: acquire_memory: allocated here
nbdkit-1.45.12/plugins/perl/perl.c:124:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/perl/perl.c:128:8: branch_false: ...to here
nbdkit-1.45.12/plugins/perl/perl.c:116:24: danger: 'err_copy' leaks here; was allocated at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20)
#  114|       const char *err;
#  115|       STRLEN n;
#  116|->     CLEANUP_FREE char *err_copy = NULL;
#  117|   
#  118|       err = SvPV (errsv, n);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
nbdkit-1.45.12/plugins/python/plugin.h:56:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/python/plugin.c:452:1: enter_function: entry to 'py_open'
nbdkit-1.45.12/plugins/python/plugin.c:458:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/python/plugin.c:463:7: branch_false: ...to here
nbdkit-1.45.12/plugins/python/plugin.c:463:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/python/plugin.c:464:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/python/plugin.c:468:3: branch_false: ...to here
nbdkit-1.45.12/plugins/python/plugin.c:474:3: call_function: inlined call to 'Py_DECREF' from 'py_open'
nbdkit-1.45.12/plugins/python/plugin.c:475:7: branch_true: ...to here
nbdkit-1.45.12/plugins/python/plugin.c:475:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/python/plugin.c:480:3: branch_false: ...to here
nbdkit-1.45.12/plugins/python/plugin.c:480:3: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/python/plugin.c:454:3: call_function: inlined call to 'cleanup_release' from 'py_open'
#   54|   cleanup_release (PyGILState_STATE *gstateptr)
#   55|   {
#   56|->   PyGILState_Release (*gstateptr);
#   57|   }
#   58|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
nbdkit-1.45.12/plugins/random/random.c:169:22: warning[-Wanalyzer-malloc-leak]: leak of 'expected'
nbdkit-1.45.12/plugins/random/random.c:169:33: acquire_memory: allocated here
nbdkit-1.45.12/plugins/random/random.c:170:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/random/random.c:175:7: branch_false: ...to here
nbdkit-1.45.12/plugins/random/random.c:169:22: danger: 'expected' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  167|                  uint32_t flags)
#  168|   {
#  169|->   CLEANUP_FREE char *expected = malloc (count);
#  170|     if (expected == NULL) {
#  171|       nbdkit_error ("malloc: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
nbdkit-1.45.12/plugins/sh/call.c:66:22: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
nbdkit-1.45.12/plugins/sh/call.c:70:8: acquire_memory: allocated here
nbdkit-1.45.12/plugins/sh/call.c:71:6: branch_false: following 'false' branch (when 'fp' is non-NULL)...
nbdkit-1.45.12/plugins/sh/call.c:74:3: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/call.c:75:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/sh/call.c:76:5: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/call.c:66:22: danger: 'fp' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   64|   debug_call (const char **argv)
#   65|   {
#   66|->   CLEANUP_FREE char *debug = NULL;
#   67|     size_t i, len = 0;
#   68|     FILE *fp;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
nbdkit-1.45.12/plugins/sh/methods.c:252:26: warning[-Wanalyzer-malloc-leak]: leak of 'name'
nbdkit-1.45.12/plugins/sh/methods.c:240:1: enter_function: entry to 'parse_exports'
nbdkit-1.45.12/plugins/sh/methods.c:248:12: call_function: calling 'skip_prefix' from 'parse_exports'
nbdkit-1.45.12/plugins/sh/methods.c:248:12: return_function: returning to 'parse_exports' from 'skip_prefix'
nbdkit-1.45.12/plugins/sh/methods.c:248:6: branch_true: following 'true' branch...
 branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:250:12: branch_true: following 'true' branch (when 'd' is non-NULL)...
nbdkit-1.45.12/plugins/sh/methods.c:251:11: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:251:11: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/sh/methods.c:252:45: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:252:33: acquire_memory: allocated here
nbdkit-1.45.12/plugins/sh/methods.c:254:10: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sh/methods.c:254:11: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:252:26: danger: 'name' leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  250|       while ((d = strchr (n, '\n')) != NULL) {
#  251|         p = strchr (d + 1, '\n') ?: d + 1;
#  252|->       CLEANUP_FREE char *name = strndup (n, d - n);
#  253|         CLEANUP_FREE char *desc = strndup (d + 1, p - d - 1);
#  254|         if (!name || !desc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
nbdkit-1.45.12/plugins/sh/methods.c:278:26: warning[-Wanalyzer-malloc-leak]: leak of 'desc'
nbdkit-1.45.12/plugins/sh/methods.c:240:1: enter_function: entry to 'parse_exports'
nbdkit-1.45.12/plugins/sh/methods.c:248:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sh/methods.c:263:17: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:263:17: call_function: calling 'skip_prefix' from 'parse_exports'
nbdkit-1.45.12/plugins/sh/methods.c:263:17: return_function: returning to 'parse_exports' from 'skip_prefix'
nbdkit-1.45.12/plugins/sh/methods.c:263:11: branch_true: following 'true' branch...
 branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:268:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/sh/methods.c:268:22: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:268:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/sh/methods.c:269:11: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:270:10: branch_false: following 'false' branch (when 'p' is NULL)...
nbdkit-1.45.12/plugins/sh/methods.c:272:11: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:268:12: branch_false: following 'false' branch (when 'p' is NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:275:12: branch_true: following 'true' branch (when 'n < d')...
nbdkit-1.45.12/plugins/sh/methods.c:276:11: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:279:33: acquire_memory: allocated here
nbdkit-1.45.12/plugins/sh/methods.c:280:10: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sh/methods.c:280:11: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:280:11: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sh/methods.c:284:11: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:284:10: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/sh/methods.c:279:26: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:278:26: danger: 'desc' leaks here; was allocated at [(26)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/25)
#  276|         p = strchr (n, '\n');
#  277|         q = strchr (d, '\n') ?: d;
#  278|->       CLEANUP_FREE char *name = strndup (n, p - n);
#  279|         CLEANUP_FREE char *desc = strndup (d, q - d);
#  280|         if (!name || !desc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
nbdkit-1.45.12/plugins/sh/methods.c:278:26: warning[-Wanalyzer-malloc-leak]: leak of 'name'
nbdkit-1.45.12/plugins/sh/methods.c:240:1: enter_function: entry to 'parse_exports'
nbdkit-1.45.12/plugins/sh/methods.c:248:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sh/methods.c:263:17: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:263:17: call_function: calling 'skip_prefix' from 'parse_exports'
nbdkit-1.45.12/plugins/sh/methods.c:263:17: return_function: returning to 'parse_exports' from 'skip_prefix'
nbdkit-1.45.12/plugins/sh/methods.c:263:11: branch_true: following 'true' branch...
 branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:268:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/sh/methods.c:268:22: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:268:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/sh/methods.c:269:11: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:270:10: branch_false: following 'false' branch (when 'p' is NULL)...
nbdkit-1.45.12/plugins/sh/methods.c:272:11: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:268:12: branch_false: following 'false' branch (when 'p' is NULL)...
 branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:275:12: branch_true: following 'true' branch (when 'n < d')...
nbdkit-1.45.12/plugins/sh/methods.c:276:11: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:278:33: acquire_memory: allocated here
nbdkit-1.45.12/plugins/sh/methods.c:280:10: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sh/methods.c:280:11: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:278:26: danger: 'name' leaks here; was allocated at [(26)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/25)
#  276|         p = strchr (n, '\n');
#  277|         q = strchr (d, '\n') ?: d;
#  278|->       CLEANUP_FREE char *name = strndup (n, p - n);
#  279|         CLEANUP_FREE char *desc = strndup (d, q - d);
#  280|         if (!name || !desc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def374]
nbdkit-1.45.12/plugins/sh/methods.c:293:26: warning[-Wanalyzer-malloc-leak]: leak of 'name'
nbdkit-1.45.12/plugins/sh/methods.c:248:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sh/methods.c:263:17: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:263:11: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sh/methods.c:291:9: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:291:9: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:292:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
nbdkit-1.45.12/plugins/sh/methods.c:293:45: branch_true: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:293:33: acquire_memory: allocated here
nbdkit-1.45.12/plugins/sh/methods.c:294:10: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sh/methods.c:298:11: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:293:26: danger: 'name' leaks here; was allocated at [(10)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/9)
#  291|       n = skip_prefix (s, "NAMES\n") ?: s;
#  292|       while ((p = strchr (n, '\n')) != NULL) {
#  293|->       CLEANUP_FREE char *name = strndup (n, p - n);
#  294|         if (!name) {
#  295|           nbdkit_error ("%s: strndup: %m", script);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
nbdkit-1.45.12/plugins/sh/methods.c:396:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/sh/methods.c:386:25: acquire_memory: allocated here
nbdkit-1.45.12/plugins/sh/methods.c:388:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/sh/methods.c:392:3: branch_false: ...to here
nbdkit-1.45.12/plugins/sh/methods.c:396:11: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  394|   
#  395|     /* We store the string returned by open in the handle. */
#  396|->   switch (sub.call_read (&h->h, args)) {
#  397|     case OK:
#  398|       /* Remove final newline if present. */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def376]
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:302:5: warning[-Wanalyzer-null-argument]: use of NULL 'buf' where non-null expected
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:325:1: enter_function: entry to 'sparse_random_pread'
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:328:25: release_memory: 'block' is NULL
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:331:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:339:3: branch_false: ...to here
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:343:6: branch_true: following 'true' branch (when 'blkoffs != 0')...
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:344:18: branch_true: ...to here
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:346:5: release_memory: 'block' is NULL
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:346:5: call_function: calling 'read_block' from 'sparse_random_pread'
#argument 1 of '__builtin_memset' must be non-null
#  300|   
#  301|     if (bitmap_get_blk (&bm, blknum, 0) == 0) /* hole */
#  302|->     memset (buf, 0, BLOCKSIZE);
#  303|     else if (!random_content) {   /* data when random-content=false */
#  304|       xsrandom (seed + offset, &state);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def377]
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:308:5: warning[-Wanalyzer-null-argument]: use of NULL 'buf' where non-null expected
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:325:1: enter_function: entry to 'sparse_random_pread'
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:328:25: release_memory: 'block' is NULL
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:331:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:339:3: branch_false: ...to here
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:343:6: branch_true: following 'true' branch (when 'blkoffs != 0')...
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:344:18: branch_true: ...to here
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:346:5: release_memory: 'block' is NULL
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:346:5: call_function: calling 'read_block' from 'sparse_random_pread'
#argument 1 of '__builtin_memset' must be non-null
#  306|       s &= 255;
#  307|       if (s == 0) s = 1;
#  308|->     memset (buf, (int)s, BLOCKSIZE);
#  309|     }
#  310|     else {                        /* data when random-content=true */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def378]
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:318:7: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:325:1: enter_function: entry to 'sparse_random_pread'
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:331:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:339:3: branch_false: ...to here
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:343:6: branch_true: following 'true' branch (when 'blkoffs != 0')...
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:344:18: branch_true: ...to here
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:346:5: call_function: calling 'read_block' from 'sparse_random_pread'
#  316|         s = xrandom (&state);
#  317|         s &= 255;
#  318|->       b[i] = s;
#  319|       }
#  320|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:384:25: warning[-Wanalyzer-malloc-leak]: leak of 'block'
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:387:11: acquire_memory: allocated here
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:388:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:393:3: branch_false: ...to here
nbdkit-1.45.12/plugins/sparse-random/sparse-random.c:384:25: danger: 'block' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  382|                         uint32_t flags)
#  383|   {
#  384|->   CLEANUP_FREE uint8_t *block;
#  385|     uint64_t blknum, blkoffs;
#  386|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
nbdkit-1.45.12/plugins/split/split.c:127:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/split/split.c:119:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:127:5: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:127:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  125|     h->files = malloc (filenames.len * sizeof (struct file));
#  126|     if (h->files == NULL) {
#  127|->     nbdkit_error ("malloc: %m");
#  128|       free (h);
#  129|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def381]
nbdkit-1.45.12/plugins/split/split.c:142:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*<unknown>,  flags)'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:142:22: acquire_resource: opened here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:142:22: danger: 'open(*<unknown>,  flags)' leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  140|   
#  141|     for (i = 0; i < filenames.len; ++i) {
#  142|->     h->files[i].fd = open (filenames.ptr[i], flags);
#  143|       if (h->files[i].fd == -1) {
#  144|         nbdkit_error ("open: %s: %m", filenames.ptr[i]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
nbdkit-1.45.12/plugins/split/split.c:142:22: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/split/split.c:119:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:142:22: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  140|   
#  141|     for (i = 0; i < filenames.len; ++i) {
#  142|->     h->files[i].fd = open (filenames.ptr[i], flags);
#  143|       if (h->files[i].fd == -1) {
#  144|         nbdkit_error ("open: %s: %m", filenames.ptr[i]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
nbdkit-1.45.12/plugins/split/split.c:142:22: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(filenames.len * 24)'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:125:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:142:22: danger: 'malloc(filenames.len * 24)' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  140|   
#  141|     for (i = 0; i < filenames.len; ++i) {
#  142|->     h->files[i].fd = open (filenames.ptr[i], flags);
#  143|       if (h->files[i].fd == -1) {
#  144|         nbdkit_error ("open: %s: %m", filenames.ptr[i]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
nbdkit-1.45.12/plugins/split/split.c:144:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/split/split.c:119:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:144:37: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:144:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  142|       h->files[i].fd = open (filenames.ptr[i], flags);
#  143|       if (h->files[i].fd == -1) {
#  144|->       nbdkit_error ("open: %s: %m", filenames.ptr[i]);
#  145|         goto err;
#  146|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
nbdkit-1.45.12/plugins/split/split.c:144:7: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(filenames.len * 24)'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:125:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:144:37: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:144:7: danger: 'malloc(filenames.len * 24)' leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  142|       h->files[i].fd = open (filenames.ptr[i], flags);
#  143|       if (h->files[i].fd == -1) {
#  144|->       nbdkit_error ("open: %s: %m", filenames.ptr[i]);
#  145|         goto err;
#  146|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def386]
nbdkit-1.45.12/plugins/split/split.c:153:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:142:22: acquire_resource: opened here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:153:24: danger: leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  151|       h->files[i].offset = offset;
#  152|   
#  153|->     h->files[i].size = device_size (h->files[i].fd, NULL);
#  154|       if (h->files[i].size == -1) {
#  155|         nbdkit_error ("%s: device_size: %m", filenames.ptr[i]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
nbdkit-1.45.12/plugins/split/split.c:153:24: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/split/split.c:119:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:153:24: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  151|       h->files[i].offset = offset;
#  152|   
#  153|->     h->files[i].size = device_size (h->files[i].fd, NULL);
#  154|       if (h->files[i].size == -1) {
#  155|         nbdkit_error ("%s: device_size: %m", filenames.ptr[i]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def388]
nbdkit-1.45.12/plugins/split/split.c:153:24: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(filenames.len * 24)'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:125:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:153:24: danger: 'malloc(filenames.len * 24)' leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  151|       h->files[i].offset = offset;
#  152|   
#  153|->     h->files[i].size = device_size (h->files[i].fd, NULL);
#  154|       if (h->files[i].size == -1) {
#  155|         nbdkit_error ("%s: device_size: %m", filenames.ptr[i]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def389]
nbdkit-1.45.12/plugins/split/split.c:155:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:142:22: acquire_resource: opened here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:155:44: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:155:7: danger: leaks here; was opened at [(13)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/12)
#  153|       h->files[i].size = device_size (h->files[i].fd, NULL);
#  154|       if (h->files[i].size == -1) {
#  155|->       nbdkit_error ("%s: device_size: %m", filenames.ptr[i]);
#  156|         goto err;
#  157|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
nbdkit-1.45.12/plugins/split/split.c:155:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/split/split.c:119:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:155:44: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:155:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  153|       h->files[i].size = device_size (h->files[i].fd, NULL);
#  154|       if (h->files[i].size == -1) {
#  155|->       nbdkit_error ("%s: device_size: %m", filenames.ptr[i]);
#  156|         goto err;
#  157|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
nbdkit-1.45.12/plugins/split/split.c:155:7: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(filenames.len * 24)'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:125:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:155:44: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:155:7: danger: 'malloc(filenames.len * 24)' leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  153|       h->files[i].size = device_size (h->files[i].fd, NULL);
#  154|       if (h->files[i].size == -1) {
#  155|->       nbdkit_error ("%s: device_size: %m", filenames.ptr[i]);
#  156|         goto err;
#  157|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def392]
nbdkit-1.45.12/plugins/split/split.c:160:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:142:22: acquire_resource: opened here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:158:5: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:160:5: danger: leaks here; was opened at [(13)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/12)
#  158|       offset += h->files[i].size;
#  159|   
#  160|->     nbdkit_debug ("file[%zu]=%s: offset=%" PRIu64 ", size=%" PRIu64,
#  161|                     i, filenames.ptr[i], h->files[i].offset, h->files[i].size);
#  162|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
nbdkit-1.45.12/plugins/split/split.c:160:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/split/split.c:119:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:158:5: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:160:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  158|       offset += h->files[i].size;
#  159|   
#  160|->     nbdkit_debug ("file[%zu]=%s: offset=%" PRIu64 ", size=%" PRIu64,
#  161|                     i, filenames.ptr[i], h->files[i].offset, h->files[i].size);
#  162|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def394]
nbdkit-1.45.12/plugins/split/split.c:160:5: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(filenames.len * 24)'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:125:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:158:5: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:160:5: danger: 'malloc(filenames.len * 24)' leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  158|       offset += h->files[i].size;
#  159|   
#  160|->     nbdkit_debug ("file[%zu]=%s: offset=%" PRIu64 ", size=%" PRIu64,
#  161|                     i, filenames.ptr[i], h->files[i].offset, h->files[i].size);
#  162|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def395]
nbdkit-1.45.12/plugins/split/split.c:165:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:142:22: acquire_resource: opened here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:158:5: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:165:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/plugins/split/split.c:166:9: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:165:5: danger: leaks here; was opened at [(13)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/12)
#  163|   #ifdef SEEK_HOLE
#  164|       /* Test if this file supports extents. */
#  165|->     ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock);
#  166|       r = lseek (h->files[i].fd, 0, SEEK_DATA);
#  167|       if (r == -1 && errno != ENXIO) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def396]
nbdkit-1.45.12/plugins/split/split.c:165:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:125:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:158:5: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:165:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/plugins/split/split.c:166:9: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:167:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:165:5: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  163|   #ifdef SEEK_HOLE
#  164|       /* Test if this file supports extents. */
#  165|->     ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock);
#  166|       r = lseek (h->files[i].fd, 0, SEEK_DATA);
#  167|       if (r == -1 && errno != ENXIO) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def397]
nbdkit-1.45.12/plugins/split/split.c:165:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/split/split.c:119:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:158:5: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:165:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/plugins/split/split.c:166:9: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:165:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  163|   #ifdef SEEK_HOLE
#  164|       /* Test if this file supports extents. */
#  165|->     ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock);
#  166|       r = lseek (h->files[i].fd, 0, SEEK_DATA);
#  167|       if (r == -1 && errno != ENXIO) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def398]
nbdkit-1.45.12/plugins/split/split.c:165:5: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(filenames.len * 24)'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:125:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:158:5: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:165:5: branch_true: following 'true' branch (when '_r == 0')...
nbdkit-1.45.12/plugins/split/split.c:166:9: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:165:5: danger: 'malloc(filenames.len * 24)' leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  163|   #ifdef SEEK_HOLE
#  164|       /* Test if this file supports extents. */
#  165|->     ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock);
#  166|       r = lseek (h->files[i].fd, 0, SEEK_DATA);
#  167|       if (r == -1 && errno != ENXIO) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def399]
nbdkit-1.45.12/plugins/split/split.c:178:3: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:125:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:177:3: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:178:3: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  176|     }
#  177|     h->size = offset;
#  178|->   nbdkit_debug ("total size=%" PRIu64, h->size);
#  179|   
#  180|     return h;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
nbdkit-1.45.12/plugins/split/split.c:178:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/split/split.c:119:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:177:3: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:178:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  176|     }
#  177|     h->size = offset;
#  178|->   nbdkit_debug ("total size=%" PRIu64, h->size);
#  179|   
#  180|     return h;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def401]
nbdkit-1.45.12/plugins/split/split.c:185:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:142:22: acquire_resource: opened here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:150:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:151:13: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:154:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:155:44: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:183:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:184:17: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:184:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:185:7: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:185:7: danger: leaks here; was opened at [(13)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/12)
#  183|     for (i = 0; i < filenames.len; ++i) {
#  184|       if (h->files[i].fd >= 0)
#  185|->       close (h->files[i].fd);
#  186|     }
#  187|     free (h->files);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def402]
nbdkit-1.45.12/plugins/split/split.c:185:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/split/split.c:119:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:144:37: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:183:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:184:17: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:184:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:185:7: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:185:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  183|     for (i = 0; i < filenames.len; ++i) {
#  184|       if (h->files[i].fd >= 0)
#  185|->       close (h->files[i].fd);
#  186|     }
#  187|     free (h->files);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
nbdkit-1.45.12/plugins/split/split.c:185:7: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(filenames.len * 24)'
nbdkit-1.45.12/plugins/split/split.c:120:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/split/split.c:125:22: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:125:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/split/split.c:126:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:141:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:142:28: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/split/split.c:141:34: branch_false: ...to here
nbdkit-1.45.12/plugins/split/split.c:143:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:144:37: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:183:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:184:17: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:184:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/split/split.c:185:7: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:185:7: danger: 'malloc(filenames.len * 24)' leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  183|     for (i = 0; i < filenames.len; ++i) {
#  184|       if (h->files[i].fd >= 0)
#  185|->       close (h->files[i].fd);
#  186|     }
#  187|     free (h->files);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def404]
nbdkit-1.45.12/plugins/split/split.c:258:31: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
nbdkit-1.45.12/plugins/split/split.c:256:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/plugins/split/split.c:257:25: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:258:31: danger: dereference of NULL 'get_file(handle,  offset)'
#  256|     while (count > 0) {
#  257|       struct file *file = get_file (h, offset);
#  258|->     uint64_t foffs = offset - file->offset;
#  259|       uint64_t max;
#  260|       ssize_t r;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def405]
nbdkit-1.45.12/plugins/split/split.c:291:31: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
nbdkit-1.45.12/plugins/split/split.c:289:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/plugins/split/split.c:290:25: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:291:31: danger: dereference of NULL 'get_file(handle,  offset)'
#  289|     while (count > 0) {
#  290|       struct file *file = get_file (h, offset);
#  291|->     uint64_t foffs = offset - file->offset;
#  292|       uint64_t max;
#  293|       ssize_t r;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def406]
nbdkit-1.45.12/plugins/split/split.c:322:31: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
nbdkit-1.45.12/plugins/split/split.c:320:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/plugins/split/split.c:321:25: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:322:31: danger: dereference of NULL 'get_file(handle,  offset)'
#  320|     while (count > 0) {
#  321|       struct file *file = get_file (h, offset);
#  322|->     uint64_t foffs = offset - file->offset;
#  323|       uint64_t max;
#  324|       int r;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def407]
nbdkit-1.45.12/plugins/split/split.c:416:31: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
nbdkit-1.45.12/plugins/split/split.c:414:10: branch_true: following 'true' branch (when 'count != 0')...
nbdkit-1.45.12/plugins/split/split.c:415:25: branch_true: ...to here
nbdkit-1.45.12/plugins/split/split.c:416:31: danger: dereference of NULL 'get_file(handle,  offset)'
#  414|     while (count > 0) {
#  415|       struct file *file = get_file (h, offset);
#  416|->     uint64_t foffs = offset - file->offset;
#  417|       uint64_t max;
#  418|       int64_t r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
nbdkit-1.45.12/plugins/ssh/ssh.c:262:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: call_function: calling 'do_verify_remote_host' from 'ssh_open'
#  260|     enum ssh_known_hosts_e state;
#  261|   
#  262|->   state = ssh_session_is_known_server (h->session);
#  263|     switch (state) {
#  264|     case SSH_KNOWN_HOSTS_OK:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
nbdkit-1.45.12/plugins/ssh/ssh.c:269:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: call_function: calling 'do_verify_remote_host' from 'ssh_open'
#  267|   
#  268|     case SSH_KNOWN_HOSTS_CHANGED:
#  269|->     nbdkit_error ("host key for server changed");
#  270|       return -1;
#  271|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
nbdkit-1.45.12/plugins/ssh/ssh.c:273:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: call_function: calling 'do_verify_remote_host' from 'ssh_open'
#  271|   
#  272|     case SSH_KNOWN_HOSTS_OTHER:
#  273|->     nbdkit_error ("host key for server was not found "
#  274|                     "but another type of key exists");
#  275|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def411]
nbdkit-1.45.12/plugins/ssh/ssh.c:281:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: call_function: calling 'do_verify_remote_host' from 'ssh_open'
#  279|        * host key is set up before using nbdkit so we error out here.
#  280|        */
#  281|->     nbdkit_error ("could not find known_hosts file");
#  282|       return -1;
#  283|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
nbdkit-1.45.12/plugins/ssh/ssh.c:286:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: call_function: calling 'do_verify_remote_host' from 'ssh_open'
#  284|     case SSH_KNOWN_HOSTS_UNKNOWN:
#  285|       /* See: https://gitlab.com/nbdkit/nbdkit/-/issues/10 */
#  286|->     nbdkit_error ("either the host key is unknown, you must use ssh "
#  287|                     "first and accept the host key; or the known_hosts "
#  288|                     "file (usually ~/.ssh/known_hosts) could not be opened, "

Error: GCC_ANALYZER_WARNING (CWE-401): [#def413]
nbdkit-1.45.12/plugins/ssh/ssh.c:293:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:584:29: call_function: calling 'do_verify_remote_host' from 'ssh_open'
#  291|   
#  292|     case SSH_KNOWN_HOSTS_ERROR:
#  293|->     nbdkit_error ("known hosts error: %s", ssh_get_error (h->session));
#  294|       return -1;
#  295|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def414]
nbdkit-1.45.12/plugins/ssh/ssh.c:308:8: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:588:7: call_function: calling 'authenticate' from 'ssh_open'
#  306|     int rc;
#  307|   
#  308|->   rc = ssh_userauth_publickey_auto (session, NULL, NULL);
#  309|     if (rc == SSH_AUTH_ERROR)
#  310|       nbdkit_debug ("public key authentication failed: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
nbdkit-1.45.12/plugins/ssh/ssh.c:310:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:588:7: call_function: calling 'authenticate' from 'ssh_open'
#  308|     rc = ssh_userauth_publickey_auto (session, NULL, NULL);
#  309|     if (rc == SSH_AUTH_ERROR)
#  310|->     nbdkit_debug ("public key authentication failed: %s",
#  311|                     ssh_get_error (session));
#  312|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
nbdkit-1.45.12/plugins/ssh/ssh.c:321:8: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:588:7: call_function: calling 'authenticate' from 'ssh_open'
#  319|     int rc;
#  320|   
#  321|->   rc = ssh_userauth_password (session, NULL, pass);
#  322|     if (rc == SSH_AUTH_ERROR)
#  323|       nbdkit_debug ("password authentication failed: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
nbdkit-1.45.12/plugins/ssh/ssh.c:323:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:588:7: call_function: calling 'authenticate' from 'ssh_open'
#  321|     rc = ssh_userauth_password (session, NULL, pass);
#  322|     if (rc == SSH_AUTH_ERROR)
#  323|->     nbdkit_debug ("password authentication failed: %s",
#  324|                     ssh_get_error (session));
#  325|     return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
nbdkit-1.45.12/plugins/ssh/ssh.c:333:8: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:588:7: call_function: calling 'authenticate' from 'ssh_open'
#  331|     int method, rc;
#  332|   
#  333|->   rc = ssh_userauth_none (h->session, NULL);
#  334|     if (rc == SSH_AUTH_SUCCESS)
#  335|       return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
nbdkit-1.45.12/plugins/ssh/ssh.c:339:12: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:588:7: call_function: calling 'authenticate' from 'ssh_open'
#  337|       return -1;
#  338|   
#  339|->   method = ssh_userauth_list (h->session, NULL);
#  340|     nbdkit_debug ("authentication methods offered by the server [0x%x]: "
#  341|                   "%s%s%s%s%s%s%s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
nbdkit-1.45.12/plugins/ssh/ssh.c:340:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:452:1: enter_function: entry to 'ssh_open'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:584:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:588:7: call_function: calling 'authenticate' from 'ssh_open'
#  338|   
#  339|     method = ssh_userauth_list (h->session, NULL);
#  340|->   nbdkit_debug ("authentication methods offered by the server [0x%x]: "
#  341|                   "%s%s%s%s%s%s%s",
#  342|                   method,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  464|   
#  465|     /* Set up the SSH session. */
#  466|->   h->session = ssh_new ();
#  467|     if (!h->session) {
#  468|       nbdkit_error ("failed to initialize libssh session");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def422]
nbdkit-1.45.12/plugins/ssh/ssh.c:468:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:468:5: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:468:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  466|     h->session = ssh_new ();
#  467|     if (!h->session) {
#  468|->     nbdkit_error ("failed to initialize libssh session");
#  469|       goto err;
#  470|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def423]
nbdkit-1.45.12/plugins/ssh/ssh.c:473:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:472:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:473:5: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:473:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  471|   
#  472|     if (ssh_debug_log > 0) {
#  473|->     ssh_options_set (h->session, SSH_OPTIONS_LOG_VERBOSITY, &ssh_debug_log);
#  474|       /* Even though this is setting a "global", we must call it every
#  475|        * time we set the session otherwise messages go to stderr.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def424]
nbdkit-1.45.12/plugins/ssh/ssh.c:477:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:472:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:473:5: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:477:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  475|        * time we set the session otherwise messages go to stderr.
#  476|        */
#  477|->     ssh_set_log_callback (log_callback);
#  478|     }
#  479|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def425]
nbdkit-1.45.12/plugins/ssh/ssh.c:484:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:484:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  482|      * we fail to set this.
#  483|      */
#  484|->   ssh_options_set (h->session, SSH_OPTIONS_NODELAY, &set);
#  485|   
#  486|     r = ssh_options_set (h->session, SSH_OPTIONS_HOST, host);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def426]
nbdkit-1.45.12/plugins/ssh/ssh.c:486:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:486:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  484|     ssh_options_set (h->session, SSH_OPTIONS_NODELAY, &set);
#  485|   
#  486|->   r = ssh_options_set (h->session, SSH_OPTIONS_HOST, host);
#  487|     if (r != SSH_OK) {
#  488|       nbdkit_error ("failed to set host in libssh session: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def427]
nbdkit-1.45.12/plugins/ssh/ssh.c:488:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:488:5: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:488:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  486|     r = ssh_options_set (h->session, SSH_OPTIONS_HOST, host);
#  487|     if (r != SSH_OK) {
#  488|->     nbdkit_error ("failed to set host in libssh session: %s: %s",
#  489|                     host, ssh_get_error (h->session));
#  490|       goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def428]
nbdkit-1.45.12/plugins/ssh/ssh.c:493:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:492:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:493:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:493:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  491|     }
#  492|     if (port != NULL) {
#  493|->     r = ssh_options_set (h->session, SSH_OPTIONS_PORT_STR, port);
#  494|       if (r != SSH_OK) {
#  495|         nbdkit_error ("failed to set port in libssh session: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def429]
nbdkit-1.45.12/plugins/ssh/ssh.c:495:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:492:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:493:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:494:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:495:7: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:495:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  493|       r = ssh_options_set (h->session, SSH_OPTIONS_PORT_STR, port);
#  494|       if (r != SSH_OK) {
#  495|->       nbdkit_error ("failed to set port in libssh session: %s: %s",
#  496|                       port, ssh_get_error (h->session));
#  497|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def430]
nbdkit-1.45.12/plugins/ssh/ssh.c:501:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:500:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:501:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:501:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  499|     }
#  500|     if (user != NULL) {
#  501|->     r = ssh_options_set (h->session, SSH_OPTIONS_USER, user);
#  502|       if (r != SSH_OK) {
#  503|         nbdkit_error ("failed to set user in libssh session: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
nbdkit-1.45.12/plugins/ssh/ssh.c:503:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:500:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:501:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:502:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:503:7: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:503:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
#  501|       r = ssh_options_set (h->session, SSH_OPTIONS_USER, user);
#  502|       if (r != SSH_OK) {
#  503|->       nbdkit_error ("failed to set user in libssh session: %s: %s",
#  504|                       user, ssh_get_error (h->session));
#  505|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def432]
nbdkit-1.45.12/plugins/ssh/ssh.c:509:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:508:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:509:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:509:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#  507|     }
#  508|     if (known_hosts != NULL) {
#  509|->     r = ssh_options_set (h->session, SSH_OPTIONS_KNOWNHOSTS, known_hosts);
#  510|       if (r != SSH_OK) {
#  511|         nbdkit_error ("failed to set known_hosts in libssh session: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def433]
nbdkit-1.45.12/plugins/ssh/ssh.c:511:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:508:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:509:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:510:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:511:7: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:511:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
#  509|       r = ssh_options_set (h->session, SSH_OPTIONS_KNOWNHOSTS, known_hosts);
#  510|       if (r != SSH_OK) {
#  511|->       nbdkit_error ("failed to set known_hosts in libssh session: %s: %s",
#  512|                       known_hosts, ssh_get_error (h->session));
#  513|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
nbdkit-1.45.12/plugins/ssh/ssh.c:521:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:520:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:522:52: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:521:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
#  519|     }
#  520|     for (i = 0; i < identities.len; ++i) {
#  521|->     r = ssh_options_set (h->session,
#  522|                            SSH_OPTIONS_ADD_IDENTITY, identities.ptr[i]);
#  523|       if (r != SSH_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
nbdkit-1.45.12/plugins/ssh/ssh.c:524:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:520:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:522:52: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:523:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:524:7: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:524:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
#  522|                            SSH_OPTIONS_ADD_IDENTITY, identities.ptr[i]);
#  523|       if (r != SSH_OK) {
#  524|->       nbdkit_error ("failed to add identity in libssh session: %s: %s",
#  525|                       identities.ptr[i], ssh_get_error (h->session));
#  526|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
nbdkit-1.45.12/plugins/ssh/ssh.c:531:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:529:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:530:10: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:531:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
#  529|     if (timeout > 0) {
#  530|       long arg = timeout;
#  531|->     r = ssh_options_set (h->session, SSH_OPTIONS_TIMEOUT, &arg);
#  532|       if (r != SSH_OK) {
#  533|         nbdkit_error ("failed to set timeout in libssh session: %" PRIu32 ": %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
nbdkit-1.45.12/plugins/ssh/ssh.c:533:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:529:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:530:10: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:532:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:533:7: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:533:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
#  531|       r = ssh_options_set (h->session, SSH_OPTIONS_TIMEOUT, &arg);
#  532|       if (r != SSH_OK) {
#  533|->       nbdkit_error ("failed to set timeout in libssh session: %" PRIu32 ": %s",
#  534|                       timeout, ssh_get_error (h->session));
#  535|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def438]
nbdkit-1.45.12/plugins/ssh/ssh.c:540:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:539:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:540:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:540:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
#  538|   
#  539|     if (compression) {
#  540|->     r = ssh_options_set (h->session, SSH_OPTIONS_COMPRESSION, "yes");
#  541|       if (r != SSH_OK) {
#  542|         nbdkit_error ("failed to enable compression in libssh session: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
nbdkit-1.45.12/plugins/ssh/ssh.c:542:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:539:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:540:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:541:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:542:7: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:542:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/0)
#  540|       r = ssh_options_set (h->session, SSH_OPTIONS_COMPRESSION, "yes");
#  541|       if (r != SSH_OK) {
#  542|->       nbdkit_error ("failed to enable compression in libssh session: %s",
#  543|                       ssh_get_error (h->session));
#  544|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
nbdkit-1.45.12/plugins/ssh/ssh.c:556:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:551:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:556:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:556:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/0)
#  554|        * ignored.
#  555|        */
#  556|->     r = ssh_options_parse_config (h->session, NULL);
#  557|       if (r != SSH_OK) {
#  558|         nbdkit_error ("failed to parse local SSH configuration: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def441]
nbdkit-1.45.12/plugins/ssh/ssh.c:558:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:551:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:556:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:557:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:558:7: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:558:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/0)
#  556|       r = ssh_options_parse_config (h->session, NULL);
#  557|       if (r != SSH_OK) {
#  558|->       nbdkit_error ("failed to parse local SSH configuration: %s",
#  559|                       ssh_get_error (h->session));
#  560|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
nbdkit-1.45.12/plugins/ssh/ssh.c:567:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:551:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:563:12: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:563:11: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:567:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:567:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/0)
#  565|        * case where the file is missing - should we check this? XXX
#  566|        */
#  567|->     r = ssh_options_parse_config (h->session, config);
#  568|       if (r != SSH_OK) {
#  569|         nbdkit_error ("failed to parse SSH configuration: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def443]
nbdkit-1.45.12/plugins/ssh/ssh.c:569:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:551:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:563:12: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:563:11: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:567:9: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:568:8: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:569:7: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:569:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/0)
#  567|       r = ssh_options_parse_config (h->session, config);
#  568|       if (r != SSH_OK) {
#  569|->       nbdkit_error ("failed to parse SSH configuration: %s: %s",
#  570|                       config, ssh_get_error (h->session));
#  571|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
nbdkit-1.45.12/plugins/ssh/ssh.c:576:7: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:576:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/0)
#  574|   
#  575|     /* Connect. */
#  576|->   r = ssh_connect (h->session);
#  577|     if (r != SSH_OK) {
#  578|       nbdkit_error ("failed to connect to remote host: %s: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def445]
nbdkit-1.45.12/plugins/ssh/ssh.c:578:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:467:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:472:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:487:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:492:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:577:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:578:5: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:578:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/0)
#  576|     r = ssh_connect (h->session);
#  577|     if (r != SSH_OK) {
#  578|->     nbdkit_error ("failed to connect to remote host: %s: %s",
#  579|                     host, ssh_get_error (h->session));
#  580|       goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
nbdkit-1.45.12/plugins/ssh/ssh.c:620:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:615:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:617:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:617:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:619:6: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:619:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:620:5: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:620:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/0)
#  618|       sftp_free (h->sftp);
#  619|     if (h->session) {
#  620|->     ssh_disconnect (h->session);
#  621|       ssh_free (h->session);
#  622|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
nbdkit-1.45.12/plugins/ssh/ssh.c:621:5: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/plugins/ssh/ssh.c:459:7: acquire_memory: allocated here
nbdkit-1.45.12/plugins/ssh/ssh.c:460:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/plugins/ssh/ssh.c:466:16: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:615:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:617:7: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:617:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:619:6: branch_false: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:619:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/ssh/ssh.c:620:5: branch_true: ...to here
nbdkit-1.45.12/plugins/ssh/ssh.c:621:5: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/0)
#  619|     if (h->session) {
#  620|       ssh_disconnect (h->session);
#  621|->     ssh_free (h->session);
#  622|     }
#  623|     free (h);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def448]
nbdkit-1.45.12/plugins/vddk/reexec.c:92:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&cmdline_file, 524288)'
nbdkit-1.45.12/plugins/vddk/reexec.c:82:8: acquire_resource: opened here
nbdkit-1.45.12/plugins/vddk/reexec.c:83:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/reexec.c:92:8: danger: 'open(&cmdline_file, 524288)' leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   90|       ssize_t r;
#   91|   
#   92|->     if (string_reserve (&buf, 512) == -1) {
#   93|         nbdkit_error ("realloc: %m");
#   94|         exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def449]
nbdkit-1.45.12/plugins/vddk/reexec.c:96:38: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&cmdline_file, 524288)'
nbdkit-1.45.12/plugins/vddk/reexec.c:82:8: acquire_resource: opened here
nbdkit-1.45.12/plugins/vddk/reexec.c:83:6: branch_false: following 'false' branch...
 branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/reexec.c:92:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/reexec.c:96:38: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/reexec.c:96:38: danger: 'open(&cmdline_file, 524288)' leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   94|         exit (EXIT_FAILURE);
#   95|       }
#   96|->     r = read (fd, buf.ptr + buf.len, buf.cap - buf.len);
#   97|       if (r == -1) {
#   98|         nbdkit_error ("read: %s: %m", cmdline_file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
nbdkit-1.45.12/plugins/vddk/vddk.c:458:22: warning[-Wanalyzer-malloc-leak]: leak of 'orig_error'
nbdkit-1.45.12/plugins/vddk/vddk.c:468:15: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:474:9: branch_true: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:474:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:479:10: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:480:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:489:8: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:489:8: branch_true: following 'true' branch (when 'i == 0')...
nbdkit-1.45.12/plugins/vddk/vddk.c:490:20: branch_true: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:491:10: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:492:22: branch_true: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:492:22: acquire_memory: allocated here
nbdkit-1.45.12/plugins/vddk/vddk.c:495:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:507:3: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:507:3: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:43:1: branch_true: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:43:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:51:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:51:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:54:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:54:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:57:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:57:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:60:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:60:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:63:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:63:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:66:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:66:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:73:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:73:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:79:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:79:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:82:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:82:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:85:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:85:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:88:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:88:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:92:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:92:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:95:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:95:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:100:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:100:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:105:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:105:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:114:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:114:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:117:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:117:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:123:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:123:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:131:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:131:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:136:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:136:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:142:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:142:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:145:1: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk-stubs.h:145:1: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vddk/vddk.c:458:22: branch_false: ...to here
nbdkit-1.45.12/plugins/vddk/vddk.c:458:22: danger: 'orig_error' leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  456|     };
#  457|     size_t i;
#  458|->   CLEANUP_FREE char *orig_error = NULL;
#  459|   
#  460|     if (!libdir) {

Error: CPPCHECK_WARNING (CWE-476): [#def451]
nbdkit-1.45.12/plugins/vddk/vddk.h:152: error[ctunullpointer]: Null pointer dereference: key
#  150|   };
#  151|   
#  152|-> DEFINE_VECTOR_TYPE (command_queue, struct command *);
#  153|   
#  154|   /* The per-connection handle. */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def452]
nbdkit-1.45.12/plugins/vram/vram.c:501:5: warning[-Wanalyzer-null-argument]: use of NULL 'buf' where non-null expected
nbdkit-1.45.12/plugins/vram/vram.c:703:1: enter_function: entry to 'vram_zero'
nbdkit-1.45.12/plugins/vram/vram.c:705:25: release_memory: 'bounce' is NULL
nbdkit-1.45.12/plugins/vram/vram.c:709:6: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vram/vram.c:717:3: branch_false: ...to here
nbdkit-1.45.12/plugins/vram/vram.c:721:6: branch_true: following 'true' branch (when 'bufoffs != 0')...
nbdkit-1.45.12/plugins/vram/vram.c:722:18: branch_true: ...to here
nbdkit-1.45.12/plugins/vram/vram.c:724:9: release_memory: 'bounce' is NULL
nbdkit-1.45.12/plugins/vram/vram.c:724:9: call_function: calling 'read_buffer' from 'vram_zero'
#argument 1 of '__builtin_memset' must be non-null
#  499|     }
#  500|     else {                        /* Sparse. */
#  501|->     memset (buf, 0, BUFFER_SIZE);
#  502|     }
#  503|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
nbdkit-1.45.12/plugins/vram/vram.c:705:25: warning[-Wanalyzer-malloc-leak]: leak of 'bounce'
nbdkit-1.45.12/plugins/vram/vram.c:709:6: branch_true: following 'true' branch...
nbdkit-1.45.12/plugins/vram/vram.c:710:14: branch_true: ...to here
nbdkit-1.45.12/plugins/vram/vram.c:710:14: acquire_memory: allocated here
nbdkit-1.45.12/plugins/vram/vram.c:711:8: branch_false: following 'false' branch...
nbdkit-1.45.12/plugins/vram/vram.c:717:3: branch_false: ...to here
nbdkit-1.45.12/plugins/vram/vram.c:721:6: branch_false: following 'false' branch (when 'bufoffs == 0')...
 branch_false: ...to here
nbdkit-1.45.12/plugins/vram/vram.c:736:10: branch_false: following 'false' branch (when 'count <= 65535')...
nbdkit-1.45.12/plugins/vram/vram.c:746:7: branch_false: ...to here
nbdkit-1.45.12/plugins/vram/vram.c:753:6: branch_false: following 'false' branch (when 'count == 0')...
nbdkit-1.45.12/plugins/vram/vram.c:764:10: branch_false: ...to here
nbdkit-1.45.12/plugins/vram/vram.c:705:25: danger: 'bounce' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  703|   vram_zero (void *handle, uint32_t count, uint64_t offset, uint32_t flags)
#  704|   {
#  705|->   CLEANUP_FREE uint8_t *bounce = NULL;
#  706|     uint64_t bufnum, bufoffs;
#  707|     cl_int r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
nbdkit-1.45.12/server/backend.c:259:3: warning[-Wanalyzer-malloc-leak]: leak of ‘c’
nbdkit-1.45.12/server/backend.c:253:7: acquire_memory: allocated here
nbdkit-1.45.12/server/backend.c:254:6: branch_false: following ‘false’ branch (when ‘c’ is non-NULL)...
nbdkit-1.45.12/server/backend.c:258:3: branch_false: ...to here
nbdkit-1.45.12/server/backend.c:259:3: danger: ‘c’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  257|     }
#  258|     c->magic = CONTEXT_MAGIC;
#  259|->   PUSH_CONTEXT_FOR_SCOPE (c);
#  260|   
#  261|     controlpath_debug ("%s: open readonly=%d exportname=\"%s\" tls=%d",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
nbdkit-1.45.12/server/captive.c:79:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/captive.c:67:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:70:8: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:70:8: acquire_memory: allocated here
nbdkit-1.45.12/server/captive.c:71:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/captive.c:77:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:78:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/captive.c:79:5: branch_true: ...to here
nbdkit-1.45.12/server/captive.c:79:5: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   77|     fprintf (fp, "uri=");
#   78|     if (uri)
#   79|->     shell_quote (uri, fp);
#   80|     putc ('\n', fp);
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
nbdkit-1.45.12/server/captive.c:88:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/captive.c:67:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:70:8: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:70:8: acquire_memory: allocated here
nbdkit-1.45.12/server/captive.c:71:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/captive.c:77:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:78:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:80:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:87:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/captive.c:88:5: branch_true: ...to here
nbdkit-1.45.12/server/captive.c:88:5: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   86|     fprintf (fp, "exportname=");
#   87|     if (export_name)
#   88|->     shell_quote (export_name, fp);
#   89|     putc ('\n', fp);
#   90|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
nbdkit-1.45.12/server/captive.c:94:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/captive.c:67:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:70:8: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:70:8: acquire_memory: allocated here
nbdkit-1.45.12/server/captive.c:71:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/captive.c:77:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:78:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:80:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:87:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:89:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:93:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/captive.c:94:5: branch_true: ...to here
nbdkit-1.45.12/server/captive.c:94:5: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   92|     fprintf (fp, "port=");
#   93|     if (port)
#   94|->     shell_quote (port, fp);
#   95|     putc ('\n', fp);
#   96|     fprintf (fp, "unixsocket=");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
nbdkit-1.45.12/server/captive.c:98:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/captive.c:67:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:70:8: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:70:8: acquire_memory: allocated here
nbdkit-1.45.12/server/captive.c:71:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/captive.c:77:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:78:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:80:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:87:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:89:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:93:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:95:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:97:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/captive.c:98:5: branch_true: ...to here
nbdkit-1.45.12/server/captive.c:98:5: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   96|     fprintf (fp, "unixsocket=");
#   97|     if (unixsocket)
#   98|->     shell_quote (unixsocket, fp);
#   99|     fprintf (fp, "\n");
#  100|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
nbdkit-1.45.12/server/captive.c:106:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/captive.c:67:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:70:8: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:70:8: acquire_memory: allocated here
nbdkit-1.45.12/server/captive.c:71:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/captive.c:77:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:78:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:80:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:87:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:89:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:93:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:95:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:97:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:99:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:105:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/captive.c:106:5: branch_true: ...to here
nbdkit-1.45.12/server/captive.c:106:5: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  104|     fprintf (fp, "tls_certificates=");
#  105|     if (tls_certificates_dir)
#  106|->     shell_quote (tls_certificates_dir, fp);
#  107|     fprintf (fp, "\n");
#  108|     fprintf (fp, "tls_psk=");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
nbdkit-1.45.12/server/captive.c:110:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/captive.c:67:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:70:8: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:70:8: acquire_memory: allocated here
nbdkit-1.45.12/server/captive.c:71:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/captive.c:77:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:78:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:80:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:87:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:89:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:93:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:95:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:97:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:99:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:105:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:107:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:109:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/captive.c:110:5: branch_true: ...to here
nbdkit-1.45.12/server/captive.c:110:5: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  108|     fprintf (fp, "tls_psk=");
#  109|     if (tls_psk)
#  110|->     shell_quote (tls_psk, fp);
#  111|     fprintf (fp, "\n");
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def461]
nbdkit-1.45.12/server/captive.c:130:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(saved_stdin, 0)’
nbdkit-1.45.12/server/captive.c:67:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:70:8: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:71:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/captive.c:77:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:116:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:122:9: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:123:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
nbdkit-1.45.12/server/captive.c:128:6: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:128:6: branch_true: following ‘true’ branch (when ‘pid > 0’)...
nbdkit-1.45.12/server/captive.c:130:9: branch_true: ...to here
nbdkit-1.45.12/server/captive.c:130:9: acquire_resource: opened here
nbdkit-1.45.12/server/captive.c:130:8: danger: ‘dup2(saved_stdin, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
#  128|     if (pid > 0) {              /* Parent process is the run command. */
#  129|       /* Restore original stdin/out */
#  130|->     if (dup2 (saved_stdin, STDIN_FILENO) == -1 ||
#  131|           dup2 (saved_stdout, STDOUT_FILENO) == -1) {
#  132|         r = -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def462]
nbdkit-1.45.12/server/captive.c:130:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(saved_stdout, 1)’
nbdkit-1.45.12/server/captive.c:67:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:70:8: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:71:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/captive.c:77:3: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:116:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:122:9: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:123:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
nbdkit-1.45.12/server/captive.c:128:6: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:128:6: branch_true: following ‘true’ branch (when ‘pid > 0’)...
nbdkit-1.45.12/server/captive.c:130:9: branch_true: ...to here
nbdkit-1.45.12/server/captive.c:130:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/captive.c:131:9: branch_false: ...to here
nbdkit-1.45.12/server/captive.c:131:9: acquire_resource: opened here
nbdkit-1.45.12/server/captive.c:130:9: danger: ‘dup2(saved_stdout, 1)’ leaks here; was opened at [(13)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/12)
#  128|     if (pid > 0) {              /* Parent process is the run command. */
#  129|       /* Restore original stdin/out */
#  130|->     if (dup2 (saved_stdin, STDIN_FILENO) == -1 ||
#  131|           dup2 (saved_stdout, STDOUT_FILENO) == -1) {
#  132|         r = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
nbdkit-1.45.12/server/crypto.c:503:22: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
nbdkit-1.45.12/server/crypto.c:507:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/crypto.c:508:12: acquire_memory: allocated here
nbdkit-1.45.12/server/crypto.c:512:3: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:503:22: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:503:22: danger: ‘copy’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  501|   {
#  502|     size_t len;
#  503|->   CLEANUP_FREE char *copy = NULL;
#  504|   
#  505|     /* Strip trailing \n added by GnuTLS. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
nbdkit-1.45.12/server/crypto.c:676:22: warning[-Wanalyzer-malloc-leak]: leak of ‘priority’
nbdkit-1.45.12/server/crypto.c:674:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/crypto.c:676:22: branch_true: ...to here
nbdkit-1.45.12/server/crypto.c:681:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:686:7: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:695:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:704:9: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:709:16: acquire_memory: allocated here
nbdkit-1.45.12/server/crypto.c:710:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:735:3: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:735:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/crypto.c:736:9: branch_true: ...to here
nbdkit-1.45.12/server/crypto.c:737:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:744:3: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:759:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/crypto.c:766:10: branch_true: ...to here
nbdkit-1.45.12/server/crypto.c:676:22: danger: ‘priority’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  674|     GET_CONN;
#  675|     gnutls_session_t session;
#  676|->   CLEANUP_FREE char *priority = NULL;
#  677|     int err;
#  678|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
nbdkit-1.45.12/server/crypto.c:870:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
nbdkit-1.45.12/server/crypto.c:801:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/crypto.c:802:20: branch_true: ...to here
nbdkit-1.45.12/server/crypto.c:811:6: branch_false: following ‘false’ branch (when ‘session’ is non-NULL)...
nbdkit-1.45.12/server/crypto.c:816:10: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:817:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:822:7: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:822:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:827:15: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:828:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:846:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:850:7: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:851:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:856:7: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:857:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:861:26: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:861:9: acquire_memory: allocated here
nbdkit-1.45.12/server/crypto.c:862:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
nbdkit-1.45.12/server/crypto.c:868:2: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:869:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/crypto.c:870:5: branch_true: ...to here
nbdkit-1.45.12/server/crypto.c:870:5: danger: ‘ret’ leaks here; was allocated at [(17)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/16)
#  868|    out:
#  869|     if (cert)
#  870|->     gnutls_x509_crt_deinit (cert);
#  871|     if (dn.data)
#  872|       gnutls_free (dn.data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
nbdkit-1.45.12/server/crypto.c:872:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
nbdkit-1.45.12/server/crypto.c:801:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/crypto.c:802:20: branch_true: ...to here
nbdkit-1.45.12/server/crypto.c:811:6: branch_false: following ‘false’ branch (when ‘session’ is non-NULL)...
nbdkit-1.45.12/server/crypto.c:816:10: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:817:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:822:7: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:822:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:827:15: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:828:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:846:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:850:7: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:851:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:856:7: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:857:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/crypto.c:861:26: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:861:9: acquire_memory: allocated here
nbdkit-1.45.12/server/crypto.c:862:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
nbdkit-1.45.12/server/crypto.c:868:2: branch_false: ...to here
nbdkit-1.45.12/server/crypto.c:871:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/crypto.c:872:5: branch_true: ...to here
nbdkit-1.45.12/server/crypto.c:872:5: danger: ‘ret’ leaks here; was allocated at [(17)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/16)
#  870|       gnutls_x509_crt_deinit (cert);
#  871|     if (dn.data)
#  872|->     gnutls_free (dn.data);
#  873|     return ret;
#  874|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
nbdkit-1.45.12/server/debug-flags.c:110:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
nbdkit-1.45.12/server/debug-flags.c:92:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:99:3: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:102:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:103:6: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:103:6: branch_false: following ‘false’ branch (when ‘p <= q’)...
nbdkit-1.45.12/server/debug-flags.c:104:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:104:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:105:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:105:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:107:10: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:108:6: branch_false: following ‘false’ branch (when ‘flag’ is non-NULL)...
nbdkit-1.45.12/server/debug-flags.c:114:30: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:114:16: acquire_memory: allocated here
nbdkit-1.45.12/server/debug-flags.c:115:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:116:28: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:117:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/debug-flags.c:117:3: branch_true: ...to here
nbdkit-1.45.12/server/debug-flags.c:110:5: danger: ‘<unknown>’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  108|     if (flag == NULL) {
#  109|     debug_flag_perror:
#  110|->     perror ("malloc");
#  111|       exit (EXIT_FAILURE);
#  112|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
nbdkit-1.45.12/server/debug-flags.c:110:5: warning[-Wanalyzer-malloc-leak]: leak of ‘flag’
nbdkit-1.45.12/server/debug-flags.c:92:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:99:3: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:102:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:103:6: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:103:6: branch_false: following ‘false’ branch (when ‘p <= q’)...
nbdkit-1.45.12/server/debug-flags.c:104:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:104:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:105:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:105:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:107:10: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:107:10: acquire_memory: allocated here
nbdkit-1.45.12/server/debug-flags.c:108:6: branch_false: following ‘false’ branch (when ‘flag’ is non-NULL)...
nbdkit-1.45.12/server/debug-flags.c:114:30: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:115:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/debug-flags.c:115:3: branch_true: ...to here
nbdkit-1.45.12/server/debug-flags.c:110:5: danger: ‘flag’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  108|     if (flag == NULL) {
#  109|     debug_flag_perror:
#  110|->     perror ("malloc");
#  111|       exit (EXIT_FAILURE);
#  112|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
nbdkit-1.45.12/server/debug-flags.c:118:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
nbdkit-1.45.12/server/debug-flags.c:92:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:99:3: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:102:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:103:6: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:103:6: branch_false: following ‘false’ branch (when ‘p <= q’)...
nbdkit-1.45.12/server/debug-flags.c:104:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:104:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:105:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:105:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:107:10: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:108:6: branch_false: following ‘false’ branch (when ‘flag’ is non-NULL)...
nbdkit-1.45.12/server/debug-flags.c:114:30: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:114:16: acquire_memory: allocated here
nbdkit-1.45.12/server/debug-flags.c:115:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:116:28: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:117:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:118:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:118:7: danger: ‘<unknown>’ leaks here; was allocated at [(15)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/14)
#  116|     flag->flag = strndup (p, q-p-1);
#  117|     if (!flag->flag) goto debug_flag_perror;
#  118|->   if (nbdkit_parse_int ("flag", q, &flag->value) == -1)
#  119|       goto bad_debug_flag;
#  120|     flag->used = false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def470]
nbdkit-1.45.12/server/debug-flags.c:118:7: warning[-Wanalyzer-malloc-leak]: leak of ‘flag’
nbdkit-1.45.12/server/debug-flags.c:92:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:99:3: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:102:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:103:6: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:103:6: branch_false: following ‘false’ branch (when ‘p <= q’)...
nbdkit-1.45.12/server/debug-flags.c:104:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:104:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:105:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:105:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:107:10: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:107:10: acquire_memory: allocated here
nbdkit-1.45.12/server/debug-flags.c:108:6: branch_false: following ‘false’ branch (when ‘flag’ is non-NULL)...
nbdkit-1.45.12/server/debug-flags.c:114:30: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:115:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:116:28: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:117:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug-flags.c:118:7: branch_false: ...to here
nbdkit-1.45.12/server/debug-flags.c:118:7: danger: ‘flag’ leaks here; was allocated at [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
#  116|     flag->flag = strndup (p, q-p-1);
#  117|     if (!flag->flag) goto debug_flag_perror;
#  118|->   if (nbdkit_parse_int ("flag", q, &flag->value) == -1)
#  119|       goto bad_debug_flag;
#  120|     flag->used = false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def471]
nbdkit-1.45.12/server/debug.c:86:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fp_outer’
nbdkit-1.45.12/server/debug.c:75:1: enter_function: entry to ‘debug_common’
nbdkit-1.45.12/server/debug.c:77:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/debug.c:80:13: branch_true: ...to here
nbdkit-1.45.12/server/debug.c:93:6: branch_false: following ‘false’ branch (when ‘fp_inner’ is non-NULL)...
nbdkit-1.45.12/server/debug.c:95:3: branch_false: ...to here
nbdkit-1.45.12/server/debug.c:97:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/debug.c:101:14: branch_false: ...to here
nbdkit-1.45.12/server/debug.c:101:14: acquire_memory: allocated here
nbdkit-1.45.12/server/debug.c:102:6: branch_false: following ‘false’ branch (when ‘fp_outer’ is non-NULL)...
nbdkit-1.45.12/server/debug.c:104:7: branch_false: ...to here
nbdkit-1.45.12/server/debug.c:106:3: call_function: calling ‘prologue’ from ‘debug_common’
nbdkit-1.45.12/server/debug.c:86:22: danger: ‘fp_outer’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#   84|     const int tty = 0;
#   85|   #endif
#   86|->   CLEANUP_FREE char *str_inner = NULL;
#   87|     CLEANUP_FREE char *str_outer = NULL;
#   88|     FILE *fp_inner, *fp_outer;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def472]
nbdkit-1.45.12/server/debug.c:86:22: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
nbdkit-1.45.12/server/debug.c:158:1: enter_function: entry to ‘debug_in_server’
nbdkit-1.45.12/server/debug.c:163:3: acquire_resource: ‘va_start’ called here
nbdkit-1.45.12/server/debug.c:164:3: call_function: calling ‘debug_common’ from ‘debug_in_server’
#   84|     const int tty = 0;
#   85|   #endif
#   86|->   CLEANUP_FREE char *str_inner = NULL;
#   87|     CLEANUP_FREE char *str_outer = NULL;
#   88|     FILE *fp_inner, *fp_outer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def473]
nbdkit-1.45.12/server/exports.c:51:1: warning[-Wanalyzer-malloc-leak]: leak of ‘e.description’
nbdkit-1.45.12/server/exports.c:104:1: enter_function: entry to ‘nbdkit_add_export’
nbdkit-1.45.12/server/exports.c:109:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:114:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:115:7: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:121:12: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:122:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:126:6: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:126:6: branch_true: following ‘true’ branch (when ‘description’ is non-NULL)...
nbdkit-1.45.12/server/exports.c:127:21: branch_true: ...to here
nbdkit-1.45.12/server/exports.c:127:21: acquire_memory: allocated here
nbdkit-1.45.12/server/exports.c:128:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:136:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:136:7: call_function: calling ‘exports_append’ from ‘nbdkit_add_export’
#   49|   
#   50|   /* Appendable list of exports. */
#   51|-> DEFINE_VECTOR_TYPE (exports, struct nbdkit_export);
#   52|   
#   53|   struct nbdkit_exports {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def474]
nbdkit-1.45.12/server/exports.c:51:1: warning[-Wanalyzer-malloc-leak]: leak of ‘e.name’
nbdkit-1.45.12/server/exports.c:104:1: enter_function: entry to ‘nbdkit_add_export’
nbdkit-1.45.12/server/exports.c:109:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:114:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:121:12: acquire_memory: allocated here
nbdkit-1.45.12/server/exports.c:122:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:126:6: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:126:6: branch_false: following ‘false’ branch (when ‘description’ is NULL)...
nbdkit-1.45.12/server/exports.c:136:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:136:7: call_function: calling ‘exports_append’ from ‘nbdkit_add_export’
#   49|   
#   50|   /* Appendable list of exports. */
#   51|-> DEFINE_VECTOR_TYPE (exports, struct nbdkit_export);
#   52|   
#   53|   struct nbdkit_exports {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def475]
nbdkit-1.45.12/server/exports.c:129:7: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(name)’
nbdkit-1.45.12/server/exports.c:109:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:114:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:115:7: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:121:12: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:121:12: acquire_memory: allocated here
nbdkit-1.45.12/server/exports.c:122:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:126:6: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:126:6: branch_true: following ‘true’ branch (when ‘description’ is non-NULL)...
nbdkit-1.45.12/server/exports.c:127:21: branch_true: ...to here
nbdkit-1.45.12/server/exports.c:128:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/exports.c:129:7: branch_true: ...to here
nbdkit-1.45.12/server/exports.c:129:7: danger: ‘strdup(name)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  127|       e.description = strdup (description);
#  128|       if (e.description == NULL) {
#  129|->       nbdkit_error ("nbdkit_add_export: strdup: %m");
#  130|         free (e.name);
#  131|         errno = ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def476]
nbdkit-1.45.12/server/exports.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘e.description’
nbdkit-1.45.12/server/exports.c:104:1: enter_function: entry to ‘nbdkit_add_export’
nbdkit-1.45.12/server/exports.c:109:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:114:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:115:7: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:121:12: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:122:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:126:6: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:126:6: branch_true: following ‘true’ branch (when ‘description’ is non-NULL)...
nbdkit-1.45.12/server/exports.c:127:21: branch_true: ...to here
nbdkit-1.45.12/server/exports.c:127:21: acquire_memory: allocated here
nbdkit-1.45.12/server/exports.c:128:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:136:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:136:7: call_function: calling ‘exports_append’ from ‘nbdkit_add_export’
nbdkit-1.45.12/server/exports.c:136:7: return_function: returning to ‘nbdkit_add_export’ from ‘exports_append’
nbdkit-1.45.12/server/exports.c:136:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/exports.c:137:5: branch_true: ...to here
nbdkit-1.45.12/server/exports.c:137:5: danger: ‘e.description’ leaks here; was allocated at [(12)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/11)
#  135|   
#  136|     if (exports_append (&exps->exports, e) == -1) {
#  137|->     nbdkit_error ("nbdkit_add_export: realloc: %m");
#  138|       free (e.name);
#  139|       free (e.description);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def477]
nbdkit-1.45.12/server/exports.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘e.name’
nbdkit-1.45.12/server/exports.c:104:1: enter_function: entry to ‘nbdkit_add_export’
nbdkit-1.45.12/server/exports.c:109:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:114:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:114:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:121:12: acquire_memory: allocated here
nbdkit-1.45.12/server/exports.c:122:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/exports.c:126:6: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:126:6: branch_false: following ‘false’ branch (when ‘description’ is NULL)...
nbdkit-1.45.12/server/exports.c:136:7: branch_false: ...to here
nbdkit-1.45.12/server/exports.c:136:7: call_function: calling ‘exports_append’ from ‘nbdkit_add_export’
nbdkit-1.45.12/server/exports.c:136:7: return_function: returning to ‘nbdkit_add_export’ from ‘exports_append’
nbdkit-1.45.12/server/exports.c:136:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/exports.c:137:5: branch_true: ...to here
nbdkit-1.45.12/server/exports.c:137:5: danger: ‘e.name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
#  135|   
#  136|     if (exports_append (&exps->exports, e) == -1) {
#  137|->     nbdkit_error ("nbdkit_add_export: realloc: %m");
#  138|       free (e.name);
#  139|       free (e.description);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def478]
nbdkit-1.45.12/server/extents.c:79:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbdkit_extents_new(offset, (long unsigned int)count + offset)’
nbdkit-1.45.12/server/extents.c:310:1: enter_function: entry to ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:324:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:326:10: branch_true: following ‘true’ branch (when ‘count != 0’)...
nbdkit-1.45.12/server/extents.c:331:9: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:331:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:331:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:332:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:334:9: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:334:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:337:17: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:348:5: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:79:7: danger: ‘nbdkit_extents_new(offset, (long unsigned int)count + offset)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   77|     struct nbdkit_extents *r;
#   78|   
#   79|->   if (start > INT64_MAX || end > INT64_MAX) {
#   80|       nbdkit_error ("nbdkit_extents_new: "
#   81|                     "start (%" PRIu64 ") or end (%" PRIu64 ") > INT64_MAX",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def479]
nbdkit-1.45.12/server/extents.c:80:5: warning[-Wanalyzer-malloc-leak]: leak of ‘nbdkit_extents_new(offset, (long unsigned int)count + offset)’
nbdkit-1.45.12/server/extents.c:310:1: enter_function: entry to ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:324:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:326:10: branch_true: following ‘true’ branch (when ‘count != 0’)...
nbdkit-1.45.12/server/extents.c:331:9: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:331:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:331:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:332:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:334:9: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:334:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:337:17: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/extents.c:338:38: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:338:38: call_function: calling ‘nbdkit_get_extent’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:338:38: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_get_extent’
nbdkit-1.45.12/server/extents.c:339:11: call_function: calling ‘nbdkit_add_extent’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:339:11: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_add_extent’
nbdkit-1.45.12/server/extents.c:339:10: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:342:7: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:342:7: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/extents.c:343:7: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:337:17: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:348:5: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:348:5: branch_true: following ‘true’ branch (when ‘offset > offset’)...
nbdkit-1.45.12/server/extents.c:330:49: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:326:10: branch_true: following ‘true’ branch (when ‘count != 0’)...
nbdkit-1.45.12/server/extents.c:331:9: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:331:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
#   78|   
#   79|     if (start > INT64_MAX || end > INT64_MAX) {
#   80|->     nbdkit_error ("nbdkit_extents_new: "
#   81|                     "start (%" PRIu64 ") or end (%" PRIu64 ") > INT64_MAX",
#   82|                     start, end);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def480]
nbdkit-1.45.12/server/extents.c:89:5: warning[-Wanalyzer-malloc-leak]: leak of ‘nbdkit_extents_new(offset, (long unsigned int)count + offset)’
nbdkit-1.45.12/server/extents.c:310:1: enter_function: entry to ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:324:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:326:10: branch_true: following ‘true’ branch (when ‘count != 0’)...
nbdkit-1.45.12/server/extents.c:331:9: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:331:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:331:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:332:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:334:9: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:334:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:337:17: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/extents.c:338:38: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:338:38: call_function: calling ‘nbdkit_get_extent’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:338:38: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_get_extent’
nbdkit-1.45.12/server/extents.c:339:11: call_function: calling ‘nbdkit_add_extent’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:339:11: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_add_extent’
nbdkit-1.45.12/server/extents.c:339:10: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:342:7: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:342:7: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/extents.c:343:7: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:337:17: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:348:5: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:348:5: branch_true: following ‘true’ branch (when ‘offset > offset’)...
nbdkit-1.45.12/server/extents.c:330:49: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:326:10: branch_true: following ‘true’ branch (when ‘count != 0’)...
nbdkit-1.45.12/server/extents.c:331:9: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:331:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
#   87|     /* 0-length ranges are possible, so start == end is not an error. */
#   88|     if (start > end) {
#   89|->     nbdkit_error ("nbdkit_extents_new: "
#   90|                     "start (%" PRIu64 ") >= end (%" PRIu64 ")",
#   91|                     start, end);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def481]
nbdkit-1.45.12/server/extents.c:98:5: warning[-Wanalyzer-malloc-leak]: leak of ‘nbdkit_extents_new(offset, (long unsigned int)count + offset)’
nbdkit-1.45.12/server/extents.c:310:1: enter_function: entry to ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:324:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:326:10: branch_true: following ‘true’ branch (when ‘count != 0’)...
nbdkit-1.45.12/server/extents.c:331:9: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:331:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
#   96|     r = malloc (sizeof *r);
#   97|     if (r == NULL) {
#   98|->     nbdkit_error ("nbdkit_extents_new: malloc: %m");
#   99|       return NULL;
#  100|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def482]
nbdkit-1.45.12/server/extents.c:279:15: warning[-Wanalyzer-malloc-leak]: leak of ‘extents2’
nbdkit-1.45.12/server/extents.c:215:1: enter_function: entry to ‘nbdkit_extents_aligned’
nbdkit-1.45.12/server/extents.c:226:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:230:3: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:230:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/extents.c:231:3: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:234:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:236:15: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/extents.c:237:10: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:238:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/extents.c:240:11: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:240:10: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:257:7: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:257:7: branch_true: following ‘true’ branch (when ‘i == 0’)...
nbdkit-1.45.12/server/extents.c:258:10: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:260:14: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/extents.c:261:13: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:261:12: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:271:55: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:273:22: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_aligned’
nbdkit-1.45.12/server/extents.c:273:22: return_function: returning to ‘nbdkit_extents_aligned’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:275:14: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:279:15: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:279:15: danger: ‘extents2’ leaks here; was allocated at [(29)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/28)
#  277|               return -1;
#  278|             }
#  279|->           if (next->extents (next_c, align - e->length,
#  280|                                offset + e->length,
#  281|                                flags & ~NBDKIT_FLAG_REQ_ONE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def483]
nbdkit-1.45.12/server/extents.c:330:49: warning[-Wanalyzer-malloc-leak]: leak of ‘nbdkit_extents_new(offset, (long unsigned int)count + offset)’
nbdkit-1.45.12/server/extents.c:310:1: enter_function: entry to ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:324:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:326:10: branch_true: following ‘true’ branch (when ‘count != 0’)...
nbdkit-1.45.12/server/extents.c:331:9: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:331:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:331:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:332:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/extents.c:332:5: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:330:49: danger: ‘nbdkit_extents_new(offset, (long unsigned int)count + offset)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/7)
#  328|       size_t i;
#  329|   
#  330|->     CLEANUP_EXTENTS_FREE struct nbdkit_extents *t
#  331|         = nbdkit_extents_new (offset, offset+count);
#  332|       if (t == NULL) goto error1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def484]
nbdkit-1.45.12/server/extents.c:334:9: warning[-Wanalyzer-malloc-leak]: leak of ‘nbdkit_extents_new(offset, (long unsigned int)count + offset)’
nbdkit-1.45.12/server/extents.c:310:1: enter_function: entry to ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:324:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:326:10: branch_true: following ‘true’ branch (when ‘count != 0’)...
nbdkit-1.45.12/server/extents.c:331:9: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:331:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:331:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:332:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:334:9: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:334:9: danger: ‘nbdkit_extents_new(offset, (long unsigned int)count + offset)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/7)
#  332|       if (t == NULL) goto error1;
#  333|   
#  334|->     if (next->extents (next_c, count, offset, flags, t, err) == -1)
#  335|         goto error0;
#  336|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def485]
nbdkit-1.45.12/server/extents.c:334:9: warning[-Wanalyzer-malloc-leak]: leak of ‘t’
nbdkit-1.45.12/server/extents.c:310:1: enter_function: entry to ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:323:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:324:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/extents.c:326:10: branch_true: following ‘true’ branch (when ‘count != 0’)...
nbdkit-1.45.12/server/extents.c:331:9: branch_true: ...to here
nbdkit-1.45.12/server/extents.c:331:9: call_function: calling ‘nbdkit_extents_new’ from ‘nbdkit_extents_full’
nbdkit-1.45.12/server/extents.c:331:9: return_function: returning to ‘nbdkit_extents_full’ from ‘nbdkit_extents_new’
nbdkit-1.45.12/server/extents.c:332:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/extents.c:334:9: branch_false: ...to here
nbdkit-1.45.12/server/extents.c:334:9: danger: ‘t’ leaks here; was allocated at [(21)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/20)
#  332|       if (t == NULL) goto error1;
#  333|   
#  334|->     if (next->extents (next_c, count, offset, flags, t, err) == -1)
#  335|         goto error0;
#  336|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def486]
nbdkit-1.45.12/server/filters.c:701:3: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
nbdkit-1.45.12/server/filters.c:694:7: acquire_memory: allocated here
nbdkit-1.45.12/server/filters.c:695:6: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
nbdkit-1.45.12/server/filters.c:700:3: branch_false: ...to here
nbdkit-1.45.12/server/filters.c:701:3: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  699|   
#  700|     f->backend = filter_functions;
#  701|->   backend_init (&f->backend, next, index, filename, dl, "filter");
#  702|   
#  703|     /* Call the initialization function which returns the address of the

Error: GCC_ANALYZER_WARNING (CWE-775): [#def487]
nbdkit-1.45.12/server/internal.h:615:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nbdkit-1.45.12/server/sockets.c:279:1: enter_function: entry to ‘bind_vsock’
nbdkit-1.45.12/server/sockets.c:297:10: acquire_resource: socket created here
nbdkit-1.45.12/server/sockets.c:304:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nbdkit-1.45.12/server/sockets.c:309:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:314:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:319:7: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:319:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:324:7: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:324:7: call_function: calling ‘sockets_append’ from ‘bind_vsock’
#  613|   
#  614|   /* sockets.c */
#  615|-> DEFINE_VECTOR_TYPE (sockets, int);
#  616|   extern void bind_unix_socket (sockets *) __attribute__ ((__nonnull__ (1)));
#  617|   extern void bind_tcpip_socket (sockets *) __attribute__ ((__nonnull__ (1)));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def488]
nbdkit-1.45.12/server/main.c:1243:22: warning[-Wanalyzer-malloc-leak]: leak of ‘new_cwd’
nbdkit-1.45.12/server/main.c:1238:1: enter_function: entry to ‘parse_at_path’
nbdkit-1.45.12/server/main.c:1257:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/main.c:1266:7: branch_false: ...to here
nbdkit-1.45.12/server/main.c:1267:3: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
nbdkit-1.45.12/server/main.c:1268:28: branch_true: ...to here
nbdkit-1.45.12/server/main.c:1269:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/main.c:1275:3: branch_false: ...to here
nbdkit-1.45.12/server/main.c:1277:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/main.c:1282:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
nbdkit-1.45.12/server/main.c:1302:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/main.c:1306:5: branch_false: ...to here
nbdkit-1.45.12/server/main.c:1306:5: call_function: calling ‘parse_key_value’ from ‘parse_at_path’
# 1241|     FILE *fp;
# 1242|     const char *p;
# 1243|->   CLEANUP_FREE char *path = NULL, *new_cwd = NULL, *line = NULL;
# 1244|     size_t linelen = 0, i;
# 1245|     ssize_t len;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def489]
nbdkit-1.45.12/server/main.c:1243:22: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
nbdkit-1.45.12/server/main.c:1249:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/main.c:1250:12: branch_true: ...to here
nbdkit-1.45.12/server/main.c:1250:12: acquire_memory: allocated here
nbdkit-1.45.12/server/main.c:1251:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/main.c:1266:7: branch_false: ...to here
nbdkit-1.45.12/server/main.c:1267:3: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
nbdkit-1.45.12/server/main.c:1268:28: branch_true: ...to here
nbdkit-1.45.12/server/main.c:1269:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/main.c:1275:3: branch_false: ...to here
nbdkit-1.45.12/server/main.c:1275:3: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/main.c:1276:8: branch_false: ...to here
nbdkit-1.45.12/server/main.c:1277:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
nbdkit-1.45.12/server/main.c:1243:22: danger: ‘path’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1241|     FILE *fp;
# 1242|     const char *p;
# 1243|->   CLEANUP_FREE char *path = NULL, *new_cwd = NULL, *line = NULL;
# 1244|     size_t linelen = 0, i;
# 1245|     ssize_t len;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def490]
nbdkit-1.45.12/server/main.c:1517:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
nbdkit-1.45.12/server/main.c:1517:7: acquire_resource: opened here
nbdkit-1.45.12/server/main.c:1517:6: danger: ‘open("/dev/null", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1515|     close (STDIN_FILENO);
# 1516|     close (STDOUT_FILENO);
# 1517|->   if (open ("/dev/null", O_RDONLY) != STDIN_FILENO ||
# 1518|         open ("/dev/null", O_WRONLY) != STDOUT_FILENO) {
# 1519|       perror ("open");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def491]
nbdkit-1.45.12/server/main.c:1517:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
nbdkit-1.45.12/server/main.c:1517:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/main.c:1518:7: branch_false: ...to here
nbdkit-1.45.12/server/main.c:1518:7: acquire_resource: opened here
nbdkit-1.45.12/server/main.c:1517:7: danger: ‘open("/dev/null", 1)’ leaks here; was opened at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 1515|     close (STDIN_FILENO);
# 1516|     close (STDOUT_FILENO);
# 1517|->   if (open ("/dev/null", O_RDONLY) != STDIN_FILENO ||
# 1518|         open ("/dev/null", O_WRONLY) != STDOUT_FILENO) {
# 1519|       perror ("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def492]
nbdkit-1.45.12/server/plugins.c:900:3: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
nbdkit-1.45.12/server/plugins.c:893:7: acquire_memory: allocated here
nbdkit-1.45.12/server/plugins.c:894:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
nbdkit-1.45.12/server/plugins.c:899:3: branch_false: ...to here
nbdkit-1.45.12/server/plugins.c:900:3: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  898|   
#  899|     p->backend = plugin_functions;
#  900|->   backend_init (&p->backend, NULL, index, filename, dl, "plugin");
#  901|   
#  902|     /* Call the initialization function which returns the address of the

Error: GCC_ANALYZER_WARNING (CWE-404): [#def493]
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:292:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:385:1: enter_function: entry to ‘negotiate_handshake_newstyle_options’
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:387:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:399:8: branch_true: ...to here
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:399:37: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:400:24: branch_true: ...to here
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:402:9: call_function: calling ‘conn_recv_full’ from ‘negotiate_handshake_newstyle_options’
#  290|     if (r == -1) {
#  291|       va_start (args, fmt);
#  292|->     nbdkit_verror (fmt, args);
#  293|       va_end (args);
#  294|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def494]
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:400:24: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:978:1: enter_function: entry to ‘protocol_handshake_newstyle’
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:980:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:984:12: branch_true: ...to here
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:992:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:998:23: branch_false: ...to here
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:998:7: call_function: calling ‘conn_recv_full’ from ‘protocol_handshake_newstyle’
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:998:7: return_function: returning to ‘protocol_handshake_newstyle’ from ‘conn_recv_full’
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:998:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:1001:18: branch_false: ...to here
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:1004:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:1010:7: branch_false: ...to here
nbdkit-1.45.12/server/protocol-handshake-newstyle.c:1010:7: call_function: calling ‘negotiate_handshake_newstyle_options’ from ‘protocol_handshake_newstyle’
#  398|   
#  399|     for (nr_options = MAX_NR_OPTIONS; nr_options > 0; --nr_options) {
#  400|->     CLEANUP_FREE char *data = NULL;
#  401|   
#  402|       if (conn_recv_full (&new_option, sizeof new_option,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def495]
nbdkit-1.45.12/server/protocol.c:474:36: warning[-Wanalyzer-malloc-leak]: leak of ‘blocks’
nbdkit-1.45.12/server/protocol.c:463:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol.c:466:12: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:466:12: acquire_memory: allocated here
nbdkit-1.45.12/server/protocol.c:468:6: branch_false: following ‘false’ branch (when ‘blocks’ is non-NULL)...
nbdkit-1.45.12/server/protocol.c:473:6: branch_false: ...to here
nbdkit-1.45.12/server/protocol.c:473:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol.c:474:36: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:474:36: danger: ‘blocks’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  472|   
#  473|     if (req_one) {
#  474|->     const struct nbdkit_extent e = nbdkit_get_extent (extents, 0);
#  475|   
#  476|       /* Checked as a side effect of how the extent list is created. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def496]
nbdkit-1.45.12/server/protocol.c:490:38: warning[-Wanalyzer-malloc-leak]: leak of ‘blocks’
nbdkit-1.45.12/server/protocol.c:463:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol.c:466:12: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:466:12: acquire_memory: allocated here
nbdkit-1.45.12/server/protocol.c:468:6: branch_false: following ‘false’ branch (when ‘blocks’ is non-NULL)...
nbdkit-1.45.12/server/protocol.c:473:6: branch_false: ...to here
nbdkit-1.45.12/server/protocol.c:473:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/protocol.c:488:5: branch_false: ...to here
nbdkit-1.45.12/server/protocol.c:489:17: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol.c:490:38: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:490:38: danger: ‘blocks’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  488|       *nr_blocks = 0;
#  489|       for (i = 0; i < nr_extents; ++i) {
#  490|->       const struct nbdkit_extent e = nbdkit_get_extent (extents, i);
#  491|         uint64_t length;
#  492|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def497]
nbdkit-1.45.12/server/protocol.c:566:7: warning[-Wanalyzer-malloc-leak]: leak of ‘blocks’
nbdkit-1.45.12/server/protocol.c:537:1: enter_function: entry to ‘send_structured_reply_block_status’
nbdkit-1.45.12/server/protocol.c:542:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol.c:543:3: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:543:3: branch_true: following ‘true’ branch (when ‘_r == 0’)...
nbdkit-1.45.12/server/protocol.c:545:48: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:551:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol.c:552:3: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:552:3: branch_true: following ‘true’ branch (when ‘cmd == 7’)...
nbdkit-1.45.12/server/protocol.c:554:12: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:554:12: call_function: calling ‘extents_to_block_descriptors’ from ‘send_structured_reply_block_status’
nbdkit-1.45.12/server/protocol.c:554:12: return_function: returning to ‘send_structured_reply_block_status’ from ‘extents_to_block_descriptors’
nbdkit-1.45.12/server/protocol.c:556:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/protocol.c:559:3: branch_false: ...to here
nbdkit-1.45.12/server/protocol.c:566:7: danger: ‘blocks’ leaks here; was allocated at [(14)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/13)
#  564|                             nr_blocks * sizeof (struct nbd_block_descriptor_32));
#  565|   
#  566|->   r = conn->send (&reply, sizeof reply, SEND_MORE);
#  567|     if (r == -1) {
#  568|       nbdkit_error ("write reply: %s: %m", name_of_nbd_cmd (cmd));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def498]
nbdkit-1.45.12/server/protocol.c:574:7: warning[-Wanalyzer-malloc-leak]: leak of ‘blocks’
nbdkit-1.45.12/server/protocol.c:537:1: enter_function: entry to ‘send_structured_reply_block_status’
nbdkit-1.45.12/server/protocol.c:542:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol.c:543:3: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:543:3: branch_true: following ‘true’ branch (when ‘_r == 0’)...
nbdkit-1.45.12/server/protocol.c:545:48: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:551:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/protocol.c:552:3: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:552:3: branch_true: following ‘true’ branch (when ‘cmd == 7’)...
nbdkit-1.45.12/server/protocol.c:554:12: branch_true: ...to here
nbdkit-1.45.12/server/protocol.c:554:12: call_function: calling ‘extents_to_block_descriptors’ from ‘send_structured_reply_block_status’
nbdkit-1.45.12/server/protocol.c:554:12: return_function: returning to ‘send_structured_reply_block_status’ from ‘extents_to_block_descriptors’
nbdkit-1.45.12/server/protocol.c:556:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/protocol.c:559:3: branch_false: ...to here
nbdkit-1.45.12/server/protocol.c:567:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/protocol.c:573:3: branch_false: ...to here
nbdkit-1.45.12/server/protocol.c:574:7: danger: ‘blocks’ leaks here; was allocated at [(14)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/13)
#  572|     /* Send the base:allocation context ID. */
#  573|     context_id = htobe32 (base_allocation_id);
#  574|->   r = conn->send (&context_id, sizeof context_id, SEND_MORE);
#  575|     if (r == -1) {
#  576|       nbdkit_error ("write reply: %s: %m", name_of_nbd_cmd (cmd));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def499]
nbdkit-1.45.12/server/public.c:91:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
nbdkit-1.45.12/server/public.c:94:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/public.c:99:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/public.c:100:11: branch_true: ...to here
nbdkit-1.45.12/server/public.c:100:11: acquire_memory: allocated here
nbdkit-1.45.12/server/public.c:101:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/public.c:91:22: branch_false: ...to here
nbdkit-1.45.12/server/public.c:91:22: danger: ‘ret’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   89|   nbdkit_absolute_path (const char *path)
#   90|   {
#   91|->   CLEANUP_FREE char *pwd = NULL;
#   92|     char *ret;
#   93|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def500]
nbdkit-1.45.12/server/public.c:1122:23: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
nbdkit-1.45.12/server/public.c:1136:1: enter_function: entry to ‘nbdkit_strndup_intern’
nbdkit-1.45.12/server/public.c:1140:6: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nbdkit-1.45.12/server/public.c:1146:10: branch_false: ...to here
nbdkit-1.45.12/server/public.c:1146:10: acquire_memory: allocated here
nbdkit-1.45.12/server/public.c:1147:6: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
nbdkit-1.45.12/server/public.c:1152:10: branch_false: ...to here
nbdkit-1.45.12/server/public.c:1152:10: call_function: calling ‘add_intern’ from ‘nbdkit_strndup_intern’
# 1120|   add_intern (char *str)
# 1121|   {
# 1122|->   struct context *c = threadlocal_get_context ();
# 1123|     struct connection *conn = c ? c->conn : NULL;
# 1124|     string_vector *list = conn ? &conn->interns : &global_interns;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def501]
nbdkit-1.45.12/server/public.c:1127:5: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
nbdkit-1.45.12/server/public.c:1156:1: enter_function: entry to ‘nbdkit_strdup_intern’
nbdkit-1.45.12/server/public.c:1160:6: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nbdkit-1.45.12/server/public.c:1166:10: branch_false: ...to here
nbdkit-1.45.12/server/public.c:1166:10: acquire_memory: allocated here
nbdkit-1.45.12/server/public.c:1167:6: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
nbdkit-1.45.12/server/public.c:1172:10: branch_false: ...to here
nbdkit-1.45.12/server/public.c:1172:10: call_function: calling ‘add_intern’ from ‘nbdkit_strdup_intern’
# 1125|   
# 1126|     if (string_vector_append (list, str) == -1) {
# 1127|->     nbdkit_error ("malloc: %m");
# 1128|       free (str);
# 1129|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def502]
nbdkit-1.45.12/server/sockets.c:106:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nbdkit-1.45.12/server/sockets.c:115:1: enter_function: entry to ‘bind_unix_socket’
nbdkit-1.45.12/server/sockets.c:121:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:123:3: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:123:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:126:9: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:127:6: branch_false: following ‘false’ branch (when ‘len <= 107’)...
nbdkit-1.45.12/server/sockets.c:133:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:136:10: acquire_resource: socket created here
nbdkit-1.45.12/server/sockets.c:143:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nbdkit-1.45.12/server/sockets.c:148:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:151:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:156:7: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:156:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:161:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:161:3: call_function: calling ‘clear_selinux_label’ from ‘bind_unix_socket’
#  104|   #ifdef HAVE_LIBSELINUX
#  105|     if (selinux_label) {
#  106|->     if (setsockcreatecon_raw (NULL) == -1) {
#  107|         perror ("selinux-label: setsockcreatecon_raw(NULL)");
#  108|         exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def503]
nbdkit-1.45.12/server/sockets.c:107:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nbdkit-1.45.12/server/sockets.c:115:1: enter_function: entry to ‘bind_unix_socket’
nbdkit-1.45.12/server/sockets.c:121:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:123:3: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:123:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:126:9: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:127:6: branch_false: following ‘false’ branch (when ‘len <= 107’)...
nbdkit-1.45.12/server/sockets.c:133:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:136:10: acquire_resource: socket created here
nbdkit-1.45.12/server/sockets.c:143:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nbdkit-1.45.12/server/sockets.c:148:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:151:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:156:7: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:156:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:161:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:161:3: call_function: calling ‘clear_selinux_label’ from ‘bind_unix_socket’
#  105|     if (selinux_label) {
#  106|       if (setsockcreatecon_raw (NULL) == -1) {
#  107|->       perror ("selinux-label: setsockcreatecon_raw(NULL)");
#  108|         exit (EXIT_FAILURE);
#  109|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def504]
nbdkit-1.45.12/server/sockets.c:157:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nbdkit-1.45.12/server/sockets.c:121:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:123:3: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:123:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:126:9: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:127:6: branch_false: following ‘false’ branch (when ‘len <= 107’)...
nbdkit-1.45.12/server/sockets.c:133:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:136:10: acquire_resource: socket created here
nbdkit-1.45.12/server/sockets.c:143:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nbdkit-1.45.12/server/sockets.c:148:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:151:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:156:7: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:156:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:157:5: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:157:5: danger: ‘sock’ leaks here
#  155|   
#  156|     if (listen (sock, SOMAXCONN) == -1) {
#  157|->     perror ("listen");
#  158|       exit (EXIT_FAILURE);
#  159|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def505]
nbdkit-1.45.12/server/sockets.c:164:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nbdkit-1.45.12/server/sockets.c:115:1: enter_function: entry to ‘bind_unix_socket’
nbdkit-1.45.12/server/sockets.c:121:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:123:3: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:123:3: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:126:9: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:127:6: branch_false: following ‘false’ branch (when ‘len <= 107’)...
nbdkit-1.45.12/server/sockets.c:133:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:136:10: acquire_resource: socket created here
nbdkit-1.45.12/server/sockets.c:143:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nbdkit-1.45.12/server/sockets.c:148:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:151:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:156:7: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:156:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:161:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:163:7: call_function: calling ‘sockets_append’ from ‘bind_unix_socket’
nbdkit-1.45.12/server/sockets.c:163:7: return_function: returning to ‘bind_unix_socket’ from ‘sockets_append’
nbdkit-1.45.12/server/sockets.c:163:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:164:5: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:164:5: danger: ‘sock’ leaks here
#  162|   
#  163|     if (sockets_append (socks, sock) == -1) {
#  164|->     perror ("realloc");
#  165|       exit (EXIT_FAILURE);
#  166|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def506]
nbdkit-1.45.12/server/sockets.c:251:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nbdkit-1.45.12/server/sockets.c:189:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:198:8: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:198:16: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
nbdkit-1.45.12/server/sockets.c:201:5: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:204:12: acquire_resource: socket created here
nbdkit-1.45.12/server/sockets.c:211:8: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nbdkit-1.45.12/server/sockets.c:228:5: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:239:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:250:9: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:250:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:251:7: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:251:7: danger: ‘sock’ leaks here
#  249|   
#  250|       if (listen (sock, SOMAXCONN) == -1) {
#  251|->       perror ("listen");
#  252|         exit (EXIT_FAILURE);
#  253|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def507]
nbdkit-1.45.12/server/sockets.c:258:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nbdkit-1.45.12/server/sockets.c:172:1: enter_function: entry to ‘bind_tcpip_socket’
nbdkit-1.45.12/server/sockets.c:189:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:198:8: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:198:16: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
nbdkit-1.45.12/server/sockets.c:201:5: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:204:12: acquire_resource: socket created here
nbdkit-1.45.12/server/sockets.c:211:8: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nbdkit-1.45.12/server/sockets.c:228:5: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:239:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:250:9: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:250:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:255:5: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:257:9: call_function: calling ‘sockets_append’ from ‘bind_tcpip_socket’
nbdkit-1.45.12/server/sockets.c:257:9: return_function: returning to ‘bind_tcpip_socket’ from ‘sockets_append’
nbdkit-1.45.12/server/sockets.c:257:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:258:7: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:258:7: danger: ‘sock’ leaks here
#  256|   
#  257|       if (sockets_append (socks, sock) == -1) {
#  258|->       perror ("realloc");
#  259|         exit (EXIT_FAILURE);
#  260|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def508]
nbdkit-1.45.12/server/sockets.c:320:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nbdkit-1.45.12/server/sockets.c:297:10: acquire_resource: socket created here
nbdkit-1.45.12/server/sockets.c:304:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nbdkit-1.45.12/server/sockets.c:309:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:314:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:319:7: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:319:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:320:5: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:320:5: danger: ‘sock’ leaks here
#  318|   
#  319|     if (listen (sock, SOMAXCONN) == -1) {
#  320|->     perror ("listen");
#  321|       exit (EXIT_FAILURE);
#  322|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def509]
nbdkit-1.45.12/server/sockets.c:325:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nbdkit-1.45.12/server/sockets.c:279:1: enter_function: entry to ‘bind_vsock’
nbdkit-1.45.12/server/sockets.c:297:10: acquire_resource: socket created here
nbdkit-1.45.12/server/sockets.c:304:6: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nbdkit-1.45.12/server/sockets.c:309:3: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:314:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:319:7: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:319:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:324:7: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:324:7: call_function: calling ‘sockets_append’ from ‘bind_vsock’
nbdkit-1.45.12/server/sockets.c:324:7: return_function: returning to ‘bind_vsock’ from ‘sockets_append’
nbdkit-1.45.12/server/sockets.c:324:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:325:5: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:325:5: danger: ‘sock’ leaks here
#  323|   
#  324|     if (sockets_append (socks, sock) == -1) {
#  325|->     perror ("realloc");
#  326|       exit (EXIT_FAILURE);
#  327|     }

Error: CPPCHECK_WARNING (CWE-401): [#def510]
nbdkit-1.45.12/server/sockets.c:402: error[memleak]: Memory leak: thread_data
#  400|     if (unlikely (!thread_data)) {
#  401|       perror ("malloc");
#  402|->     return;
#  403|     }
#  404|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def511]
nbdkit-1.45.12/server/sockets.c:408:23: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_data’
nbdkit-1.45.12/server/sockets.c:399:17: acquire_memory: allocated here
nbdkit-1.45.12/server/sockets.c:400:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:405:31: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:408:23: danger: ‘thread_data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  406|    again:
#  407|   #ifdef HAVE_ACCEPT4
#  408|->   thread_data->sock = accept4 (listen_sock, NULL, NULL, SOCK_CLOEXEC);
#  409|   #else
#  410|     /* If we were fully parallel, then this function could be accepting

Error: GCC_ANALYZER_WARNING (CWE-401): [#def512]
nbdkit-1.45.12/server/sockets.c:425:5: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_data’
nbdkit-1.45.12/server/sockets.c:399:17: acquire_memory: allocated here
nbdkit-1.45.12/server/sockets.c:400:6: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/sockets.c:405:31: branch_false: ...to here
nbdkit-1.45.12/server/sockets.c:422:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/sockets.c:423:9: branch_true: ...to here
nbdkit-1.45.12/server/sockets.c:425:5: danger: ‘thread_data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  423|       if (errno == EINTR || errno == EAGAIN)
#  424|         goto again;
#  425|->     nbdkit_error ("accept: %m");
#  426|       free (thread_data);
#  427|       return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def513]
nbdkit-1.45.12/server/threadlocal.c:106:5: warning[-Wanalyzer-malloc-leak]: leak of ‘threadlocal’
nbdkit-1.45.12/server/threadlocal.c:98:17: acquire_memory: allocated here
nbdkit-1.45.12/server/threadlocal.c:99:6: branch_false: following ‘false’ branch (when ‘threadlocal’ is non-NULL)...
nbdkit-1.45.12/server/threadlocal.c:103:9: branch_false: ...to here
nbdkit-1.45.12/server/threadlocal.c:104:6: branch_true: following ‘true’ branch (when ‘err != 0’)...
nbdkit-1.45.12/server/threadlocal.c:105:5: branch_true: ...to here
nbdkit-1.45.12/server/threadlocal.c:106:5: danger: ‘threadlocal’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  104|     if (err) {
#  105|       errno = err;
#  106|->     perror ("pthread_setspecific");
#  107|       exit (EXIT_FAILURE);
#  108|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def514]
nbdkit-1.45.12/server/threadlocal.c:109:1: warning[-Wanalyzer-malloc-leak]: leak of ‘threadlocal’
nbdkit-1.45.12/server/threadlocal.c:98:17: acquire_memory: allocated here
nbdkit-1.45.12/server/threadlocal.c:99:6: branch_false: following ‘false’ branch (when ‘threadlocal’ is non-NULL)...
nbdkit-1.45.12/server/threadlocal.c:103:9: branch_false: ...to here
nbdkit-1.45.12/server/threadlocal.c:104:6: branch_false: following ‘false’ branch (when ‘err == 0’)...
nbdkit-1.45.12/server/threadlocal.c:109:1: branch_false: ...to here
nbdkit-1.45.12/server/threadlocal.c:109:1: danger: ‘threadlocal’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  107|       exit (EXIT_FAILURE);
#  108|     }
#  109|-> }
#  110|   
#  111|   void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def515]
nbdkit-1.45.12/server/uri.c:97:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/uri.c:57:3: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/uri.c:62:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:85:8: acquire_memory: allocated here
nbdkit-1.45.12/server/uri.c:86:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/uri.c:91:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:95:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/uri.c:97:7: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   95|       if (export_name && strcmp (export_name, "") != 0) {
#   96|         putc ('/', fp);
#   97|->       uri_quote (export_name, fp);
#   98|       }
#   99|       fprintf (fp, "?socket=");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
nbdkit-1.45.12/server/uri.c:100:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/uri.c:57:3: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/uri.c:62:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:85:8: acquire_memory: allocated here
nbdkit-1.45.12/server/uri.c:86:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/uri.c:91:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:100:5: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   98|       }
#   99|       fprintf (fp, "?socket=");
#  100|->     uri_quote (unixsocket, fp);
#  101|       query_appended = true;
#  102|       break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def517]
nbdkit-1.45.12/server/uri.c:112:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/uri.c:57:3: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/uri.c:62:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:85:8: acquire_memory: allocated here
nbdkit-1.45.12/server/uri.c:86:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/uri.c:91:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:110:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/uri.c:112:7: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  110|       if (export_name && strcmp (export_name, "") != 0) {
#  111|         putc ('/', fp);
#  112|->       uri_quote (export_name, fp);
#  113|       }
#  114|       query_appended = false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def518]
nbdkit-1.45.12/server/uri.c:124:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/uri.c:57:3: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/uri.c:62:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:85:8: acquire_memory: allocated here
nbdkit-1.45.12/server/uri.c:86:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/uri.c:91:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:122:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/uri.c:124:7: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  122|       if (export_name && strcmp (export_name, "") != 0) {
#  123|         putc ('/', fp);
#  124|->       uri_quote (export_name, fp);
#  125|       }
#  126|       query_appended = false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def519]
nbdkit-1.45.12/server/uri.c:148:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/uri.c:57:3: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/uri.c:62:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:85:8: acquire_memory: allocated here
nbdkit-1.45.12/server/uri.c:86:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/uri.c:91:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:144:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/uri.c:144:24: branch_true: ...to here
nbdkit-1.45.12/server/uri.c:145:5: branch_false: following ‘false’ branch (when ‘query_appended == 0’)...
 branch_false: ...to here
nbdkit-1.45.12/server/uri.c:146:8: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/uri.c:147:7: branch_true: ...to here
nbdkit-1.45.12/server/uri.c:148:7: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  146|       if (tls_certificates_dir) {
#  147|         fputs ("tls-certificates=", fp);
#  148|->       uri_quote (tls_certificates_dir, fp);
#  149|       }
#  150|       else if (tls_psk) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def520]
nbdkit-1.45.12/server/uri.c:152:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
nbdkit-1.45.12/server/uri.c:57:3: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/uri.c:62:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:85:8: acquire_memory: allocated here
nbdkit-1.45.12/server/uri.c:86:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
nbdkit-1.45.12/server/uri.c:91:3: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:144:6: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/uri.c:144:24: branch_true: ...to here
nbdkit-1.45.12/server/uri.c:145:5: branch_false: following ‘false’ branch (when ‘query_appended == 0’)...
 branch_false: ...to here
nbdkit-1.45.12/server/uri.c:146:8: branch_false: following ‘false’ branch...
nbdkit-1.45.12/server/uri.c:150:14: branch_false: ...to here
nbdkit-1.45.12/server/uri.c:150:13: branch_true: following ‘true’ branch...
nbdkit-1.45.12/server/uri.c:151:7: branch_true: ...to here
nbdkit-1.45.12/server/uri.c:152:7: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  150|       else if (tls_psk) {
#  151|         fputs ("tls-psk-file=", fp);
#  152|->       uri_quote (tls_psk, fp);
#  153|       }
#  154|     }

Error: CPPCHECK_WARNING (CWE-476): [#def521]
nbdkit-1.45.12/tests/dummy-vddk.c:219: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: *info
#  217|   {
#  218|     *info = calloc (1, sizeof (struct VixDiskLibInfo));
#  219|->   (*info)->capacity = CAPACITY;
#  220|     return VIX_OK;
#  221|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def522]
nbdkit-1.45.12/tests/dummy-vddk.c:219:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*info'
nbdkit-1.45.12/tests/dummy-vddk.c:218:11: acquire_memory: this call could return NULL
nbdkit-1.45.12/tests/dummy-vddk.c:219:3: danger: 'calloc(1, 64)' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  217|   {
#  218|     *info = calloc (1, sizeof (struct VixDiskLibInfo));
#  219|->   (*info)->capacity = CAPACITY;
#  220|     return VIX_OK;
#  221|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def523]
nbdkit-1.45.12/tests/test-layers-filter.c:149:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/tests/test-layers-filter.c:147:22: acquire_memory: allocated here
nbdkit-1.45.12/tests/test-layers-filter.c:149:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  147|     struct handle *h = calloc (1, sizeof *h);
#  148|   
#  149|->   assert (nbdkit_context_get_backend (nxdata) == saved_backend);
#  150|     if (!h) {
#  151|       perror ("malloc");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def524]
nbdkit-1.45.12/tests/test-layers-filter.c:160:15: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/tests/test-layers-filter.c:147:22: acquire_memory: allocated here
nbdkit-1.45.12/tests/test-layers-filter.c:149:3: branch_true: following 'true' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_true: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/tests/test-layers-filter.c:160:15: branch_false: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:160:15: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  158|       nbdkit_next *n, *old;
#  159|   
#  160|->     backend = nbdkit_context_get_backend (nxdata);
#  161|       assert (backend != NULL);
#  162|       n = nbdkit_next_context_open (backend, readonly, exportname, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def525]
nbdkit-1.45.12/tests/test-layers-filter.c:162:9: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/tests/test-layers-filter.c:147:22: acquire_memory: allocated here
nbdkit-1.45.12/tests/test-layers-filter.c:149:3: branch_true: following 'true' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_true: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/tests/test-layers-filter.c:160:15: branch_false: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:161:5: branch_true: following 'true' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:162:9: branch_true: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:162:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  160|       backend = nbdkit_context_get_backend (nxdata);
#  161|       assert (backend != NULL);
#  162|->     n = nbdkit_next_context_open (backend, readonly, exportname, 0);
#  163|       if (n == NULL) {
#  164|         free (h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def526]
nbdkit-1.45.12/tests/test-layers-filter.c:167:11: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/tests/test-layers-filter.c:147:22: acquire_memory: allocated here
nbdkit-1.45.12/tests/test-layers-filter.c:149:3: branch_true: following 'true' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_true: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/tests/test-layers-filter.c:160:15: branch_false: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:161:5: branch_true: following 'true' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:162:9: branch_true: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:163:8: branch_false: following 'false' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:167:11: branch_false: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:167:11: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  165|         return NULL;
#  166|       }
#  167|->     old = nbdkit_context_set_next (nxdata, n);
#  168|       assert (old == NULL);
#  169|       h->next = n;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def527]
nbdkit-1.45.12/tests/test-layers-filter.c:171:12: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/tests/test-layers-filter.c:147:22: acquire_memory: allocated here
nbdkit-1.45.12/tests/test-layers-filter.c:149:3: branch_true: following 'true' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_true: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/tests/test-layers-filter.c:171:12: branch_false: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:171:12: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  169|       h->next = n;
#  170|     }
#  171|->   else if (next (nxdata, readonly, exportname) == -1) {
#  172|       free (h);
#  173|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
nbdkit-1.45.12/tests/test-layers-filter.c:177:3: warning[-Wanalyzer-malloc-leak]: leak of 'h'
nbdkit-1.45.12/tests/test-layers-filter.c:147:22: acquire_memory: allocated here
nbdkit-1.45.12/tests/test-layers-filter.c:149:3: branch_true: following 'true' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_true: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:150:6: branch_false: following 'false' branch (when 'h' is non-NULL)...
nbdkit-1.45.12/tests/test-layers-filter.c:160:15: branch_false: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:161:5: branch_true: following 'true' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:162:9: branch_true: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:163:8: branch_false: following 'false' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:167:11: branch_false: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:168:5: branch_true: following 'true' branch...
nbdkit-1.45.12/tests/test-layers-filter.c:169:5: branch_true: ...to here
nbdkit-1.45.12/tests/test-layers-filter.c:177:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  175|   
#  176|     /* Debug after recursing, to show opposite order from .close */
#  177|->   DEBUG_FUNCTION;
#  178|   
#  179|     return h;

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-40.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-namenbdkit-1.45.12-1.fc44
store-results-to/tmp/tmpda5h2pjq/nbdkit-1.45.12-1.fc44.tar.xz
time-created2025-10-28 19:32:59
time-finished2025-10-28 19:41:23
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpda5h2pjq/nbdkit-1.45.12-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpda5h2pjq/nbdkit-1.45.12-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9