libnbd-1.24.0-1.fc44

List of Findings

Error: SHELLCHECK_WARNING: [#def1]
/usr/bin/nbdsh:25:6: warning[SC2194]: This word is constant. Did you forget the $ on a variable?
#   23|   # this hack to Darwin only so it doesn't cause potential security
#   24|   # issues on normal platforms.
#   25|-> case "linux-gnu" in
#   26|       darwin*)
#   27|   	if test -z "$DYLD_LIBRARY_PATH" && test -n "$_DYLD_LIBRARY_PATH"; then

Error: SHELLCHECK_WARNING: [#def2]
/usr/bin/nbdsh:37:10: warning[SC3038]: In POSIX sh, exec flags are undefined.
#   35|   # and above, and not part of POSIX).
#   36|   if /bin/sh -c 'exec -a test true' 2>/dev/null; then
#   37|->     exec -a nbdsh /usr/bin/python3 -mnbd "$@"
#   38|   else
#   39|       exec          /usr/bin/python3 -mnbd "$@"

Error: CPPCHECK_WARNING (CWE-476): [#def3]
libnbd-1.24.0/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|   #endif /* CONST_STRING_VECTOR_H */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libnbd-1.24.0/common/utils/const-string-vector.h:40:1: warning[-Wanalyzer-malloc-leak]: leak of ‘rwn’
libnbd-1.24.0/copy/nbd-ops.c:162:1: enter_function: entry to ‘nbd_rw_create_subprocess’
libnbd-1.24.0/copy/nbd-ops.c:164:24: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:165:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:167:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:173:7: call_function: inlined call to ‘const_string_vector_append_array’ from ‘nbd_rw_create_subprocess’
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_VECTOR_TYPE (const_string_vector, const char *);
#   41|   
#   42|   #endif /* CONST_STRING_VECTOR_H */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
libnbd-1.24.0/common/utils/const-string-vector.h:40:1: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libnbd-1.24.0/copy/nbd-ops.c:162:1: enter_function: entry to ‘nbd_rw_create_subprocess’
libnbd-1.24.0/copy/nbd-ops.c:165:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:167:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:173:7: call_function: inlined call to ‘const_string_vector_append_array’ from ‘nbd_rw_create_subprocess’
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_VECTOR_TYPE (const_string_vector, const char *);
#   41|   
#   42|   #endif /* CONST_STRING_VECTOR_H */

Error: CPPCHECK_WARNING (CWE-476): [#def6]
libnbd-1.24.0/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|   #endif /* STRING_VECTOR_H */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libnbd-1.24.0/common/utils/string-vector.h:40:1: warning[-Wanalyzer-malloc-leak]: leak of 'copy'
libnbd-1.24.0/lib/handle.c:471:1: enter_function: entry to 'nbd_unlocked_add_meta_context'
libnbd-1.24.0/lib/handle.c:475:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/handle.c:480:10: branch_false: ...to here
libnbd-1.24.0/lib/handle.c:480:10: acquire_memory: allocated here
libnbd-1.24.0/lib/handle.c:481:6: branch_false: following 'false' branch (when 'copy' is non-NULL)...
libnbd-1.24.0/lib/handle.c:486:7: branch_false: ...to here
libnbd-1.24.0/lib/handle.c:486:7: call_function: calling 'string_vector_append' from 'nbd_unlocked_add_meta_context'
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_POINTER_VECTOR_TYPE (string_vector, char *);
#   41|   
#   42|   #endif /* STRING_VECTOR_H */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libnbd-1.24.0/common/utils/string-vector.h:40:1: warning[-Wanalyzer-malloc-leak]: leak of 'new_var'
libnbd-1.24.0/lib/lib/states.c:1596:1: enter_function: entry to 'enter_STATE_CONNECT_SA_START'
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:193:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:194:3: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:194:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:195:3: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:195:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:203:12: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:204:6: branch_false: following 'false' branch (when 'tmpdir' is non-NULL)...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:209:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:209:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:214:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:214:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:219:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:220:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:225:3: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:227:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:232:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:232:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:237:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:237:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:244:3: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:258:7: call_function: calling 'prepare_socket_activation_environment' from 'enter_STATE_CONNECT_SA_START'
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_POINTER_VECTOR_TYPE (string_vector, char *);
#   41|   
#   42|   #endif /* STRING_VECTOR_H */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libnbd-1.24.0/common/utils/string-vector.h:40:1: warning[-Wanalyzer-malloc-leak]: leak of 'pathname'
libnbd-1.24.0/lib/utils.c:682:1: enter_function: entry to 'nbd_internal_execvpe_init'
libnbd-1.24.0/lib/utils.c:695:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:702:3: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:704:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:777:16: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:777:16: acquire_memory: allocated here
libnbd-1.24.0/lib/utils.c:778:8: branch_false: following 'false' branch (when 'pathname' is non-NULL)...
libnbd-1.24.0/lib/utils.c:781:9: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:781:9: call_function: calling 'string_vector_append' from 'nbd_internal_execvpe_init'
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_POINTER_VECTOR_TYPE (string_vector, char *);
#   41|   
#   42|   #endif /* STRING_VECTOR_H */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
libnbd-1.24.0/common/utils/string-vector.h:40:1: warning[-Wanalyzer-malloc-leak]: leak of 'scan'
libnbd-1.24.0/lib/utils.c:682:1: enter_function: entry to 'nbd_internal_execvpe_init'
libnbd-1.24.0/lib/utils.c:695:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:702:3: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:704:6: branch_true: following 'true' branch...
libnbd-1.24.0/lib/utils.c:709:16: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:709:16: call_function: calling 'get_path' from 'nbd_internal_execvpe_init'
libnbd-1.24.0/lib/utils.c:709:16: return_function: returning to 'nbd_internal_execvpe_init' from 'get_path'
libnbd-1.24.0/lib/utils.c:710:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:713:9: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:713:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:719:16: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:723:7: branch_true: following 'true' branch (when 'sys_path_element <= scan')...
libnbd-1.24.0/lib/utils.c:724:17: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:732:12: branch_true: following 'true' branch (when 'sys_path_element == scan')...
libnbd-1.24.0/lib/utils.c:741:46: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:743:12: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:744:13: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:743:13: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:745:13: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:743:13: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:750:20: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:751:12: branch_false: following 'false' branch (when 'pathname' is non-NULL)...
libnbd-1.24.0/lib/utils.c:755:9: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:766:13: call_function: calling 'string_vector_append' from 'nbd_internal_execvpe_init'
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_POINTER_VECTOR_TYPE (string_vector, char *);
#   41|   
#   42|   #endif /* STRING_VECTOR_H */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
libnbd-1.24.0/common/utils/string-vector.h:40:1: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
libnbd-1.24.0/info/show.c:318:1: enter_function: entry to ‘collect_context’
libnbd-1.24.0/info/show.c:323:10: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:324:6: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libnbd-1.24.0/info/show.c:324:23: branch_false: ...to here
libnbd-1.24.0/info/show.c:324:23: call_function: calling ‘string_vector_append’ from ‘collect_context’
#   38|   #include "vector.h"
#   39|   
#   40|-> DEFINE_POINTER_VECTOR_TYPE (string_vector, char *);
#   41|   
#   42|   #endif /* STRING_VECTOR_H */

Error: CPPCHECK_WARNING (CWE-457): [#def12]
libnbd-1.24.0/common/utils/vector.c:67: error[uninitvar]: Uninitialized variable: reqcap
#   65|      */
#   66|     if (exactly ||
#   67|->       reqcap < v->cap ||
#   68|         ADD_OVERFLOW (v->cap, 1u, &t) ||
#   69|         ADD_OVERFLOW (v->cap, t/2, &newcap) ||

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libnbd-1.24.0/common/utils/version.c:52:20: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_create()'
libnbd-1.24.0/common/utils/version.c:50:9: acquire_memory: allocated here
libnbd-1.24.0/common/utils/version.c:51:6: branch_true: following 'true' branch...
libnbd-1.24.0/common/utils/version.c:52:20: branch_true: ...to here
libnbd-1.24.0/common/utils/version.c:52:20: throw: if 'nbd_get_package_name' throws an exception...
libnbd-1.24.0/common/utils/version.c:52:20: danger: 'nbd_create()' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   50|     nbd = nbd_create ();
#   51|     if (nbd) {
#   52|->     package_name = nbd_get_package_name (nbd);
#   53|       version = nbd_get_version (nbd);
#   54|       version_extra = nbd_get_version_extra (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libnbd-1.24.0/copy/blkhash.c:179:7: warning[-Wanalyzer-malloc-leak]: leak of ‘b.ptr’
libnbd-1.24.0/copy/blkhash.c:311:1: enter_function: entry to ‘update_blkhash’
libnbd-1.24.0/copy/blkhash.c:315:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:317:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:329:6: branch_true: following ‘true’ branch (when ‘blkoffs != 0’)...
libnbd-1.24.0/copy/blkhash.c:330:18: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:331:5: call_function: calling ‘set_incomplete_block’ from ‘update_blkhash’
#  177|   
#  178|     /* Create the digest handle. */
#  179|->   r = gnutls_hash_init (&dig, blkhash_alg);
#  180|     if (r < 0) {
#  181|       fprintf (stderr, "nbdcopy: gnutls_hash_init: %s\n", gnutls_strerror (r));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libnbd-1.24.0/copy/blkhash.c:179:7: warning[-Wanalyzer-malloc-leak]: leak of ‘zero_block’
libnbd-1.24.0/copy/blkhash.c:355:1: enter_function: entry to ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:367:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:369:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:389:16: acquire_memory: allocated here
libnbd-1.24.0/copy/blkhash.c:390:6: branch_false: following ‘false’ branch (when ‘zero_block’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:394:17: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:394:17: call_function: calling ‘compute_one_block_hash’ from ‘finish_blkhash’
#  177|   
#  178|     /* Create the digest handle. */
#  179|->   r = gnutls_hash_init (&dig, blkhash_alg);
#  180|     if (r < 0) {
#  181|       fprintf (stderr, "nbdcopy: gnutls_hash_init: %s\n", gnutls_strerror (r));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libnbd-1.24.0/copy/blkhash.c:188:5: warning[-Wanalyzer-malloc-leak]: leak of ‘b.ptr’
libnbd-1.24.0/copy/blkhash.c:311:1: enter_function: entry to ‘update_blkhash’
libnbd-1.24.0/copy/blkhash.c:315:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:317:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:329:6: branch_true: following ‘true’ branch (when ‘blkoffs != 0’)...
libnbd-1.24.0/copy/blkhash.c:330:18: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:331:5: call_function: calling ‘set_incomplete_block’ from ‘update_blkhash’
#  186|     digest = malloc (alg_len);
#  187|     if (digest == NULL) {
#  188|->     perror ("nbdcopy: malloc");
#  189|       exit (EXIT_FAILURE);
#  190|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
libnbd-1.24.0/copy/blkhash.c:188:5: warning[-Wanalyzer-malloc-leak]: leak of ‘zero_block’
libnbd-1.24.0/copy/blkhash.c:355:1: enter_function: entry to ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:367:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:369:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:389:16: acquire_memory: allocated here
libnbd-1.24.0/copy/blkhash.c:390:6: branch_false: following ‘false’ branch (when ‘zero_block’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:394:17: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:394:17: call_function: calling ‘compute_one_block_hash’ from ‘finish_blkhash’
#  186|     digest = malloc (alg_len);
#  187|     if (digest == NULL) {
#  188|->     perror ("nbdcopy: malloc");
#  189|       exit (EXIT_FAILURE);
#  190|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libnbd-1.24.0/copy/blkhash.c:192:7: warning[-Wanalyzer-malloc-leak]: leak of ‘digest’
libnbd-1.24.0/copy/blkhash.c:355:1: enter_function: entry to ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:367:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:369:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:390:6: branch_false: following ‘false’ branch (when ‘zero_block’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:394:17: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:394:17: call_function: calling ‘compute_one_block_hash’ from ‘finish_blkhash’
#  190|     }
#  191|   
#  192|->   r = gnutls_hash (dig, buf, len);
#  193|     if (r < 0) {
#  194|       fprintf (stderr, "nbdcopy: gnutls_hash: %s\n", gnutls_strerror (r));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libnbd-1.24.0/copy/blkhash.c:192:7: warning[-Wanalyzer-malloc-leak]: leak of ‘zero_block’
libnbd-1.24.0/copy/blkhash.c:355:1: enter_function: entry to ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:367:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:369:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:389:16: acquire_memory: allocated here
libnbd-1.24.0/copy/blkhash.c:390:6: branch_false: following ‘false’ branch (when ‘zero_block’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:394:17: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:394:17: call_function: calling ‘compute_one_block_hash’ from ‘finish_blkhash’
#  190|     }
#  191|   
#  192|->   r = gnutls_hash (dig, buf, len);
#  193|     if (r < 0) {
#  194|       fprintf (stderr, "nbdcopy: gnutls_hash: %s\n", gnutls_strerror (r));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libnbd-1.24.0/copy/blkhash.c:198:3: warning[-Wanalyzer-malloc-leak]: leak of ‘digest’
libnbd-1.24.0/copy/blkhash.c:355:1: enter_function: entry to ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:367:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:369:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:390:6: branch_false: following ‘false’ branch (when ‘zero_block’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:394:17: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:394:17: call_function: calling ‘compute_one_block_hash’ from ‘finish_blkhash’
#  196|     }
#  197|   
#  198|->   gnutls_hash_deinit (dig, digest);
#  199|     return digest; /* caller must free */
#  200|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libnbd-1.24.0/copy/blkhash.c:198:3: warning[-Wanalyzer-malloc-leak]: leak of ‘zero_block’
libnbd-1.24.0/copy/blkhash.c:355:1: enter_function: entry to ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:367:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:369:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:389:16: acquire_memory: allocated here
libnbd-1.24.0/copy/blkhash.c:390:6: branch_false: following ‘false’ branch (when ‘zero_block’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:394:17: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:394:17: call_function: calling ‘compute_one_block_hash’ from ‘finish_blkhash’
#  196|     }
#  197|   
#  198|->   gnutls_hash_deinit (dig, digest);
#  199|     return digest; /* caller must free */
#  200|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libnbd-1.24.0/copy/blkhash.c:448:3: warning[-Wanalyzer-malloc-leak]: leak of ‘final_digest’
libnbd-1.24.0/copy/blkhash.c:355:1: enter_function: entry to ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:367:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:369:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:384:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:382:34: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:384:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:382:34: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:390:6: branch_false: following ‘false’ branch (when ‘zero_block’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:394:17: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:394:17: call_function: calling ‘compute_one_block_hash’ from ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:394:17: return_function: returning to ‘finish_blkhash’ from ‘compute_one_block_hash’
libnbd-1.24.0/copy/blkhash.c:399:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:399:6: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:404:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:405:10: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:424:10: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:404:34: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:404:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:405:10: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:424:10: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:404:34: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:404:15: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:432:3: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:436:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:442:18: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:442:18: acquire_memory: allocated here
libnbd-1.24.0/copy/blkhash.c:443:6: branch_false: following ‘false’ branch (when ‘final_digest’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:448:3: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:448:3: throw: if ‘gnutls_hash_deinit’ throws an exception...
libnbd-1.24.0/copy/blkhash.c:448:3: danger: ‘final_digest’ leaks here; was allocated at [(37)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/36)
#  446|     }
#  447|   
#  448|->   gnutls_hash_deinit (dig, final_digest);
#  449|   
#  450|     /* Print the final digest. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def26]
libnbd-1.24.0/copy/blkhash.c:464:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libnbd-1.24.0/copy/blkhash.c:355:1: enter_function: entry to ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:367:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:369:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:384:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:382:34: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:384:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:382:34: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:390:6: branch_false: following ‘false’ branch (when ‘zero_block’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:394:17: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:394:17: call_function: calling ‘compute_one_block_hash’ from ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:394:17: return_function: returning to ‘finish_blkhash’ from ‘compute_one_block_hash’
libnbd-1.24.0/copy/blkhash.c:399:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:399:6: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:404:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:405:10: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:424:10: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:404:34: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:404:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:405:10: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:424:10: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:404:34: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:404:15: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:432:3: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:436:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:442:18: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:443:6: branch_false: following ‘false’ branch (when ‘final_digest’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:448:3: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:451:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:452:10: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:452:10: acquire_resource: opened here
libnbd-1.24.0/copy/blkhash.c:453:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:461:3: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:464:3: throw: if ‘fflush’ throws an exception...
libnbd-1.24.0/copy/blkhash.c:464:3: danger: ‘fp’ leaks here; was opened at [(41)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/40)
#  462|       fprintf (fp, "%02x", final_digest[i]);
#  463|     fprintf (fp, "\n");
#  464|->   fflush (fp);
#  465|     if (blkhash_file != NULL)
#  466|       fclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libnbd-1.24.0/copy/blkhash.c:464:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libnbd-1.24.0/copy/blkhash.c:355:1: enter_function: entry to ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:367:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:369:7: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:384:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:382:34: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:384:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:385:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:382:34: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:390:6: branch_false: following ‘false’ branch (when ‘zero_block’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:394:17: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:394:17: call_function: calling ‘compute_one_block_hash’ from ‘finish_blkhash’
libnbd-1.24.0/copy/blkhash.c:394:17: return_function: returning to ‘finish_blkhash’ from ‘compute_one_block_hash’
libnbd-1.24.0/copy/blkhash.c:399:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:399:6: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:404:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:405:10: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:424:10: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:404:34: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:404:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:405:10: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:424:10: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:404:34: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:404:15: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:432:3: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:436:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:442:18: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:443:6: branch_false: following ‘false’ branch (when ‘final_digest’ is non-NULL)...
libnbd-1.24.0/copy/blkhash.c:448:3: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:451:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/blkhash.c:452:10: branch_true: ...to here
libnbd-1.24.0/copy/blkhash.c:452:10: acquire_memory: allocated here
libnbd-1.24.0/copy/blkhash.c:453:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/blkhash.c:461:3: branch_false: ...to here
libnbd-1.24.0/copy/blkhash.c:464:3: throw: if ‘fflush’ throws an exception...
libnbd-1.24.0/copy/blkhash.c:464:3: danger: ‘fp’ leaks here; was allocated at [(41)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/40)
#  462|       fprintf (fp, "%02x", final_digest[i]);
#  463|     fprintf (fp, "\n");
#  464|->   fflush (fp);
#  465|     if (blkhash_file != NULL)
#  466|       fclose (fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libnbd-1.24.0/copy/file-ops.c:227:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/file-ops.c:601:1: enter_function: entry to ‘file_allocate_space’
libnbd-1.24.0/copy/file-ops.c:621:9: acquire_memory: allocated here
libnbd-1.24.0/copy/file-ops.c:622:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/file-ops.c:622:6: branch_false: ...to here
libnbd-1.24.0/copy/file-ops.c:627:10: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/file-ops.c:633:6: branch_false: ...to here
libnbd-1.24.0/copy/file-ops.c:633:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libnbd-1.24.0/copy/file-ops.c:634:5: branch_true: ...to here
libnbd-1.24.0/copy/file-ops.c:634:5: call_function: calling ‘file_synch_write’ from ‘file_allocate_space’
#  225|      * (asynchronously).
#  226|      */
#  227|->   if (sync_file_range (fd, offset, len, SYNC_FILE_RANGE_WRITE) == -1) {
#  228|       fprintf (stderr, "%s: sync_file_range: cache=none: "
#  229|                "starting eviction: %m", prog);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libnbd-1.24.0/copy/file-ops.c:239:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/file-ops.c:601:1: enter_function: entry to ‘file_allocate_space’
libnbd-1.24.0/copy/file-ops.c:621:9: acquire_memory: allocated here
libnbd-1.24.0/copy/file-ops.c:622:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/file-ops.c:622:6: branch_false: ...to here
libnbd-1.24.0/copy/file-ops.c:627:10: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/file-ops.c:633:6: branch_false: ...to here
libnbd-1.24.0/copy/file-ops.c:633:6: branch_true: following ‘true’ branch (when ‘len != 0’)...
libnbd-1.24.0/copy/file-ops.c:634:5: branch_true: ...to here
libnbd-1.24.0/copy/file-ops.c:634:5: call_function: calling ‘file_synch_write’ from ‘file_allocate_space’
#  237|     /* Evict the oldest window from the page cache (synchronously). */
#  238|     if (oldest.len > 0) {
#  239|->     if (sync_file_range (fd, oldest.offset, oldest.len,
#  240|                            SYNC_FILE_RANGE_WAIT_BEFORE |
#  241|                            SYNC_FILE_RANGE_WRITE |

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libnbd-1.24.0/copy/file-ops.c:501:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/file-ops.c:601:1: enter_function: entry to ‘file_allocate_space’
libnbd-1.24.0/copy/file-ops.c:621:9: acquire_memory: allocated here
libnbd-1.24.0/copy/file-ops.c:622:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/file-ops.c:622:6: branch_false: ...to here
libnbd-1.24.0/copy/file-ops.c:627:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/file-ops.c:628:5: branch_true: ...to here
libnbd-1.24.0/copy/file-ops.c:628:5: call_function: calling ‘file_synch_write’ from ‘file_allocate_space’
#  499|   
#  500|     while (len > 0) {
#  501|->     r = pwrite (rwf->fd, data, len, offset);
#  502|       if (r == -1) {
#  503|         perror (rw->name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libnbd-1.24.0/copy/file-ops.c:503:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/file-ops.c:601:1: enter_function: entry to ‘file_allocate_space’
libnbd-1.24.0/copy/file-ops.c:621:9: acquire_memory: allocated here
libnbd-1.24.0/copy/file-ops.c:622:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/file-ops.c:622:6: branch_false: ...to here
libnbd-1.24.0/copy/file-ops.c:627:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/file-ops.c:628:5: branch_true: ...to here
libnbd-1.24.0/copy/file-ops.c:628:5: call_function: calling ‘file_synch_write’ from ‘file_allocate_space’
#  501|       r = pwrite (rwf->fd, data, len, offset);
#  502|       if (r == -1) {
#  503|->       perror (rw->name);
#  504|         exit (EXIT_FAILURE);
#  505|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libnbd-1.24.0/copy/main.c:585:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/copy/main.c:580:9: acquire_memory: allocated here
libnbd-1.24.0/copy/main.c:581:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/main.c:585:7: branch_false: ...to here
libnbd-1.24.0/copy/main.c:585:7: throw: if ‘nbd_is_uri’ throws an exception...
libnbd-1.24.0/copy/main.c:585:7: danger: ‘nbd_create()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  583|       exit (EXIT_FAILURE);
#  584|     }
#  585|->   r = nbd_is_uri (nbd, s);
#  586|     nbd_close (nbd);
#  587|     return r > 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
libnbd-1.24.0/copy/multi-thread-copying.c:431:5: warning[-Wanalyzer-malloc-leak]: leak of ‘command’
libnbd-1.24.0/copy/multi-thread-copying.c:448:1: enter_function: entry to ‘create_command’
libnbd-1.24.0/copy/multi-thread-copying.c:452:13: acquire_memory: allocated here
libnbd-1.24.0/copy/multi-thread-copying.c:453:6: branch_false: following ‘false’ branch (when ‘command’ is non-NULL)...
libnbd-1.24.0/copy/multi-thread-copying.c:458:3: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:461:6: branch_false: following ‘false’ branch (when ‘zero == 0’)...
libnbd-1.24.0/copy/multi-thread-copying.c:462:29: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:462:29: call_function: calling ‘create_buffer’ from ‘create_command’
#  429|     buffer = calloc (1, sizeof *buffer);
#  430|     if (buffer == NULL) {
#  431|->     perror ("calloc");
#  432|       exit (EXIT_FAILURE);
#  433|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
libnbd-1.24.0/copy/multi-thread-copying.c:437:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
libnbd-1.24.0/copy/multi-thread-copying.c:429:12: acquire_memory: allocated here
libnbd-1.24.0/copy/multi-thread-copying.c:430:6: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
libnbd-1.24.0/copy/multi-thread-copying.c:435:18: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:436:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:437:5: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:437:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/copy/multi-thread-copying.c:437:5: danger: ‘buffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  435|     buffer->data = malloc (len);
#  436|     if (buffer->data == NULL) {
#  437|->     perror ("malloc");
#  438|       exit (EXIT_FAILURE);
#  439|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
libnbd-1.24.0/copy/multi-thread-copying.c:437:5: warning[-Wanalyzer-malloc-leak]: leak of ‘command’
libnbd-1.24.0/copy/multi-thread-copying.c:448:1: enter_function: entry to ‘create_command’
libnbd-1.24.0/copy/multi-thread-copying.c:452:13: acquire_memory: allocated here
libnbd-1.24.0/copy/multi-thread-copying.c:453:6: branch_false: following ‘false’ branch (when ‘command’ is non-NULL)...
libnbd-1.24.0/copy/multi-thread-copying.c:458:3: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:461:6: branch_false: following ‘false’ branch (when ‘zero == 0’)...
libnbd-1.24.0/copy/multi-thread-copying.c:462:29: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:462:29: call_function: calling ‘create_buffer’ from ‘create_command’
#  435|     buffer->data = malloc (len);
#  436|     if (buffer->data == NULL) {
#  437|->     perror ("malloc");
#  438|       exit (EXIT_FAILURE);
#  439|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
libnbd-1.24.0/copy/multi-thread-copying.c:476:24: warning[-Wanalyzer-malloc-leak]: leak of ‘create_subcommand(vp,  last_offset,  i - last_offset, 1)’
libnbd-1.24.0/copy/multi-thread-copying.c:503:1: enter_function: entry to ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:507:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:513:3: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:516:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:537:14: call_function: inlined call to ‘is_power_of_2’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:537:14: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:545:12: branch_false: following ‘false’ branch (when ‘last_is_zero == 0’)...
libnbd-1.24.0/copy/multi-thread-copying.c:547:14: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:547:14: branch_true: following ‘true’ branch (when ‘last_offset != i’)...
libnbd-1.24.0/copy/multi-thread-copying.c:549:58: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:548:26: call_function: calling ‘create_subcommand’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:548:26: return_function: returning to ‘finished_read’ from ‘create_subcommand’
libnbd-1.24.0/copy/multi-thread-copying.c:584:8: branch_true: following ‘true’ branch (when ‘last_offset != i’)...
libnbd-1.24.0/copy/multi-thread-copying.c:585:10: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:585:10: branch_true: following ‘true’ branch (when ‘last_is_zero != 0’)...
libnbd-1.24.0/copy/multi-thread-copying.c:597:54: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:596:22: call_function: calling ‘create_subcommand’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:596:22: return_function: returning to ‘finished_read’ from ‘create_subcommand’
libnbd-1.24.0/copy/multi-thread-copying.c:599:9: call_function: inlined call to ‘decrease_queue_size’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:600:9: call_function: calling ‘fill_dst_range_with_zeroes’ from ‘finished_read’
#  474|                      bool zero)
#  475|   {
#  476|->   const uint64_t end = command->offset + command->slice.len;
#  477|     struct command *newcommand;
#  478|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
libnbd-1.24.0/copy/multi-thread-copying.c:551:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<Ua1c8>.user_data’
libnbd-1.24.0/copy/multi-thread-copying.c:503:1: enter_function: entry to ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:507:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:513:3: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:516:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:537:14: call_function: inlined call to ‘is_power_of_2’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:537:14: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:538:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:540:20: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:540:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:545:12: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:545:12: branch_false: following ‘false’ branch (when ‘last_is_zero == 0’)...
libnbd-1.24.0/copy/multi-thread-copying.c:547:14: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:547:14: branch_true: following ‘true’ branch (when ‘last_offset != i’)...
libnbd-1.24.0/copy/multi-thread-copying.c:549:58: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:548:26: call_function: calling ‘create_subcommand’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:548:26: return_function: returning to ‘finished_read’ from ‘create_subcommand’
libnbd-1.24.0/copy/multi-thread-copying.c:551:13: throw: if the called function throws an exception...
libnbd-1.24.0/copy/multi-thread-copying.c:551:13: danger: ‘<Ua1c8>.user_data’ leaks here; was allocated at [(23)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/22)
#  549|                                               last_offset, i - last_offset,
#  550|                                               false);
#  551|->             dst->ops->asynch_write (dst, newcommand,
#  552|                                       (nbd_completion_callback) {
#  553|                                         .callback = finished_command,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
libnbd-1.24.0/copy/multi-thread-copying.c:589:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<Ua260>.user_data’
libnbd-1.24.0/copy/multi-thread-copying.c:503:1: enter_function: entry to ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:507:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:513:3: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:516:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:537:14: call_function: inlined call to ‘is_power_of_2’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:537:14: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:584:8: branch_true: following ‘true’ branch (when ‘last_offset != i’)...
libnbd-1.24.0/copy/multi-thread-copying.c:585:10: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:585:10: branch_false: following ‘false’ branch (when ‘last_is_zero == 0’)...
libnbd-1.24.0/copy/multi-thread-copying.c:587:54: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:586:22: call_function: calling ‘create_subcommand’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:586:22: return_function: returning to ‘finished_read’ from ‘create_subcommand’
libnbd-1.24.0/copy/multi-thread-copying.c:589:9: throw: if the called function throws an exception...
libnbd-1.24.0/copy/multi-thread-copying.c:589:9: danger: ‘<Ua260>.user_data’ leaks here; was allocated at [(19)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/18)
#  587|                                           last_offset, i - last_offset,
#  588|                                           false);
#  589|->         dst->ops->asynch_write (dst, newcommand,
#  590|                                   (nbd_completion_callback) {
#  591|                                     .callback = finished_command,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
libnbd-1.24.0/copy/multi-thread-copying.c:607:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<Ua2f8>.user_data’
libnbd-1.24.0/copy/multi-thread-copying.c:503:1: enter_function: entry to ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:507:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:513:3: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:516:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:537:14: call_function: inlined call to ‘is_power_of_2’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:537:14: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:605:8: branch_true: following ‘true’ branch (when ‘i != end’)...
libnbd-1.24.0/copy/multi-thread-copying.c:606:51: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:606:20: call_function: calling ‘create_subcommand’ from ‘finished_read’
libnbd-1.24.0/copy/multi-thread-copying.c:606:20: return_function: returning to ‘finished_read’ from ‘create_subcommand’
libnbd-1.24.0/copy/multi-thread-copying.c:607:7: throw: if the called function throws an exception...
libnbd-1.24.0/copy/multi-thread-copying.c:607:7: danger: ‘<Ua2f8>.user_data’ leaks here; was allocated at [(17)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/16)
#  605|       if (end - i > 0) {
#  606|         newcommand = create_subcommand (command, i, end - i, false);
#  607|->       dst->ops->asynch_write (dst, newcommand,
#  608|                                 (nbd_completion_callback) {
#  609|                                   .callback = finished_command,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
libnbd-1.24.0/copy/multi-thread-copying.c:672:5: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
libnbd-1.24.0/copy/multi-thread-copying.c:645:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:649:10: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:649:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:680:1: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:661:10: acquire_memory: allocated here
libnbd-1.24.0/copy/multi-thread-copying.c:662:6: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
libnbd-1.24.0/copy/multi-thread-copying.c:662:6: branch_false: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:666:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/multi-thread-copying.c:669:8: branch_true: ...to here
libnbd-1.24.0/copy/multi-thread-copying.c:672:5: throw: if the called function throws an exception...
libnbd-1.24.0/copy/multi-thread-copying.c:672:5: danger: ‘data’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  670|         len = data_size;
#  671|   
#  672|->     dst->ops->synch_write (dst, data, len, command->offset);
#  673|       command->slice.len -= len;
#  674|       command->offset += len;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
libnbd-1.24.0/copy/nbd-ops.c:60:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rwn’
libnbd-1.24.0/copy/nbd-ops.c:145:1: enter_function: entry to ‘nbd_rw_create_uri’
libnbd-1.24.0/copy/nbd-ops.c:147:24: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:148:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:150:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:156:3: call_function: calling ‘open_one_nbd_handle’ from ‘nbd_rw_create_uri’
#   58|     struct nbd_handle *nbd;
#   59|   
#   60|->   nbd = nbd_create ();
#   61|     if (nbd == NULL) {
#   62|       fprintf (stderr, "%s: %s\n", prog, nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
libnbd-1.24.0/copy/nbd-ops.c:62:5: warning[-Wanalyzer-malloc-leak]: leak of ‘rwn’
libnbd-1.24.0/copy/nbd-ops.c:145:1: enter_function: entry to ‘nbd_rw_create_uri’
libnbd-1.24.0/copy/nbd-ops.c:147:24: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:148:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:150:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:156:3: call_function: calling ‘open_one_nbd_handle’ from ‘nbd_rw_create_uri’
#   60|     nbd = nbd_create ();
#   61|     if (nbd == NULL) {
#   62|->     fprintf (stderr, "%s: %s\n", prog, nbd_get_error ());
#   63|       exit (EXIT_FAILURE);
#   64|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
libnbd-1.24.0/copy/nbd-ops.c:66:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/copy/nbd-ops.c:60:9: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:61:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/nbd-ops.c:66:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:66:3: throw: if ‘nbd_set_debug’ throws an exception...
libnbd-1.24.0/copy/nbd-ops.c:66:3: danger: ‘nbd_create()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   64|     }
#   65|   
#   66|->   nbd_set_debug (nbd, verbose);
#   67|   
#   68|     /* Set the handle name for debugging.  We could use rwn->rw.name

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
libnbd-1.24.0/copy/nbd-ops.c:66:3: warning[-Wanalyzer-malloc-leak]: leak of ‘rwn’
libnbd-1.24.0/copy/nbd-ops.c:145:1: enter_function: entry to ‘nbd_rw_create_uri’
libnbd-1.24.0/copy/nbd-ops.c:147:24: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:148:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:150:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:156:3: call_function: calling ‘open_one_nbd_handle’ from ‘nbd_rw_create_uri’
#   64|     }
#   65|   
#   66|->   nbd_set_debug (nbd, verbose);
#   67|   
#   68|     /* Set the handle name for debugging.  We could use rwn->rw.name

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
libnbd-1.24.0/copy/nbd-ops.c:80:7: warning[-Wanalyzer-malloc-leak]: leak of ‘rwn’
libnbd-1.24.0/copy/nbd-ops.c:145:1: enter_function: entry to ‘nbd_rw_create_uri’
libnbd-1.24.0/copy/nbd-ops.c:147:24: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:148:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:150:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:156:3: call_function: calling ‘open_one_nbd_handle’ from ‘nbd_rw_create_uri’
#   78|                     rwn->d == READING ? "src" : "dst",
#   79|                     index) == -1) {
#   80|->       perror ("asprintf");
#   81|         exit (EXIT_FAILURE);
#   82|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
libnbd-1.24.0/copy/nbd-ops.c:83:5: warning[-Wanalyzer-malloc-leak]: leak of ‘rwn’
libnbd-1.24.0/copy/nbd-ops.c:145:1: enter_function: entry to ‘nbd_rw_create_uri’
libnbd-1.24.0/copy/nbd-ops.c:147:24: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:148:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:150:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:156:3: call_function: calling ‘open_one_nbd_handle’ from ‘nbd_rw_create_uri’
#   81|         exit (EXIT_FAILURE);
#   82|       }
#   83|->     nbd_set_handle_name (nbd, name);
#   84|       free (name);
#   85|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
libnbd-1.24.0/copy/nbd-ops.c:88:7: warning[-Wanalyzer-malloc-leak]: leak of ‘rwn’
libnbd-1.24.0/copy/nbd-ops.c:145:1: enter_function: entry to ‘nbd_rw_create_uri’
libnbd-1.24.0/copy/nbd-ops.c:147:24: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:148:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:150:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:156:3: call_function: calling ‘open_one_nbd_handle’ from ‘nbd_rw_create_uri’
#   86|   
#   87|     if (extents && rwn->d == READING &&
#   88|->       nbd_add_meta_context (nbd, "base:allocation") == -1) {
#   89|       fprintf (stderr, "%s: %s\n", prog, nbd_get_error ());
#   90|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
libnbd-1.24.0/copy/nbd-ops.c:89:5: warning[-Wanalyzer-malloc-leak]: leak of ‘rwn’
libnbd-1.24.0/copy/nbd-ops.c:145:1: enter_function: entry to ‘nbd_rw_create_uri’
libnbd-1.24.0/copy/nbd-ops.c:147:24: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:148:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:150:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:156:3: call_function: calling ‘open_one_nbd_handle’ from ‘nbd_rw_create_uri’
#   87|     if (extents && rwn->d == READING &&
#   88|         nbd_add_meta_context (nbd, "base:allocation") == -1) {
#   89|->     fprintf (stderr, "%s: %s\n", prog, nbd_get_error ());
#   90|       exit (EXIT_FAILURE);
#   91|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
libnbd-1.24.0/copy/nbd-ops.c:95:5: warning[-Wanalyzer-malloc-leak]: leak of ‘rwn’
libnbd-1.24.0/copy/nbd-ops.c:145:1: enter_function: entry to ‘nbd_rw_create_uri’
libnbd-1.24.0/copy/nbd-ops.c:147:24: acquire_memory: allocated here
libnbd-1.24.0/copy/nbd-ops.c:148:6: branch_false: following ‘false’ branch (when ‘rwn’ is non-NULL)...
libnbd-1.24.0/copy/nbd-ops.c:150:3: branch_false: ...to here
libnbd-1.24.0/copy/nbd-ops.c:156:3: call_function: calling ‘open_one_nbd_handle’ from ‘nbd_rw_create_uri’
#   93|     switch (rwn->create_t) {
#   94|     case CREATE_URI:
#   95|->     nbd_set_uri_allow_local_file (nbd, true); /* Allow ?tls-psk-file. */
#   96|   
#   97|       if (nbd_connect_uri (nbd, rwn->uri) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
libnbd-1.24.0/copy/null-ops.c:50:10: warning[-Wanalyzer-malloc-leak]: leak of ‘rw’
libnbd-1.24.0/copy/null-ops.c:43:24: acquire_memory: allocated here
libnbd-1.24.0/copy/null-ops.c:44:6: branch_false: following ‘false’ branch (when ‘rw’ is non-NULL)...
libnbd-1.24.0/copy/null-ops.c:46:3: branch_false: ...to here
libnbd-1.24.0/copy/null-ops.c:50:10: danger: ‘rw’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   48|     rw->rw.size = INT64_MAX;
#   49|     rw->rw.preferred = 4096;
#   50|->   return &rw->rw;
#   51|   }
#   52|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
libnbd-1.24.0/copy/pipe-ops.c:49:10: warning[-Wanalyzer-malloc-leak]: leak of ‘rwp’
libnbd-1.24.0/copy/pipe-ops.c:40:25: acquire_memory: allocated here
libnbd-1.24.0/copy/pipe-ops.c:41:6: branch_false: following ‘false’ branch (when ‘rwp’ is non-NULL)...
libnbd-1.24.0/copy/pipe-ops.c:44:3: branch_false: ...to here
libnbd-1.24.0/copy/pipe-ops.c:49:10: danger: ‘rwp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   47|     rwp->rw.preferred = 4096;
#   48|     rwp->fd = fd;
#   49|->   return &rwp->rw;
#   50|   }
#   51|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
libnbd-1.24.0/copy/synch-copying.c:53:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/synch-copying.c:68:1: enter_function: entry to ‘synch_copying’
libnbd-1.24.0/copy/synch-copying.c:73:9: acquire_memory: allocated here
libnbd-1.24.0/copy/synch-copying.c:74:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/synch-copying.c:82:10: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:103:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:104:19: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:117:9: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:119:13: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:119:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:120:11: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:121:11: call_function: calling ‘fill_dst_range_with_zeroes’ from ‘synch_copying’
#   51|   
#   52|     /* Try efficient zeroing. */
#   53|->   if (dst->ops->synch_zero (dst, offset, length, allocated))
#   54|       return;
#   55|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
libnbd-1.24.0/copy/synch-copying.c:61:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/synch-copying.c:68:1: enter_function: entry to ‘synch_copying’
libnbd-1.24.0/copy/synch-copying.c:73:9: acquire_memory: allocated here
libnbd-1.24.0/copy/synch-copying.c:74:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/synch-copying.c:82:10: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:103:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:104:19: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:117:9: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:119:13: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:119:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:120:11: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:121:11: call_function: calling ‘fill_dst_range_with_zeroes’ from ‘synch_copying’
#   59|       size_t len = MIN (length, request_size);
#   60|   
#   61|->     dst->ops->synch_write (dst, buf, len, offset);
#   62|       length -= len;
#   63|       offset += len;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
libnbd-1.24.0/copy/synch-copying.c:85:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/synch-copying.c:73:9: acquire_memory: allocated here
libnbd-1.24.0/copy/synch-copying.c:74:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/synch-copying.c:82:10: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:85:17: throw: if the called function throws an exception...
libnbd-1.24.0/copy/synch-copying.c:85:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   83|       size_t r;
#   84|   
#   85|->     while ((r = src->ops->synch_read (src, buf, request_size, offset)) > 0) {
#   86|         update_blkhash ((const char *) buf, offset, r);
#   87|         dst->ops->synch_write (dst, buf, r, offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
libnbd-1.24.0/copy/synch-copying.c:112:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/synch-copying.c:73:9: acquire_memory: allocated here
libnbd-1.24.0/copy/synch-copying.c:74:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/synch-copying.c:82:10: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:103:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:104:19: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:111:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:112:9: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:112:9: throw: if the called function throws an exception...
libnbd-1.24.0/copy/synch-copying.c:112:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  110|   
#  111|         if (extents)
#  112|->         src->ops->get_extents (src, 0, offset, count, &exts);
#  113|         else
#  114|           default_get_extents (src, 0, offset, count, &exts);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
libnbd-1.24.0/copy/synch-copying.c:114:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/synch-copying.c:73:9: acquire_memory: allocated here
libnbd-1.24.0/copy/synch-copying.c:74:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/synch-copying.c:82:10: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:103:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:104:19: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:114:9: throw: if ‘default_get_extents’ throws an exception...
libnbd-1.24.0/copy/synch-copying.c:114:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  112|           src->ops->get_extents (src, 0, offset, count, &exts);
#  113|         else
#  114|->         default_get_extents (src, 0, offset, count, &exts);
#  115|   
#  116|         for (i = 0; i < exts.len; ++i) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
libnbd-1.24.0/copy/synch-copying.c:120:11: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/synch-copying.c:73:9: acquire_memory: allocated here
libnbd-1.24.0/copy/synch-copying.c:74:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/synch-copying.c:82:10: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:103:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:104:19: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:117:9: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:119:13: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:119:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:120:11: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:120:11: throw: if ‘update_blkhash’ throws an exception...
libnbd-1.24.0/copy/synch-copying.c:120:11: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  118|   
#  119|           if (exts.ptr[i].zero) {
#  120|->           update_blkhash (NULL, offset, exts.ptr[i].length);
#  121|             fill_dst_range_with_zeroes(offset, exts.ptr[i].length, buf);
#  122|             offset += exts.ptr[i].length;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
libnbd-1.24.0/copy/synch-copying.c:125:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/copy/synch-copying.c:73:9: acquire_memory: allocated here
libnbd-1.24.0/copy/synch-copying.c:74:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/copy/synch-copying.c:82:10: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/copy/synch-copying.c:82:6: branch_false: ...to here
libnbd-1.24.0/copy/synch-copying.c:103:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:104:19: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:117:9: branch_true: following ‘true’ branch...
libnbd-1.24.0/copy/synch-copying.c:119:13: branch_true: ...to here
libnbd-1.24.0/copy/synch-copying.c:125:15: throw: if the called function throws an exception...
libnbd-1.24.0/copy/synch-copying.c:125:15: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  123|           }
#  124|           else /* data */ {
#  125|->           r = src->ops->synch_read (src, buf, exts.ptr[i].length, offset);
#  126|   
#  127|             /* These cases should never happen unless the file is

Error: CPPCHECK_WARNING (CWE-457): [#def59]
libnbd-1.24.0/dump/dump.c:386: error[uninitvar]: Uninitialized variable: last
#  384|           offset + i > 0 && /* first line is never squashed */
#  385|           offset + i + 16 < size && /* last line is never squashed */
#  386|->         memcmp (&buffer[i], last, 16) == 0;
#  387|         if (same) {
#  388|           if (!printed_splat) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
libnbd-1.24.0/examples/aio-connect-read.c:52:11: warning[-Wanalyzer-malloc-leak]: leak of ‘popen("hexdump -C", "w")’
libnbd-1.24.0/examples/aio-connect-read.c:39:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/aio-connect-read.c:45:3: branch_false: ...to here
libnbd-1.24.0/examples/aio-connect-read.c:47:8: acquire_memory: allocated here
libnbd-1.24.0/examples/aio-connect-read.c:48:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/aio-connect-read.c:52:11: branch_false: ...to here
libnbd-1.24.0/examples/aio-connect-read.c:52:11: danger: ‘popen("hexdump -C", "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   50|       exit (EXIT_FAILURE);
#   51|     }
#   52|->   fwrite (data->sector, SECTOR_SIZE, 1, pp);
#   53|     pclose (pp);
#   54|     printf ("\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
libnbd-1.24.0/examples/aio-connect-read.c:85:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/aio-connect-read.c:70:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/aio-connect-read.c:76:9: branch_false: ...to here
libnbd-1.24.0/examples/aio-connect-read.c:76:9: acquire_memory: allocated here
libnbd-1.24.0/examples/aio-connect-read.c:77:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/aio-connect-read.c:85:7: branch_false: ...to here
libnbd-1.24.0/examples/aio-connect-read.c:85:7: throw: if ‘nbd_aio_connect_unix’ throws an exception...
libnbd-1.24.0/examples/aio-connect-read.c:85:7: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   83|      * This only starts the connection.
#   84|      */
#   85|->   if (nbd_aio_connect_unix (nbd, argv[1]) == -1) {
#   86|       fprintf (stderr, "%s\n", nbd_get_error ());
#   87|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
libnbd-1.24.0/examples/connect-benchmark.c:109:9: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/connect-benchmark.c:101:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/connect-benchmark.c:103:11: branch_false: ...to here
libnbd-1.24.0/examples/connect-benchmark.c:103:11: acquire_memory: allocated here
libnbd-1.24.0/examples/connect-benchmark.c:104:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/connect-benchmark.c:109:9: branch_false: ...to here
libnbd-1.24.0/examples/connect-benchmark.c:109:9: throw: if ‘nbd_connect_uri’ throws an exception...
libnbd-1.24.0/examples/connect-benchmark.c:109:9: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  107|       }
#  108|   
#  109|->     if (nbd_connect_uri (nbd, uri) == -1) {
#  110|         fprintf (stderr, "%s\n", nbd_get_error ());
#  111|         exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
libnbd-1.24.0/examples/connect-command.c:49:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/connect-command.c:19:9: acquire_memory: allocated here
libnbd-1.24.0/examples/connect-command.c:20:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/connect-command.c:26:9: branch_false: ...to here
libnbd-1.24.0/examples/connect-command.c:49:7: throw: if ‘nbd_connect_command’ throws an exception...
libnbd-1.24.0/examples/connect-command.c:49:7: danger: ‘nbd_create()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   47|       NULL
#   48|     };
#   49|->   if (nbd_connect_command (nbd, args) == -1) {
#   50|       fprintf (stderr, "%s\n", nbd_get_error ());
#   51|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
libnbd-1.24.0/examples/connect-uri.c:49:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/connect-uri.c:32:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/connect-uri.c:39:9: branch_false: ...to here
libnbd-1.24.0/examples/connect-uri.c:39:9: acquire_memory: allocated here
libnbd-1.24.0/examples/connect-uri.c:40:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/connect-uri.c:49:7: branch_false: ...to here
libnbd-1.24.0/examples/connect-uri.c:49:7: throw: if ‘nbd_set_full_info’ throws an exception...
libnbd-1.24.0/examples/connect-uri.c:49:7: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   47|      */
#   48|   #if LIBNBD_HAVE_NBD_SET_FULL_INFO
#   49|->   if (nbd_set_full_info (nbd, true) == -1) {
#   50|       fprintf (stderr, "%s\n", nbd_get_error ());
#   51|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
libnbd-1.24.0/examples/encryption.c:78:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/encryption.c:63:1: enter_function: entry to ‘main’
libnbd-1.24.0/examples/encryption.c:68:3: call_function: calling ‘create_keys’ from ‘main’
libnbd-1.24.0/examples/encryption.c:68:3: return_function: returning to ‘main’ from ‘create_keys’
libnbd-1.24.0/examples/encryption.c:71:9: acquire_memory: allocated here
libnbd-1.24.0/examples/encryption.c:72:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/encryption.c:78:7: branch_false: ...to here
libnbd-1.24.0/examples/encryption.c:78:7: throw: if ‘nbd_set_tls’ throws an exception...
libnbd-1.24.0/examples/encryption.c:78:7: danger: ‘nbd_create()’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   76|   
#   77|     /* Enable TLS in the client. */
#   78|->   if (nbd_set_tls (nbd, LIBNBD_TLS_REQUIRE) == -1) {
#   79|       fprintf (stderr, "%s\n", nbd_get_error ());
#   80|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
libnbd-1.24.0/examples/fetch-first-sector.c:42:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/fetch-first-sector.c:27:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/fetch-first-sector.c:33:9: branch_false: ...to here
libnbd-1.24.0/examples/fetch-first-sector.c:33:9: acquire_memory: allocated here
libnbd-1.24.0/examples/fetch-first-sector.c:34:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/fetch-first-sector.c:42:7: branch_false: ...to here
libnbd-1.24.0/examples/fetch-first-sector.c:42:7: throw: if ‘nbd_connect_unix’ throws an exception...
libnbd-1.24.0/examples/fetch-first-sector.c:42:7: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   40|      * Unix domain socket.
#   41|      */
#   42|->   if (nbd_connect_unix (nbd, argv[1]) == -1) {
#   43|       fprintf (stderr, "%s\n", nbd_get_error ());
#   44|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
libnbd-1.24.0/examples/fetch-first-sector.c:63:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen("hexdump -C", "w")’
libnbd-1.24.0/examples/fetch-first-sector.c:27:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/fetch-first-sector.c:33:9: branch_false: ...to here
libnbd-1.24.0/examples/fetch-first-sector.c:34:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/fetch-first-sector.c:42:7: branch_false: ...to here
libnbd-1.24.0/examples/fetch-first-sector.c:42:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/fetch-first-sector.c:48:7: branch_false: ...to here
libnbd-1.24.0/examples/fetch-first-sector.c:48:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/fetch-first-sector.c:54:3: branch_false: ...to here
libnbd-1.24.0/examples/fetch-first-sector.c:57:8: acquire_memory: allocated here
libnbd-1.24.0/examples/fetch-first-sector.c:58:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/fetch-first-sector.c:62:3: branch_false: ...to here
libnbd-1.24.0/examples/fetch-first-sector.c:63:3: danger: ‘popen("hexdump -C", "w")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#   61|     }
#   62|     fwrite (buf, sizeof buf, 1, pp);
#   63|->   pclose (pp);
#   64|   
#   65|     exit (EXIT_SUCCESS);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
libnbd-1.24.0/examples/get-size.c:38:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/get-size.c:23:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/get-size.c:29:9: branch_false: ...to here
libnbd-1.24.0/examples/get-size.c:29:9: acquire_memory: allocated here
libnbd-1.24.0/examples/get-size.c:30:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/get-size.c:38:7: branch_false: ...to here
libnbd-1.24.0/examples/get-size.c:38:7: throw: if ‘nbd_connect_unix’ throws an exception...
libnbd-1.24.0/examples/get-size.c:38:7: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   36|      * Unix domain socket.
#   37|      */
#   38|->   if (nbd_connect_unix (nbd, argv[1]) == -1) {
#   39|       fprintf (stderr, "%s\n", nbd_get_error ());
#   40|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
libnbd-1.24.0/examples/glib-main-loop.c:214:25: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/glib-main-loop.c:276:1: enter_function: entry to ‘main’
libnbd-1.24.0/examples/glib-main-loop.c:285:9: acquire_memory: allocated here
libnbd-1.24.0/examples/glib-main-loop.c:286:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/glib-main-loop.c:290:10: branch_false: ...to here
libnbd-1.24.0/examples/glib-main-loop.c:291:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/glib-main-loop.c:297:11: branch_false: ...to here
libnbd-1.24.0/examples/glib-main-loop.c:297:11: call_function: calling ‘create_libnbd_gsource’ from ‘main’
#  212|   
#  213|     source =
#  214|->     (struct NBDSource *)g_source_new (&nbd_source_funcs, sizeof *source);
#  215|     source->nbd = nbd;
#  216|     source->debug = nbd_get_debug (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
libnbd-1.24.0/examples/glib-main-loop.c:216:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/glib-main-loop.c:276:1: enter_function: entry to ‘main’
libnbd-1.24.0/examples/glib-main-loop.c:286:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/glib-main-loop.c:290:10: branch_false: ...to here
libnbd-1.24.0/examples/glib-main-loop.c:290:10: acquire_memory: allocated here
libnbd-1.24.0/examples/glib-main-loop.c:291:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/glib-main-loop.c:297:11: branch_false: ...to here
libnbd-1.24.0/examples/glib-main-loop.c:298:12: call_function: calling ‘create_libnbd_gsource’ from ‘main’
#  214|       (struct NBDSource *)g_source_new (&nbd_source_funcs, sizeof *source);
#  215|     source->nbd = nbd;
#  216|->   source->debug = nbd_get_debug (nbd);
#  217|     source->fd = -1;
#  218|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
libnbd-1.24.0/examples/glib-main-loop.c:216:19: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/glib-main-loop.c:276:1: enter_function: entry to ‘main’
libnbd-1.24.0/examples/glib-main-loop.c:285:9: acquire_memory: allocated here
libnbd-1.24.0/examples/glib-main-loop.c:286:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/glib-main-loop.c:290:10: branch_false: ...to here
libnbd-1.24.0/examples/glib-main-loop.c:291:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/glib-main-loop.c:297:11: branch_false: ...to here
libnbd-1.24.0/examples/glib-main-loop.c:297:11: call_function: calling ‘create_libnbd_gsource’ from ‘main’
#  214|       (struct NBDSource *)g_source_new (&nbd_source_funcs, sizeof *source);
#  215|     source->nbd = nbd;
#  216|->   source->debug = nbd_get_debug (nbd);
#  217|     source->fd = -1;
#  218|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
libnbd-1.24.0/examples/glib-main-loop.c:290:10: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/glib-main-loop.c:285:9: acquire_memory: allocated here
libnbd-1.24.0/examples/glib-main-loop.c:286:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/glib-main-loop.c:290:10: branch_false: ...to here
libnbd-1.24.0/examples/glib-main-loop.c:290:10: throw: if ‘nbd_create’ throws an exception...
libnbd-1.24.0/examples/glib-main-loop.c:290:10: danger: ‘nbd_create()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  288|       exit (EXIT_FAILURE);
#  289|     }
#  290|->   dest = nbd_create ();
#  291|     if (!dest) {
#  292|       fprintf (stderr, "%s\n", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
libnbd-1.24.0/examples/glib-main-loop.c:291:6: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/glib-main-loop.c:285:9: acquire_memory: allocated here
libnbd-1.24.0/examples/glib-main-loop.c:286:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/glib-main-loop.c:290:10: branch_false: ...to here
libnbd-1.24.0/examples/glib-main-loop.c:291:6: danger: ‘nbd_create()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  289|     }
#  290|     dest = nbd_create ();
#  291|->   if (!dest) {
#  292|       fprintf (stderr, "%s\n", nbd_get_error ());
#  293|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
libnbd-1.24.0/examples/list-exports.c:62:6: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(name)’
libnbd-1.24.0/examples/list-exports.c:57:6: branch_false: following ‘false’ branch (when ‘names’ is non-NULL)...
libnbd-1.24.0/examples/list-exports.c:61:9: branch_false: ...to here
libnbd-1.24.0/examples/list-exports.c:61:17: acquire_memory: allocated here
libnbd-1.24.0/examples/list-exports.c:62:6: danger: ‘strdup(name)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   60|     }
#   61|     names[l->i] = strdup (name);
#   62|->   if (!names[l->i]) {
#   63|       perror ("strdup");
#   64|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
libnbd-1.24.0/examples/list-exports.c:63:5: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
libnbd-1.24.0/examples/list-exports.c:57:6: branch_false: following ‘false’ branch (when ‘names’ is non-NULL)...
libnbd-1.24.0/examples/list-exports.c:61:9: branch_false: ...to here
libnbd-1.24.0/examples/list-exports.c:62:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/list-exports.c:63:5: branch_true: ...to here
libnbd-1.24.0/examples/list-exports.c:63:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/examples/list-exports.c:63:5: danger: ‘names’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   61|     names[l->i] = strdup (name);
#   62|     if (!names[l->i]) {
#   63|->     perror ("strdup");
#   64|       exit (EXIT_FAILURE);
#   65|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
libnbd-1.24.0/examples/list-exports.c:93:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/list-exports.c:80:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/list-exports.c:86:9: branch_false: ...to here
libnbd-1.24.0/examples/list-exports.c:86:9: acquire_memory: allocated here
libnbd-1.24.0/examples/list-exports.c:87:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/list-exports.c:93:3: branch_false: ...to here
libnbd-1.24.0/examples/list-exports.c:93:3: throw: if ‘nbd_set_opt_mode’ throws an exception...
libnbd-1.24.0/examples/list-exports.c:93:3: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   91|   
#   92|     /* Set opt mode. */
#   93|->   nbd_set_opt_mode (nbd, true);
#   94|   
#   95|     /* Connect to the NBD server over a

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
libnbd-1.24.0/examples/open-qcow2.c:40:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/open-qcow2.c:19:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/open-qcow2.c:23:3: branch_false: ...to here
libnbd-1.24.0/examples/open-qcow2.c:26:9: acquire_memory: allocated here
libnbd-1.24.0/examples/open-qcow2.c:27:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/open-qcow2.c:35:9: branch_false: ...to here
libnbd-1.24.0/examples/open-qcow2.c:40:7: throw: if ‘nbd_connect_systemd_socket_activation’ throws an exception...
libnbd-1.24.0/examples/open-qcow2.c:40:7: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   38|       NULL
#   39|     };
#   40|->   if (nbd_connect_systemd_socket_activation (nbd,
#   41|                                                args) == -1) {
#   42|       fprintf (stderr, "%s\n", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
libnbd-1.24.0/examples/open-qcow2.c:58:3: warning[-Wanalyzer-malloc-leak]: leak of ‘popen("hexdump -C", "w")’
libnbd-1.24.0/examples/open-qcow2.c:19:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/open-qcow2.c:23:3: branch_false: ...to here
libnbd-1.24.0/examples/open-qcow2.c:27:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/open-qcow2.c:35:9: branch_false: ...to here
libnbd-1.24.0/examples/open-qcow2.c:40:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/open-qcow2.c:47:7: branch_false: ...to here
libnbd-1.24.0/examples/open-qcow2.c:47:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/open-qcow2.c:52:8: branch_false: ...to here
libnbd-1.24.0/examples/open-qcow2.c:52:8: acquire_memory: allocated here
libnbd-1.24.0/examples/open-qcow2.c:53:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/open-qcow2.c:57:3: branch_false: ...to here
libnbd-1.24.0/examples/open-qcow2.c:58:3: danger: ‘popen("hexdump -C", "w")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#   56|     }
#   57|     fwrite (buf, sizeof buf, 1, fp);
#   58|->   pclose (fp);
#   59|   
#   60|     /* Close the libnbd handle. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
libnbd-1.24.0/examples/reads-and-writes.c:47:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/reads-and-writes.c:32:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/reads-and-writes.c:38:9: branch_false: ...to here
libnbd-1.24.0/examples/reads-and-writes.c:38:9: acquire_memory: allocated here
libnbd-1.24.0/examples/reads-and-writes.c:39:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/reads-and-writes.c:47:7: branch_false: ...to here
libnbd-1.24.0/examples/reads-and-writes.c:47:7: throw: if ‘nbd_connect_unix’ throws an exception...
libnbd-1.24.0/examples/reads-and-writes.c:47:7: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   45|      * Unix domain socket.
#   46|      */
#   47|->   if (nbd_connect_unix (nbd, argv[1]) == -1) {
#   48|       fprintf (stderr, "%s\n", nbd_get_error ());
#   49|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
libnbd-1.24.0/examples/server-flags.c:37:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/server-flags.c:23:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/server-flags.c:29:9: branch_false: ...to here
libnbd-1.24.0/examples/server-flags.c:29:9: acquire_memory: allocated here
libnbd-1.24.0/examples/server-flags.c:30:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/server-flags.c:37:7: branch_false: ...to here
libnbd-1.24.0/examples/server-flags.c:37:7: throw: if ‘nbd_set_full_info’ throws an exception...
libnbd-1.24.0/examples/server-flags.c:37:7: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   35|     /* Request full information. */
#   36|   #if LIBNBD_HAVE_NBD_SET_FULL_INFO /* Added in 1.4 */
#   37|->   if (nbd_set_full_info (nbd, true) == -1) {
#   38|       fprintf (stderr, "%s\n", nbd_get_error ());
#   39|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
libnbd-1.24.0/examples/strict-structured-reads.c:239:9: warning[-Wanalyzer-malloc-leak]: leak of ‘d’
libnbd-1.24.0/examples/strict-structured-reads.c:184:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/strict-structured-reads.c:189:9: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:190:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:194:7: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:194:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:200:12: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:200:11: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:205:16: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:206:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:210:6: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:210:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:214:6: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:221:15: branch_true: following ‘true’ branch (when ‘i != 1000’)...
libnbd-1.24.0/examples/strict-structured-reads.c:223:22: branch_true: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:223:22: acquire_memory: allocated here
libnbd-1.24.0/examples/strict-structured-reads.c:232:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:233:14: branch_true: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:234:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:234:8: branch_true: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:239:9: throw: if ‘nbd_aio_pread_structured’ throws an exception...
libnbd-1.24.0/examples/strict-structured-reads.c:239:9: danger: ‘d’ leaks here; was allocated at [(16)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/15)
#  237|       *d = (struct data) { .offset = offset, .count = maxsize, .flags = flags,
#  238|                            .remaining = r, };
#  239|->     if (nbd_aio_pread_structured (nbd, buf, sizeof buf, offset, chunk_callback,
#  240|                                     completion_callback, flags) == -1) {
#  241|         fprintf (stderr, "%s\n", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
libnbd-1.24.0/examples/strict-structured-reads.c:239:9: warning[-Wanalyzer-malloc-leak]: leak of ‘r’
libnbd-1.24.0/examples/strict-structured-reads.c:184:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libnbd-1.24.0/examples/strict-structured-reads.c:189:9: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:190:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:194:7: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:194:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:200:12: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:200:11: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:205:16: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:206:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:210:6: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:210:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:214:6: branch_false: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:221:15: branch_true: following ‘true’ branch (when ‘i != 1000’)...
libnbd-1.24.0/examples/strict-structured-reads.c:223:22: branch_true: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:224:23: acquire_memory: allocated here
libnbd-1.24.0/examples/strict-structured-reads.c:232:5: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:233:14: branch_true: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:234:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/strict-structured-reads.c:234:8: branch_true: ...to here
libnbd-1.24.0/examples/strict-structured-reads.c:239:9: throw: if ‘nbd_aio_pread_structured’ throws an exception...
libnbd-1.24.0/examples/strict-structured-reads.c:239:9: danger: ‘r’ leaks here; was allocated at [(16)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/15)
#  237|       *d = (struct data) { .offset = offset, .count = maxsize, .flags = flags,
#  238|                            .remaining = r, };
#  239|->     if (nbd_aio_pread_structured (nbd, buf, sizeof buf, offset, chunk_callback,
#  240|                                     completion_callback, flags) == -1) {
#  241|         fprintf (stderr, "%s\n", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:103:9: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:78:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:83:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:83:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:84:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:90:6: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:90:6: branch_false: following ‘false’ branch (when ‘argc != 2’)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:103:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:103:9: throw: if ‘nbd_connect_tcp’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:103:9: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  101|     }
#  102|     else {
#  103|->     if (nbd_connect_tcp (nbd, argv[1], argv[2]) == -1) {
#  104|         fprintf (stderr, "%s\n", nbd_get_error ());
#  105|         exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: throw: if ‘nbd_create’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  204|     }
#  205|   
#  206|->   nbd = nbd_create ();
#  207|     if (nbd == NULL) {
#  208|       fprintf (stderr, "%s\n", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:208:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:208:5: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:208:5: throw: if ‘nbd_get_error’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:208:5: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  206|     nbd = nbd_create ();
#  207|     if (nbd == NULL) {
#  208|->     fprintf (stderr, "%s\n", nbd_get_error ());
#  209|       exit (EXIT_FAILURE);
#  210|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:48: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:9: throw: if ‘nbd_connect_tcp’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: danger: ‘nbd_create()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  210|     }
#  211|   
#  212|->   if (status->argc == 2) {
#  213|       if (strstr (status->argv[1], "://")) {
#  214|         if (nbd_connect_uri (nbd, status->argv[1]) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:214:11: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:213:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:213:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:214:11: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:214:11: throw: if ‘nbd_connect_uri’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:214:11: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  212|     if (status->argc == 2) {
#  213|       if (strstr (status->argv[1], "://")) {
#  214|->       if (nbd_connect_uri (nbd, status->argv[1]) == -1) {
#  215|           fprintf (stderr, "%s\n", nbd_get_error ());
#  216|           exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:215:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:213:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:213:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:214:11: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:214:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:215:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:215:9: throw: if ‘nbd_get_error’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:215:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  213|       if (strstr (status->argv[1], "://")) {
#  214|         if (nbd_connect_uri (nbd, status->argv[1]) == -1) {
#  215|->         fprintf (stderr, "%s\n", nbd_get_error ());
#  216|           exit (EXIT_FAILURE);
#  217|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:219:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:213:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:213:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:219:14: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:219:14: throw: if ‘nbd_connect_unix’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:219:14: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  217|         }
#  218|       }
#  219|->     else if (nbd_connect_unix (nbd, status->argv[1]) == -1) {
#  220|         fprintf (stderr, "%s\n", nbd_get_error ());
#  221|         exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:220:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:213:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:213:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:219:14: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:219:13: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:220:7: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:220:7: throw: if ‘nbd_get_error’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:220:7: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  218|       }
#  219|       else if (nbd_connect_unix (nbd, status->argv[1]) == -1) {
#  220|->       fprintf (stderr, "%s\n", nbd_get_error ());
#  221|         exit (EXIT_FAILURE);
#  222|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:48: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:9: throw: if ‘nbd_connect_tcp’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  223|     }
#  224|     else {
#  225|->     if (nbd_connect_tcp (nbd, status->argv[1], status->argv[2]) == -1) {
#  226|         fprintf (stderr, "%s\n", nbd_get_error ());
#  227|         exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:226:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:48: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:226:7: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:226:7: throw: if ‘nbd_get_error’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:226:7: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  224|     else {
#  225|       if (nbd_connect_tcp (nbd, status->argv[1], status->argv[2]) == -1) {
#  226|->       fprintf (stderr, "%s\n", nbd_get_error ());
#  227|         exit (EXIT_FAILURE);
#  228|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:3: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:15: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:232:14: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:237:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:9: throw: if ‘nbd_aio_is_dead’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  236|     i = NR_CYCLES;
#  237|     while (i > 0 || in_flight > 0) {
#  238|->     if (nbd_aio_is_dead (nbd) || nbd_aio_is_closed (nbd)) {
#  239|         fprintf (stderr, "thread %zu: connection is dead or closed\n",
#  240|                  status->i);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:3: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:15: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:232:14: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:237:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:34: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:34: throw: if ‘nbd_aio_is_closed’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:34: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  236|     i = NR_CYCLES;
#  237|     while (i > 0 || in_flight > 0) {
#  238|->     if (nbd_aio_is_dead (nbd) || nbd_aio_is_closed (nbd)) {
#  239|         fprintf (stderr, "thread %zu: connection is dead or closed\n",
#  240|                  status->i);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:255:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:3: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:15: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:232:14: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:237:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:250:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:251:15: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:251:14: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:252:16: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:254:10: branch_true: following ‘true’ branch (when ‘cmd == 0’)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:256:34: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:255:18: throw: if ‘nbd_aio_pwrite’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:255:18: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  253|         cmd = rand () & 1;
#  254|         if (cmd == 0)
#  255|->         cookie = nbd_aio_pwrite (nbd, buf, size, offset,
#  256|                                    NBD_NULL_COMPLETION, 0);
#  257|         else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:258:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:3: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:15: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:232:14: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:237:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:250:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:251:15: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:258:18: throw: if ‘nbd_aio_pread’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:258:18: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  256|                                    NBD_NULL_COMPLETION, 0);
#  257|         else
#  258|->         cookie = nbd_aio_pread (nbd, buf, size, offset,
#  259|                                   NBD_NULL_COMPLETION, 0);
#  260|         if (cookie == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
libnbd-1.24.0/examples/threaded-reads-and-writes.c:261:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/threaded-reads-and-writes.c:200:9: acquire_memory: allocated here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:201:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:206:9: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:207:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:212:7: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:225:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:3: branch_false: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:231:15: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:232:14: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:237:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:9: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:238:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:250:12: branch_true: following ‘true’ branch...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:251:15: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:254:10: branch_true: following ‘true’ branch (when ‘cmd == 0’)...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:256:34: branch_true: ...to here
libnbd-1.24.0/examples/threaded-reads-and-writes.c:261:9: throw: if ‘nbd_get_error’ throws an exception...
libnbd-1.24.0/examples/threaded-reads-and-writes.c:261:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  259|                                   NBD_NULL_COMPLETION, 0);
#  260|         if (cookie == -1) {
#  261|->         fprintf (stderr, "%s\n", nbd_get_error ());
#  262|           goto error;
#  263|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
libnbd-1.24.0/examples/userfault-map.c:230:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/userfault-map.c:209:9: acquire_memory: allocated here
libnbd-1.24.0/examples/userfault-map.c:210:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/userfault-map.c:216:3: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:230:9: throw: if ‘poll’ throws an exception...
libnbd-1.24.0/examples/userfault-map.c:230:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  228|       pollfd[0].events = POLLIN;
#  229|   
#  230|->     r = poll (pollfd, 1, -1);
#  231|       if (r == -1) {
#  232|         perror ("poll");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
libnbd-1.24.0/examples/userfault-map.c:232:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/userfault-map.c:209:9: acquire_memory: allocated here
libnbd-1.24.0/examples/userfault-map.c:210:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/userfault-map.c:216:3: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:232:7: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/examples/userfault-map.c:232:7: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  230|       r = poll (pollfd, 1, -1);
#  231|       if (r == -1) {
#  232|->       perror ("poll");
#  233|         exit (EXIT_FAILURE);
#  234|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
libnbd-1.24.0/examples/userfault-map.c:247:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/userfault-map.c:209:9: acquire_memory: allocated here
libnbd-1.24.0/examples/userfault-map.c:210:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/userfault-map.c:216:3: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:231:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/userfault-map.c:235:8: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:237:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/userfault-map.c:237:8: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:247:9: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/examples/userfault-map.c:247:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  245|           if (errno == EAGAIN || errno == EWOULDBLOCK)
#  246|             continue;
#  247|->         perror ("read");
#  248|           exit (EXIT_FAILURE);
#  249|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
libnbd-1.24.0/examples/userfault-map.c:267:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libnbd-1.24.0/examples/userfault-map.c:209:9: acquire_memory: allocated here
libnbd-1.24.0/examples/userfault-map.c:210:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
libnbd-1.24.0/examples/userfault-map.c:216:3: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:231:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/userfault-map.c:235:8: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:237:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/userfault-map.c:237:8: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:251:10: branch_false: following ‘false’ branch (when ‘r == 32’)...
libnbd-1.24.0/examples/userfault-map.c:256:11: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:263:12: branch_false: following ‘false’ branch...
libnbd-1.24.0/examples/userfault-map.c:267:13: branch_false: ...to here
libnbd-1.24.0/examples/userfault-map.c:267:13: throw: if ‘nbd_pread’ throws an exception...
libnbd-1.24.0/examples/userfault-map.c:267:13: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  265|             memset (buf, 0, page_size);
#  266|           }
#  267|->         if (nbd_pread (nbd, buf, len, offset, 0)
#  268|               == -1) {
#  269|             fprintf (stderr, "%s\n", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
libnbd-1.24.0/fuse/nbdfuse.c:540:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/fuse/nbdfuse.c:535:7: acquire_memory: allocated here
libnbd-1.24.0/fuse/nbdfuse.c:536:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuse/nbdfuse.c:540:3: branch_false: ...to here
libnbd-1.24.0/fuse/nbdfuse.c:540:3: throw: if ‘nbd_set_debug’ throws an exception...
libnbd-1.24.0/fuse/nbdfuse.c:540:3: danger: ‘nbd_create()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  538|       exit (EXIT_FAILURE);
#  539|     }
#  540|->   nbd_set_debug (h, verbose);
#  541|   
#  542|     /* Allow ?tls-psk-file and ?tls-certificates */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def103]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:100:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:85:11: branch_true: following ‘true’ branch (when ‘argc == 2’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: acquire_resource: opened here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:88:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:100:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:100:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:100:5: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   98|     /* Create a connected socket. */
#   99|     if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, sv) == -1) {
#  100|->     perror ("socketpair");
#  101|       exit (EXIT_FAILURE);
#  102|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def104]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:109:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:85:11: branch_true: following ‘true’ branch (when ‘argc == 2’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: acquire_resource: opened here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:88:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:107:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:108:6: branch_true: following ‘true’ branch (when ‘pid == -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:109:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:109:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:109:5: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  107|     pid = fork ();
#  108|     if (pid == -1) {
#  109|->     perror ("fork");
#  110|       exit (EXIT_FAILURE);
#  111|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def105]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:115:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:85:11: branch_true: following ‘true’ branch (when ‘argc == 2’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: acquire_resource: opened here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:88:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:107:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:108:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:113:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:113:6: branch_true: following ‘true’ branch (when ‘pid > 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:115:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:115:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:115:5: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  113|     if (pid > 0) {
#  114|       /* Parent: libnbd client. */
#  115|->     close (sv[1]);
#  116|       close (fd);
#  117|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def106]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:116:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:85:11: branch_true: following ‘true’ branch (when ‘argc == 2’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: acquire_resource: opened here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:88:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:107:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:108:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:113:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:113:6: branch_true: following ‘true’ branch (when ‘pid > 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:115:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:116:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:116:5: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  114|       /* Parent: libnbd client. */
#  115|       close (sv[1]);
#  116|->     close (fd);
#  117|   
#  118|       client (sv[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def107]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:134:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:85:11: branch_true: following ‘true’ branch (when ‘argc == 2’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:87:10: acquire_resource: opened here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:88:8: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:99:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:107:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:108:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:113:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:113:6: branch_false: following ‘false’ branch (when ‘pid <= 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:134:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:134:3: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:134:3: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  132|   
#  133|     /* Child: NBD server. */
#  134|->   close (sv[0]);
#  135|   
#  136|     if (!write_testcase)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:200:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:189:9: acquire_memory: allocated here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:190:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:200:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:200:3: throw: if ‘nbd_set_strict_mode’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:200:3: danger: ‘nbd_create()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  198|      * because client side strictness sees a problem.
#  199|      */
#  200|->   nbd_set_strict_mode (nbd, 0);
#  201|   
#  202|     /* Enable a metadata context, for block status below. */

Error: CPPCHECK_WARNING (CWE-768): [#def109]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:225: error[unknownEvaluationOrder]: Expression 'nbd,prbuf,sizeof(prbuf),8192,(struct nbd_chunk_callback){.callback=chunk_callback,},(struct nbd_completion_callback){.callback=NULL}' depends on order of evaluation of side effects
#  223|                               (nbd_chunk_callback) {
#  224|                                 .callback = chunk_callback,
#  225|->                             },
#  226|                               NBD_NULL_COMPLETION,
#  227|                               0);

Error: CPPCHECK_WARNING (CWE-768): [#def110]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:233: error[unknownEvaluationOrder]: Expression 'nbd,length,0,(struct nbd_extent_callback){.callback=extent_callback,},(struct nbd_completion_callback){.callback=NULL}' depends on order of evaluation of side effects
#  231|                           (nbd_extent_callback) {
#  232|                             .callback = extent_callback,
#  233|->                         },
#  234|                           NBD_NULL_COMPLETION,
#  235|                           0);

Error: CPPCHECK_WARNING (CWE-768): [#def111]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:239: error[unknownEvaluationOrder]: Expression 'nbd,length,0,(struct nbd_extent64_callback){.callback=extent64_callback,},(struct nbd_completion_callback){.callback=NULL}' depends on order of evaluation of side effects
#  237|                              (nbd_extent64_callback) {
#  238|                                .callback = extent64_callback,
#  239|->                            },
#  240|                              NBD_NULL_COMPLETION,
#  241|                              0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def112]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:345:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:345:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:345:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:345:5: danger: ‘rfd[0]’ leaks here
#  343|   
#  344|     if (pipe (wfd) == -1) {       /* Will be our output, nbdkit's stdin */
#  345|->     perror ("pipe");
#  346|       _exit (EXIT_FAILURE);
#  347|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def113]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:345:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:345:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:345:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:345:5: danger: ‘rfd[1]’ leaks here
#  343|   
#  344|     if (pipe (wfd) == -1) {       /* Will be our output, nbdkit's stdin */
#  345|->     perror ("pipe");
#  346|       _exit (EXIT_FAILURE);
#  347|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def114]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_true: following ‘true’ branch (when ‘pid == -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: danger: ‘rfd[0]’ leaks here
#  350|     pid = fork ();
#  351|     if (pid == -1) {
#  352|->     perror ("fork");
#  353|       _exit (EXIT_FAILURE);
#  354|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def115]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_true: following ‘true’ branch (when ‘pid == -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: danger: ‘rfd[1]’ leaks here
#  350|     pid = fork ();
#  351|     if (pid == -1) {
#  352|->     perror ("fork");
#  353|       _exit (EXIT_FAILURE);
#  354|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def116]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_true: following ‘true’ branch (when ‘pid == -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: danger: ‘wfd[0]’ leaks here
#  350|     pid = fork ();
#  351|     if (pid == -1) {
#  352|->     perror ("fork");
#  353|       _exit (EXIT_FAILURE);
#  354|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def117]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_true: following ‘true’ branch (when ‘pid == -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:352:5: danger: ‘wfd[1]’ leaks here
#  350|     pid = fork ();
#  351|     if (pid == -1) {
#  352|->     perror ("fork");
#  353|       _exit (EXIT_FAILURE);
#  354|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def118]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: danger: ‘rfd[0]’ leaks here
#  355|   
#  356|     if (pid == 0) {               /* Child - nbdkit */
#  357|->     close (fd);
#  358|       close (sock);
#  359|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def119]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: danger: ‘rfd[1]’ leaks here
#  355|   
#  356|     if (pid == 0) {               /* Child - nbdkit */
#  357|->     close (fd);
#  358|       close (sock);
#  359|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def120]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: danger: ‘wfd[0]’ leaks here
#  355|   
#  356|     if (pid == 0) {               /* Child - nbdkit */
#  357|->     close (fd);
#  358|       close (sock);
#  359|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def121]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: danger: ‘wfd[1]’ leaks here
#  355|   
#  356|     if (pid == 0) {               /* Child - nbdkit */
#  357|->     close (fd);
#  358|       close (sock);
#  359|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def122]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: danger: ‘rfd[0]’ leaks here
#  356|     if (pid == 0) {               /* Child - nbdkit */
#  357|       close (fd);
#  358|->     close (sock);
#  359|   
#  360|       close (rfd[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: danger: ‘rfd[1]’ leaks here
#  356|     if (pid == 0) {               /* Child - nbdkit */
#  357|       close (fd);
#  358|->     close (sock);
#  359|   
#  360|       close (rfd[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: danger: ‘wfd[0]’ leaks here
#  356|     if (pid == 0) {               /* Child - nbdkit */
#  357|       close (fd);
#  358|->     close (sock);
#  359|   
#  360|       close (rfd[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:358:5: danger: ‘wfd[1]’ leaks here
#  356|     if (pid == 0) {               /* Child - nbdkit */
#  357|       close (fd);
#  358|->     close (sock);
#  359|   
#  360|       close (rfd[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def126]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: danger: ‘rfd[0]’ leaks here
#  358|       close (sock);
#  359|   
#  360|->     close (rfd[0]);
#  361|       dup2 (rfd[1], STDOUT_FILENO);
#  362|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: danger: ‘rfd[1]’ leaks here
#  358|       close (sock);
#  359|   
#  360|->     close (rfd[0]);
#  361|       dup2 (rfd[1], STDOUT_FILENO);
#  362|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: danger: ‘wfd[0]’ leaks here
#  358|       close (sock);
#  359|   
#  360|->     close (rfd[0]);
#  361|       dup2 (rfd[1], STDOUT_FILENO);
#  362|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def129]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:360:5: danger: ‘wfd[1]’ leaks here
#  358|       close (sock);
#  359|   
#  360|->     close (rfd[0]);
#  361|       dup2 (rfd[1], STDOUT_FILENO);
#  362|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def130]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:363:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:363:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:363:5: danger: ‘rfd[1]’ leaks here
#  361|       dup2 (rfd[1], STDOUT_FILENO);
#  362|   
#  363|->     close (wfd[1]);
#  364|       dup2 (wfd[0], STDIN_FILENO);
#  365|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def131]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:363:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:363:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:363:5: danger: ‘wfd[0]’ leaks here
#  361|       dup2 (rfd[1], STDOUT_FILENO);
#  362|   
#  363|->     close (wfd[1]);
#  364|       dup2 (wfd[0], STDIN_FILENO);
#  365|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:363:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:363:5: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:363:5: danger: ‘wfd[1]’ leaks here
#  361|       dup2 (rfd[1], STDOUT_FILENO);
#  362|   
#  363|->     close (wfd[1]);
#  364|       dup2 (wfd[0], STDIN_FILENO);
#  365|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def133]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:373:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:373:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:373:5: danger: ‘rfd[1]’ leaks here
#  371|               "runlength=8192", "percent=50", "random-content=true",
#  372|               NULL);
#  373|->     perror ("execlp");
#  374|       _exit (EXIT_FAILURE);
#  375|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def134]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:373:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:357:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:373:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:373:5: danger: ‘wfd[0]’ leaks here
#  371|               "runlength=8192", "percent=50", "random-content=true",
#  372|               NULL);
#  373|->     perror ("execlp");
#  374|       _exit (EXIT_FAILURE);
#  375|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def135]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: danger: ‘rfd[0]’ leaks here
#  389|      * doesn't matter since we're only capturing a test case.
#  390|      */
#  391|->   close (rfd[1]);
#  392|     close (wfd[0]);
#  393|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def136]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: danger: ‘rfd[1]’ leaks here
#  389|      * doesn't matter since we're only capturing a test case.
#  390|      */
#  391|->   close (rfd[1]);
#  392|     close (wfd[0]);
#  393|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def137]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: danger: ‘wfd[0]’ leaks here
#  389|      * doesn't matter since we're only capturing a test case.
#  390|      */
#  391|->   close (rfd[1]);
#  392|     close (wfd[0]);
#  393|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def138]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: danger: ‘wfd[1]’ leaks here
#  389|      * doesn't matter since we're only capturing a test case.
#  390|      */
#  391|->   close (rfd[1]);
#  392|     close (wfd[0]);
#  393|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def139]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:392:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:392:3: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:392:3: danger: ‘rfd[0]’ leaks here
#  390|      */
#  391|     close (rfd[1]);
#  392|->   close (wfd[0]);
#  393|   
#  394|     while (!parent_dead || rfd[0] >= 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def140]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:392:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:392:3: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:392:3: danger: ‘wfd[0]’ leaks here
#  390|      */
#  391|     close (rfd[1]);
#  392|->   close (wfd[0]);
#  393|   
#  394|     while (!parent_dead || rfd[0] >= 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def141]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:392:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:392:3: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:392:3: danger: ‘wfd[1]’ leaks here
#  390|      */
#  391|     close (rfd[1]);
#  392|->   close (wfd[0]);
#  393|   
#  394|     while (!parent_dead || rfd[0] >= 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def142]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:403:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rfd[0]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:403:9: throw: if ‘poll’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:403:9: danger: ‘rfd[0]’ leaks here
#  401|       pfds[1].revents = 0;
#  402|   
#  403|->     if (poll (pfds, 2, -1) == -1) {
#  404|         if (errno == EINTR)
#  405|           continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def143]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:403:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:403:9: throw: if ‘poll’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:403:9: danger: ‘wfd[1]’ leaks here
#  401|       pfds[1].revents = 0;
#  402|   
#  403|->     if (poll (pfds, 2, -1) == -1) {
#  404|         if (errno == EINTR)
#  405|           continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def144]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:406:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:403:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:404:11: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:406:7: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:406:7: danger: ‘wfd[1]’ leaks here
#  404|         if (errno == EINTR)
#  405|           continue;
#  406|->       perror ("poll");
#  407|         _exit (EXIT_FAILURE);
#  408|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def145]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:413:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:8: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:26: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:9: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:411:11: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:412:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:413:9: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:413:9: danger: ‘wfd[1]’ leaks here
#  411|         r = read (sock, buf, sizeof buf);
#  412|         if (r == -1 && errno != EINTR) {
#  413|->         perror ("read (libnbd)");
#  414|           _exit (EXIT_FAILURE);
#  415|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def146]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:427:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:8: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:26: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:424:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:426:10: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:427:9: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:427:9: danger: ‘wfd[1]’ leaks here
#  425|         r = read (rfd[0], buf, sizeof buf);
#  426|         if (r == -1 && errno == EINTR) {
#  427|->         perror ("read (nbdkit)");
#  428|           _exit (EXIT_FAILURE);
#  429|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def147]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:431:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:8: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:26: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:424:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:430:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:431:9: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:431:9: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:431:9: danger: ‘wfd[1]’ leaks here
#  429|         }
#  430|         else if (r == 0) {
#  431|->         close (rfd[0]);
#  432|           rfd[0] = -1;
#  433|           continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def148]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:442:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:8: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:26: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:442:7: throw: if ‘close’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:442:7: danger: ‘wfd[1]’ leaks here
#  440|     }
#  441|   
#  442|->   if (close (fd) == -1) {
#  443|       perror ("close");
#  444|       _exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def149]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:443:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:8: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:26: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:442:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:443:5: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:443:5: throw: if ‘perror’ throws an exception...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:443:5: danger: ‘wfd[1]’ leaks here
#  441|   
#  442|     if (close (fd) == -1) {
#  443|->     perror ("close");
#  444|       _exit (EXIT_FAILURE);
#  445|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def150]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:446:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:8: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:26: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:442:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:446:1: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:446:1: danger: ‘wfd[1]’ leaks here
#  444|       _exit (EXIT_FAILURE);
#  445|     }
#  446|-> }
#  447|   
#  448|   static void

Error: GCC_ANALYZER_WARNING (CWE-775): [#def151]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:454:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:330:1: enter_function: entry to ‘nbdkit’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:8: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:26: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:9: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:411:11: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:416:15: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:420:15: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:420:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:421:9: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:421:9: call_function: calling ‘xwrite’ from ‘nbdkit’
#  452|   
#  453|     while (n > 0) {
#  454|->     r = write (fd, buf, n);
#  455|       if (r == -1) {
#  456|         perror ("write");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def152]
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:456:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘wfd[1]’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:330:1: enter_function: entry to ‘nbdkit’
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:339:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:7: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:344:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:350:9: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:351:6: branch_false: following ‘false’ branch (when ‘pid != -1’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:356:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:391:3: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:394:10: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:395:5: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:8: branch_false: following ‘false’ branch (when ‘parent_dead == 0’)...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:26: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:410:9: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:411:11: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:416:15: branch_false: following ‘false’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:420:15: branch_false: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:420:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:421:9: branch_true: ...to here
libnbd-1.24.0/fuzzing/libnbd-fuzz-wrapper.c:421:9: call_function: calling ‘xwrite’ from ‘nbdkit’
#  454|       r = write (fd, buf, n);
#  455|       if (r == -1) {
#  456|->       perror ("write");
#  457|         _exit (EXIT_FAILURE);
#  458|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
libnbd-1.24.0/info/list.c:38:1: warning[-Wanalyzer-malloc-leak]: leak of ‘e.desc’
libnbd-1.24.0/info/list.c:42:1: enter_function: entry to ‘collect_export’
libnbd-1.24.0/info/list.c:47:12: acquire_memory: allocated here
libnbd-1.24.0/info/list.c:48:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/list.c:48:7: branch_false: ...to here
libnbd-1.24.0/info/list.c:48:7: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/list.c:49:7: branch_false: ...to here
libnbd-1.24.0/info/list.c:49:7: call_function: calling ‘exports_append’ from ‘collect_export’
#   36|     char *desc;
#   37|   };
#   38|-> DEFINE_VECTOR_TYPE (exports, struct export);
#   39|   static exports export_list = empty_vector;
#   40|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
libnbd-1.24.0/info/list.c:38:1: warning[-Wanalyzer-malloc-leak]: leak of ‘e.name’
libnbd-1.24.0/info/list.c:42:1: enter_function: entry to ‘collect_export’
libnbd-1.24.0/info/list.c:46:12: acquire_memory: allocated here
libnbd-1.24.0/info/list.c:48:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/list.c:49:7: call_function: calling ‘exports_append’ from ‘collect_export’
#   36|     char *desc;
#   37|   };
#   38|-> DEFINE_VECTOR_TYPE (exports, struct export);
#   39|   static exports export_list = empty_vector;
#   40|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
libnbd-1.24.0/info/list.c:48:6: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(desc)’
libnbd-1.24.0/info/list.c:47:12: acquire_memory: allocated here
libnbd-1.24.0/info/list.c:48:6: danger: ‘strdup(desc)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   46|     e.name = strdup (name);
#   47|     e.desc = strdup (desc);
#   48|->   if (e.name == NULL || e.desc == NULL ||
#   49|         exports_append (&export_list, e) == -1) {
#   50|       perror ("malloc");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
libnbd-1.24.0/info/list.c:48:7: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(name)’
libnbd-1.24.0/info/list.c:46:12: acquire_memory: allocated here
libnbd-1.24.0/info/list.c:48:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/list.c:48:7: branch_false: ...to here
libnbd-1.24.0/info/list.c:48:7: danger: ‘strdup(name)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   46|     e.name = strdup (name);
#   47|     e.desc = strdup (desc);
#   48|->   if (e.name == NULL || e.desc == NULL ||
#   49|         exports_append (&export_list, e) == -1) {
#   50|       perror ("malloc");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
libnbd-1.24.0/info/list.c:50:5: warning[-Wanalyzer-malloc-leak]: leak of ‘e.desc’
libnbd-1.24.0/info/list.c:42:1: enter_function: entry to ‘collect_export’
libnbd-1.24.0/info/list.c:47:12: acquire_memory: allocated here
libnbd-1.24.0/info/list.c:48:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/list.c:48:7: branch_false: ...to here
libnbd-1.24.0/info/list.c:48:7: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/list.c:49:7: branch_false: ...to here
libnbd-1.24.0/info/list.c:49:7: call_function: calling ‘exports_append’ from ‘collect_export’
libnbd-1.24.0/info/list.c:49:7: return_function: returning to ‘collect_export’ from ‘exports_append’
libnbd-1.24.0/info/list.c:48:7: branch_true: following ‘true’ branch...
 branch_true: ...to here
 call_function: calling ‘collect_export’ from ‘collect_export’
#   48|     if (e.name == NULL || e.desc == NULL ||
#   49|         exports_append (&export_list, e) == -1) {
#   50|->     perror ("malloc");
#   51|       exit (EXIT_FAILURE);
#   52|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
libnbd-1.24.0/info/list.c:50:5: warning[-Wanalyzer-malloc-leak]: leak of ‘e.name’
libnbd-1.24.0/info/list.c:42:1: enter_function: entry to ‘collect_export’
libnbd-1.24.0/info/list.c:46:12: acquire_memory: allocated here
libnbd-1.24.0/info/list.c:48:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/list.c:49:7: call_function: calling ‘exports_append’ from ‘collect_export’
libnbd-1.24.0/info/list.c:49:7: return_function: returning to ‘collect_export’ from ‘exports_append’
libnbd-1.24.0/info/list.c:48:7: branch_true: following ‘true’ branch...
 branch_true: ...to here
 call_function: calling ‘collect_export’ from ‘collect_export’
#   48|     if (e.name == NULL || e.desc == NULL ||
#   49|         exports_append (&export_list, e) == -1) {
#   50|->     perror ("malloc");
#   51|       exit (EXIT_FAILURE);
#   52|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
libnbd-1.24.0/info/list.c:99:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/info/list.c:88:15: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/list.c:89:24: branch_true: ...to here
libnbd-1.24.0/info/list.c:92:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/list.c:94:14: branch_true: ...to here
libnbd-1.24.0/info/list.c:94:14: acquire_memory: allocated here
libnbd-1.24.0/info/list.c:95:10: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/list.c:99:7: branch_false: ...to here
libnbd-1.24.0/info/list.c:99:7: throw: if ‘nbd_set_uri_allow_local_file’ throws an exception...
libnbd-1.24.0/info/list.c:99:7: danger: ‘nbd_create()’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#   97|           exit (EXIT_FAILURE);
#   98|         }
#   99|->       nbd_set_uri_allow_local_file (nbd2, true); /* Allow ?tls-psk-file. */
#  100|         nbd_set_opt_mode (nbd2, true);
#  101|         nbd_set_request_meta_context (nbd2, false);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
libnbd-1.24.0/info/show.c:100:17: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:100:17: throw: if ‘nbd_get_canonical_export_name’ throws an exception...
libnbd-1.24.0/info/show.c:100:17: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   98|   
#   99|     /* Prefer the server's version of the name, if available */
#  100|->   export_name = nbd_get_canonical_export_name (nbd);
#  101|     if (export_name == NULL)
#  102|       export_name = nbd_get_export_name (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
libnbd-1.24.0/info/show.c:102:19: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:102:19: branch_true: ...to here
libnbd-1.24.0/info/show.c:102:19: throw: if ‘nbd_get_export_name’ throws an exception...
libnbd-1.24.0/info/show.c:102:19: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  100|     export_name = nbd_get_canonical_export_name (nbd);
#  101|     if (export_name == NULL)
#  102|->     export_name = nbd_get_export_name (nbd);
#  103|     if (export_name == NULL) {
#  104|       fprintf (stderr, "%s: %s\n", progname, nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
libnbd-1.24.0/info/show.c:104:5: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:102:19: branch_true: ...to here
libnbd-1.24.0/info/show.c:103:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:104:5: branch_true: ...to here
libnbd-1.24.0/info/show.c:104:5: throw: if ‘nbd_get_error’ throws an exception...
libnbd-1.24.0/info/show.c:104:5: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  102|       export_name = nbd_get_export_name (nbd);
#  103|     if (export_name == NULL) {
#  104|->     fprintf (stderr, "%s: %s\n", progname, nbd_get_error ());
#  105|       exit (EXIT_FAILURE);
#  106|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
libnbd-1.24.0/info/show.c:109:26: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_true: following ‘true’ branch (when ‘desc’ is NULL)...
libnbd-1.24.0/info/show.c:109:26: branch_true: ...to here
libnbd-1.24.0/info/show.c:109:26: throw: if ‘nbd_get_export_description’ throws an exception...
libnbd-1.24.0/info/show.c:109:26: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  107|     /* Get description if list didn't already give us one */
#  108|     if (!desc)
#  109|->     desc = export_desc = nbd_get_export_description (nbd);
#  110|     is_rotational = nbd_is_rotational (nbd);
#  111|     is_read_only = nbd_is_read_only (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
libnbd-1.24.0/info/show.c:109:26: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_true: following ‘true’ branch (when ‘desc’ is NULL)...
libnbd-1.24.0/info/show.c:109:26: branch_true: ...to here
libnbd-1.24.0/info/show.c:109:26: throw: if ‘nbd_get_export_description’ throws an exception...
libnbd-1.24.0/info/show.c:109:26: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  107|     /* Get description if list didn't already give us one */
#  108|     if (!desc)
#  109|->     desc = export_desc = nbd_get_export_description (nbd);
#  110|     is_rotational = nbd_is_rotational (nbd);
#  111|     is_read_only = nbd_is_read_only (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
libnbd-1.24.0/info/show.c:110:19: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:110:19: throw: if ‘nbd_is_rotational’ throws an exception...
libnbd-1.24.0/info/show.c:110:19: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  108|     if (!desc)
#  109|       desc = export_desc = nbd_get_export_description (nbd);
#  110|->   is_rotational = nbd_is_rotational (nbd);
#  111|     is_read_only = nbd_is_read_only (nbd);
#  112|     can_cache = nbd_can_cache (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
libnbd-1.24.0/info/show.c:110:19: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:110:19: throw: if ‘nbd_is_rotational’ throws an exception...
libnbd-1.24.0/info/show.c:110:19: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  108|     if (!desc)
#  109|       desc = export_desc = nbd_get_export_description (nbd);
#  110|->   is_rotational = nbd_is_rotational (nbd);
#  111|     is_read_only = nbd_is_read_only (nbd);
#  112|     can_cache = nbd_can_cache (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
libnbd-1.24.0/info/show.c:111:18: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:111:18: throw: if ‘nbd_is_read_only’ throws an exception...
libnbd-1.24.0/info/show.c:111:18: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  109|       desc = export_desc = nbd_get_export_description (nbd);
#  110|     is_rotational = nbd_is_rotational (nbd);
#  111|->   is_read_only = nbd_is_read_only (nbd);
#  112|     can_cache = nbd_can_cache (nbd);
#  113|     can_df = nbd_can_df (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
libnbd-1.24.0/info/show.c:111:18: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:111:18: throw: if ‘nbd_is_read_only’ throws an exception...
libnbd-1.24.0/info/show.c:111:18: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  109|       desc = export_desc = nbd_get_export_description (nbd);
#  110|     is_rotational = nbd_is_rotational (nbd);
#  111|->   is_read_only = nbd_is_read_only (nbd);
#  112|     can_cache = nbd_can_cache (nbd);
#  113|     can_df = nbd_can_df (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
libnbd-1.24.0/info/show.c:112:15: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:112:15: throw: if ‘nbd_can_cache’ throws an exception...
libnbd-1.24.0/info/show.c:112:15: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  110|     is_rotational = nbd_is_rotational (nbd);
#  111|     is_read_only = nbd_is_read_only (nbd);
#  112|->   can_cache = nbd_can_cache (nbd);
#  113|     can_df = nbd_can_df (nbd);
#  114|     can_fast_zero = nbd_can_fast_zero (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
libnbd-1.24.0/info/show.c:112:15: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:112:15: throw: if ‘nbd_can_cache’ throws an exception...
libnbd-1.24.0/info/show.c:112:15: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  110|     is_rotational = nbd_is_rotational (nbd);
#  111|     is_read_only = nbd_is_read_only (nbd);
#  112|->   can_cache = nbd_can_cache (nbd);
#  113|     can_df = nbd_can_df (nbd);
#  114|     can_fast_zero = nbd_can_fast_zero (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
libnbd-1.24.0/info/show.c:113:12: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:113:12: throw: if ‘nbd_can_df’ throws an exception...
libnbd-1.24.0/info/show.c:113:12: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  111|     is_read_only = nbd_is_read_only (nbd);
#  112|     can_cache = nbd_can_cache (nbd);
#  113|->   can_df = nbd_can_df (nbd);
#  114|     can_fast_zero = nbd_can_fast_zero (nbd);
#  115|     can_flush = nbd_can_flush (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
libnbd-1.24.0/info/show.c:113:12: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:113:12: throw: if ‘nbd_can_df’ throws an exception...
libnbd-1.24.0/info/show.c:113:12: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  111|     is_read_only = nbd_is_read_only (nbd);
#  112|     can_cache = nbd_can_cache (nbd);
#  113|->   can_df = nbd_can_df (nbd);
#  114|     can_fast_zero = nbd_can_fast_zero (nbd);
#  115|     can_flush = nbd_can_flush (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
libnbd-1.24.0/info/show.c:114:19: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:114:19: throw: if ‘nbd_can_fast_zero’ throws an exception...
libnbd-1.24.0/info/show.c:114:19: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  112|     can_cache = nbd_can_cache (nbd);
#  113|     can_df = nbd_can_df (nbd);
#  114|->   can_fast_zero = nbd_can_fast_zero (nbd);
#  115|     can_flush = nbd_can_flush (nbd);
#  116|     can_fua = nbd_can_fua (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
libnbd-1.24.0/info/show.c:114:19: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:114:19: throw: if ‘nbd_can_fast_zero’ throws an exception...
libnbd-1.24.0/info/show.c:114:19: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  112|     can_cache = nbd_can_cache (nbd);
#  113|     can_df = nbd_can_df (nbd);
#  114|->   can_fast_zero = nbd_can_fast_zero (nbd);
#  115|     can_flush = nbd_can_flush (nbd);
#  116|     can_fua = nbd_can_fua (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
libnbd-1.24.0/info/show.c:115:15: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:115:15: throw: if ‘nbd_can_flush’ throws an exception...
libnbd-1.24.0/info/show.c:115:15: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  113|     can_df = nbd_can_df (nbd);
#  114|     can_fast_zero = nbd_can_fast_zero (nbd);
#  115|->   can_flush = nbd_can_flush (nbd);
#  116|     can_fua = nbd_can_fua (nbd);
#  117|     can_multi_conn = nbd_can_multi_conn (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
libnbd-1.24.0/info/show.c:115:15: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:115:15: throw: if ‘nbd_can_flush’ throws an exception...
libnbd-1.24.0/info/show.c:115:15: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  113|     can_df = nbd_can_df (nbd);
#  114|     can_fast_zero = nbd_can_fast_zero (nbd);
#  115|->   can_flush = nbd_can_flush (nbd);
#  116|     can_fua = nbd_can_fua (nbd);
#  117|     can_multi_conn = nbd_can_multi_conn (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
libnbd-1.24.0/info/show.c:116:13: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:116:13: throw: if ‘nbd_can_fua’ throws an exception...
libnbd-1.24.0/info/show.c:116:13: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  114|     can_fast_zero = nbd_can_fast_zero (nbd);
#  115|     can_flush = nbd_can_flush (nbd);
#  116|->   can_fua = nbd_can_fua (nbd);
#  117|     can_multi_conn = nbd_can_multi_conn (nbd);
#  118|     can_trim = nbd_can_trim (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
libnbd-1.24.0/info/show.c:116:13: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:116:13: throw: if ‘nbd_can_fua’ throws an exception...
libnbd-1.24.0/info/show.c:116:13: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  114|     can_fast_zero = nbd_can_fast_zero (nbd);
#  115|     can_flush = nbd_can_flush (nbd);
#  116|->   can_fua = nbd_can_fua (nbd);
#  117|     can_multi_conn = nbd_can_multi_conn (nbd);
#  118|     can_trim = nbd_can_trim (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
libnbd-1.24.0/info/show.c:117:20: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:117:20: throw: if ‘nbd_can_multi_conn’ throws an exception...
libnbd-1.24.0/info/show.c:117:20: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  115|     can_flush = nbd_can_flush (nbd);
#  116|     can_fua = nbd_can_fua (nbd);
#  117|->   can_multi_conn = nbd_can_multi_conn (nbd);
#  118|     can_trim = nbd_can_trim (nbd);
#  119|     can_zero = nbd_can_zero (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
libnbd-1.24.0/info/show.c:117:20: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:117:20: throw: if ‘nbd_can_multi_conn’ throws an exception...
libnbd-1.24.0/info/show.c:117:20: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  115|     can_flush = nbd_can_flush (nbd);
#  116|     can_fua = nbd_can_fua (nbd);
#  117|->   can_multi_conn = nbd_can_multi_conn (nbd);
#  118|     can_trim = nbd_can_trim (nbd);
#  119|     can_zero = nbd_can_zero (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
libnbd-1.24.0/info/show.c:118:14: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:118:14: throw: if ‘nbd_can_trim’ throws an exception...
libnbd-1.24.0/info/show.c:118:14: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  116|     can_fua = nbd_can_fua (nbd);
#  117|     can_multi_conn = nbd_can_multi_conn (nbd);
#  118|->   can_trim = nbd_can_trim (nbd);
#  119|     can_zero = nbd_can_zero (nbd);
#  120|     can_block_status_payload = nbd_can_block_status_payload (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def182]
libnbd-1.24.0/info/show.c:118:14: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:118:14: throw: if ‘nbd_can_trim’ throws an exception...
libnbd-1.24.0/info/show.c:118:14: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  116|     can_fua = nbd_can_fua (nbd);
#  117|     can_multi_conn = nbd_can_multi_conn (nbd);
#  118|->   can_trim = nbd_can_trim (nbd);
#  119|     can_zero = nbd_can_zero (nbd);
#  120|     can_block_status_payload = nbd_can_block_status_payload (nbd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
libnbd-1.24.0/info/show.c:119:14: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:119:14: throw: if ‘nbd_can_zero’ throws an exception...
libnbd-1.24.0/info/show.c:119:14: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  117|     can_multi_conn = nbd_can_multi_conn (nbd);
#  118|     can_trim = nbd_can_trim (nbd);
#  119|->   can_zero = nbd_can_zero (nbd);
#  120|     can_block_status_payload = nbd_can_block_status_payload (nbd);
#  121|     block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
libnbd-1.24.0/info/show.c:119:14: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:119:14: throw: if ‘nbd_can_zero’ throws an exception...
libnbd-1.24.0/info/show.c:119:14: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  117|     can_multi_conn = nbd_can_multi_conn (nbd);
#  118|     can_trim = nbd_can_trim (nbd);
#  119|->   can_zero = nbd_can_zero (nbd);
#  120|     can_block_status_payload = nbd_can_block_status_payload (nbd);
#  121|     block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
libnbd-1.24.0/info/show.c:120:30: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:120:30: throw: if ‘nbd_can_block_status_payload’ throws an exception...
libnbd-1.24.0/info/show.c:120:30: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
#  118|     can_trim = nbd_can_trim (nbd);
#  119|     can_zero = nbd_can_zero (nbd);
#  120|->   can_block_status_payload = nbd_can_block_status_payload (nbd);
#  121|     block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
#  122|     block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
libnbd-1.24.0/info/show.c:120:30: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:120:30: throw: if ‘nbd_can_block_status_payload’ throws an exception...
libnbd-1.24.0/info/show.c:120:30: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
#  118|     can_trim = nbd_can_trim (nbd);
#  119|     can_zero = nbd_can_zero (nbd);
#  120|->   can_block_status_payload = nbd_can_block_status_payload (nbd);
#  121|     block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
#  122|     block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
libnbd-1.24.0/info/show.c:121:19: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:121:19: throw: if ‘nbd_get_block_size’ throws an exception...
libnbd-1.24.0/info/show.c:121:19: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/2)
#  119|     can_zero = nbd_can_zero (nbd);
#  120|     can_block_status_payload = nbd_can_block_status_payload (nbd);
#  121|->   block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
#  122|     block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
#  123|     block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
libnbd-1.24.0/info/show.c:121:19: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:121:19: throw: if ‘nbd_get_block_size’ throws an exception...
libnbd-1.24.0/info/show.c:121:19: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
#  119|     can_zero = nbd_can_zero (nbd);
#  120|     can_block_status_payload = nbd_can_block_status_payload (nbd);
#  121|->   block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
#  122|     block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
#  123|     block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
libnbd-1.24.0/info/show.c:122:21: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:122:21: throw: if ‘nbd_get_block_size’ throws an exception...
libnbd-1.24.0/info/show.c:122:21: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  120|     can_block_status_payload = nbd_can_block_status_payload (nbd);
#  121|     block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
#  122|->   block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
#  123|     block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);
#  124|     if (nbd_opt_list_meta_context (nbd,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
libnbd-1.24.0/info/show.c:122:21: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:122:21: throw: if ‘nbd_get_block_size’ throws an exception...
libnbd-1.24.0/info/show.c:122:21: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
#  120|     can_block_status_payload = nbd_can_block_status_payload (nbd);
#  121|     block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
#  122|->   block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
#  123|     block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);
#  124|     if (nbd_opt_list_meta_context (nbd,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
libnbd-1.24.0/info/show.c:123:19: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:123:19: throw: if ‘nbd_get_block_size’ throws an exception...
libnbd-1.24.0/info/show.c:123:19: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/2)
#  121|     block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
#  122|     block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
#  123|->   block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);
#  124|     if (nbd_opt_list_meta_context (nbd,
#  125|                (nbd_context_callback) {.callback = collect_context,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
libnbd-1.24.0/info/show.c:123:19: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:123:19: throw: if ‘nbd_get_block_size’ throws an exception...
libnbd-1.24.0/info/show.c:123:19: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/2)
#  121|     block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
#  122|     block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
#  123|->   block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);
#  124|     if (nbd_opt_list_meta_context (nbd,
#  125|                (nbd_context_callback) {.callback = collect_context,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
libnbd-1.24.0/info/show.c:124:7: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:124:7: throw: if ‘nbd_opt_list_meta_context’ throws an exception...
libnbd-1.24.0/info/show.c:124:7: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/2)
#  122|     block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
#  123|     block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);
#  124|->   if (nbd_opt_list_meta_context (nbd,
#  125|                (nbd_context_callback) {.callback = collect_context,
#  126|                                          .user_data = &contexts}) != -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
libnbd-1.24.0/info/show.c:124:7: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:124:7: throw: if ‘nbd_opt_list_meta_context’ throws an exception...
libnbd-1.24.0/info/show.c:124:7: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/2)
#  122|     block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
#  123|     block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);
#  124|->   if (nbd_opt_list_meta_context (nbd,
#  125|                (nbd_context_callback) {.callback = collect_context,
#  126|                                          .user_data = &contexts}) != -1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
libnbd-1.24.0/info/show.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:133:7: branch_false: ...to here
libnbd-1.24.0/info/show.c:133:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:134:5: branch_false: ...to here
libnbd-1.24.0/info/show.c:137:5: throw: if ‘print_json_string’ throws an exception...
libnbd-1.24.0/info/show.c:137:5: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/2)
#  135|       fprintf (fp, "export=");
#  136|       /* Might as well use the JSON function to get an escaped string here ... */
#  137|->     print_json_string (export_name);
#  138|       fprintf (fp, ":\n");
#  139|       if (desc && *desc)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
libnbd-1.24.0/info/show.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:133:7: branch_false: ...to here
libnbd-1.24.0/info/show.c:133:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:134:5: branch_false: ...to here
libnbd-1.24.0/info/show.c:137:5: throw: if ‘print_json_string’ throws an exception...
libnbd-1.24.0/info/show.c:137:5: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/2)
#  135|       fprintf (fp, "export=");
#  136|       /* Might as well use the JSON function to get an escaped string here ... */
#  137|->     print_json_string (export_name);
#  138|       fprintf (fp, ":\n");
#  139|       if (desc && *desc)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
libnbd-1.24.0/info/show.c:193:5: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:133:7: branch_false: ...to here
libnbd-1.24.0/info/show.c:133:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:188:8: branch_true: ...to here
libnbd-1.24.0/info/show.c:193:5: throw: if ‘print_json_string’ throws an exception...
libnbd-1.24.0/info/show.c:193:5: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/2)
#  191|   
#  192|       fprintf (fp, "\t\"export-name\": ");
#  193|->     print_json_string (export_name);
#  194|       fprintf (fp, ",\n");
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
libnbd-1.24.0/info/show.c:193:5: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:133:7: branch_false: ...to here
libnbd-1.24.0/info/show.c:133:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:188:8: branch_true: ...to here
libnbd-1.24.0/info/show.c:193:5: throw: if ‘print_json_string’ throws an exception...
libnbd-1.24.0/info/show.c:193:5: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/2)
#  191|   
#  192|       fprintf (fp, "\t\"export-name\": ");
#  193|->     print_json_string (export_name);
#  194|       fprintf (fp, ",\n");
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
libnbd-1.24.0/info/show.c:198:7: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:133:7: branch_false: ...to here
libnbd-1.24.0/info/show.c:133:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:188:8: branch_true: ...to here
libnbd-1.24.0/info/show.c:196:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:198:7: throw: if ‘print_json_string’ throws an exception...
libnbd-1.24.0/info/show.c:198:7: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/2)
#  196|       if (desc && *desc) {
#  197|         fprintf (fp, "\t\"description\": ");
#  198|->       print_json_string (desc);
#  199|         fprintf (fp, ",\n");
#  200|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
libnbd-1.24.0/info/show.c:198:7: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:133:7: branch_false: ...to here
libnbd-1.24.0/info/show.c:133:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:188:8: branch_true: ...to here
libnbd-1.24.0/info/show.c:196:8: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:198:7: throw: if ‘print_json_string’ throws an exception...
libnbd-1.24.0/info/show.c:198:7: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/2)
#  196|       if (desc && *desc) {
#  197|         fprintf (fp, "\t\"description\": ");
#  198|->       print_json_string (desc);
#  199|         fprintf (fp, ",\n");
#  200|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
libnbd-1.24.0/info/show.c:210:7: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:133:7: branch_false: ...to here
libnbd-1.24.0/info/show.c:133:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:188:8: branch_true: ...to here
libnbd-1.24.0/info/show.c:196:8: branch_true: following ‘true’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:196:17: branch_true: ...to here
libnbd-1.24.0/info/show.c:202:8: branch_false: following ‘false’ branch (when ‘content’ is NULL)...
libnbd-1.24.0/info/show.c:208:8: branch_false: ...to here
libnbd-1.24.0/info/show.c:208:8: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
libnbd-1.24.0/info/show.c:209:7: branch_true: ...to here
libnbd-1.24.0/info/show.c:210:7: throw: if ‘print_json_string’ throws an exception...
libnbd-1.24.0/info/show.c:210:7: danger: ‘export_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/2)
#  208|       if (uri) {
#  209|         fprintf (fp, "\t\"uri\": ");
#  210|->       print_json_string (uri);
#  211|         fprintf (fp, ",\n");
#  212|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
libnbd-1.24.0/info/show.c:210:7: warning[-Wanalyzer-malloc-leak]: leak of ‘uri’
libnbd-1.24.0/info/show.c:96:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:97:11: branch_true: ...to here
libnbd-1.24.0/info/show.c:97:11: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:133:7: branch_false: ...to here
libnbd-1.24.0/info/show.c:133:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:188:8: branch_true: ...to here
libnbd-1.24.0/info/show.c:196:8: branch_true: following ‘true’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:196:17: branch_true: ...to here
libnbd-1.24.0/info/show.c:202:8: branch_false: following ‘false’ branch (when ‘content’ is NULL)...
libnbd-1.24.0/info/show.c:208:8: branch_false: ...to here
libnbd-1.24.0/info/show.c:208:8: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
libnbd-1.24.0/info/show.c:209:7: branch_true: ...to here
libnbd-1.24.0/info/show.c:210:7: throw: if ‘print_json_string’ throws an exception...
libnbd-1.24.0/info/show.c:210:7: danger: ‘uri’ leaks here; was allocated at [(3)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/2)
#  208|       if (uri) {
#  209|         fprintf (fp, "\t\"uri\": ");
#  210|->       print_json_string (uri);
#  211|         fprintf (fp, ",\n");
#  212|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
libnbd-1.24.0/info/show.c:325:5: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
libnbd-1.24.0/info/show.c:318:1: enter_function: entry to ‘collect_context’
libnbd-1.24.0/info/show.c:323:10: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:324:6: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libnbd-1.24.0/info/show.c:324:23: branch_false: ...to here
libnbd-1.24.0/info/show.c:324:23: call_function: calling ‘string_vector_append’ from ‘collect_context’
libnbd-1.24.0/info/show.c:324:23: return_function: returning to ‘collect_context’ from ‘string_vector_append’
libnbd-1.24.0/info/show.c:324:7: branch_true: following ‘true’ branch...
 branch_true: ...to here
 call_function: calling ‘collect_context’ from ‘collect_context’
#  323|     copy = strdup (name);
#  324|     if (copy == NULL || string_vector_append (contexts, copy) == -1) {
#  325|->     perror ("malloc");
#  326|       exit (EXIT_FAILURE);
#  327|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
libnbd-1.24.0/info/show.c:356:7: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:46:1: enter_function: entry to ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: call_function: calling ‘human_size’ from ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: return_function: returning to ‘show_one_export’ from ‘human_size’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:131:15: branch_true: ...to here
libnbd-1.24.0/info/show.c:131:15: call_function: calling ‘get_content’ from ‘show_one_export’
#  354|       return NULL;
#  355|   
#  356|->   if (nbd_aio_is_negotiating (nbd)) {
#  357|       if (nbd_opt_go (nbd) == -1) {
#  358|         fprintf (stderr, "%s: %s\n", progname, nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
libnbd-1.24.0/info/show.c:357:9: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:46:1: enter_function: entry to ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: call_function: calling ‘human_size’ from ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: return_function: returning to ‘show_one_export’ from ‘human_size’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:131:15: branch_true: ...to here
libnbd-1.24.0/info/show.c:131:15: call_function: calling ‘get_content’ from ‘show_one_export’
#  355|   
#  356|     if (nbd_aio_is_negotiating (nbd)) {
#  357|->     if (nbd_opt_go (nbd) == -1) {
#  358|         fprintf (stderr, "%s: %s\n", progname, nbd_get_error ());
#  359|         exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
libnbd-1.24.0/info/show.c:358:7: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:46:1: enter_function: entry to ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: call_function: calling ‘human_size’ from ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: return_function: returning to ‘show_one_export’ from ‘human_size’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:131:15: branch_true: ...to here
libnbd-1.24.0/info/show.c:131:15: call_function: calling ‘get_content’ from ‘show_one_export’
#  356|     if (nbd_aio_is_negotiating (nbd)) {
#  357|       if (nbd_opt_go (nbd) == -1) {
#  358|->       fprintf (stderr, "%s: %s\n", progname, nbd_get_error ());
#  359|         exit (EXIT_FAILURE);
#  360|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
libnbd-1.24.0/info/show.c:366:14: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:46:1: enter_function: entry to ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: call_function: calling ‘human_size’ from ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: return_function: returning to ‘show_one_export’ from ‘human_size’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:131:15: branch_true: ...to here
libnbd-1.24.0/info/show.c:131:15: call_function: calling ‘get_content’ from ‘show_one_export’
#  364|        */
#  365|       if (size == 0) {
#  366|->       size = nbd_get_size (nbd);
#  367|         if (size == -1)
#  368|           size = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
libnbd-1.24.0/info/show.c:373:8: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:46:1: enter_function: entry to ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: call_function: calling ‘human_size’ from ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: return_function: returning to ‘show_one_export’ from ‘human_size’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:131:15: branch_true: ...to here
libnbd-1.24.0/info/show.c:131:15: call_function: calling ‘get_content’ from ‘show_one_export’
#  371|   
#  372|     /* Write the first part of the NBD export to a temporary file. */
#  373|->   fd = mkstemp (template);
#  374|     if (fd == -1) {
#  375|       perror ("mkstemp");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
libnbd-1.24.0/info/show.c:375:5: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:46:1: enter_function: entry to ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: call_function: calling ‘human_size’ from ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: return_function: returning to ‘show_one_export’ from ‘human_size’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:131:15: branch_true: ...to here
libnbd-1.24.0/info/show.c:131:15: call_function: calling ‘get_content’ from ‘show_one_export’
#  373|     fd = mkstemp (template);
#  374|     if (fd == -1) {
#  375|->     perror ("mkstemp");
#  376|       exit (EXIT_FAILURE);
#  377|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
libnbd-1.24.0/info/show.c:380:15: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:46:1: enter_function: entry to ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: call_function: calling ‘human_size’ from ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: return_function: returning to ‘show_one_export’ from ‘human_size’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:131:15: branch_true: ...to here
libnbd-1.24.0/info/show.c:131:15: call_function: calling ‘get_content’ from ‘show_one_export’
#  378|     if (size > sizeof buf)
#  379|       size = sizeof buf;
#  380|->   if (size && nbd_pread (nbd, buf, size, 0, 0) == -1)
#  381|       goto out;
#  382|     if (write (fd, buf, size) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
libnbd-1.24.0/info/show.c:382:7: warning[-Wanalyzer-malloc-leak]: leak of ‘export_name’
libnbd-1.24.0/info/show.c:46:1: enter_function: entry to ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: call_function: calling ‘human_size’ from ‘show_one_export’
libnbd-1.24.0/info/show.c:94:5: return_function: returning to ‘show_one_export’ from ‘human_size’
libnbd-1.24.0/info/show.c:96:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:100:17: branch_false: ...to here
libnbd-1.24.0/info/show.c:100:17: acquire_memory: allocated here
libnbd-1.24.0/info/show.c:101:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/show.c:108:6: branch_false: ...to here
libnbd-1.24.0/info/show.c:108:6: branch_false: following ‘false’ branch (when ‘desc’ is non-NULL)...
libnbd-1.24.0/info/show.c:110:19: branch_false: ...to here
libnbd-1.24.0/info/show.c:130:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/show.c:131:15: branch_true: ...to here
libnbd-1.24.0/info/show.c:131:15: call_function: calling ‘get_content’ from ‘show_one_export’
#  380|     if (size && nbd_pread (nbd, buf, size, 0, 0) == -1)
#  381|       goto out;
#  382|->   if (write (fd, buf, size) == -1) {
#  383|       perror ("write");
#  384|       exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
libnbd-1.24.0/info/uri.c:40:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_uri(nbd)’
libnbd-1.24.0/info/uri.c:34:9: acquire_memory: allocated here
libnbd-1.24.0/info/uri.c:35:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/info/uri.c:40:7: branch_false: ...to here
libnbd-1.24.0/info/uri.c:40:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/info/uri.c:43:5: branch_true: ...to here
libnbd-1.24.0/info/uri.c:43:5: throw: if ‘print_json_string’ throws an exception...
libnbd-1.24.0/info/uri.c:40:7: danger: ‘nbd_get_uri(nbd)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   38|     }
#   39|   
#   40|->   if (!json_output)
#   41|       fputs (uri, fp);
#   42|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
libnbd-1.24.0/lib/api.c:298:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(handle_name)'
libnbd-1.24.0/lib/api.c:291:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:292:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:295:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:297:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:297:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:298:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:298:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:298:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:298:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:298:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:298:5: danger: 'nbd_internal_printable_string(handle_name)' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  296|       char *handle_name_printable =
#  297|           nbd_internal_printable_string (handle_name);
#  298|->     debug (h,
#  299|              "enter: handle_name=%s",
#  300|              handle_name_printable ? handle_name_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
libnbd-1.24.0/lib/api.c:344:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_unlocked_get_handle_name(h)'
libnbd-1.24.0/lib/api.c:333:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:334:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:342:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:344:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:345:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:345:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:349:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:349:11: throw: if 'nbd_internal_printable_string' throws an exception...
libnbd-1.24.0/lib/api.c:344:3: danger: 'nbd_unlocked_get_handle_name(h)' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  342|     ret = nbd_unlocked_get_handle_name (h);
#  343|   
#  344|->   if_debug (h) {
#  345|       if (ret == NULL)
#  346|         debug (h, "leave: error=\"%s\"", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
libnbd-1.24.0/lib/api.c:350:7: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(nbd_unlocked_get_handle_name(h))'
libnbd-1.24.0/lib/api.c:333:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:334:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:344:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:345:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:345:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:349:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:349:11: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:350:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:350:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:350:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:350:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:350:7: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:350:7: danger: 'nbd_internal_printable_string(nbd_unlocked_get_handle_name(h))' leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  348|         char *ret_printable =
#  349|             nbd_internal_printable_string (ret);
#  350|->       debug (h, "leave: ret=%s", ret_printable ? ret_printable : "");
#  351|         free (ret_printable);
#  352|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
libnbd-1.24.0/lib/api.c:471:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(export_name)'
libnbd-1.24.0/lib/api.c:464:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:465:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:468:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:470:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:470:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:471:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:471:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:471:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:471:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:471:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:471:5: danger: 'nbd_internal_printable_string(export_name)' leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  469|       char *export_name_printable =
#  470|           nbd_internal_printable_string (export_name);
#  471|->     debug (h,
#  472|              "enter: export_name=%s",
#  473|              export_name_printable ? export_name_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
libnbd-1.24.0/lib/api.c:522:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_unlocked_get_export_name(h)'
libnbd-1.24.0/lib/api.c:511:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:512:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:520:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:522:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:523:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:523:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:527:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:527:11: throw: if 'nbd_internal_printable_string' throws an exception...
libnbd-1.24.0/lib/api.c:522:3: danger: 'nbd_unlocked_get_export_name(h)' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  520|     ret = nbd_unlocked_get_export_name (h);
#  521|   
#  522|->   if_debug (h) {
#  523|       if (ret == NULL)
#  524|         debug (h, "leave: error=\"%s\"", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
libnbd-1.24.0/lib/api.c:528:7: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(nbd_unlocked_get_export_name(h))'
libnbd-1.24.0/lib/api.c:511:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:512:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:522:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:523:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:523:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:527:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:527:11: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:528:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:528:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:528:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:528:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:528:7: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:528:7: danger: 'nbd_internal_printable_string(nbd_unlocked_get_export_name(h))' leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  526|         char *ret_printable =
#  527|             nbd_internal_printable_string (ret);
#  528|->       debug (h, "leave: ret=%s", ret_printable ? ret_printable : "");
#  529|         free (ret_printable);
#  530|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
libnbd-1.24.0/lib/api.c:1015:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(dir)'
libnbd-1.24.0/lib/api.c:1008:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1009:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1012:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1014:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1014:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1015:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1015:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1015:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1015:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1015:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:1015:5: danger: 'nbd_internal_printable_string(dir)' leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
# 1013|       char *dir_printable =
# 1014|           nbd_internal_printable_string (dir);
# 1015|->     debug (h,
# 1016|              "enter: dir=%s",
# 1017|              dir_printable ? dir_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
libnbd-1.24.0/lib/api.c:1160:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(username)'
libnbd-1.24.0/lib/api.c:1153:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1154:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1157:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1159:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1159:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1160:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1160:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1160:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1160:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1160:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:1160:5: danger: 'nbd_internal_printable_string(username)' leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
# 1158|       char *username_printable =
# 1159|           nbd_internal_printable_string (username);
# 1160|->     debug (h,
# 1161|              "enter: username=%s",
# 1162|              username_printable ? username_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
libnbd-1.24.0/lib/api.c:1211:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_unlocked_get_tls_username(h)'
libnbd-1.24.0/lib/api.c:1200:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1201:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1209:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1211:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1212:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1212:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:1216:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:1216:11: throw: if 'nbd_internal_printable_string' throws an exception...
libnbd-1.24.0/lib/api.c:1211:3: danger: 'nbd_unlocked_get_tls_username(h)' leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 1209|     ret = nbd_unlocked_get_tls_username (h);
# 1210|   
# 1211|->   if_debug (h) {
# 1212|       if (ret == NULL)
# 1213|         debug (h, "leave: error=\"%s\"", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
libnbd-1.24.0/lib/api.c:1217:7: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(nbd_unlocked_get_tls_username(h))'
libnbd-1.24.0/lib/api.c:1200:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1201:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1211:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1212:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1212:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:1216:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:1216:11: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1217:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1217:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1217:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1217:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1217:7: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:1217:7: danger: 'nbd_internal_printable_string(nbd_unlocked_get_tls_username(h))' leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
# 1215|         char *ret_printable =
# 1216|             nbd_internal_printable_string (ret);
# 1217|->       debug (h, "leave: ret=%s", ret_printable ? ret_printable : "");
# 1218|         free (ret_printable);
# 1219|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
libnbd-1.24.0/lib/api.c:1258:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(hostname)'
libnbd-1.24.0/lib/api.c:1251:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1252:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1255:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1257:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1257:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1258:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1258:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1258:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1258:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1258:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:1258:5: danger: 'nbd_internal_printable_string(hostname)' leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
# 1256|       char *hostname_printable =
# 1257|           nbd_internal_printable_string (hostname);
# 1258|->     debug (h,
# 1259|              "enter: hostname=%s",
# 1260|              hostname_printable ? hostname_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
libnbd-1.24.0/lib/api.c:1309:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_unlocked_get_tls_hostname(h)'
libnbd-1.24.0/lib/api.c:1298:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1299:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1307:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1309:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1310:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1310:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:1314:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:1314:11: throw: if 'nbd_internal_printable_string' throws an exception...
libnbd-1.24.0/lib/api.c:1309:3: danger: 'nbd_unlocked_get_tls_hostname(h)' leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 1307|     ret = nbd_unlocked_get_tls_hostname (h);
# 1308|   
# 1309|->   if_debug (h) {
# 1310|       if (ret == NULL)
# 1311|         debug (h, "leave: error=\"%s\"", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
libnbd-1.24.0/lib/api.c:1315:7: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(nbd_unlocked_get_tls_hostname(h))'
libnbd-1.24.0/lib/api.c:1298:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1299:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1309:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1310:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1310:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:1314:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:1314:11: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1315:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1315:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1315:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1315:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1315:7: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:1315:7: danger: 'nbd_internal_printable_string(nbd_unlocked_get_tls_hostname(h))' leaks here; was allocated at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
# 1313|         char *ret_printable =
# 1314|             nbd_internal_printable_string (ret);
# 1315|->       debug (h, "leave: ret=%s", ret_printable ? ret_printable : "");
# 1316|         free (ret_printable);
# 1317|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
libnbd-1.24.0/lib/api.c:1356:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(filename)'
libnbd-1.24.0/lib/api.c:1349:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1350:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1353:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1355:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1355:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1356:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1356:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1356:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1356:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1356:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:1356:5: danger: 'nbd_internal_printable_string(filename)' leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4)
# 1354|       char *filename_printable =
# 1355|           nbd_internal_printable_string (filename);
# 1356|->     debug (h,
# 1357|              "enter: filename=%s",
# 1358|              filename_printable ? filename_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
libnbd-1.24.0/lib/api.c:1419:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(priority)'
libnbd-1.24.0/lib/api.c:1412:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1413:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1416:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1418:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1418:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1419:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1419:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1419:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1419:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1419:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:1419:5: danger: 'nbd_internal_printable_string(priority)' leaks here; was allocated at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
# 1417|       char *priority_printable =
# 1418|           nbd_internal_printable_string (priority);
# 1419|->     debug (h,
# 1420|              "enter: priority=%s",
# 1421|              priority_printable ? priority_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
libnbd-1.24.0/lib/api.c:1470:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_unlocked_get_tls_priority(h)'
libnbd-1.24.0/lib/api.c:1459:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1460:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1468:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1470:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1471:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1471:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:1475:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:1475:11: throw: if 'nbd_internal_printable_string' throws an exception...
libnbd-1.24.0/lib/api.c:1470:3: danger: 'nbd_unlocked_get_tls_priority(h)' leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
# 1468|     ret = nbd_unlocked_get_tls_priority (h);
# 1469|   
# 1470|->   if_debug (h) {
# 1471|       if (ret == NULL)
# 1472|         debug (h, "leave: error=\"%s\"", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
libnbd-1.24.0/lib/api.c:1476:7: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(nbd_unlocked_get_tls_priority(h))'
libnbd-1.24.0/lib/api.c:1459:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1460:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1470:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1471:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1471:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:1475:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:1475:11: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:1476:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1476:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1476:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:1476:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:1476:7: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:1476:7: danger: 'nbd_internal_printable_string(nbd_unlocked_get_tls_priority(h))' leaks here; was allocated at [(7)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/6)
# 1474|         char *ret_printable =
# 1475|             nbd_internal_printable_string (ret);
# 1476|->       debug (h, "leave: ret=%s", ret_printable ? ret_printable : "");
# 1477|         free (ret_printable);
# 1478|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
libnbd-1.24.0/lib/api.c:2629:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(queries)'
libnbd-1.24.0/lib/api.c:2622:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2623:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2626:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2628:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2628:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:2629:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2629:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2629:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2629:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2629:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:2629:5: danger: 'nbd_internal_printable_string_list(queries)' leaks here; was allocated at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
# 2627|       char *queries_printable =
# 2628|           nbd_internal_printable_string_list (queries);
# 2629|->     debug (h,
# 2630|              "enter: queries=%s context=%s",
# 2631|              queries_printable ? queries_printable : "", "<fun>");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
libnbd-1.24.0/lib/api.c:2761:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(queries)'
libnbd-1.24.0/lib/api.c:2754:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2755:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2758:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2760:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2760:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:2761:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2761:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2761:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2761:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2761:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:2761:5: danger: 'nbd_internal_printable_string_list(queries)' leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
# 2759|       char *queries_printable =
# 2760|           nbd_internal_printable_string_list (queries);
# 2761|->     debug (h,
# 2762|              "enter: queries=%s context=%s",
# 2763|              queries_printable ? queries_printable : "", "<fun>");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
libnbd-1.24.0/lib/api.c:2832:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(name)'
libnbd-1.24.0/lib/api.c:2825:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2826:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2829:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2831:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2831:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:2832:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2832:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2832:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2832:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2832:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:2832:5: danger: 'nbd_internal_printable_string(name)' leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
# 2830|       char *name_printable =
# 2831|           nbd_internal_printable_string (name);
# 2832|->     debug (h,
# 2833|              "enter: name=%s",
# 2834|              name_printable ? name_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
libnbd-1.24.0/lib/api.c:2916:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_unlocked_get_meta_context(h,  i)'
libnbd-1.24.0/lib/api.c:2904:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2905:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2914:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:2916:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2917:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2917:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:2921:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:2921:11: throw: if 'nbd_internal_printable_string' throws an exception...
libnbd-1.24.0/lib/api.c:2916:3: danger: 'nbd_unlocked_get_meta_context(h,  i)' leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
# 2914|     ret = nbd_unlocked_get_meta_context (h, i);
# 2915|   
# 2916|->   if_debug (h) {
# 2917|       if (ret == NULL)
# 2918|         debug (h, "leave: error=\"%s\"", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
libnbd-1.24.0/lib/api.c:2922:7: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(nbd_unlocked_get_meta_context(h,  i))'
libnbd-1.24.0/lib/api.c:2904:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2905:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2916:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2917:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2917:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:2921:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:2921:11: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:2922:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2922:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2922:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:2922:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:2922:7: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:2922:7: danger: 'nbd_internal_printable_string(nbd_unlocked_get_meta_context(h,  i))' leaks here; was allocated at [(7)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/6)
# 2920|         char *ret_printable =
# 2921|             nbd_internal_printable_string (ret);
# 2922|->       debug (h, "leave: ret=%s", ret_printable ? ret_printable : "");
# 2923|         free (ret_printable);
# 2924|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
libnbd-1.24.0/lib/api.c:3255:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(uri)'
libnbd-1.24.0/lib/api.c:3248:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3249:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3252:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3254:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3254:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3255:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3255:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3255:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3255:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3255:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:3255:5: danger: 'nbd_internal_printable_string(uri)' leaks here; was allocated at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
# 3253|       char *uri_printable =
# 3254|           nbd_internal_printable_string (uri);
# 3255|->     debug (h,
# 3256|              "enter: uri=%s",
# 3257|              uri_printable ? uri_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
libnbd-1.24.0/lib/api.c:3318:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(unixsocket)'
libnbd-1.24.0/lib/api.c:3311:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3312:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3315:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3317:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3317:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3318:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3318:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3318:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3318:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3318:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:3318:5: danger: 'nbd_internal_printable_string(unixsocket)' leaks here; was allocated at [(5)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/4)
# 3316|       char *unixsocket_printable =
# 3317|           nbd_internal_printable_string (unixsocket);
# 3318|->     debug (h,
# 3319|              "enter: unixsocket=%s",
# 3320|              unixsocket_printable ? unixsocket_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def237]
libnbd-1.24.0/lib/api.c:3437:9: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(hostname)'
libnbd-1.24.0/lib/api.c:3429:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3430:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3433:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3435:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3435:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3437:9: throw: if 'nbd_internal_printable_string' throws an exception...
libnbd-1.24.0/lib/api.c:3437:9: danger: 'nbd_internal_printable_string(hostname)' leaks here; was allocated at [(5)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/4)
# 3435|           nbd_internal_printable_string (hostname);
# 3436|       char *port_printable =
# 3437|->         nbd_internal_printable_string (port);
# 3438|       debug (h,
# 3439|              "enter: hostname=%s port=%s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
libnbd-1.24.0/lib/api.c:3438:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(hostname)'
libnbd-1.24.0/lib/api.c:3429:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3430:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3433:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3435:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3435:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3438:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3438:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3438:5: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:3438:5: branch_false: ...to here
libnbd-1.24.0/lib/api.c:3438:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3438:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3438:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:3438:5: danger: 'nbd_internal_printable_string(hostname)' leaks here; was allocated at [(5)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/4)
# 3436|       char *port_printable =
# 3437|           nbd_internal_printable_string (port);
# 3438|->     debug (h,
# 3439|              "enter: hostname=%s port=%s",
# 3440|              hostname_printable ? hostname_printable : "",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
libnbd-1.24.0/lib/api.c:3438:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(port)'
libnbd-1.24.0/lib/api.c:3429:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3430:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3433:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3435:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3437:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3438:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3438:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3438:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3438:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3438:5: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:3438:5: branch_false: ...to here
libnbd-1.24.0/lib/api.c:3438:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:3438:5: danger: 'nbd_internal_printable_string(port)' leaks here; was allocated at [(5)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/4)
# 3436|       char *port_printable =
# 3437|           nbd_internal_printable_string (port);
# 3438|->     debug (h,
# 3439|              "enter: hostname=%s port=%s",
# 3440|              hostname_printable ? hostname_printable : "",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
libnbd-1.24.0/lib/api.c:3563:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(argv)'
libnbd-1.24.0/lib/api.c:3556:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3557:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3560:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3562:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3562:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3563:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3563:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3563:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3563:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3563:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:3563:5: danger: 'nbd_internal_printable_string_list(argv)' leaks here; was allocated at [(5)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/4)
# 3561|       char *argv_printable =
# 3562|           nbd_internal_printable_string_list (argv);
# 3563|->     debug (h,
# 3564|              "enter: argv=%s",
# 3565|              argv_printable ? argv_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
libnbd-1.24.0/lib/api.c:3626:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(argv)'
libnbd-1.24.0/lib/api.c:3619:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3620:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3623:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3625:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3625:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3626:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3626:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3626:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3626:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3626:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:3626:5: danger: 'nbd_internal_printable_string_list(argv)' leaks here; was allocated at [(5)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/4)
# 3624|       char *argv_printable =
# 3625|           nbd_internal_printable_string_list (argv);
# 3626|->     debug (h,
# 3627|              "enter: argv=%s",
# 3628|              argv_printable ? argv_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def242]
libnbd-1.24.0/lib/api.c:3689:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(socket_name)'
libnbd-1.24.0/lib/api.c:3682:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3683:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3686:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3688:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3688:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3689:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3689:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3689:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3689:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3689:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:3689:5: danger: 'nbd_internal_printable_string(socket_name)' leaks here; was allocated at [(5)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/4)
# 3687|       char *socket_name_printable =
# 3688|           nbd_internal_printable_string (socket_name);
# 3689|->     debug (h,
# 3690|              "enter: socket_name=%s",
# 3691|              socket_name_printable ? socket_name_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def243]
libnbd-1.24.0/lib/api.c:3740:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_unlocked_get_socket_activation_name(h)'
libnbd-1.24.0/lib/api.c:3729:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3730:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3738:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3740:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3741:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3741:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:3745:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:3745:11: throw: if 'nbd_internal_printable_string' throws an exception...
libnbd-1.24.0/lib/api.c:3740:3: danger: 'nbd_unlocked_get_socket_activation_name(h)' leaks here; was allocated at [(3)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/2)
# 3738|     ret = nbd_unlocked_get_socket_activation_name (h);
# 3739|   
# 3740|->   if_debug (h) {
# 3741|       if (ret == NULL)
# 3742|         debug (h, "leave: error=\"%s\"", nbd_get_error ());

Error: GCC_ANALYZER_WARNING (CWE-401): [#def244]
libnbd-1.24.0/lib/api.c:3746:7: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(nbd_unlocked_get_socket_activation_name(h))'
libnbd-1.24.0/lib/api.c:3729:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3730:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3740:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3741:8: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3741:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:3745:11: branch_false: ...to here
libnbd-1.24.0/lib/api.c:3745:11: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:3746:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3746:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3746:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:3746:7: branch_true: ...to here
libnbd-1.24.0/lib/api.c:3746:7: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:3746:7: danger: 'nbd_internal_printable_string(nbd_unlocked_get_socket_activation_name(h))' leaks here; was allocated at [(7)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/6)
# 3744|         char *ret_printable =
# 3745|             nbd_internal_printable_string (ret);
# 3746|->       debug (h, "leave: ret=%s", ret_printable ? ret_printable : "");
# 3747|         free (ret_printable);
# 3748|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
libnbd-1.24.0/lib/api.c:4417:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(metacontext)'
libnbd-1.24.0/lib/api.c:4410:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:4411:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:4414:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:4416:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:4416:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:4417:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:4417:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:4417:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:4417:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:4417:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:4417:5: danger: 'nbd_internal_printable_string(metacontext)' leaks here; was allocated at [(5)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/4)
# 4415|       char *metacontext_printable =
# 4416|           nbd_internal_printable_string (metacontext);
# 4417|->     debug (h,
# 4418|              "enter: metacontext=%s",
# 4419|              metacontext_printable ? metacontext_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
libnbd-1.24.0/lib/api.c:5344:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(contexts)'
libnbd-1.24.0/lib/api.c:5337:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5338:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5341:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5343:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5343:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:5344:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5344:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5344:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5344:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5344:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:5344:5: danger: 'nbd_internal_printable_string_list(contexts)' leaks here; was allocated at [(5)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/4)
# 5342|       char *contexts_printable =
# 5343|           nbd_internal_printable_string_list (contexts);
# 5344|->     debug (h,
# 5345|              "enter: count=%"PRIu64" offset=%"PRIu64" contexts=%s "
# 5346|              "extent64=%s flags=0x%x",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
libnbd-1.24.0/lib/api.c:5549:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(uri)'
libnbd-1.24.0/lib/api.c:5542:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5543:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5546:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5548:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5548:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:5549:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5549:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5549:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5549:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5549:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:5549:5: danger: 'nbd_internal_printable_string(uri)' leaks here; was allocated at [(5)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/4)
# 5547|       char *uri_printable =
# 5548|           nbd_internal_printable_string (uri);
# 5549|->     debug (h,
# 5550|              "enter: uri=%s",
# 5551|              uri_printable ? uri_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def248]
libnbd-1.24.0/lib/api.c:5612:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(unixsocket)'
libnbd-1.24.0/lib/api.c:5605:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5606:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5609:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5611:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5611:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:5612:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5612:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5612:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5612:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5612:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:5612:5: danger: 'nbd_internal_printable_string(unixsocket)' leaks here; was allocated at [(5)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/4)
# 5610|       char *unixsocket_printable =
# 5611|           nbd_internal_printable_string (unixsocket);
# 5612|->     debug (h,
# 5613|              "enter: unixsocket=%s",
# 5614|              unixsocket_printable ? unixsocket_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
libnbd-1.24.0/lib/api.c:5731:9: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(hostname)'
libnbd-1.24.0/lib/api.c:5723:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5724:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5727:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5729:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5729:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:5731:9: throw: if 'nbd_internal_printable_string' throws an exception...
libnbd-1.24.0/lib/api.c:5731:9: danger: 'nbd_internal_printable_string(hostname)' leaks here; was allocated at [(5)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/4)
# 5729|           nbd_internal_printable_string (hostname);
# 5730|       char *port_printable =
# 5731|->         nbd_internal_printable_string (port);
# 5732|       debug (h,
# 5733|              "enter: hostname=%s port=%s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
libnbd-1.24.0/lib/api.c:5732:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(hostname)'
libnbd-1.24.0/lib/api.c:5723:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5724:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5727:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5729:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5729:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:5732:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5732:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5732:5: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:5732:5: branch_false: ...to here
libnbd-1.24.0/lib/api.c:5732:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5732:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5732:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:5732:5: danger: 'nbd_internal_printable_string(hostname)' leaks here; was allocated at [(5)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/4)
# 5730|       char *port_printable =
# 5731|           nbd_internal_printable_string (port);
# 5732|->     debug (h,
# 5733|              "enter: hostname=%s port=%s",
# 5734|              hostname_printable ? hostname_printable : "",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
libnbd-1.24.0/lib/api.c:5732:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(port)'
libnbd-1.24.0/lib/api.c:5723:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5724:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5727:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5729:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5731:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:5732:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5732:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5732:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5732:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5732:5: branch_false: following 'false' branch...
libnbd-1.24.0/lib/api.c:5732:5: branch_false: ...to here
libnbd-1.24.0/lib/api.c:5732:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:5732:5: danger: 'nbd_internal_printable_string(port)' leaks here; was allocated at [(5)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/4)
# 5730|       char *port_printable =
# 5731|           nbd_internal_printable_string (port);
# 5732|->     debug (h,
# 5733|              "enter: hostname=%s port=%s",
# 5734|              hostname_printable ? hostname_printable : "",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
libnbd-1.24.0/lib/api.c:5857:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(argv)'
libnbd-1.24.0/lib/api.c:5850:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5851:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5854:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5856:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5856:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:5857:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5857:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5857:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5857:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5857:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:5857:5: danger: 'nbd_internal_printable_string_list(argv)' leaks here; was allocated at [(5)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/4)
# 5855|       char *argv_printable =
# 5856|           nbd_internal_printable_string_list (argv);
# 5857|->     debug (h,
# 5858|              "enter: argv=%s",
# 5859|              argv_printable ? argv_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
libnbd-1.24.0/lib/api.c:5920:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(argv)'
libnbd-1.24.0/lib/api.c:5913:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5914:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5917:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5919:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5919:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:5920:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5920:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5920:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:5920:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:5920:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:5920:5: danger: 'nbd_internal_printable_string_list(argv)' leaks here; was allocated at [(5)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/4)
# 5918|       char *argv_printable =
# 5919|           nbd_internal_printable_string_list (argv);
# 5920|->     debug (h,
# 5921|              "enter: argv=%s",
# 5922|              argv_printable ? argv_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
libnbd-1.24.0/lib/api.c:6448:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(queries)'
libnbd-1.24.0/lib/api.c:6441:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:6442:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:6445:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:6447:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:6447:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:6448:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:6448:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:6448:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:6448:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:6448:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:6448:5: danger: 'nbd_internal_printable_string_list(queries)' leaks here; was allocated at [(5)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/4)
# 6446|       char *queries_printable =
# 6447|           nbd_internal_printable_string_list (queries);
# 6448|->     debug (h,
# 6449|              "enter: queries=%s context=%s completion=%s",
# 6450|              queries_printable ? queries_printable : "", "<fun>",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
libnbd-1.24.0/lib/api.c:6588:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(queries)'
libnbd-1.24.0/lib/api.c:6581:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:6582:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:6585:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:6587:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:6587:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:6588:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:6588:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:6588:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:6588:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:6588:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:6588:5: danger: 'nbd_internal_printable_string_list(queries)' leaks here; was allocated at [(5)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/4)
# 6586|       char *queries_printable =
# 6587|           nbd_internal_printable_string_list (queries);
# 6588|->     debug (h,
# 6589|              "enter: queries=%s context=%s completion=%s",
# 6590|              queries_printable ? queries_printable : "", "<fun>",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
libnbd-1.24.0/lib/api.c:7381:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string_list(contexts)'
libnbd-1.24.0/lib/api.c:7374:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:7375:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:7378:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:7380:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:7380:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:7381:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:7381:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:7381:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:7381:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:7381:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:7381:5: danger: 'nbd_internal_printable_string_list(contexts)' leaks here; was allocated at [(5)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/4)
# 7379|       char *contexts_printable =
# 7380|           nbd_internal_printable_string_list (contexts);
# 7381|->     debug (h,
# 7382|              "enter: count=%"PRIu64" offset=%"PRIu64" contexts=%s "
# 7383|              "extent64=%s completion=%s flags=0x%x",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
libnbd-1.24.0/lib/api.c:8147:5: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_internal_printable_string(uri)'
libnbd-1.24.0/lib/api.c:8140:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:8141:3: branch_true: ...to here
libnbd-1.24.0/lib/api.c:8144:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:8146:9: branch_true: ...to here
libnbd-1.24.0/lib/api.c:8146:9: acquire_memory: allocated here
libnbd-1.24.0/lib/api.c:8147:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:8147:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:8147:5: branch_true: following 'true' branch...
libnbd-1.24.0/lib/api.c:8147:5: branch_true: ...to here
libnbd-1.24.0/lib/api.c:8147:5: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/api.c:8147:5: danger: 'nbd_internal_printable_string(uri)' leaks here; was allocated at [(5)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/4)
# 8145|       char *uri_printable =
# 8146|           nbd_internal_printable_string (uri);
# 8147|->     debug (h,
# 8148|              "enter: uri=%s",
# 8149|              uri_printable ? uri_printable : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
libnbd-1.24.0/lib/errors.c:94:35: warning[-Wanalyzer-malloc-leak]: leak of 'allocate_last_error_on_demand()'
libnbd-1.24.0/lib/errors.c:143:1: enter_function: entry to 'nbd_internal_get_error_context'
libnbd-1.24.0/lib/errors.c:145:35: call_function: calling 'allocate_last_error_on_demand' from 'nbd_internal_get_error_context'
libnbd-1.24.0/lib/errors.c:145:35: return_function: returning to 'nbd_internal_get_error_context' from 'allocate_last_error_on_demand'
libnbd-1.24.0/lib/errors.c:147:10: branch_true: following 'true' branch...
libnbd-1.24.0/lib/errors.c:147:10: branch_true: ...to here
libnbd-1.24.0/lib/errors.c:94:35: danger: 'allocate_last_error_on_demand()' leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   92|   allocate_last_error_on_demand (void)
#   93|   {
#   94|->   struct last_error *last_error = pthread_getspecific (errors_key);
#   95|   
#   96|     if (!last_error) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def259]
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:226:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'nbd_internal_socket(1, 1, 0, 0)'
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:193:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:194:3: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:194:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:195:3: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:195:3: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:203:12: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:204:6: branch_false: following 'false' branch (when 'tmpdir' is non-NULL)...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:209:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:209:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:214:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:214:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:219:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:220:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:225:3: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:227:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:232:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:232:6: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:233:5: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:233:5: throw: if 'nbd_internal_get_error_context' throws an exception...
libnbd-1.24.0/lib/generator/states-connect-socket-activation.c:226:36: danger: 'nbd_internal_socket(1, 1, 0, 0)' leaks here

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:110:7: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:79:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:87:37: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:89:10: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:95:10: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:101:15: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:101:15: acquire_memory: allocated here
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:102:12: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:108:9: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:110:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:110:7: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:110:7: throw: if the called function throws an exception...
libnbd-1.24.0/lib/generator/states-newstyle-opt-list.c:110:7: danger: 'tmp' leaks here; was allocated at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: warning[-Wanalyzer-malloc-leak]: leak of 'strndup(&*h.sbuf.or.payload.context.str, (long unsigned int)__builtin_bswap32(*h.sbuf.or.option_reply.replylen) + 18446744073709551612)'
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:234:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:237:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:237:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:239:9: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:241:27: acquire_memory: allocated here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:243:10: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: throw: if 'nbd_internal_debug' throws an exception...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: danger: 'strndup(&*h.sbuf.or.payload.context.str, (long unsigned int)__builtin_bswap32(*h.sbuf.or.option_reply.replylen) + 18446744073709551612)' leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:255:9: warning[-Wanalyzer-malloc-leak]: leak of 'meta_context.name'
libnbd-1.24.0/lib/lib/states.c:3865:1: enter_function: entry to 'enter_STATE_NEWSTYLE_OPT_META_CONTEXT_CHECK_REPLY'
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:234:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:237:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:237:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:239:9: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:241:27: acquire_memory: allocated here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:243:10: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:250:11: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:252:10: branch_false: following 'false' branch (when 'opt != 9')...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:254:16: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:254:16: call_function: calling 'meta_vector_append' from 'enter_STATE_NEWSTYLE_OPT_META_CONTEXT_CHECK_REPLY'
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:254:16: return_function: returning to 'enter_STATE_NEWSTYLE_OPT_META_CONTEXT_CHECK_REPLY' from 'meta_vector_append'
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:254:15: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:255:9: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:255:9: throw: if 'nbd_internal_get_error_context' throws an exception...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:255:9: danger: 'meta_context.name' leaks here; was allocated at [(8)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/7)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
libnbd-1.24.0/lib/internal.h:75:1: warning[-Wanalyzer-malloc-leak]: leak of 'meta_context.name'
libnbd-1.24.0/lib/lib/states.c:3865:1: enter_function: entry to 'enter_STATE_NEWSTYLE_OPT_META_CONTEXT_CHECK_REPLY'
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:234:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:237:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:237:7: branch_true: following 'true' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:239:9: branch_true: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:241:27: acquire_memory: allocated here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:243:10: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:248:7: branch_false: following 'false' branch...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:250:11: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:252:10: branch_false: following 'false' branch (when 'opt != 9')...
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:254:16: branch_false: ...to here
libnbd-1.24.0/lib/generator/states-newstyle-opt-meta-context.c:254:16: call_function: calling 'meta_vector_append' from 'enter_STATE_NEWSTYLE_OPT_META_CONTEXT_CHECK_REPLY'
#   73|     uint32_t context_id;          /* Context ID negotiated with the server. */
#   74|   };
#   75|-> DEFINE_VECTOR_TYPE (meta_vector, struct meta_context);
#   76|   
#   77|   DEFINE_VECTOR_TYPE(uint32_vector, uint32_t);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
libnbd-1.24.0/lib/internal.h:77:1: warning[-Wanalyzer-malloc-leak]: leak of 'ids'
libnbd-1.24.0/lib/rw.c:611:1: enter_function: entry to 'nbd_unlocked_aio_block_status_filter'
libnbd-1.24.0/lib/rw.c:624:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/rw.c:627:7: branch_false: ...to here
libnbd-1.24.0/lib/rw.c:652:9: acquire_memory: allocated here
libnbd-1.24.0/lib/rw.c:653:6: branch_false: following 'false' branch (when 'ids' is non-NULL)...
libnbd-1.24.0/lib/rw.c:657:34: branch_false: ...to here
libnbd-1.24.0/lib/rw.c:657:7: call_function: calling 'uint32_vector_append' from 'nbd_unlocked_aio_block_status_filter'
#   75|   DEFINE_VECTOR_TYPE (meta_vector, struct meta_context);
#   76|   
#   77|-> DEFINE_VECTOR_TYPE(uint32_vector, uint32_t);
#   78|   
#   79|   struct export {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
libnbd-1.24.0/lib/rw.c:333:5: warning[-Wanalyzer-malloc-leak]: leak of 'cmd'
libnbd-1.24.0/lib/rw.c:220:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/rw.c:224:7: branch_false: ...to here
libnbd-1.24.0/lib/rw.c:224:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/rw.c:229:6: branch_false: ...to here
libnbd-1.24.0/lib/rw.c:261:8: branch_false: following 'false' branch (when 'count <= 67108864')...
libnbd-1.24.0/lib/rw.c:293:9: branch_false: ...to here
libnbd-1.24.0/lib/rw.c:293:9: acquire_memory: allocated here
libnbd-1.24.0/lib/rw.c:294:6: branch_false: following 'false' branch (when 'cmd' is non-NULL)...
libnbd-1.24.0/lib/rw.c:298:3: branch_false: ...to here
libnbd-1.24.0/lib/rw.c:305:6: branch_false: following 'false' branch (when 'cb' is NULL)...
libnbd-1.24.0/lib/rw.c:319:22: branch_false: ...to here
libnbd-1.24.0/lib/rw.c:332:6: branch_true: following 'true' branch...
libnbd-1.24.0/lib/rw.c:333:5: branch_true: ...to here
libnbd-1.24.0/lib/rw.c:333:5: throw: if 'nbd_internal_is_state_processing' throws an exception...
libnbd-1.24.0/lib/rw.c:333:5: danger: 'cmd' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  331|     h->in_flight++;
#  332|     if (h->cmds_to_issue != NULL) {
#  333|->     assert (nbd_internal_is_state_processing (get_next_state (h)));
#  334|       h->cmds_to_issue_tail = h->cmds_to_issue_tail->next = cmd;
#  335|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
libnbd-1.24.0/lib/uri.c:66:1: warning[-Wanalyzer-malloc-leak]: leak of 'q.value'
libnbd-1.24.0/lib/uri.c:338:1: enter_function: entry to 'nbd_unlocked_aio_connect_uri'
libnbd-1.24.0/lib/uri.c:353:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/uri.c:357:26: branch_false: ...to here
libnbd-1.24.0/lib/uri.c:357:7: call_function: calling 'parse_uri_queries' from 'nbd_unlocked_aio_connect_uri'
#   64|   };
#   65|   
#   66|-> DEFINE_VECTOR_TYPE (uri_query_list, struct uri_query);
#   67|   
#   68|   static void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
libnbd-1.24.0/lib/utils.c:713:9: warning[-Wanalyzer-malloc-leak]: leak of 'get_path()'
libnbd-1.24.0/lib/utils.c:682:1: enter_function: entry to 'nbd_internal_execvpe_init'
libnbd-1.24.0/lib/utils.c:695:6: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:702:3: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:704:6: branch_true: following 'true' branch...
libnbd-1.24.0/lib/utils.c:709:16: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:709:16: call_function: calling 'get_path' from 'nbd_internal_execvpe_init'
libnbd-1.24.0/lib/utils.c:709:16: return_function: returning to 'nbd_internal_execvpe_init' from 'get_path'
libnbd-1.24.0/lib/utils.c:710:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:713:9: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:713:8: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:719:16: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:723:7: branch_true: following 'true' branch (when 'sys_path_element <= scan')...
libnbd-1.24.0/lib/utils.c:724:17: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:725:11: branch_true: following 'true' branch...
libnbd-1.24.0/lib/utils.c:732:12: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:732:12: branch_true: following 'true' branch (when 'sys_path_element == scan')...
libnbd-1.24.0/lib/utils.c:741:46: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:743:12: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:744:13: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:743:13: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:745:13: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:743:13: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:750:20: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:751:12: branch_false: following 'false' branch (when 'pathname' is non-NULL)...
libnbd-1.24.0/lib/utils.c:755:9: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:766:13: call_function: calling 'string_vector_append' from 'nbd_internal_execvpe_init'
libnbd-1.24.0/lib/utils.c:766:13: return_function: returning to 'nbd_internal_execvpe_init' from 'string_vector_append'
libnbd-1.24.0/lib/utils.c:766:12: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:771:9: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:775:14: branch_true: following 'true' branch...
libnbd-1.24.0/lib/utils.c:775:14: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:723:7: branch_true: following 'true' branch (when 'sys_path_element <= scan')...
libnbd-1.24.0/lib/utils.c:724:17: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:725:10: branch_true: following 'true' branch...
libnbd-1.24.0/lib/utils.c:732:12: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:732:12: branch_true: following 'true' branch (when 'sys_path_element == scan')...
libnbd-1.24.0/lib/utils.c:741:46: branch_true: ...to here
libnbd-1.24.0/lib/utils.c:743:12: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:744:13: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:743:13: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:745:13: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:743:13: branch_false: following 'false' branch...
libnbd-1.24.0/lib/utils.c:750:20: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:751:12: branch_false: following 'false' branch (when 'pathname' is non-NULL)...
libnbd-1.24.0/lib/utils.c:755:9: branch_false: ...to here
libnbd-1.24.0/lib/utils.c:766:13: call_function: calling 'string_vector_append' from 'nbd_internal_execvpe_init'
#  711|         return rc;
#  712|   
#  713|->     if (sys_path[0] == '\0') {
#  714|         errno = ENOENT;
#  715|         goto free_sys_path;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
libnbd-1.24.0/ocaml/nbd-c.c:58:5: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4183:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4190:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4195:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4197:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4205:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4208:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
#   56|     struct user_data *data = calloc (1, sizeof *data);
#   57|     if (data == NULL)
#   58|->     caml_raise_out_of_memory ();
#   59|     return data;
#   60|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
libnbd-1.24.0/ocaml/nbd-c.c:473:9: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4486:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_flush’
libnbd-1.24.0/ocaml/nbd-c.c:4488:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4488:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4492:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4497:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4498:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_flush’
libnbd-1.24.0/ocaml/nbd-c.c:4498:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_flush’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4499:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4507:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4510:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4511:27: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4511:13: call_function: calling ‘CMD_FLAG_val’ from ‘nbd_internal_ocaml_nbd_aio_flush’
#  471|         bit = Int_val (Field (i, 0)); /* UNKNOWN of int */
#  472|         if (bit > 31)
#  473|->         caml_invalid_argument ("bitmask value out of range");
#  474|         else
#  475|           r |= 1u << bit;

Error: CPPCHECK_WARNING (CWE-758): [#def270]
libnbd-1.24.0/ocaml/nbd-c.c:529: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  527|     rv = Val_emptylist;
#  528|     for (i = 31; i >= 0; i--) {
#  529|->     if (flags & (1 << i)) {
#  530|         switch (1 << i) {
#  531|         case LIBNBD_HANDSHAKE_FLAG_FIXED_NEWSTYLE: v = Val_int (0); break;

Error: CPPCHECK_WARNING (CWE-758): [#def271]
libnbd-1.24.0/ocaml/nbd-c.c:600: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  598|     rv = Val_emptylist;
#  599|     for (i = 31; i >= 0; i--) {
#  600|->     if (flags & (1 << i)) {
#  601|         switch (1 << i) {
#  602|         case LIBNBD_STRICT_COMMANDS: v = Val_int (0); break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
libnbd-1.24.0/ocaml/nbd-c.c:767:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:751:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_set_debug_callback’
libnbd-1.24.0/ocaml/nbd-c.c:753:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:753:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:757:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:763:39: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:763:39: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_set_debug_callback’
libnbd-1.24.0/ocaml/nbd-c.c:763:39: return_function: returning to ‘nbd_internal_ocaml_nbd_set_debug_callback’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:768:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:767:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/7)
#  765|      * must treat it as a possible GC root.
#  766|      */
#  767|->   debug_user_data->fnv = debugv;
#  768|     caml_register_generational_global_root (&debug_user_data->fnv);
#  769|     debug_callback.callback = debug_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
libnbd-1.24.0/ocaml/nbd-c.c:940:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_handle_name(h)’
libnbd-1.24.0/ocaml/nbd-c.c:927:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:927:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:931:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:938:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:939:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:940:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:940:3: danger: ‘nbd_get_handle_name(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/4)
#  938|     caml_enter_blocking_section ();
#  939|     r =  nbd_get_handle_name (h);
#  940|->   caml_leave_blocking_section ();
#  941|   
#  942|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
libnbd-1.24.0/ocaml/nbd-c.c:945:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_handle_name(h)’
libnbd-1.24.0/ocaml/nbd-c.c:927:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:927:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:931:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:938:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:939:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:942:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:945:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:945:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:945:8: danger: ‘nbd_get_handle_name(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/4)
#  943|       nbd_internal_ocaml_raise_error ();
#  944|   
#  945|->   rv = caml_copy_string (r);
#  946|     free (r);
#  947|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
libnbd-1.24.0/ocaml/nbd-c.c:1062:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_export_name(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1049:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1049:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1053:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1060:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1061:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1062:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1062:3: danger: ‘nbd_get_export_name(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
# 1060|     caml_enter_blocking_section ();
# 1061|     r =  nbd_get_export_name (h);
# 1062|->   caml_leave_blocking_section ();
# 1063|   
# 1064|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
libnbd-1.24.0/ocaml/nbd-c.c:1067:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_export_name(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1049:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1049:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1053:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1060:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1061:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1064:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1067:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1067:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1067:8: danger: ‘nbd_get_export_name(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
# 1065|       nbd_internal_ocaml_raise_error ();
# 1066|   
# 1067|->   rv = caml_copy_string (r);
# 1068|     free (r);
# 1069|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
libnbd-1.24.0/ocaml/nbd-c.c:1190:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_canonical_export_name(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1177:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1177:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1181:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1188:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1189:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1190:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1190:3: danger: ‘nbd_get_canonical_export_name(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
# 1188|     caml_enter_blocking_section ();
# 1189|     r =  nbd_get_canonical_export_name (h);
# 1190|->   caml_leave_blocking_section ();
# 1191|   
# 1192|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
libnbd-1.24.0/ocaml/nbd-c.c:1195:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_canonical_export_name(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1177:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1177:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1181:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1188:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1189:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1192:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1195:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1195:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1195:8: danger: ‘nbd_get_canonical_export_name(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/4)
# 1193|       nbd_internal_ocaml_raise_error ();
# 1194|   
# 1195|->   rv = caml_copy_string (r);
# 1196|     free (r);
# 1197|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
libnbd-1.24.0/ocaml/nbd-c.c:1216:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_export_description(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1203:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1203:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1207:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1214:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1215:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1216:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1216:3: danger: ‘nbd_get_export_description(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/4)
# 1214|     caml_enter_blocking_section ();
# 1215|     r =  nbd_get_export_description (h);
# 1216|->   caml_leave_blocking_section ();
# 1217|   
# 1218|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
libnbd-1.24.0/ocaml/nbd-c.c:1221:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_export_description(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1203:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1203:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1207:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1214:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1215:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1218:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1221:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1221:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1221:8: danger: ‘nbd_get_export_description(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/4)
# 1219|       nbd_internal_ocaml_raise_error ();
# 1220|   
# 1221|->   rv = caml_copy_string (r);
# 1222|     free (r);
# 1223|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
libnbd-1.24.0/ocaml/nbd-c.c:1418:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_tls_username(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1405:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1405:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1409:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1416:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1417:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1418:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1418:3: danger: ‘nbd_get_tls_username(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
# 1416|     caml_enter_blocking_section ();
# 1417|     r =  nbd_get_tls_username (h);
# 1418|->   caml_leave_blocking_section ();
# 1419|   
# 1420|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
libnbd-1.24.0/ocaml/nbd-c.c:1423:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_tls_username(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1405:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1405:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1409:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1416:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1417:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1420:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1423:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1423:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1423:8: danger: ‘nbd_get_tls_username(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/4)
# 1421|       nbd_internal_ocaml_raise_error ();
# 1422|   
# 1423|->   rv = caml_copy_string (r);
# 1424|     free (r);
# 1425|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
libnbd-1.24.0/ocaml/nbd-c.c:1470:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_tls_hostname(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1457:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1457:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1461:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1468:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1469:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1470:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1470:3: danger: ‘nbd_get_tls_hostname(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/4)
# 1468|     caml_enter_blocking_section ();
# 1469|     r =  nbd_get_tls_hostname (h);
# 1470|->   caml_leave_blocking_section ();
# 1471|   
# 1472|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
libnbd-1.24.0/ocaml/nbd-c.c:1475:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_tls_hostname(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1457:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1457:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1461:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1468:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1469:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1472:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1475:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1475:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1475:8: danger: ‘nbd_get_tls_hostname(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/4)
# 1473|       nbd_internal_ocaml_raise_error ();
# 1474|   
# 1475|->   rv = caml_copy_string (r);
# 1476|     free (r);
# 1477|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
libnbd-1.24.0/ocaml/nbd-c.c:1548:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_tls_priority(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1535:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1535:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1539:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1546:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1547:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1548:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1548:3: danger: ‘nbd_get_tls_priority(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/4)
# 1546|     caml_enter_blocking_section ();
# 1547|     r =  nbd_get_tls_priority (h);
# 1548|->   caml_leave_blocking_section ();
# 1549|   
# 1550|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
libnbd-1.24.0/ocaml/nbd-c.c:1553:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_tls_priority(h)’
libnbd-1.24.0/ocaml/nbd-c.c:1535:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1535:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1539:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:1546:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1547:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:1550:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:1553:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:1553:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:1553:8: danger: ‘nbd_get_tls_priority(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/4)
# 1551|       nbd_internal_ocaml_raise_error ();
# 1552|   
# 1553|->   rv = caml_copy_string (r);
# 1554|     free (r);
# 1555|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
libnbd-1.24.0/ocaml/nbd-c.c:2103:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:2087:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:2089:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2089:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2093:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:2099:38: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2099:38: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:2099:38: return_function: returning to ‘nbd_internal_ocaml_nbd_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:2104:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:2103:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/7)
# 2101|      * must treat it as a possible GC root.
# 2102|      */
# 2103|->   list_user_data->fnv = listv;
# 2104|     caml_register_generational_global_root (&list_user_data->fnv);
# 2105|     list_callback.callback = list_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
libnbd-1.24.0/ocaml/nbd-c.c:2163:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:2147:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:2149:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2149:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2153:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:2159:41: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2159:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:2159:41: return_function: returning to ‘nbd_internal_ocaml_nbd_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:2164:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:2163:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/7)
# 2161|      * must treat it as a possible GC root.
# 2162|      */
# 2163|->   context_user_data->fnv = contextv;
# 2164|     caml_register_generational_global_root (&context_user_data->fnv);
# 2165|     context_callback.callback = context_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
libnbd-1.24.0/ocaml/nbd-c.c:2201:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:2182:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:2186:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2186:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2190:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:2195:29: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2197:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:2197:41: return_function: returning to ‘nbd_internal_ocaml_nbd_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:2202:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:2201:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/7)
# 2199|      * must treat it as a possible GC root.
# 2200|      */
# 2201|->   context_user_data->fnv = contextv;
# 2202|     caml_register_generational_global_root (&context_user_data->fnv);
# 2203|     context_callback.callback = context_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
libnbd-1.24.0/ocaml/nbd-c.c:2237:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:2221:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:2223:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2223:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2227:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:2233:41: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2233:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:2233:41: return_function: returning to ‘nbd_internal_ocaml_nbd_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:2238:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:2237:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/7)
# 2235|      * must treat it as a possible GC root.
# 2236|      */
# 2237|->   context_user_data->fnv = contextv;
# 2238|     caml_register_generational_global_root (&context_user_data->fnv);
# 2239|     context_callback.callback = context_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
libnbd-1.24.0/ocaml/nbd-c.c:2275:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:2256:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:2260:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2260:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2264:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:2269:29: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2271:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:2271:41: return_function: returning to ‘nbd_internal_ocaml_nbd_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:2276:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:2275:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/7)
# 2273|      * must treat it as a possible GC root.
# 2274|      */
# 2275|->   context_user_data->fnv = contextv;
# 2276|     caml_register_generational_global_root (&context_user_data->fnv);
# 2277|     context_callback.callback = context_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
libnbd-1.24.0/ocaml/nbd-c.c:2362:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_meta_context(h,  i)’
libnbd-1.24.0/ocaml/nbd-c.c:2348:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2348:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2352:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:2357:14: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2361:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:2362:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:2362:3: danger: ‘nbd_get_meta_context(h,  i)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/4)
# 2360|     caml_enter_blocking_section ();
# 2361|     r =  nbd_get_meta_context (h, i);
# 2362|->   caml_leave_blocking_section ();
# 2363|   
# 2364|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
libnbd-1.24.0/ocaml/nbd-c.c:2367:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_meta_context(h,  i)’
libnbd-1.24.0/ocaml/nbd-c.c:2348:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2348:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2352:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:2357:14: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2361:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:2364:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2367:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2367:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:2367:8: danger: ‘nbd_get_meta_context(h,  i)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/4)
# 2365|       nbd_internal_ocaml_raise_error ();
# 2366|   
# 2367|->   rv = caml_copy_string (r);
# 2368|     free (r);
# 2369|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
libnbd-1.24.0/ocaml/nbd-c.c:2738:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_socket_activation_name(h)’
libnbd-1.24.0/ocaml/nbd-c.c:2725:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2725:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2729:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:2736:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2737:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:2738:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:2738:3: danger: ‘nbd_get_socket_activation_name(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/4)
# 2736|     caml_enter_blocking_section ();
# 2737|     r =  nbd_get_socket_activation_name (h);
# 2738|->   caml_leave_blocking_section ();
# 2739|   
# 2740|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
libnbd-1.24.0/ocaml/nbd-c.c:2743:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_socket_activation_name(h)’
libnbd-1.24.0/ocaml/nbd-c.c:2725:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2725:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2729:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:2736:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2737:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:2740:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:2743:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:2743:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:2743:8: danger: ‘nbd_get_socket_activation_name(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/4)
# 2741|       nbd_internal_ocaml_raise_error ();
# 2742|   
# 2743|->   rv = caml_copy_string (r);
# 2744|     free (r);
# 2745|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
libnbd-1.24.0/ocaml/nbd-c.c:3185:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3160:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:3163:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3163:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3167:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3173:7: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3181:39: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:3181:39: return_function: returning to ‘nbd_internal_ocaml_nbd_pread_structured’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3186:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3185:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/7)
# 3183|      * must treat it as a possible GC root.
# 3184|      */
# 3185|->   chunk_user_data->fnv = chunkv;
# 3186|     caml_register_generational_global_root (&chunk_user_data->fnv);
# 3187|     chunk_callback.callback = chunk_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
libnbd-1.24.0/ocaml/nbd-c.c:3421:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3397:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:3400:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3400:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3404:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3410:7: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3417:40: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:3417:40: return_function: returning to ‘nbd_internal_ocaml_nbd_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3422:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3421:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/7)
# 3419|      * must treat it as a possible GC root.
# 3420|      */
# 3421|->   extent_user_data->fnv = extentv;
# 3422|     caml_register_generational_global_root (&extent_user_data->fnv);
# 3423|     extent_callback.callback = extent_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
libnbd-1.24.0/ocaml/nbd-c.c:3465:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3440:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:3444:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3444:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3448:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3454:7: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3461:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:3461:42: return_function: returning to ‘nbd_internal_ocaml_nbd_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3466:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3465:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/7)
# 3463|      * must treat it as a possible GC root.
# 3464|      */
# 3465|->   extent64_user_data->fnv = extent64v;
# 3466|     caml_register_generational_global_root (&extent64_user_data->fnv);
# 3467|     extent64_callback.callback = extent64_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
libnbd-1.24.0/ocaml/nbd-c.c:3512:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3484:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:3489:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3489:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3494:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3500:7: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3508:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:3508:42: return_function: returning to ‘nbd_internal_ocaml_nbd_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3513:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3512:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/7)
# 3510|      * must treat it as a possible GC root.
# 3511|      */
# 3512|->   extent64_user_data->fnv = extent64v;
# 3513|     caml_register_generational_global_root (&extent64_user_data->fnv);
# 3514|     extent64_callback.callback = extent64_wrapper;

Error: CPPCHECK_WARNING (CWE-457): [#def300]
libnbd-1.24.0/ocaml/nbd-c.c:3615: error[uninitvar]: Uninitialized variable: addr
# 3613|   
# 3614|     caml_enter_blocking_section ();
# 3615|->   r =  nbd_aio_connect (h, addr, addrlen);
# 3616|     caml_leave_blocking_section ();
# 3617|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
libnbd-1.24.0/ocaml/nbd-c.c:3834:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3821:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_go’
libnbd-1.24.0/ocaml/nbd-c.c:3823:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3823:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3827:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3832:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3833:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_go’
libnbd-1.24.0/ocaml/nbd-c.c:3833:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_go’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3834:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3838:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3839:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3834:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/7)
# 3832|     nbd_completion_callback completion_callback = {0};
# 3833|     struct user_data *completion_user_data = alloc_user_data ();
# 3834|->   if (completionv != Val_int (0)) { /* Some closure */
# 3835|       /* The function may save a reference to the closure, so we
# 3836|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
libnbd-1.24.0/ocaml/nbd-c.c:3846:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3821:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_go’
libnbd-1.24.0/ocaml/nbd-c.c:3823:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3823:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3827:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3832:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3833:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_go’
libnbd-1.24.0/ocaml/nbd-c.c:3833:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_go’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3834:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3842:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3846:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3846:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/7)
# 3844|     int r;
# 3845|   
# 3846|->   caml_enter_blocking_section ();
# 3847|     r =  nbd_aio_opt_go (h, completion_callback);
# 3848|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
libnbd-1.24.0/ocaml/nbd-c.c:3847:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3821:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_go’
libnbd-1.24.0/ocaml/nbd-c.c:3823:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3823:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3827:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3832:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3833:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_go’
libnbd-1.24.0/ocaml/nbd-c.c:3833:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_go’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3834:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3842:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3847:8: throw: if ‘nbd_aio_opt_go’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3847:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/7)
# 3845|   
# 3846|     caml_enter_blocking_section ();
# 3847|->   r =  nbd_aio_opt_go (h, completion_callback);
# 3848|     caml_leave_blocking_section ();
# 3849|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
libnbd-1.24.0/ocaml/nbd-c.c:3896:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3883:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_starttls’
libnbd-1.24.0/ocaml/nbd-c.c:3885:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3885:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3889:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3894:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3895:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_starttls’
libnbd-1.24.0/ocaml/nbd-c.c:3895:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_starttls’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3896:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3900:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3901:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3896:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/7)
# 3894|     nbd_completion_callback completion_callback = {0};
# 3895|     struct user_data *completion_user_data = alloc_user_data ();
# 3896|->   if (completionv != Val_int (0)) { /* Some closure */
# 3897|       /* The function may save a reference to the closure, so we
# 3898|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
libnbd-1.24.0/ocaml/nbd-c.c:3908:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3883:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_starttls’
libnbd-1.24.0/ocaml/nbd-c.c:3885:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3885:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3889:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3894:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3895:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_starttls’
libnbd-1.24.0/ocaml/nbd-c.c:3895:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_starttls’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3896:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3904:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3908:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3908:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/7)
# 3906|     int r;
# 3907|   
# 3908|->   caml_enter_blocking_section ();
# 3909|     r =  nbd_aio_opt_starttls (h, completion_callback);
# 3910|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
libnbd-1.24.0/ocaml/nbd-c.c:3909:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3883:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_starttls’
libnbd-1.24.0/ocaml/nbd-c.c:3885:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3885:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3889:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3894:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3895:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_starttls’
libnbd-1.24.0/ocaml/nbd-c.c:3895:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_starttls’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3896:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3904:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3909:8: throw: if ‘nbd_aio_opt_starttls’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3909:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/7)
# 3907|   
# 3908|     caml_enter_blocking_section ();
# 3909|->   r =  nbd_aio_opt_starttls (h, completion_callback);
# 3910|     caml_leave_blocking_section ();
# 3911|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
libnbd-1.24.0/ocaml/nbd-c.c:3934:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3920:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_extended_headers’
libnbd-1.24.0/ocaml/nbd-c.c:3923:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3923:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3927:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3932:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3933:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_extended_headers’
libnbd-1.24.0/ocaml/nbd-c.c:3933:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_extended_headers’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3934:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3938:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3939:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3934:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/7)
# 3932|     nbd_completion_callback completion_callback = {0};
# 3933|     struct user_data *completion_user_data = alloc_user_data ();
# 3934|->   if (completionv != Val_int (0)) { /* Some closure */
# 3935|       /* The function may save a reference to the closure, so we
# 3936|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
libnbd-1.24.0/ocaml/nbd-c.c:3946:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3920:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_extended_headers’
libnbd-1.24.0/ocaml/nbd-c.c:3923:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3923:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3927:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3932:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3933:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_extended_headers’
libnbd-1.24.0/ocaml/nbd-c.c:3933:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_extended_headers’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3934:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3942:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3946:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3946:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/7)
# 3944|     int r;
# 3945|   
# 3946|->   caml_enter_blocking_section ();
# 3947|     r =  nbd_aio_opt_extended_headers (h, completion_callback);
# 3948|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
libnbd-1.24.0/ocaml/nbd-c.c:3947:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3920:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_extended_headers’
libnbd-1.24.0/ocaml/nbd-c.c:3923:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3923:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3927:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3932:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3933:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_extended_headers’
libnbd-1.24.0/ocaml/nbd-c.c:3933:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_extended_headers’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3934:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3942:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3947:8: throw: if ‘nbd_aio_opt_extended_headers’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3947:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/7)
# 3945|   
# 3946|     caml_enter_blocking_section ();
# 3947|->   r =  nbd_aio_opt_extended_headers (h, completion_callback);
# 3948|     caml_leave_blocking_section ();
# 3949|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
libnbd-1.24.0/ocaml/nbd-c.c:3972:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3958:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_structured_reply’
libnbd-1.24.0/ocaml/nbd-c.c:3961:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3961:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3965:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3970:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3971:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_structured_reply’
libnbd-1.24.0/ocaml/nbd-c.c:3971:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_structured_reply’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3972:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3976:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3977:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3972:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/7)
# 3970|     nbd_completion_callback completion_callback = {0};
# 3971|     struct user_data *completion_user_data = alloc_user_data ();
# 3972|->   if (completionv != Val_int (0)) { /* Some closure */
# 3973|       /* The function may save a reference to the closure, so we
# 3974|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
libnbd-1.24.0/ocaml/nbd-c.c:3984:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3958:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_structured_reply’
libnbd-1.24.0/ocaml/nbd-c.c:3961:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3961:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3965:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3970:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3971:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_structured_reply’
libnbd-1.24.0/ocaml/nbd-c.c:3971:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_structured_reply’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3972:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3980:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3984:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3984:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/7)
# 3982|     int r;
# 3983|   
# 3984|->   caml_enter_blocking_section ();
# 3985|     r =  nbd_aio_opt_structured_reply (h, completion_callback);
# 3986|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
libnbd-1.24.0/ocaml/nbd-c.c:3985:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3958:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_structured_reply’
libnbd-1.24.0/ocaml/nbd-c.c:3961:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3961:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3965:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:3970:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3971:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_structured_reply’
libnbd-1.24.0/ocaml/nbd-c.c:3971:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_structured_reply’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3972:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3980:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:3985:8: throw: if ‘nbd_aio_opt_structured_reply’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:3985:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/7)
# 3983|   
# 3984|     caml_enter_blocking_section ();
# 3985|->   r =  nbd_aio_opt_structured_reply (h, completion_callback);
# 3986|     caml_leave_blocking_section ();
# 3987|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
libnbd-1.24.0/ocaml/nbd-c.c:4010:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3996:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4003:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4008:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4010:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4014:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4015:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4010:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/7)
# 4008|     nbd_completion_callback completion_callback = {0};
# 4009|     struct user_data *completion_user_data = alloc_user_data ();
# 4010|->   if (completionv != Val_int (0)) { /* Some closure */
# 4011|       /* The function may save a reference to the closure, so we
# 4012|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
libnbd-1.24.0/ocaml/nbd-c.c:4025:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:3996:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4003:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4008:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4010:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4018:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4021:38: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:4021:38: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4026:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4025:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(15)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/14)
# 4023|      * must treat it as a possible GC root.
# 4024|      */
# 4025|->   list_user_data->fnv = listv;
# 4026|     caml_register_generational_global_root (&list_user_data->fnv);
# 4027|     list_callback.callback = list_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
libnbd-1.24.0/ocaml/nbd-c.c:4026:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3996:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4003:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4008:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4010:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4018:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4021:38: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:4021:38: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4026:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4026:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/7)
# 4024|      */
# 4025|     list_user_data->fnv = listv;
# 4026|->   caml_register_generational_global_root (&list_user_data->fnv);
# 4027|     list_callback.callback = list_wrapper;
# 4028|     list_callback.user_data = list_user_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
libnbd-1.24.0/ocaml/nbd-c.c:4032:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3996:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4003:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4008:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4010:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4018:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4021:38: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:4021:38: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4032:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4032:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/7)
# 4030|     int r;
# 4031|   
# 4032|->   caml_enter_blocking_section ();
# 4033|     r =  nbd_aio_opt_list (h, list_callback, completion_callback);
# 4034|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
libnbd-1.24.0/ocaml/nbd-c.c:4033:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:3996:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:3999:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4003:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4008:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:4009:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4010:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4018:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4021:38: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list’
libnbd-1.24.0/ocaml/nbd-c.c:4021:38: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4033:8: throw: if ‘nbd_aio_opt_list’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4033:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/7)
# 4031|   
# 4032|     caml_enter_blocking_section ();
# 4033|->   r =  nbd_aio_opt_list (h, list_callback, completion_callback);
# 4034|     caml_leave_blocking_section ();
# 4035|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
libnbd-1.24.0/ocaml/nbd-c.c:4057:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4044:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_info’
libnbd-1.24.0/ocaml/nbd-c.c:4046:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4046:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4050:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4055:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4056:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_info’
libnbd-1.24.0/ocaml/nbd-c.c:4056:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_info’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4057:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4061:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4062:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4057:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/7)
# 4055|     nbd_completion_callback completion_callback = {0};
# 4056|     struct user_data *completion_user_data = alloc_user_data ();
# 4057|->   if (completionv != Val_int (0)) { /* Some closure */
# 4058|       /* The function may save a reference to the closure, so we
# 4059|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
libnbd-1.24.0/ocaml/nbd-c.c:4069:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4044:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_info’
libnbd-1.24.0/ocaml/nbd-c.c:4046:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4046:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4050:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4055:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4056:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_info’
libnbd-1.24.0/ocaml/nbd-c.c:4056:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_info’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4057:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4065:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4069:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4069:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/7)
# 4067|     int r;
# 4068|   
# 4069|->   caml_enter_blocking_section ();
# 4070|     r =  nbd_aio_opt_info (h, completion_callback);
# 4071|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def320]
libnbd-1.24.0/ocaml/nbd-c.c:4070:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4044:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_info’
libnbd-1.24.0/ocaml/nbd-c.c:4046:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4046:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4050:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4055:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4056:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_info’
libnbd-1.24.0/ocaml/nbd-c.c:4056:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_info’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4057:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4065:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4070:8: throw: if ‘nbd_aio_opt_info’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4070:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/7)
# 4068|   
# 4069|     caml_enter_blocking_section ();
# 4070|->   r =  nbd_aio_opt_info (h, completion_callback);
# 4071|     caml_leave_blocking_section ();
# 4072|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
libnbd-1.24.0/ocaml/nbd-c.c:4095:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4081:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4088:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4093:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4095:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4099:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4100:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4095:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/7)
# 4093|     nbd_completion_callback completion_callback = {0};
# 4094|     struct user_data *completion_user_data = alloc_user_data ();
# 4095|->   if (completionv != Val_int (0)) { /* Some closure */
# 4096|       /* The function may save a reference to the closure, so we
# 4097|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
libnbd-1.24.0/ocaml/nbd-c.c:4110:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4081:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4088:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4093:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4095:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4103:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4106:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4106:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4111:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4110:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(15)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/14)
# 4108|      * must treat it as a possible GC root.
# 4109|      */
# 4110|->   context_user_data->fnv = contextv;
# 4111|     caml_register_generational_global_root (&context_user_data->fnv);
# 4112|     context_callback.callback = context_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
libnbd-1.24.0/ocaml/nbd-c.c:4111:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4081:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4088:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4093:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4095:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4103:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4106:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4106:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4111:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4111:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/7)
# 4109|      */
# 4110|     context_user_data->fnv = contextv;
# 4111|->   caml_register_generational_global_root (&context_user_data->fnv);
# 4112|     context_callback.callback = context_wrapper;
# 4113|     context_callback.user_data = context_user_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def324]
libnbd-1.24.0/ocaml/nbd-c.c:4117:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4081:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4088:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4093:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4095:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4103:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4106:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4106:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4117:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4117:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/7)
# 4115|     int r;
# 4116|   
# 4117|->   caml_enter_blocking_section ();
# 4118|     r =  nbd_aio_opt_list_meta_context (h, context_callback,
# 4119|                                         completion_callback);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
libnbd-1.24.0/ocaml/nbd-c.c:4118:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4081:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4084:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4088:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4093:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4094:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4095:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4103:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4106:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4106:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4118:8: throw: if ‘nbd_aio_opt_list_meta_context’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4118:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/7)
# 4116|   
# 4117|     caml_enter_blocking_section ();
# 4118|->   r =  nbd_aio_opt_list_meta_context (h, context_callback,
# 4119|                                         completion_callback);
# 4120|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
libnbd-1.24.0/ocaml/nbd-c.c:4146:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4130:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4139:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4144:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4146:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4150:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4151:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4146:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/7)
# 4144|     nbd_completion_callback completion_callback = {0};
# 4145|     struct user_data *completion_user_data = alloc_user_data ();
# 4146|->   if (completionv != Val_int (0)) { /* Some closure */
# 4147|       /* The function may save a reference to the closure, so we
# 4148|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
libnbd-1.24.0/ocaml/nbd-c.c:4156:29: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4130:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4139:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4144:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4146:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4154:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4156:29: throw: if ‘nbd_internal_ocaml_string_list’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4156:29: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/7)
# 4154|     completion_callback.user_data = completion_user_data;
# 4155|     completion_callback.free = free_user_data;
# 4156|->   char **queries = (char **)nbd_internal_ocaml_string_list (queriesv);
# 4157|     nbd_context_callback context_callback;
# 4158|     struct user_data *context_user_data = alloc_user_data ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
libnbd-1.24.0/ocaml/nbd-c.c:4162:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4130:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4139:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4144:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4146:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4154:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4158:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4158:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4163:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4162:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(15)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/14)
# 4160|      * must treat it as a possible GC root.
# 4161|      */
# 4162|->   context_user_data->fnv = contextv;
# 4163|     caml_register_generational_global_root (&context_user_data->fnv);
# 4164|     context_callback.callback = context_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
libnbd-1.24.0/ocaml/nbd-c.c:4163:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4130:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4139:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4144:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4146:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4154:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4158:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4158:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4163:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4163:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/7)
# 4161|      */
# 4162|     context_user_data->fnv = contextv;
# 4163|->   caml_register_generational_global_root (&context_user_data->fnv);
# 4164|     context_callback.callback = context_wrapper;
# 4165|     context_callback.user_data = context_user_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
libnbd-1.24.0/ocaml/nbd-c.c:4169:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4130:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4139:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4144:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4146:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4154:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4158:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4158:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4169:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4169:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/76/codeFlows/0/threadFlows/0/locations/7)
# 4167|     int r;
# 4168|   
# 4169|->   caml_enter_blocking_section ();
# 4170|     r =  nbd_aio_opt_list_meta_context_queries (h, queries, context_callback,
# 4171|                                                 completion_callback);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
libnbd-1.24.0/ocaml/nbd-c.c:4170:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4130:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4135:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4139:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4144:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4145:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4146:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4154:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4158:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4158:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_list_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4170:8: throw: if ‘nbd_aio_opt_list_meta_context_queries’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4170:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/77/codeFlows/0/threadFlows/0/locations/7)
# 4168|   
# 4169|     caml_enter_blocking_section ();
# 4170|->   r =  nbd_aio_opt_list_meta_context_queries (h, queries, context_callback,
# 4171|                                                 completion_callback);
# 4172|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
libnbd-1.24.0/ocaml/nbd-c.c:4197:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4183:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4190:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4195:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4197:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4201:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4202:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4197:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/78/codeFlows/0/threadFlows/0/locations/7)
# 4195|     nbd_completion_callback completion_callback = {0};
# 4196|     struct user_data *completion_user_data = alloc_user_data ();
# 4197|->   if (completionv != Val_int (0)) { /* Some closure */
# 4198|       /* The function may save a reference to the closure, so we
# 4199|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def333]
libnbd-1.24.0/ocaml/nbd-c.c:4212:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4183:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4190:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4195:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4197:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4205:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4208:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4208:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4213:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4212:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(15)](sarif:/runs/0/results/79/codeFlows/0/threadFlows/0/locations/14)
# 4210|      * must treat it as a possible GC root.
# 4211|      */
# 4212|->   context_user_data->fnv = contextv;
# 4213|     caml_register_generational_global_root (&context_user_data->fnv);
# 4214|     context_callback.callback = context_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
libnbd-1.24.0/ocaml/nbd-c.c:4213:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4183:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4190:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4195:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4197:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4205:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4208:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4208:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4213:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4213:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/80/codeFlows/0/threadFlows/0/locations/7)
# 4211|      */
# 4212|     context_user_data->fnv = contextv;
# 4213|->   caml_register_generational_global_root (&context_user_data->fnv);
# 4214|     context_callback.callback = context_wrapper;
# 4215|     context_callback.user_data = context_user_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def335]
libnbd-1.24.0/ocaml/nbd-c.c:4219:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4183:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4190:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4195:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4197:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4205:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4208:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4208:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4219:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4219:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/81/codeFlows/0/threadFlows/0/locations/7)
# 4217|     int r;
# 4218|   
# 4219|->   caml_enter_blocking_section ();
# 4220|     r =  nbd_aio_opt_set_meta_context (h, context_callback,
# 4221|                                        completion_callback);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
libnbd-1.24.0/ocaml/nbd-c.c:4220:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4183:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4186:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4190:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4195:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4196:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4197:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4205:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4208:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’
libnbd-1.24.0/ocaml/nbd-c.c:4208:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4220:8: throw: if ‘nbd_aio_opt_set_meta_context’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4220:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/82/codeFlows/0/threadFlows/0/locations/7)
# 4218|   
# 4219|     caml_enter_blocking_section ();
# 4220|->   r =  nbd_aio_opt_set_meta_context (h, context_callback,
# 4221|                                        completion_callback);
# 4222|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def337]
libnbd-1.24.0/ocaml/nbd-c.c:4248:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4232:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4241:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4246:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4248:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4252:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4253:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4248:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/83/codeFlows/0/threadFlows/0/locations/7)
# 4246|     nbd_completion_callback completion_callback = {0};
# 4247|     struct user_data *completion_user_data = alloc_user_data ();
# 4248|->   if (completionv != Val_int (0)) { /* Some closure */
# 4249|       /* The function may save a reference to the closure, so we
# 4250|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def338]
libnbd-1.24.0/ocaml/nbd-c.c:4258:29: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4232:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4241:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4246:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4248:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4256:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4258:29: throw: if ‘nbd_internal_ocaml_string_list’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4258:29: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/84/codeFlows/0/threadFlows/0/locations/7)
# 4256|     completion_callback.user_data = completion_user_data;
# 4257|     completion_callback.free = free_user_data;
# 4258|->   char **queries = (char **)nbd_internal_ocaml_string_list (queriesv);
# 4259|     nbd_context_callback context_callback;
# 4260|     struct user_data *context_user_data = alloc_user_data ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
libnbd-1.24.0/ocaml/nbd-c.c:4264:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4232:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4241:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4246:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4248:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4256:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4260:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4260:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4265:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4264:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(15)](sarif:/runs/0/results/85/codeFlows/0/threadFlows/0/locations/14)
# 4262|      * must treat it as a possible GC root.
# 4263|      */
# 4264|->   context_user_data->fnv = contextv;
# 4265|     caml_register_generational_global_root (&context_user_data->fnv);
# 4266|     context_callback.callback = context_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
libnbd-1.24.0/ocaml/nbd-c.c:4265:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4232:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4241:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4246:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4248:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4256:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4260:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4260:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4265:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4265:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/86/codeFlows/0/threadFlows/0/locations/7)
# 4263|      */
# 4264|     context_user_data->fnv = contextv;
# 4265|->   caml_register_generational_global_root (&context_user_data->fnv);
# 4266|     context_callback.callback = context_wrapper;
# 4267|     context_callback.user_data = context_user_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
libnbd-1.24.0/ocaml/nbd-c.c:4271:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4232:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4241:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4246:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4248:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4256:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4260:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4260:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4271:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4271:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/87/codeFlows/0/threadFlows/0/locations/7)
# 4269|     int r;
# 4270|   
# 4271|->   caml_enter_blocking_section ();
# 4272|     r =  nbd_aio_opt_set_meta_context_queries (h, queries, context_callback,
# 4273|                                                completion_callback);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
libnbd-1.24.0/ocaml/nbd-c.c:4272:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4232:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4237:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4241:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4246:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4247:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4248:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4256:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4260:41: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’
libnbd-1.24.0/ocaml/nbd-c.c:4260:41: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_opt_set_meta_context_queries’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4272:8: throw: if ‘nbd_aio_opt_set_meta_context_queries’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4272:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/88/codeFlows/0/threadFlows/0/locations/7)
# 4270|   
# 4271|     caml_enter_blocking_section ();
# 4272|->   r =  nbd_aio_opt_set_meta_context_queries (h, queries, context_callback,
# 4273|                                                completion_callback);
# 4274|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
libnbd-1.24.0/ocaml/nbd-c.c:4299:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4285:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_pread’
libnbd-1.24.0/ocaml/nbd-c.c:4288:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4288:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4292:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4297:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4298:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pread’
libnbd-1.24.0/ocaml/nbd-c.c:4298:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pread’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4299:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4303:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4304:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4299:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/89/codeFlows/0/threadFlows/0/locations/7)
# 4297|     nbd_completion_callback completion_callback = {0};
# 4298|     struct user_data *completion_user_data = alloc_user_data ();
# 4299|->   if (completionv != Val_int (0)) { /* Some closure */
# 4300|       /* The function may save a reference to the closure, so we
# 4301|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
libnbd-1.24.0/ocaml/nbd-c.c:4319:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4285:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_pread’
libnbd-1.24.0/ocaml/nbd-c.c:4288:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4288:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4292:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4297:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4298:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pread’
libnbd-1.24.0/ocaml/nbd-c.c:4298:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pread’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4299:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4307:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4319:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4319:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/90/codeFlows/0/threadFlows/0/locations/7)
# 4317|     uint64_t offset = Int64_val (offsetv);
# 4318|     completion_user_data->bufv = bufv;
# 4319|->   caml_register_generational_global_root (&completion_user_data->bufv);
# 4320|     int64_t r;
# 4321|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
libnbd-1.24.0/ocaml/nbd-c.c:4351:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4334:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4339:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4339:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4344:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4349:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4350:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4350:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pread_structured’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4351:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4355:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4356:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4351:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/91/codeFlows/0/threadFlows/0/locations/7)
# 4349|     nbd_completion_callback completion_callback = {0};
# 4350|     struct user_data *completion_user_data = alloc_user_data ();
# 4351|->   if (completionv != Val_int (0)) { /* Some closure */
# 4352|       /* The function may save a reference to the closure, so we
# 4353|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
libnbd-1.24.0/ocaml/nbd-c.c:4375:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4334:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4339:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4339:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4344:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4349:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4350:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4350:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pread_structured’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4351:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4359:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4371:39: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4371:39: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pread_structured’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4376:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4375:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(15)](sarif:/runs/0/results/92/codeFlows/0/threadFlows/0/locations/14)
# 4373|      * must treat it as a possible GC root.
# 4374|      */
# 4375|->   chunk_user_data->fnv = chunkv;
# 4376|     caml_register_generational_global_root (&chunk_user_data->fnv);
# 4377|     chunk_callback.callback = chunk_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
libnbd-1.24.0/ocaml/nbd-c.c:4376:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4334:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4339:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4339:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4344:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4349:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4350:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4350:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pread_structured’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4351:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4359:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4371:39: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4371:39: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pread_structured’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4376:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4376:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/93/codeFlows/0/threadFlows/0/locations/7)
# 4374|      */
# 4375|     chunk_user_data->fnv = chunkv;
# 4376|->   caml_register_generational_global_root (&chunk_user_data->fnv);
# 4377|     chunk_callback.callback = chunk_wrapper;
# 4378|     chunk_callback.user_data = chunk_user_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
libnbd-1.24.0/ocaml/nbd-c.c:4381:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4334:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4339:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4339:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4344:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4349:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4350:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4350:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pread_structured’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4351:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4359:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4371:39: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pread_structured’
libnbd-1.24.0/ocaml/nbd-c.c:4371:39: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pread_structured’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4381:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4381:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/94/codeFlows/0/threadFlows/0/locations/7)
# 4379|     chunk_callback.free = free_user_data;
# 4380|     completion_user_data->bufv = bufv;
# 4381|->   caml_register_generational_global_root (&completion_user_data->bufv);
# 4382|     int64_t r;
# 4383|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
libnbd-1.24.0/ocaml/nbd-c.c:4421:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4407:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_pwrite’
libnbd-1.24.0/ocaml/nbd-c.c:4410:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4410:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4414:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4419:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4420:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pwrite’
libnbd-1.24.0/ocaml/nbd-c.c:4420:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pwrite’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4421:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4425:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4426:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4421:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/95/codeFlows/0/threadFlows/0/locations/7)
# 4419|     nbd_completion_callback completion_callback = {0};
# 4420|     struct user_data *completion_user_data = alloc_user_data ();
# 4421|->   if (completionv != Val_int (0)) { /* Some closure */
# 4422|       /* The function may save a reference to the closure, so we
# 4423|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
libnbd-1.24.0/ocaml/nbd-c.c:4441:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4407:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_pwrite’
libnbd-1.24.0/ocaml/nbd-c.c:4410:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4410:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4414:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4419:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4420:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_pwrite’
libnbd-1.24.0/ocaml/nbd-c.c:4420:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_pwrite’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4421:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4429:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4441:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4441:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/96/codeFlows/0/threadFlows/0/locations/7)
# 4439|     uint64_t offset = Int64_val (offsetv);
# 4440|     completion_user_data->bufv = bufv;
# 4441|->   caml_register_generational_global_root (&completion_user_data->bufv);
# 4442|     int64_t r;
# 4443|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
libnbd-1.24.0/ocaml/nbd-c.c:4499:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4486:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_flush’
libnbd-1.24.0/ocaml/nbd-c.c:4488:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4488:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4492:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4497:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4498:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_flush’
libnbd-1.24.0/ocaml/nbd-c.c:4498:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_flush’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4499:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4503:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4504:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4499:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/97/codeFlows/0/threadFlows/0/locations/7)
# 4497|     nbd_completion_callback completion_callback = {0};
# 4498|     struct user_data *completion_user_data = alloc_user_data ();
# 4499|->   if (completionv != Val_int (0)) { /* Some closure */
# 4500|       /* The function may save a reference to the closure, so we
# 4501|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
libnbd-1.24.0/ocaml/nbd-c.c:4516:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4486:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_flush’
libnbd-1.24.0/ocaml/nbd-c.c:4488:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4488:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4492:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4497:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4498:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_flush’
libnbd-1.24.0/ocaml/nbd-c.c:4498:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_flush’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4499:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4507:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4516:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4516:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/98/codeFlows/0/threadFlows/0/locations/7)
# 4514|     int64_t r;
# 4515|   
# 4516|->   caml_enter_blocking_section ();
# 4517|     r =  nbd_aio_flush (h, completion_callback, flags);
# 4518|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
libnbd-1.24.0/ocaml/nbd-c.c:4517:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4486:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_flush’
libnbd-1.24.0/ocaml/nbd-c.c:4488:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4488:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4492:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4497:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4498:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_flush’
libnbd-1.24.0/ocaml/nbd-c.c:4498:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_flush’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4499:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4507:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4517:8: throw: if ‘nbd_aio_flush’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4517:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/99/codeFlows/0/threadFlows/0/locations/7)
# 4515|   
# 4516|     caml_enter_blocking_section ();
# 4517|->   r =  nbd_aio_flush (h, completion_callback, flags);
# 4518|     caml_leave_blocking_section ();
# 4519|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
libnbd-1.24.0/ocaml/nbd-c.c:4542:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4528:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_trim’
libnbd-1.24.0/ocaml/nbd-c.c:4531:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4531:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4535:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4540:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4541:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_trim’
libnbd-1.24.0/ocaml/nbd-c.c:4541:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_trim’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4542:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4546:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4547:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4542:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/100/codeFlows/0/threadFlows/0/locations/7)
# 4540|     nbd_completion_callback completion_callback = {0};
# 4541|     struct user_data *completion_user_data = alloc_user_data ();
# 4542|->   if (completionv != Val_int (0)) { /* Some closure */
# 4543|       /* The function may save a reference to the closure, so we
# 4544|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
libnbd-1.24.0/ocaml/nbd-c.c:4561:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4528:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_trim’
libnbd-1.24.0/ocaml/nbd-c.c:4531:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4531:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4535:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4540:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4541:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_trim’
libnbd-1.24.0/ocaml/nbd-c.c:4541:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_trim’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4542:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4550:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4561:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4561:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/101/codeFlows/0/threadFlows/0/locations/7)
# 4559|     int64_t r;
# 4560|   
# 4561|->   caml_enter_blocking_section ();
# 4562|     r =  nbd_aio_trim (h, count, offset, completion_callback, flags);
# 4563|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
libnbd-1.24.0/ocaml/nbd-c.c:4562:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4528:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_trim’
libnbd-1.24.0/ocaml/nbd-c.c:4531:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4531:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4535:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4540:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4541:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_trim’
libnbd-1.24.0/ocaml/nbd-c.c:4541:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_trim’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4542:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4550:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4562:8: throw: if ‘nbd_aio_trim’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4562:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/102/codeFlows/0/threadFlows/0/locations/7)
# 4560|   
# 4561|     caml_enter_blocking_section ();
# 4562|->   r =  nbd_aio_trim (h, count, offset, completion_callback, flags);
# 4563|     caml_leave_blocking_section ();
# 4564|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
libnbd-1.24.0/ocaml/nbd-c.c:4587:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4573:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_cache’
libnbd-1.24.0/ocaml/nbd-c.c:4576:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4576:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4580:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4585:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4586:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_cache’
libnbd-1.24.0/ocaml/nbd-c.c:4586:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_cache’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4587:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4591:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4592:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4587:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/103/codeFlows/0/threadFlows/0/locations/7)
# 4585|     nbd_completion_callback completion_callback = {0};
# 4586|     struct user_data *completion_user_data = alloc_user_data ();
# 4587|->   if (completionv != Val_int (0)) { /* Some closure */
# 4588|       /* The function may save a reference to the closure, so we
# 4589|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
libnbd-1.24.0/ocaml/nbd-c.c:4606:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4573:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_cache’
libnbd-1.24.0/ocaml/nbd-c.c:4576:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4576:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4580:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4585:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4586:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_cache’
libnbd-1.24.0/ocaml/nbd-c.c:4586:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_cache’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4587:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4595:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4606:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4606:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/104/codeFlows/0/threadFlows/0/locations/7)
# 4604|     int64_t r;
# 4605|   
# 4606|->   caml_enter_blocking_section ();
# 4607|     r =  nbd_aio_cache (h, count, offset, completion_callback, flags);
# 4608|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def359]
libnbd-1.24.0/ocaml/nbd-c.c:4607:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4573:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_cache’
libnbd-1.24.0/ocaml/nbd-c.c:4576:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4576:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4580:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4585:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4586:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_cache’
libnbd-1.24.0/ocaml/nbd-c.c:4586:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_cache’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4587:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4595:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4607:8: throw: if ‘nbd_aio_cache’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4607:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/105/codeFlows/0/threadFlows/0/locations/7)
# 4605|   
# 4606|     caml_enter_blocking_section ();
# 4607|->   r =  nbd_aio_cache (h, count, offset, completion_callback, flags);
# 4608|     caml_leave_blocking_section ();
# 4609|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
libnbd-1.24.0/ocaml/nbd-c.c:4632:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4618:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_zero’
libnbd-1.24.0/ocaml/nbd-c.c:4621:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4621:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4625:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4630:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4631:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_zero’
libnbd-1.24.0/ocaml/nbd-c.c:4631:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_zero’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4632:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4636:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4637:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4632:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/106/codeFlows/0/threadFlows/0/locations/7)
# 4630|     nbd_completion_callback completion_callback = {0};
# 4631|     struct user_data *completion_user_data = alloc_user_data ();
# 4632|->   if (completionv != Val_int (0)) { /* Some closure */
# 4633|       /* The function may save a reference to the closure, so we
# 4634|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def361]
libnbd-1.24.0/ocaml/nbd-c.c:4651:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4618:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_zero’
libnbd-1.24.0/ocaml/nbd-c.c:4621:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4621:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4625:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4630:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4631:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_zero’
libnbd-1.24.0/ocaml/nbd-c.c:4631:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_zero’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4632:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4640:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4651:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4651:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/107/codeFlows/0/threadFlows/0/locations/7)
# 4649|     int64_t r;
# 4650|   
# 4651|->   caml_enter_blocking_section ();
# 4652|     r =  nbd_aio_zero (h, count, offset, completion_callback, flags);
# 4653|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
libnbd-1.24.0/ocaml/nbd-c.c:4652:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4618:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_zero’
libnbd-1.24.0/ocaml/nbd-c.c:4621:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4621:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4625:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4630:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4631:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_zero’
libnbd-1.24.0/ocaml/nbd-c.c:4631:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_zero’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4632:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4640:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4652:8: throw: if ‘nbd_aio_zero’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4652:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/108/codeFlows/0/threadFlows/0/locations/7)
# 4650|   
# 4651|     caml_enter_blocking_section ();
# 4652|->   r =  nbd_aio_zero (h, count, offset, completion_callback, flags);
# 4653|     caml_leave_blocking_section ();
# 4654|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
libnbd-1.24.0/ocaml/nbd-c.c:4679:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4663:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4672:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4677:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4679:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4683:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4684:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4679:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/109/codeFlows/0/threadFlows/0/locations/7)
# 4677|     nbd_completion_callback completion_callback = {0};
# 4678|     struct user_data *completion_user_data = alloc_user_data ();
# 4679|->   if (completionv != Val_int (0)) { /* Some closure */
# 4680|       /* The function may save a reference to the closure, so we
# 4681|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
libnbd-1.24.0/ocaml/nbd-c.c:4701:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4663:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4672:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4677:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4679:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4687:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4697:40: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4697:40: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4702:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4701:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(15)](sarif:/runs/0/results/110/codeFlows/0/threadFlows/0/locations/14)
# 4699|      * must treat it as a possible GC root.
# 4700|      */
# 4701|->   extent_user_data->fnv = extentv;
# 4702|     caml_register_generational_global_root (&extent_user_data->fnv);
# 4703|     extent_callback.callback = extent_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def365]
libnbd-1.24.0/ocaml/nbd-c.c:4702:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4663:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4672:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4677:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4679:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4687:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4697:40: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4697:40: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4702:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4702:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/111/codeFlows/0/threadFlows/0/locations/7)
# 4700|      */
# 4701|     extent_user_data->fnv = extentv;
# 4702|->   caml_register_generational_global_root (&extent_user_data->fnv);
# 4703|     extent_callback.callback = extent_wrapper;
# 4704|     extent_callback.user_data = extent_user_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
libnbd-1.24.0/ocaml/nbd-c.c:4708:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4663:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4672:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4677:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4679:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4687:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4697:40: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4697:40: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4708:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4708:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/112/codeFlows/0/threadFlows/0/locations/7)
# 4706|     int64_t r;
# 4707|   
# 4708|->   caml_enter_blocking_section ();
# 4709|     r =  nbd_aio_block_status (h, count, offset, extent_callback,
# 4710|                                completion_callback, flags);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
libnbd-1.24.0/ocaml/nbd-c.c:4709:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4663:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4667:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4672:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4677:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4678:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4679:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4687:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4697:40: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status’
libnbd-1.24.0/ocaml/nbd-c.c:4697:40: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4709:8: throw: if ‘nbd_aio_block_status’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4709:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/113/codeFlows/0/threadFlows/0/locations/7)
# 4707|   
# 4708|     caml_enter_blocking_section ();
# 4709|->   r =  nbd_aio_block_status (h, count, offset, extent_callback,
# 4710|                                completion_callback, flags);
# 4711|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
libnbd-1.24.0/ocaml/nbd-c.c:4746:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4730:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4739:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4744:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4746:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4750:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4751:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4746:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/114/codeFlows/0/threadFlows/0/locations/7)
# 4744|     nbd_completion_callback completion_callback = {0};
# 4745|     struct user_data *completion_user_data = alloc_user_data ();
# 4746|->   if (completionv != Val_int (0)) { /* Some closure */
# 4747|       /* The function may save a reference to the closure, so we
# 4748|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
libnbd-1.24.0/ocaml/nbd-c.c:4768:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4730:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4739:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4744:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4746:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4754:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4764:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4764:42: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4769:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4768:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(15)](sarif:/runs/0/results/115/codeFlows/0/threadFlows/0/locations/14)
# 4766|      * must treat it as a possible GC root.
# 4767|      */
# 4768|->   extent64_user_data->fnv = extent64v;
# 4769|     caml_register_generational_global_root (&extent64_user_data->fnv);
# 4770|     extent64_callback.callback = extent64_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
libnbd-1.24.0/ocaml/nbd-c.c:4769:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4730:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4739:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4744:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4746:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4754:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4764:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4764:42: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4769:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4769:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/116/codeFlows/0/threadFlows/0/locations/7)
# 4767|      */
# 4768|     extent64_user_data->fnv = extent64v;
# 4769|->   caml_register_generational_global_root (&extent64_user_data->fnv);
# 4770|     extent64_callback.callback = extent64_wrapper;
# 4771|     extent64_callback.user_data = extent64_user_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
libnbd-1.24.0/ocaml/nbd-c.c:4775:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4730:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4739:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4744:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4746:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4754:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4764:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4764:42: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4775:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4775:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/117/codeFlows/0/threadFlows/0/locations/7)
# 4773|     int64_t r;
# 4774|   
# 4775|->   caml_enter_blocking_section ();
# 4776|     r =  nbd_aio_block_status_64 (h, count, offset, extent64_callback,
# 4777|                                   completion_callback, flags);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
libnbd-1.24.0/ocaml/nbd-c.c:4776:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4730:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4734:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4739:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4744:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4745:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4746:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4754:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4764:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_64’
libnbd-1.24.0/ocaml/nbd-c.c:4764:42: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_64’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4776:8: throw: if ‘nbd_aio_block_status_64’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4776:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/118/codeFlows/0/threadFlows/0/locations/7)
# 4774|   
# 4775|     caml_enter_blocking_section ();
# 4776|->   r =  nbd_aio_block_status_64 (h, count, offset, extent64_callback,
# 4777|                                   completion_callback, flags);
# 4778|     caml_leave_blocking_section ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
libnbd-1.24.0/ocaml/nbd-c.c:4816:7: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4798:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4809:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4814:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4816:6: branch_true: following ‘true’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4820:33: branch_true: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4821:5: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4816:7: danger: ‘alloc_user_data()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/119/codeFlows/0/threadFlows/0/locations/7)
# 4814|     nbd_completion_callback completion_callback = {0};
# 4815|     struct user_data *completion_user_data = alloc_user_data ();
# 4816|->   if (completionv != Val_int (0)) { /* Some closure */
# 4817|       /* The function may save a reference to the closure, so we
# 4818|        * must treat it as a possible GC root.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def374]
libnbd-1.24.0/ocaml/nbd-c.c:4833:30: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4798:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4809:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4814:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4816:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4824:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4833:30: throw: if ‘nbd_internal_ocaml_string_list’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4833:30: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/120/codeFlows/0/threadFlows/0/locations/7)
# 4831|     uint64_t count = Int64_val (countv);
# 4832|     uint64_t offset = Int64_val (offsetv);
# 4833|->   char **contexts = (char **)nbd_internal_ocaml_string_list (contextsv);
# 4834|     nbd_extent64_callback extent64_callback;
# 4835|     struct user_data *extent64_user_data = alloc_user_data ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
libnbd-1.24.0/ocaml/nbd-c.c:4839:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_user_data()’
libnbd-1.24.0/ocaml/nbd-c.c:4798:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4809:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4814:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4816:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4824:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4835:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4835:42: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4840:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4839:3: danger: ‘alloc_user_data()’ leaks here; was allocated at [(15)](sarif:/runs/0/results/121/codeFlows/0/threadFlows/0/locations/14)
# 4837|      * must treat it as a possible GC root.
# 4838|      */
# 4839|->   extent64_user_data->fnv = extent64v;
# 4840|     caml_register_generational_global_root (&extent64_user_data->fnv);
# 4841|     extent64_callback.callback = extent64_wrapper;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
libnbd-1.24.0/ocaml/nbd-c.c:4840:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4798:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4809:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4814:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4816:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4824:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4835:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4835:42: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4840:3: throw: if ‘caml_register_generational_global_root’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4840:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/122/codeFlows/0/threadFlows/0/locations/7)
# 4838|      */
# 4839|     extent64_user_data->fnv = extent64v;
# 4840|->   caml_register_generational_global_root (&extent64_user_data->fnv);
# 4841|     extent64_callback.callback = extent64_wrapper;
# 4842|     extent64_callback.user_data = extent64_user_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
libnbd-1.24.0/ocaml/nbd-c.c:4846:3: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4798:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4809:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4814:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4816:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4824:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4835:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4835:42: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4846:3: throw: if ‘caml_enter_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4846:3: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/123/codeFlows/0/threadFlows/0/locations/7)
# 4844|     int64_t r;
# 4845|   
# 4846|->   caml_enter_blocking_section ();
# 4847|     r =  nbd_aio_block_status_filter (h, count, offset, contexts,
# 4848|                                       extent64_callback, completion_callback,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
libnbd-1.24.0/ocaml/nbd-c.c:4847:8: warning[-Wanalyzer-malloc-leak]: leak of ‘completion_callback.user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4798:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4804:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4809:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:4814:27: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4815:44: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4816:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:4824:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:4835:42: call_function: calling ‘alloc_user_data’ from ‘nbd_internal_ocaml_nbd_aio_block_status_filter’
libnbd-1.24.0/ocaml/nbd-c.c:4835:42: return_function: returning to ‘nbd_internal_ocaml_nbd_aio_block_status_filter’ from ‘alloc_user_data’
libnbd-1.24.0/ocaml/nbd-c.c:4847:8: throw: if ‘nbd_aio_block_status_filter’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:4847:8: danger: ‘completion_callback.user_data’ leaks here; was allocated at [(8)](sarif:/runs/0/results/124/codeFlows/0/threadFlows/0/locations/7)
# 4845|   
# 4846|     caml_enter_blocking_section ();
# 4847|->   r =  nbd_aio_block_status_filter (h, count, offset, contexts,
# 4848|                                       extent64_callback, completion_callback,
# 4849|                                       flags);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
libnbd-1.24.0/ocaml/nbd-c.c:5461:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_uri(h)’
libnbd-1.24.0/ocaml/nbd-c.c:5448:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:5448:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:5452:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:5459:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:5460:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:5461:3: throw: if ‘caml_leave_blocking_section’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:5461:3: danger: ‘nbd_get_uri(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/125/codeFlows/0/threadFlows/0/locations/4)
# 5459|     caml_enter_blocking_section ();
# 5460|     r =  nbd_get_uri (h);
# 5461|->   caml_leave_blocking_section ();
# 5462|   
# 5463|     if (r == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
libnbd-1.24.0/ocaml/nbd-c.c:5466:8: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_get_uri(h)’
libnbd-1.24.0/ocaml/nbd-c.c:5448:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:5448:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:5452:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
libnbd-1.24.0/ocaml/nbd-c.c:5459:3: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:5460:8: acquire_memory: allocated here
libnbd-1.24.0/ocaml/nbd-c.c:5463:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/nbd-c.c:5466:8: branch_false: ...to here
libnbd-1.24.0/ocaml/nbd-c.c:5466:8: throw: if ‘caml_copy_string’ throws an exception...
libnbd-1.24.0/ocaml/nbd-c.c:5466:8: danger: ‘nbd_get_uri(h)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/126/codeFlows/0/threadFlows/0/locations/4)
# 5464|       nbd_internal_ocaml_raise_error ();
# 5465|   
# 5466|->   rv = caml_copy_string (r);
# 5467|     free (r);
# 5468|     CAMLreturn (rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
libnbd-1.24.0/ocaml/nbd-c.h:84:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/ocaml/handle.c:36:1: enter_function: entry to ‘nbd_internal_ocaml_nbd_create’
libnbd-1.24.0/ocaml/handle.c:38:3: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/handle.c:38:3: branch_false: ...to here
libnbd-1.24.0/ocaml/handle.c:42:7: acquire_memory: allocated here
libnbd-1.24.0/ocaml/handle.c:43:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ocaml/handle.c:46:8: branch_false: ...to here
libnbd-1.24.0/ocaml/handle.c:46:8: call_function: calling ‘Val_nbd’ from ‘nbd_internal_ocaml_nbd_create’
#   82|   Val_nbd (struct nbd_handle *h)
#   83|   {
#   84|->   CAMLparam0 ();
#   85|     CAMLlocal1 (rv);
#   86|     ssize_t __attribute__((unused)) hsize;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
libnbd-1.24.0/python/handle.c:49:10: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_create()'
libnbd-1.24.0/python/handle.c:53:1: enter_function: entry to 'nbd_internal_py_create'
libnbd-1.24.0/python/handle.c:57:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/handle.c:59:7: branch_false: ...to here
libnbd-1.24.0/python/handle.c:59:7: acquire_memory: allocated here
libnbd-1.24.0/python/handle.c:60:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/handle.c:65:10: branch_false: ...to here
libnbd-1.24.0/python/handle.c:65:10: call_function: calling 'put_handle' from 'nbd_internal_py_create'
#   47|   {
#   48|     assert (h);
#   49|->   return PyCapsule_New (h, "nbd_handle", NULL);
#   50|   }
#   51|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
libnbd-1.24.0/python/methods.c:48:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4334:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4335:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
#   46|     struct user_data *data = calloc (1, sizeof *data);
#   47|     if (data == NULL) {
#   48|->     PyErr_NoMemory ();
#   49|       return NULL;
#   50|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
libnbd-1.24.0/python/methods.c:60:32: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4548:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4572:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_aio_pread_structured'
#   58|   
#   59|     if (data) {
#   60|->     PyGILState_STATE py_save = PyGILState_Ensure ();
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
libnbd-1.24.0/python/methods.c:60:32: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4831:1: enter_function: entry to 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4848:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4851:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4851:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4851:7: return_function: returning to 'nbd_internal_py_aio_zero' from 'get_handle'
libnbd-1.24.0/python/methods.c:4852:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4853:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4853:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4853:49: return_function: returning to 'nbd_internal_py_aio_zero' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4854:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4855:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4855:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4856:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4856:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4857:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4882:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_aio_zero'
#   58|   
#   59|     if (data) {
#   60|->     PyGILState_STATE py_save = PyGILState_Ensure ();
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
libnbd-1.24.0/python/methods.c:60:32: warning[-Wanalyzer-malloc-leak]: leak of 'completion_user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4990:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4990:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4991:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5029:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_aio_block_status_64'
#   58|   
#   59|     if (data) {
#   60|->     PyGILState_STATE py_save = PyGILState_Ensure ();
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
libnbd-1.24.0/python/methods.c:60:32: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2059:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2073:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2073:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:2074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2075:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2075:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2075:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2077:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2077:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:2078:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2097:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_opt_set_meta_context'
#   58|   
#   59|     if (data) {
#   60|->     PyGILState_STATE py_save = PyGILState_Ensure ();
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def388]
libnbd-1.24.0/python/methods.c:60:32: warning[-Wanalyzer-malloc-leak]: leak of 'debug.user_data'
libnbd-1.24.0/python/methods.c:466:1: enter_function: entry to 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:477:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:480:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:480:7: call_function: calling 'get_handle' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:480:7: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'get_handle'
libnbd-1.24.0/python/methods.c:481:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:482:39: branch_false: ...to here
libnbd-1.24.0/python/methods.c:482:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:482:39: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:483:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:484:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:484:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:485:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:505:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_set_debug_callback'
#   58|   
#   59|     if (data) {
#   60|->     PyGILState_STATE py_save = PyGILState_Ensure ();
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def389]
libnbd-1.24.0/python/methods.c:60:32: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:3362:1: enter_function: entry to 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3379:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3382:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3382:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3382:7: return_function: returning to 'nbd_internal_py_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:3383:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3384:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3387:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3387:41: return_function: returning to 'nbd_internal_py_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3388:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3389:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3389:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3390:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3410:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_block_status'
#   58|   
#   59|     if (data) {
#   60|->     PyGILState_STATE py_save = PyGILState_Ensure ();
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
libnbd-1.24.0/python/methods.c:60:32: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3415:1: enter_function: entry to 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3432:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3435:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3435:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3435:7: return_function: returning to 'nbd_internal_py_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:3436:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3437:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3440:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3440:45: return_function: returning to 'nbd_internal_py_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3441:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3442:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3442:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3443:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3463:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_block_status_64'
#   58|   
#   59|     if (data) {
#   60|->     PyGILState_STATE py_save = PyGILState_Ensure ();
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
libnbd-1.24.0/python/methods.c:60:32: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:1898:1: enter_function: entry to 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1909:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1911:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1911:7: return_function: returning to 'nbd_internal_py_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:1912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1913:37: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1913:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1913:37: return_function: returning to 'nbd_internal_py_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1915:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1915:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:1916:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:1935:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_opt_list'
#   58|   
#   59|     if (data) {
#   60|->     PyGILState_STATE py_save = PyGILState_Ensure ();
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def392]
libnbd-1.24.0/python/methods.c:63:5: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4548:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4572:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_aio_pread_structured'
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);
#   63|->     PyGILState_Release (py_save);
#   64|       free (data);
#   65|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
libnbd-1.24.0/python/methods.c:63:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4831:1: enter_function: entry to 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4848:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4851:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4851:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4851:7: return_function: returning to 'nbd_internal_py_aio_zero' from 'get_handle'
libnbd-1.24.0/python/methods.c:4852:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4853:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4853:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4853:49: return_function: returning to 'nbd_internal_py_aio_zero' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4854:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4855:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4855:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4856:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4856:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4857:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4882:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_aio_zero'
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);
#   63|->     PyGILState_Release (py_save);
#   64|       free (data);
#   65|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def394]
libnbd-1.24.0/python/methods.c:63:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion_user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4990:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4990:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4991:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5029:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_aio_block_status_64'
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);
#   63|->     PyGILState_Release (py_save);
#   64|       free (data);
#   65|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def395]
libnbd-1.24.0/python/methods.c:63:5: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2059:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2073:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2073:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:2074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2075:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2075:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2075:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2077:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2077:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:2078:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2097:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_opt_set_meta_context'
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);
#   63|->     PyGILState_Release (py_save);
#   64|       free (data);
#   65|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def396]
libnbd-1.24.0/python/methods.c:63:5: warning[-Wanalyzer-malloc-leak]: leak of 'debug.user_data'
libnbd-1.24.0/python/methods.c:466:1: enter_function: entry to 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:477:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:480:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:480:7: call_function: calling 'get_handle' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:480:7: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'get_handle'
libnbd-1.24.0/python/methods.c:481:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:482:39: branch_false: ...to here
libnbd-1.24.0/python/methods.c:482:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:482:39: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:483:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:484:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:484:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:485:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:505:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_set_debug_callback'
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);
#   63|->     PyGILState_Release (py_save);
#   64|       free (data);
#   65|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def397]
libnbd-1.24.0/python/methods.c:63:5: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:3362:1: enter_function: entry to 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3379:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3382:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3382:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3382:7: return_function: returning to 'nbd_internal_py_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:3383:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3384:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3387:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3387:41: return_function: returning to 'nbd_internal_py_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3388:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3389:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3389:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3390:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3410:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_block_status'
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);
#   63|->     PyGILState_Release (py_save);
#   64|       free (data);
#   65|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def398]
libnbd-1.24.0/python/methods.c:63:5: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3415:1: enter_function: entry to 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3432:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3435:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3435:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3435:7: return_function: returning to 'nbd_internal_py_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:3436:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3437:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3440:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3440:45: return_function: returning to 'nbd_internal_py_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3441:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3442:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3442:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3443:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3463:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_block_status_64'
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);
#   63|->     PyGILState_Release (py_save);
#   64|       free (data);
#   65|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def399]
libnbd-1.24.0/python/methods.c:63:5: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:1898:1: enter_function: entry to 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1909:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1911:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1911:7: return_function: returning to 'nbd_internal_py_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:1912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1913:37: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1913:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1913:37: return_function: returning to 'nbd_internal_py_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1915:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1915:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:1916:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:1935:3: call_function: inlined call to 'free_user_data' from 'nbd_internal_py_opt_list'
#   61|       Py_XDECREF (data->fn);
#   62|       Py_XDECREF (data->view);
#   63|->     PyGILState_Release (py_save);
#   64|       free (data);
#   65|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
libnbd-1.24.0/python/methods.c:484:8: warning[-Wanalyzer-malloc-leak]: leak of 'debug.user_data'
libnbd-1.24.0/python/methods.c:466:1: enter_function: entry to 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:477:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:480:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:480:7: call_function: calling 'get_handle' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:480:7: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'get_handle'
libnbd-1.24.0/python/methods.c:481:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:482:39: branch_false: ...to here
libnbd-1.24.0/python/methods.c:482:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:482:39: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:483:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:484:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:484:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:484:8: danger: 'debug.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/99/codeFlows/0/threadFlows/0/locations/14)
#  482|     debug.user_data = debug_user_data = alloc_user_data ();
#  483|     if (debug_user_data == NULL) goto out;
#  484|->   if (!PyCallable_Check (py_debug_fn)) {
#  485|       PyErr_SetString (PyExc_TypeError,
#  486|                        "callback parameter debug is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def401]
libnbd-1.24.0/python/methods.c:485:5: warning[-Wanalyzer-malloc-leak]: leak of 'debug.user_data'
libnbd-1.24.0/python/methods.c:466:1: enter_function: entry to 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:477:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:480:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:480:7: call_function: calling 'get_handle' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:480:7: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'get_handle'
libnbd-1.24.0/python/methods.c:481:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:482:39: branch_false: ...to here
libnbd-1.24.0/python/methods.c:482:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:482:39: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:483:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:484:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:484:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:485:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:485:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:485:5: danger: 'debug.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/100/codeFlows/0/threadFlows/0/locations/14)
#  483|     if (debug_user_data == NULL) goto out;
#  484|     if (!PyCallable_Check (py_debug_fn)) {
#  485|->     PyErr_SetString (PyExc_TypeError,
#  486|                        "callback parameter debug is not callable");
#  487|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def402]
libnbd-1.24.0/python/methods.c:493:3: warning[-Wanalyzer-malloc-leak]: leak of 'debug.user_data'
libnbd-1.24.0/python/methods.c:466:1: enter_function: entry to 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:477:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:480:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:480:7: call_function: calling 'get_handle' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:480:7: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'get_handle'
libnbd-1.24.0/python/methods.c:481:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:482:39: branch_false: ...to here
libnbd-1.24.0/python/methods.c:482:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:482:39: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:483:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:484:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:484:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:490:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:490:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:491:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:493:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:493:3: danger: 'debug.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/101/codeFlows/0/threadFlows/0/locations/14)
#  491|     debug_user_data->fn = py_debug_fn;
#  492|   
#  493|->   Py_BEGIN_ALLOW_THREADS;
#  494|     ret = nbd_set_debug_callback (h, debug);
#  495|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
libnbd-1.24.0/python/methods.c:494:9: warning[-Wanalyzer-malloc-leak]: leak of 'debug.user_data'
libnbd-1.24.0/python/methods.c:466:1: enter_function: entry to 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:477:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:480:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:480:7: call_function: calling 'get_handle' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:480:7: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'get_handle'
libnbd-1.24.0/python/methods.c:481:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:482:39: branch_false: ...to here
libnbd-1.24.0/python/methods.c:482:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:482:39: return_function: returning to 'nbd_internal_py_set_debug_callback' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:483:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:484:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:484:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:490:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:490:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_set_debug_callback'
libnbd-1.24.0/python/methods.c:491:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:494:9: throw: if 'nbd_set_debug_callback' throws an exception...
libnbd-1.24.0/python/methods.c:494:9: danger: 'debug.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/102/codeFlows/0/threadFlows/0/locations/14)
#  492|   
#  493|     Py_BEGIN_ALLOW_THREADS;
#  494|->   ret = nbd_set_debug_callback (h, debug);
#  495|     Py_END_ALLOW_THREADS;
#  496|     debug_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
libnbd-1.24.0/python/methods.c:668:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_handle_name(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:654:1: enter_function: entry to 'nbd_internal_py_get_handle_name'
libnbd-1.24.0/python/methods.c:661:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:663:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:663:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_handle_name'
libnbd-1.24.0/python/methods.c:663:7: return_function: returning to 'nbd_internal_py_get_handle_name' from 'get_handle'
libnbd-1.24.0/python/methods.c:664:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:666:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:667:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:668:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:668:3: danger: 'nbd_get_handle_name(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/103/codeFlows/0/threadFlows/0/locations/12)
#  666|     Py_BEGIN_ALLOW_THREADS;
#  667|     ret = nbd_get_handle_name (h);
#  668|->   Py_END_ALLOW_THREADS;
#  669|     if (ret == NULL) {
#  670|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def405]
libnbd-1.24.0/python/methods.c:673:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_handle_name(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:654:1: enter_function: entry to 'nbd_internal_py_get_handle_name'
libnbd-1.24.0/python/methods.c:661:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:663:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:663:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_handle_name'
libnbd-1.24.0/python/methods.c:663:7: return_function: returning to 'nbd_internal_py_get_handle_name' from 'get_handle'
libnbd-1.24.0/python/methods.c:664:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:666:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:667:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:669:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:673:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:673:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:673:12: danger: 'nbd_get_handle_name(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/104/codeFlows/0/threadFlows/0/locations/12)
#  671|       goto out;
#  672|     }
#  673|->   py_ret = PyUnicode_FromString (ret);
#  674|     free (ret);
#  675|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def406]
libnbd-1.24.0/python/methods.c:796:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_export_name(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:782:1: enter_function: entry to 'nbd_internal_py_get_export_name'
libnbd-1.24.0/python/methods.c:789:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:791:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:791:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_export_name'
libnbd-1.24.0/python/methods.c:791:7: return_function: returning to 'nbd_internal_py_get_export_name' from 'get_handle'
libnbd-1.24.0/python/methods.c:792:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:794:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:795:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:796:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:796:3: danger: 'nbd_get_export_name(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/105/codeFlows/0/threadFlows/0/locations/12)
#  794|     Py_BEGIN_ALLOW_THREADS;
#  795|     ret = nbd_get_export_name (h);
#  796|->   Py_END_ALLOW_THREADS;
#  797|     if (ret == NULL) {
#  798|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def407]
libnbd-1.24.0/python/methods.c:801:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_export_name(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:782:1: enter_function: entry to 'nbd_internal_py_get_export_name'
libnbd-1.24.0/python/methods.c:789:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:791:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:791:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_export_name'
libnbd-1.24.0/python/methods.c:791:7: return_function: returning to 'nbd_internal_py_get_export_name' from 'get_handle'
libnbd-1.24.0/python/methods.c:792:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:794:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:795:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:797:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:801:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:801:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:801:12: danger: 'nbd_get_export_name(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/106/codeFlows/0/threadFlows/0/locations/12)
#  799|       goto out;
#  800|     }
#  801|->   py_ret = PyUnicode_FromString (ret);
#  802|     free (ret);
#  803|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
libnbd-1.24.0/python/methods.c:934:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_canonical_export_name(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:920:1: enter_function: entry to 'nbd_internal_py_get_canonical_export_name'
libnbd-1.24.0/python/methods.c:927:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:929:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:929:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_canonical_export_name'
libnbd-1.24.0/python/methods.c:929:7: return_function: returning to 'nbd_internal_py_get_canonical_export_name' from 'get_handle'
libnbd-1.24.0/python/methods.c:930:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:932:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:933:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:934:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:934:3: danger: 'nbd_get_canonical_export_name(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/107/codeFlows/0/threadFlows/0/locations/12)
#  932|     Py_BEGIN_ALLOW_THREADS;
#  933|     ret = nbd_get_canonical_export_name (h);
#  934|->   Py_END_ALLOW_THREADS;
#  935|     if (ret == NULL) {
#  936|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
libnbd-1.24.0/python/methods.c:939:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_canonical_export_name(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:920:1: enter_function: entry to 'nbd_internal_py_get_canonical_export_name'
libnbd-1.24.0/python/methods.c:927:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:929:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:929:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_canonical_export_name'
libnbd-1.24.0/python/methods.c:929:7: return_function: returning to 'nbd_internal_py_get_canonical_export_name' from 'get_handle'
libnbd-1.24.0/python/methods.c:930:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:932:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:933:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:935:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:939:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:939:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:939:12: danger: 'nbd_get_canonical_export_name(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/108/codeFlows/0/threadFlows/0/locations/12)
#  937|       goto out;
#  938|     }
#  939|->   py_ret = PyUnicode_FromString (ret);
#  940|     free (ret);
#  941|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
libnbd-1.24.0/python/methods.c:961:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_export_description(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:947:1: enter_function: entry to 'nbd_internal_py_get_export_description'
libnbd-1.24.0/python/methods.c:954:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:956:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:956:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_export_description'
libnbd-1.24.0/python/methods.c:956:7: return_function: returning to 'nbd_internal_py_get_export_description' from 'get_handle'
libnbd-1.24.0/python/methods.c:957:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:959:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:960:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:961:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:961:3: danger: 'nbd_get_export_description(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/109/codeFlows/0/threadFlows/0/locations/12)
#  959|     Py_BEGIN_ALLOW_THREADS;
#  960|     ret = nbd_get_export_description (h);
#  961|->   Py_END_ALLOW_THREADS;
#  962|     if (ret == NULL) {
#  963|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def411]
libnbd-1.24.0/python/methods.c:966:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_export_description(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:947:1: enter_function: entry to 'nbd_internal_py_get_export_description'
libnbd-1.24.0/python/methods.c:954:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:956:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:956:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_export_description'
libnbd-1.24.0/python/methods.c:956:7: return_function: returning to 'nbd_internal_py_get_export_description' from 'get_handle'
libnbd-1.24.0/python/methods.c:957:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:959:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:960:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:962:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:966:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:966:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:966:12: danger: 'nbd_get_export_description(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/110/codeFlows/0/threadFlows/0/locations/12)
#  964|       goto out;
#  965|     }
#  966|->   py_ret = PyUnicode_FromString (ret);
#  967|     free (ret);
#  968|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
libnbd-1.24.0/python/methods.c:1177:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_tls_username(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:1163:1: enter_function: entry to 'nbd_internal_py_get_tls_username'
libnbd-1.24.0/python/methods.c:1170:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1172:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1172:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_tls_username'
libnbd-1.24.0/python/methods.c:1172:7: return_function: returning to 'nbd_internal_py_get_tls_username' from 'get_handle'
libnbd-1.24.0/python/methods.c:1173:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1175:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1176:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:1177:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:1177:3: danger: 'nbd_get_tls_username(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/111/codeFlows/0/threadFlows/0/locations/12)
# 1175|     Py_BEGIN_ALLOW_THREADS;
# 1176|     ret = nbd_get_tls_username (h);
# 1177|->   Py_END_ALLOW_THREADS;
# 1178|     if (ret == NULL) {
# 1179|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def413]
libnbd-1.24.0/python/methods.c:1182:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_tls_username(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:1163:1: enter_function: entry to 'nbd_internal_py_get_tls_username'
libnbd-1.24.0/python/methods.c:1170:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1172:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1172:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_tls_username'
libnbd-1.24.0/python/methods.c:1172:7: return_function: returning to 'nbd_internal_py_get_tls_username' from 'get_handle'
libnbd-1.24.0/python/methods.c:1173:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1175:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1176:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:1178:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1182:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1182:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:1182:12: danger: 'nbd_get_tls_username(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/112/codeFlows/0/threadFlows/0/locations/12)
# 1180|       goto out;
# 1181|     }
# 1182|->   py_ret = PyUnicode_FromString (ret);
# 1183|     free (ret);
# 1184|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def414]
libnbd-1.24.0/python/methods.c:1232:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_tls_hostname(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:1218:1: enter_function: entry to 'nbd_internal_py_get_tls_hostname'
libnbd-1.24.0/python/methods.c:1225:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1227:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1227:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_tls_hostname'
libnbd-1.24.0/python/methods.c:1227:7: return_function: returning to 'nbd_internal_py_get_tls_hostname' from 'get_handle'
libnbd-1.24.0/python/methods.c:1228:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1230:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1231:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:1232:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:1232:3: danger: 'nbd_get_tls_hostname(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/113/codeFlows/0/threadFlows/0/locations/12)
# 1230|     Py_BEGIN_ALLOW_THREADS;
# 1231|     ret = nbd_get_tls_hostname (h);
# 1232|->   Py_END_ALLOW_THREADS;
# 1233|     if (ret == NULL) {
# 1234|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
libnbd-1.24.0/python/methods.c:1237:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_tls_hostname(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:1218:1: enter_function: entry to 'nbd_internal_py_get_tls_hostname'
libnbd-1.24.0/python/methods.c:1225:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1227:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1227:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_tls_hostname'
libnbd-1.24.0/python/methods.c:1227:7: return_function: returning to 'nbd_internal_py_get_tls_hostname' from 'get_handle'
libnbd-1.24.0/python/methods.c:1228:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1230:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1231:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:1233:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1237:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1237:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:1237:12: danger: 'nbd_get_tls_hostname(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/114/codeFlows/0/threadFlows/0/locations/12)
# 1235|       goto out;
# 1236|     }
# 1237|->   py_ret = PyUnicode_FromString (ret);
# 1238|     free (ret);
# 1239|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
libnbd-1.24.0/python/methods.c:1320:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_tls_priority(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:1306:1: enter_function: entry to 'nbd_internal_py_get_tls_priority'
libnbd-1.24.0/python/methods.c:1313:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1315:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1315:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_tls_priority'
libnbd-1.24.0/python/methods.c:1315:7: return_function: returning to 'nbd_internal_py_get_tls_priority' from 'get_handle'
libnbd-1.24.0/python/methods.c:1316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1318:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1319:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:1320:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:1320:3: danger: 'nbd_get_tls_priority(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/115/codeFlows/0/threadFlows/0/locations/12)
# 1318|     Py_BEGIN_ALLOW_THREADS;
# 1319|     ret = nbd_get_tls_priority (h);
# 1320|->   Py_END_ALLOW_THREADS;
# 1321|     if (ret == NULL) {
# 1322|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
libnbd-1.24.0/python/methods.c:1325:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_tls_priority(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:1306:1: enter_function: entry to 'nbd_internal_py_get_tls_priority'
libnbd-1.24.0/python/methods.c:1313:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1315:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1315:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_tls_priority'
libnbd-1.24.0/python/methods.c:1315:7: return_function: returning to 'nbd_internal_py_get_tls_priority' from 'get_handle'
libnbd-1.24.0/python/methods.c:1316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1318:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1319:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:1321:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1325:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1325:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:1325:12: danger: 'nbd_get_tls_priority(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/116/codeFlows/0/threadFlows/0/locations/12)
# 1323|       goto out;
# 1324|     }
# 1325|->   py_ret = PyUnicode_FromString (ret);
# 1326|     free (ret);
# 1327|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
libnbd-1.24.0/python/methods.c:1915:8: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:1898:1: enter_function: entry to 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1909:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1911:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1911:7: return_function: returning to 'nbd_internal_py_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:1912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1913:37: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1913:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1913:37: return_function: returning to 'nbd_internal_py_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1915:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1915:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:1915:8: danger: 'list.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/117/codeFlows/0/threadFlows/0/locations/14)
# 1913|     list.user_data = list_user_data = alloc_user_data ();
# 1914|     if (list_user_data == NULL) goto out;
# 1915|->   if (!PyCallable_Check (py_list_fn)) {
# 1916|       PyErr_SetString (PyExc_TypeError,
# 1917|                        "callback parameter list is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
libnbd-1.24.0/python/methods.c:1916:5: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:1898:1: enter_function: entry to 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1909:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1911:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1911:7: return_function: returning to 'nbd_internal_py_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:1912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1913:37: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1913:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1913:37: return_function: returning to 'nbd_internal_py_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1915:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1915:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:1916:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:1916:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:1916:5: danger: 'list.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/118/codeFlows/0/threadFlows/0/locations/14)
# 1914|     if (list_user_data == NULL) goto out;
# 1915|     if (!PyCallable_Check (py_list_fn)) {
# 1916|->     PyErr_SetString (PyExc_TypeError,
# 1917|                        "callback parameter list is not callable");
# 1918|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
libnbd-1.24.0/python/methods.c:1924:3: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:1898:1: enter_function: entry to 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1909:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1911:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1911:7: return_function: returning to 'nbd_internal_py_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:1912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1913:37: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1913:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1913:37: return_function: returning to 'nbd_internal_py_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1915:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1921:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1921:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1922:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:1924:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:1924:3: danger: 'list.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/119/codeFlows/0/threadFlows/0/locations/14)
# 1922|     list_user_data->fn = py_list_fn;
# 1923|   
# 1924|->   Py_BEGIN_ALLOW_THREADS;
# 1925|     ret = nbd_opt_list (h, list);
# 1926|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
libnbd-1.24.0/python/methods.c:1925:9: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:1898:1: enter_function: entry to 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1909:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1911:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1911:7: return_function: returning to 'nbd_internal_py_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:1912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1913:37: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1913:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1913:37: return_function: returning to 'nbd_internal_py_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1915:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1921:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1921:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_list'
libnbd-1.24.0/python/methods.c:1922:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:1925:9: throw: if 'nbd_opt_list' throws an exception...
libnbd-1.24.0/python/methods.c:1925:9: danger: 'list.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/120/codeFlows/0/threadFlows/0/locations/14)
# 1923|   
# 1924|     Py_BEGIN_ALLOW_THREADS;
# 1925|->   ret = nbd_opt_list (h, list);
# 1926|     Py_END_ALLOW_THREADS;
# 1927|     list_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def422]
libnbd-1.24.0/python/methods.c:1985:8: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:1967:1: enter_function: entry to 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1978:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1981:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1981:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1981:7: return_function: returning to 'nbd_internal_py_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:1982:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1983:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1983:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1983:43: return_function: returning to 'nbd_internal_py_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1984:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1985:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1985:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:1985:8: danger: 'context.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/121/codeFlows/0/threadFlows/0/locations/14)
# 1983|     context.user_data = context_user_data = alloc_user_data ();
# 1984|     if (context_user_data == NULL) goto out;
# 1985|->   if (!PyCallable_Check (py_context_fn)) {
# 1986|       PyErr_SetString (PyExc_TypeError,
# 1987|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def423]
libnbd-1.24.0/python/methods.c:1986:5: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:1967:1: enter_function: entry to 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1978:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1981:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1981:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1981:7: return_function: returning to 'nbd_internal_py_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:1982:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1983:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1983:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1983:43: return_function: returning to 'nbd_internal_py_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1984:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1985:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1985:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:1986:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:1986:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:1986:5: danger: 'context.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/122/codeFlows/0/threadFlows/0/locations/14)
# 1984|     if (context_user_data == NULL) goto out;
# 1985|     if (!PyCallable_Check (py_context_fn)) {
# 1986|->     PyErr_SetString (PyExc_TypeError,
# 1987|                        "callback parameter context is not callable");
# 1988|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def424]
libnbd-1.24.0/python/methods.c:1994:3: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:1967:1: enter_function: entry to 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1978:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1981:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1981:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1981:7: return_function: returning to 'nbd_internal_py_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:1982:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1983:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1983:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1983:43: return_function: returning to 'nbd_internal_py_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1984:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1985:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1985:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1991:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1991:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1992:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:1994:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:1994:3: danger: 'context.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/123/codeFlows/0/threadFlows/0/locations/14)
# 1992|     context_user_data->fn = py_context_fn;
# 1993|   
# 1994|->   Py_BEGIN_ALLOW_THREADS;
# 1995|     ret = nbd_opt_list_meta_context (h, context);
# 1996|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def425]
libnbd-1.24.0/python/methods.c:1995:9: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:1967:1: enter_function: entry to 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1978:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1981:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1981:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1981:7: return_function: returning to 'nbd_internal_py_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:1982:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1983:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1983:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1983:43: return_function: returning to 'nbd_internal_py_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:1984:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1985:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1985:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:1991:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:1991:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:1992:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:1995:9: throw: if 'nbd_opt_list_meta_context' throws an exception...
libnbd-1.24.0/python/methods.c:1995:9: danger: 'context.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/124/codeFlows/0/threadFlows/0/locations/14)
# 1993|   
# 1994|     Py_BEGIN_ALLOW_THREADS;
# 1995|->   ret = nbd_opt_list_meta_context (h, context);
# 1996|     Py_END_ALLOW_THREADS;
# 1997|     context_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def426]
libnbd-1.24.0/python/methods.c:2033:8: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2010:1: enter_function: entry to 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2024:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2027:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2027:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2027:7: return_function: returning to 'nbd_internal_py_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:2028:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2029:13: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2030:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2031:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2031:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2031:43: return_function: returning to 'nbd_internal_py_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2032:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2033:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2033:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:2033:8: danger: 'context.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/125/codeFlows/0/threadFlows/0/locations/16)
# 2031|     context.user_data = context_user_data = alloc_user_data ();
# 2032|     if (context_user_data == NULL) goto out;
# 2033|->   if (!PyCallable_Check (py_context_fn)) {
# 2034|       PyErr_SetString (PyExc_TypeError,
# 2035|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def427]
libnbd-1.24.0/python/methods.c:2034:5: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2010:1: enter_function: entry to 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2024:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2027:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2027:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2027:7: return_function: returning to 'nbd_internal_py_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:2028:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2029:13: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2030:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2031:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2031:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2031:43: return_function: returning to 'nbd_internal_py_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2032:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2033:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2033:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:2034:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2034:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:2034:5: danger: 'context.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/126/codeFlows/0/threadFlows/0/locations/16)
# 2032|     if (context_user_data == NULL) goto out;
# 2033|     if (!PyCallable_Check (py_context_fn)) {
# 2034|->     PyErr_SetString (PyExc_TypeError,
# 2035|                        "callback parameter context is not callable");
# 2036|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def428]
libnbd-1.24.0/python/methods.c:2042:3: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2010:1: enter_function: entry to 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2024:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2027:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2027:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2027:7: return_function: returning to 'nbd_internal_py_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:2028:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2029:13: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2030:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2031:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2031:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2031:43: return_function: returning to 'nbd_internal_py_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2032:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2033:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2033:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2039:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2039:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2040:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2042:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:2042:3: danger: 'context.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/127/codeFlows/0/threadFlows/0/locations/16)
# 2040|     context_user_data->fn = py_context_fn;
# 2041|   
# 2042|->   Py_BEGIN_ALLOW_THREADS;
# 2043|     ret = nbd_opt_list_meta_context_queries (h, queries, context);
# 2044|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def429]
libnbd-1.24.0/python/methods.c:2043:9: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2010:1: enter_function: entry to 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2024:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2027:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2027:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2027:7: return_function: returning to 'nbd_internal_py_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:2028:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2029:13: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2030:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2031:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2031:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2031:43: return_function: returning to 'nbd_internal_py_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2032:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2033:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2033:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2039:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2039:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:2040:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2043:9: throw: if 'nbd_opt_list_meta_context_queries' throws an exception...
libnbd-1.24.0/python/methods.c:2043:9: danger: 'context.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/128/codeFlows/0/threadFlows/0/locations/16)
# 2041|   
# 2042|     Py_BEGIN_ALLOW_THREADS;
# 2043|->   ret = nbd_opt_list_meta_context_queries (h, queries, context);
# 2044|     Py_END_ALLOW_THREADS;
# 2045|     context_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def430]
libnbd-1.24.0/python/methods.c:2077:8: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2059:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2073:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2073:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:2074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2075:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2075:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2075:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2077:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2077:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:2077:8: danger: 'context.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/129/codeFlows/0/threadFlows/0/locations/14)
# 2075|     context.user_data = context_user_data = alloc_user_data ();
# 2076|     if (context_user_data == NULL) goto out;
# 2077|->   if (!PyCallable_Check (py_context_fn)) {
# 2078|       PyErr_SetString (PyExc_TypeError,
# 2079|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
libnbd-1.24.0/python/methods.c:2078:5: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2059:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2073:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2073:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:2074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2075:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2075:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2075:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2077:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2077:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:2078:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2078:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:2078:5: danger: 'context.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/130/codeFlows/0/threadFlows/0/locations/14)
# 2076|     if (context_user_data == NULL) goto out;
# 2077|     if (!PyCallable_Check (py_context_fn)) {
# 2078|->     PyErr_SetString (PyExc_TypeError,
# 2079|                        "callback parameter context is not callable");
# 2080|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def432]
libnbd-1.24.0/python/methods.c:2086:3: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2059:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2073:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2073:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:2074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2075:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2075:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2075:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2077:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2083:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2083:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2084:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2086:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:2086:3: danger: 'context.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/131/codeFlows/0/threadFlows/0/locations/14)
# 2084|     context_user_data->fn = py_context_fn;
# 2085|   
# 2086|->   Py_BEGIN_ALLOW_THREADS;
# 2087|     ret = nbd_opt_set_meta_context (h, context);
# 2088|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def433]
libnbd-1.24.0/python/methods.c:2087:9: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2059:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2073:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2073:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:2074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2075:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2075:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2075:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2077:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2083:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2083:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:2084:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2087:9: throw: if 'nbd_opt_set_meta_context' throws an exception...
libnbd-1.24.0/python/methods.c:2087:9: danger: 'context.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/132/codeFlows/0/threadFlows/0/locations/14)
# 2085|   
# 2086|     Py_BEGIN_ALLOW_THREADS;
# 2087|->   ret = nbd_opt_set_meta_context (h, context);
# 2088|     Py_END_ALLOW_THREADS;
# 2089|     context_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
libnbd-1.24.0/python/methods.c:2125:8: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2102:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2116:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2119:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2119:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2119:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:2120:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2121:13: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2122:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2123:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2123:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2123:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2124:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2125:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2125:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:2125:8: danger: 'context.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/133/codeFlows/0/threadFlows/0/locations/16)
# 2123|     context.user_data = context_user_data = alloc_user_data ();
# 2124|     if (context_user_data == NULL) goto out;
# 2125|->   if (!PyCallable_Check (py_context_fn)) {
# 2126|       PyErr_SetString (PyExc_TypeError,
# 2127|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
libnbd-1.24.0/python/methods.c:2126:5: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2102:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2116:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2119:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2119:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2119:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:2120:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2121:13: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2122:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2123:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2123:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2123:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2124:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2125:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2125:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:2126:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2126:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:2126:5: danger: 'context.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/134/codeFlows/0/threadFlows/0/locations/16)
# 2124|     if (context_user_data == NULL) goto out;
# 2125|     if (!PyCallable_Check (py_context_fn)) {
# 2126|->     PyErr_SetString (PyExc_TypeError,
# 2127|                        "callback parameter context is not callable");
# 2128|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
libnbd-1.24.0/python/methods.c:2134:3: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2102:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2116:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2119:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2119:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2119:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:2120:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2121:13: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2122:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2123:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2123:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2123:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2124:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2125:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2125:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2131:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2131:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2132:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2134:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:2134:3: danger: 'context.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/135/codeFlows/0/threadFlows/0/locations/16)
# 2132|     context_user_data->fn = py_context_fn;
# 2133|   
# 2134|->   Py_BEGIN_ALLOW_THREADS;
# 2135|     ret = nbd_opt_set_meta_context_queries (h, queries, context);
# 2136|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
libnbd-1.24.0/python/methods.c:2135:9: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:2102:1: enter_function: entry to 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2116:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2119:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2119:7: call_function: calling 'get_handle' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2119:7: return_function: returning to 'nbd_internal_py_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:2120:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2121:13: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2122:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2123:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2123:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2123:43: return_function: returning to 'nbd_internal_py_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:2124:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2125:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2125:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2131:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2131:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:2132:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:2135:9: throw: if 'nbd_opt_set_meta_context_queries' throws an exception...
libnbd-1.24.0/python/methods.c:2135:9: danger: 'context.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/136/codeFlows/0/threadFlows/0/locations/16)
# 2133|   
# 2134|     Py_BEGIN_ALLOW_THREADS;
# 2135|->   ret = nbd_opt_set_meta_context_queries (h, queries, context);
# 2136|     Py_END_ALLOW_THREADS;
# 2137|     context_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def438]
libnbd-1.24.0/python/methods.c:2220:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_meta_context(get_handle(py_h), (long unsigned int)i)'
libnbd-1.24.0/python/methods.c:2205:1: enter_function: entry to 'nbd_internal_py_get_meta_context'
libnbd-1.24.0/python/methods.c:2213:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2215:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2215:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_meta_context'
libnbd-1.24.0/python/methods.c:2215:7: return_function: returning to 'nbd_internal_py_get_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:2216:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2218:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2219:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:2220:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:2220:3: danger: 'nbd_get_meta_context(get_handle(py_h), (long unsigned int)i)' leaks here; was allocated at [(13)](sarif:/runs/0/results/137/codeFlows/0/threadFlows/0/locations/12)
# 2218|     Py_BEGIN_ALLOW_THREADS;
# 2219|     ret = nbd_get_meta_context (h, (size_t)i);
# 2220|->   Py_END_ALLOW_THREADS;
# 2221|     if (ret == NULL) {
# 2222|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
libnbd-1.24.0/python/methods.c:2225:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_meta_context(get_handle(py_h), (long unsigned int)i)'
libnbd-1.24.0/python/methods.c:2205:1: enter_function: entry to 'nbd_internal_py_get_meta_context'
libnbd-1.24.0/python/methods.c:2213:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2215:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2215:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_meta_context'
libnbd-1.24.0/python/methods.c:2215:7: return_function: returning to 'nbd_internal_py_get_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:2216:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2218:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2219:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:2221:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2225:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2225:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:2225:12: danger: 'nbd_get_meta_context(get_handle(py_h), (long unsigned int)i)' leaks here; was allocated at [(13)](sarif:/runs/0/results/138/codeFlows/0/threadFlows/0/locations/12)
# 2223|       goto out;
# 2224|     }
# 2225|->   py_ret = PyUnicode_FromString (ret);
# 2226|     free (ret);
# 2227|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
libnbd-1.24.0/python/methods.c:2638:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_socket_activation_name(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:2624:1: enter_function: entry to 'nbd_internal_py_get_socket_activation_name'
libnbd-1.24.0/python/methods.c:2631:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2633:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2633:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_socket_activation_name'
libnbd-1.24.0/python/methods.c:2633:7: return_function: returning to 'nbd_internal_py_get_socket_activation_name' from 'get_handle'
libnbd-1.24.0/python/methods.c:2634:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2636:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2637:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:2638:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:2638:3: danger: 'nbd_get_socket_activation_name(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/139/codeFlows/0/threadFlows/0/locations/12)
# 2636|     Py_BEGIN_ALLOW_THREADS;
# 2637|     ret = nbd_get_socket_activation_name (h);
# 2638|->   Py_END_ALLOW_THREADS;
# 2639|     if (ret == NULL) {
# 2640|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def441]
libnbd-1.24.0/python/methods.c:2643:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_socket_activation_name(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:2624:1: enter_function: entry to 'nbd_internal_py_get_socket_activation_name'
libnbd-1.24.0/python/methods.c:2631:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2633:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2633:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_socket_activation_name'
libnbd-1.24.0/python/methods.c:2633:7: return_function: returning to 'nbd_internal_py_get_socket_activation_name' from 'get_handle'
libnbd-1.24.0/python/methods.c:2634:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2636:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2637:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:2639:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:2643:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:2643:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:2643:12: danger: 'nbd_get_socket_activation_name(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/140/codeFlows/0/threadFlows/0/locations/12)
# 2641|       goto out;
# 2642|     }
# 2643|->   py_ret = PyUnicode_FromString (ret);
# 2644|     free (ret);
# 2645|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
libnbd-1.24.0/python/methods.c:3124:8: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:3096:1: enter_function: entry to 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3113:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3116:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3116:7: call_function: calling 'get_handle' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3116:7: return_function: returning to 'nbd_internal_py_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:3117:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3118:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3120:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3121:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3122:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3122:39: return_function: returning to 'nbd_internal_py_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3123:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3124:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3124:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:3124:8: danger: 'chunk.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/141/codeFlows/0/threadFlows/0/locations/16)
# 3122|     chunk.user_data = chunk_user_data = alloc_user_data ();
# 3123|     if (chunk_user_data == NULL) goto out;
# 3124|->   if (!PyCallable_Check (py_chunk_fn)) {
# 3125|       PyErr_SetString (PyExc_TypeError,
# 3126|                        "callback parameter chunk is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def443]
libnbd-1.24.0/python/methods.c:3125:5: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:3096:1: enter_function: entry to 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3113:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3116:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3116:7: call_function: calling 'get_handle' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3116:7: return_function: returning to 'nbd_internal_py_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:3117:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3118:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3120:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3121:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3122:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3122:39: return_function: returning to 'nbd_internal_py_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3123:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3124:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3124:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3125:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3125:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:3125:5: danger: 'chunk.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/142/codeFlows/0/threadFlows/0/locations/16)
# 3123|     if (chunk_user_data == NULL) goto out;
# 3124|     if (!PyCallable_Check (py_chunk_fn)) {
# 3125|->     PyErr_SetString (PyExc_TypeError,
# 3126|                        "callback parameter chunk is not callable");
# 3127|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
libnbd-1.24.0/python/methods.c:3132:27: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:3096:1: enter_function: entry to 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3113:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3116:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3116:7: call_function: calling 'get_handle' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3116:7: return_function: returning to 'nbd_internal_py_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:3117:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3118:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3120:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3121:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3122:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3122:39: return_function: returning to 'nbd_internal_py_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3123:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3124:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3124:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3130:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3130:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3131:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3132:27: throw: if 'nbd_internal_py_get_aio_view' throws an exception...
libnbd-1.24.0/python/methods.c:3132:27: danger: 'chunk.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/143/codeFlows/0/threadFlows/0/locations/16)
# 3130|     Py_INCREF (py_chunk_fn);
# 3131|     chunk_user_data->fn = py_chunk_fn;
# 3132|->   chunk_user_data->view = nbd_internal_py_get_aio_view (buf, PyBUF_WRITE);
# 3133|     if (!chunk_user_data->view) goto out;
# 3134|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def445]
libnbd-1.24.0/python/methods.c:3135:3: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:3096:1: enter_function: entry to 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3113:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3116:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3116:7: call_function: calling 'get_handle' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3116:7: return_function: returning to 'nbd_internal_py_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:3117:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3118:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3120:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3121:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3122:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3122:39: return_function: returning to 'nbd_internal_py_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3123:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3124:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3124:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3130:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3133:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3135:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3135:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:3135:3: danger: 'chunk.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/144/codeFlows/0/threadFlows/0/locations/16)
# 3133|     if (!chunk_user_data->view) goto out;
# 3134|   
# 3135|->   Py_BEGIN_ALLOW_THREADS;
# 3136|     ret = nbd_pread_structured (h, PyByteArray_AS_STRING (buf), count,
# 3137|                                 offset_u64, chunk, flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
libnbd-1.24.0/python/methods.c:3136:9: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:3096:1: enter_function: entry to 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3113:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3116:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3116:7: call_function: calling 'get_handle' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3116:7: return_function: returning to 'nbd_internal_py_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:3117:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3118:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3120:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3121:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3122:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3122:39: return_function: returning to 'nbd_internal_py_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3123:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3124:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3124:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3130:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3133:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3135:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3136:34: call_function: calling 'PyByteArray_AS_STRING' from 'nbd_internal_py_pread_structured'
libnbd-1.24.0/python/methods.c:3136:34: return_function: returning to 'nbd_internal_py_pread_structured' from 'PyByteArray_AS_STRING'
libnbd-1.24.0/python/methods.c:3136:9: throw: if 'nbd_pread_structured' throws an exception...
libnbd-1.24.0/python/methods.c:3136:9: danger: 'chunk.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/145/codeFlows/0/threadFlows/0/locations/16)
# 3134|   
# 3135|     Py_BEGIN_ALLOW_THREADS;
# 3136|->   ret = nbd_pread_structured (h, PyByteArray_AS_STRING (buf), count,
# 3137|                                 offset_u64, chunk, flags_u32);
# 3138|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
libnbd-1.24.0/python/methods.c:3389:8: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:3362:1: enter_function: entry to 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3379:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3382:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3382:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3382:7: return_function: returning to 'nbd_internal_py_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:3383:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3384:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3387:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3387:41: return_function: returning to 'nbd_internal_py_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3388:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3389:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3389:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:3389:8: danger: 'extent.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/146/codeFlows/0/threadFlows/0/locations/14)
# 3387|     extent.user_data = extent_user_data = alloc_user_data ();
# 3388|     if (extent_user_data == NULL) goto out;
# 3389|->   if (!PyCallable_Check (py_extent_fn)) {
# 3390|       PyErr_SetString (PyExc_TypeError,
# 3391|                        "callback parameter extent is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
libnbd-1.24.0/python/methods.c:3390:5: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:3362:1: enter_function: entry to 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3379:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3382:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3382:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3382:7: return_function: returning to 'nbd_internal_py_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:3383:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3384:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3387:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3387:41: return_function: returning to 'nbd_internal_py_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3388:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3389:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3389:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3390:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3390:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:3390:5: danger: 'extent.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/147/codeFlows/0/threadFlows/0/locations/14)
# 3388|     if (extent_user_data == NULL) goto out;
# 3389|     if (!PyCallable_Check (py_extent_fn)) {
# 3390|->     PyErr_SetString (PyExc_TypeError,
# 3391|                        "callback parameter extent is not callable");
# 3392|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def449]
libnbd-1.24.0/python/methods.c:3398:3: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:3362:1: enter_function: entry to 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3379:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3382:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3382:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3382:7: return_function: returning to 'nbd_internal_py_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:3383:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3384:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3387:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3387:41: return_function: returning to 'nbd_internal_py_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3388:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3389:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3395:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3395:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3396:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3398:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:3398:3: danger: 'extent.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/148/codeFlows/0/threadFlows/0/locations/14)
# 3396|     extent_user_data->fn = py_extent_fn;
# 3397|   
# 3398|->   Py_BEGIN_ALLOW_THREADS;
# 3399|     ret = nbd_block_status (h, count_u64, offset_u64, extent, flags_u32);
# 3400|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
libnbd-1.24.0/python/methods.c:3399:9: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:3362:1: enter_function: entry to 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3379:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3382:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3382:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3382:7: return_function: returning to 'nbd_internal_py_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:3383:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3384:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3387:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3387:41: return_function: returning to 'nbd_internal_py_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3388:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3389:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3395:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3395:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_block_status'
libnbd-1.24.0/python/methods.c:3396:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3399:9: throw: if 'nbd_block_status' throws an exception...
libnbd-1.24.0/python/methods.c:3399:9: danger: 'extent.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/149/codeFlows/0/threadFlows/0/locations/14)
# 3397|   
# 3398|     Py_BEGIN_ALLOW_THREADS;
# 3399|->   ret = nbd_block_status (h, count_u64, offset_u64, extent, flags_u32);
# 3400|     Py_END_ALLOW_THREADS;
# 3401|     extent_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def451]
libnbd-1.24.0/python/methods.c:3442:8: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3415:1: enter_function: entry to 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3432:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3435:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3435:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3435:7: return_function: returning to 'nbd_internal_py_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:3436:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3437:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3440:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3440:45: return_function: returning to 'nbd_internal_py_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3441:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3442:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3442:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:3442:8: danger: 'extent64.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/150/codeFlows/0/threadFlows/0/locations/14)
# 3440|     extent64.user_data = extent64_user_data = alloc_user_data ();
# 3441|     if (extent64_user_data == NULL) goto out;
# 3442|->   if (!PyCallable_Check (py_extent64_fn)) {
# 3443|       PyErr_SetString (PyExc_TypeError,
# 3444|                        "callback parameter extent64 is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
libnbd-1.24.0/python/methods.c:3443:5: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3415:1: enter_function: entry to 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3432:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3435:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3435:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3435:7: return_function: returning to 'nbd_internal_py_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:3436:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3437:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3440:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3440:45: return_function: returning to 'nbd_internal_py_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3441:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3442:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3442:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3443:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3443:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:3443:5: danger: 'extent64.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/151/codeFlows/0/threadFlows/0/locations/14)
# 3441|     if (extent64_user_data == NULL) goto out;
# 3442|     if (!PyCallable_Check (py_extent64_fn)) {
# 3443|->     PyErr_SetString (PyExc_TypeError,
# 3444|                        "callback parameter extent64 is not callable");
# 3445|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
libnbd-1.24.0/python/methods.c:3451:3: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3415:1: enter_function: entry to 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3432:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3435:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3435:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3435:7: return_function: returning to 'nbd_internal_py_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:3436:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3437:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3440:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3440:45: return_function: returning to 'nbd_internal_py_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3441:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3442:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3442:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3448:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3448:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3449:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3451:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:3451:3: danger: 'extent64.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/152/codeFlows/0/threadFlows/0/locations/14)
# 3449|     extent64_user_data->fn = py_extent64_fn;
# 3450|   
# 3451|->   Py_BEGIN_ALLOW_THREADS;
# 3452|     ret = nbd_block_status_64 (h, count_u64, offset_u64, extent64, flags_u32);
# 3453|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
libnbd-1.24.0/python/methods.c:3452:9: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3415:1: enter_function: entry to 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3432:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3435:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3435:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3435:7: return_function: returning to 'nbd_internal_py_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:3436:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3437:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3440:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3440:45: return_function: returning to 'nbd_internal_py_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3441:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3442:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3442:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3448:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3448:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_block_status_64'
libnbd-1.24.0/python/methods.c:3449:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3452:9: throw: if 'nbd_block_status_64' throws an exception...
libnbd-1.24.0/python/methods.c:3452:9: danger: 'extent64.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/153/codeFlows/0/threadFlows/0/locations/14)
# 3450|   
# 3451|     Py_BEGIN_ALLOW_THREADS;
# 3452|->   ret = nbd_block_status_64 (h, count_u64, offset_u64, extent64, flags_u32);
# 3453|     Py_END_ALLOW_THREADS;
# 3454|     extent64_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
libnbd-1.24.0/python/methods.c:3500:8: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3468:1: enter_function: entry to 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3487:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3491:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3491:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3491:7: return_function: returning to 'nbd_internal_py_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:3492:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3493:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3497:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3498:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3498:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3498:45: return_function: returning to 'nbd_internal_py_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3499:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3500:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3500:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:3500:8: danger: 'extent64.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/154/codeFlows/0/threadFlows/0/locations/16)
# 3498|     extent64.user_data = extent64_user_data = alloc_user_data ();
# 3499|     if (extent64_user_data == NULL) goto out;
# 3500|->   if (!PyCallable_Check (py_extent64_fn)) {
# 3501|       PyErr_SetString (PyExc_TypeError,
# 3502|                        "callback parameter extent64 is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
libnbd-1.24.0/python/methods.c:3501:5: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3468:1: enter_function: entry to 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3487:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3491:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3491:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3491:7: return_function: returning to 'nbd_internal_py_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:3492:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3493:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3497:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3498:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3498:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3498:45: return_function: returning to 'nbd_internal_py_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3499:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3500:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3500:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3501:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3501:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:3501:5: danger: 'extent64.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/155/codeFlows/0/threadFlows/0/locations/16)
# 3499|     if (extent64_user_data == NULL) goto out;
# 3500|     if (!PyCallable_Check (py_extent64_fn)) {
# 3501|->     PyErr_SetString (PyExc_TypeError,
# 3502|                        "callback parameter extent64 is not callable");
# 3503|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
libnbd-1.24.0/python/methods.c:3509:3: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3468:1: enter_function: entry to 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3487:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3491:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3491:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3491:7: return_function: returning to 'nbd_internal_py_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:3492:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3493:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3497:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3498:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3498:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3498:45: return_function: returning to 'nbd_internal_py_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3499:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3500:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3500:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3506:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3506:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3507:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3509:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:3509:3: danger: 'extent64.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/156/codeFlows/0/threadFlows/0/locations/16)
# 3507|     extent64_user_data->fn = py_extent64_fn;
# 3508|   
# 3509|->   Py_BEGIN_ALLOW_THREADS;
# 3510|     ret = nbd_block_status_filter (h, count_u64, offset_u64, contexts,
# 3511|                                    extent64, flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
libnbd-1.24.0/python/methods.c:3510:9: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:3468:1: enter_function: entry to 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3487:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3491:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3491:7: call_function: calling 'get_handle' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3491:7: return_function: returning to 'nbd_internal_py_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:3492:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3493:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3497:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3498:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3498:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3498:45: return_function: returning to 'nbd_internal_py_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3499:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3500:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3500:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3506:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3506:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_block_status_filter'
libnbd-1.24.0/python/methods.c:3507:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3510:9: throw: if 'nbd_block_status_filter' throws an exception...
libnbd-1.24.0/python/methods.c:3510:9: danger: 'extent64.user_data' leaks here; was allocated at [(17)](sarif:/runs/0/results/157/codeFlows/0/threadFlows/0/locations/16)
# 3508|   
# 3509|     Py_BEGIN_ALLOW_THREADS;
# 3510|->   ret = nbd_block_status_filter (h, count_u64, offset_u64, contexts,
# 3511|                                    extent64, flags_u32);
# 3512|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
libnbd-1.24.0/python/methods.c:3855:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3836:1: enter_function: entry to 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3847:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3850:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3850:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3850:7: return_function: returning to 'nbd_internal_py_aio_opt_go' from 'get_handle'
libnbd-1.24.0/python/methods.c:3851:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3852:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3852:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3852:49: return_function: returning to 'nbd_internal_py_aio_opt_go' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3853:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3854:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3854:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3855:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3855:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:3855:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/158/codeFlows/0/threadFlows/0/locations/14)
# 3853|     if (completion_user_data == NULL) goto out;
# 3854|     if (py_completion_fn != Py_None) {
# 3855|->     if (!PyCallable_Check (py_completion_fn)) {
# 3856|         PyErr_SetString (PyExc_TypeError,
# 3857|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
libnbd-1.24.0/python/methods.c:3856:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3836:1: enter_function: entry to 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3847:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3850:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3850:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3850:7: return_function: returning to 'nbd_internal_py_aio_opt_go' from 'get_handle'
libnbd-1.24.0/python/methods.c:3851:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3852:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3852:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3852:49: return_function: returning to 'nbd_internal_py_aio_opt_go' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3853:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3854:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3854:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3855:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3855:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3856:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3856:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:3856:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/159/codeFlows/0/threadFlows/0/locations/14)
# 3854|     if (py_completion_fn != Py_None) {
# 3855|       if (!PyCallable_Check (py_completion_fn)) {
# 3856|->       PyErr_SetString (PyExc_TypeError,
# 3857|                          "callback parameter completion is not callable");
# 3858|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def461]
libnbd-1.24.0/python/methods.c:3867:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3836:1: enter_function: entry to 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3847:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3850:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3850:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3850:7: return_function: returning to 'nbd_internal_py_aio_opt_go' from 'get_handle'
libnbd-1.24.0/python/methods.c:3851:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3852:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3852:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3852:49: return_function: returning to 'nbd_internal_py_aio_opt_go' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3853:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3854:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3854:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3865:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3867:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:3867:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/160/codeFlows/0/threadFlows/0/locations/14)
# 3865|       completion.callback = NULL; /* we're not going to call it */
# 3866|   
# 3867|->   Py_BEGIN_ALLOW_THREADS;
# 3868|     ret = nbd_aio_opt_go (h, completion);
# 3869|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
libnbd-1.24.0/python/methods.c:3868:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3836:1: enter_function: entry to 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3847:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3850:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3850:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3850:7: return_function: returning to 'nbd_internal_py_aio_opt_go' from 'get_handle'
libnbd-1.24.0/python/methods.c:3851:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3852:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3852:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_go'
libnbd-1.24.0/python/methods.c:3852:49: return_function: returning to 'nbd_internal_py_aio_opt_go' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3853:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3854:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3854:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3865:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3868:9: throw: if 'nbd_aio_opt_go' throws an exception...
libnbd-1.24.0/python/methods.c:3868:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/161/codeFlows/0/threadFlows/0/locations/14)
# 3866|   
# 3867|     Py_BEGIN_ALLOW_THREADS;
# 3868|->   ret = nbd_aio_opt_go (h, completion);
# 3869|     Py_END_ALLOW_THREADS;
# 3870|     completion_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
libnbd-1.24.0/python/methods.c:3930:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3911:1: enter_function: entry to 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3922:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3925:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3925:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3925:7: return_function: returning to 'nbd_internal_py_aio_opt_starttls' from 'get_handle'
libnbd-1.24.0/python/methods.c:3926:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3927:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3927:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3927:49: return_function: returning to 'nbd_internal_py_aio_opt_starttls' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3928:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3929:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3929:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3930:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3930:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:3930:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/162/codeFlows/0/threadFlows/0/locations/14)
# 3928|     if (completion_user_data == NULL) goto out;
# 3929|     if (py_completion_fn != Py_None) {
# 3930|->     if (!PyCallable_Check (py_completion_fn)) {
# 3931|         PyErr_SetString (PyExc_TypeError,
# 3932|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
libnbd-1.24.0/python/methods.c:3931:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3911:1: enter_function: entry to 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3922:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3925:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3925:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3925:7: return_function: returning to 'nbd_internal_py_aio_opt_starttls' from 'get_handle'
libnbd-1.24.0/python/methods.c:3926:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3927:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3927:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3927:49: return_function: returning to 'nbd_internal_py_aio_opt_starttls' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3928:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3929:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3929:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3930:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3930:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3931:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3931:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:3931:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/163/codeFlows/0/threadFlows/0/locations/14)
# 3929|     if (py_completion_fn != Py_None) {
# 3930|       if (!PyCallable_Check (py_completion_fn)) {
# 3931|->       PyErr_SetString (PyExc_TypeError,
# 3932|                          "callback parameter completion is not callable");
# 3933|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
libnbd-1.24.0/python/methods.c:3942:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3911:1: enter_function: entry to 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3922:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3925:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3925:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3925:7: return_function: returning to 'nbd_internal_py_aio_opt_starttls' from 'get_handle'
libnbd-1.24.0/python/methods.c:3926:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3927:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3927:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3927:49: return_function: returning to 'nbd_internal_py_aio_opt_starttls' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3928:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3929:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3929:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3940:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3942:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:3942:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/164/codeFlows/0/threadFlows/0/locations/14)
# 3940|       completion.callback = NULL; /* we're not going to call it */
# 3941|   
# 3942|->   Py_BEGIN_ALLOW_THREADS;
# 3943|     ret = nbd_aio_opt_starttls (h, completion);
# 3944|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
libnbd-1.24.0/python/methods.c:3943:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3911:1: enter_function: entry to 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3922:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3925:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3925:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3925:7: return_function: returning to 'nbd_internal_py_aio_opt_starttls' from 'get_handle'
libnbd-1.24.0/python/methods.c:3926:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3927:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3927:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_starttls'
libnbd-1.24.0/python/methods.c:3927:49: return_function: returning to 'nbd_internal_py_aio_opt_starttls' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3928:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3929:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3929:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3940:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3943:9: throw: if 'nbd_aio_opt_starttls' throws an exception...
libnbd-1.24.0/python/methods.c:3943:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/165/codeFlows/0/threadFlows/0/locations/14)
# 3941|   
# 3942|     Py_BEGIN_ALLOW_THREADS;
# 3943|->   ret = nbd_aio_opt_starttls (h, completion);
# 3944|     Py_END_ALLOW_THREADS;
# 3945|     completion_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
libnbd-1.24.0/python/methods.c:3978:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3959:1: enter_function: entry to 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3970:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3973:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3973:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3973:7: return_function: returning to 'nbd_internal_py_aio_opt_extended_headers' from 'get_handle'
libnbd-1.24.0/python/methods.c:3974:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3975:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3975:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3975:49: return_function: returning to 'nbd_internal_py_aio_opt_extended_headers' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3976:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3977:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3977:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3978:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3978:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:3978:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/166/codeFlows/0/threadFlows/0/locations/14)
# 3976|     if (completion_user_data == NULL) goto out;
# 3977|     if (py_completion_fn != Py_None) {
# 3978|->     if (!PyCallable_Check (py_completion_fn)) {
# 3979|         PyErr_SetString (PyExc_TypeError,
# 3980|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
libnbd-1.24.0/python/methods.c:3979:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3959:1: enter_function: entry to 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3970:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3973:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3973:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3973:7: return_function: returning to 'nbd_internal_py_aio_opt_extended_headers' from 'get_handle'
libnbd-1.24.0/python/methods.c:3974:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3975:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3975:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3975:49: return_function: returning to 'nbd_internal_py_aio_opt_extended_headers' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3976:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3977:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3977:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3978:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3978:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:3979:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:3979:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:3979:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/167/codeFlows/0/threadFlows/0/locations/14)
# 3977|     if (py_completion_fn != Py_None) {
# 3978|       if (!PyCallable_Check (py_completion_fn)) {
# 3979|->       PyErr_SetString (PyExc_TypeError,
# 3980|                          "callback parameter completion is not callable");
# 3981|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
libnbd-1.24.0/python/methods.c:3990:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3959:1: enter_function: entry to 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3970:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3973:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3973:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3973:7: return_function: returning to 'nbd_internal_py_aio_opt_extended_headers' from 'get_handle'
libnbd-1.24.0/python/methods.c:3974:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3975:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3975:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3975:49: return_function: returning to 'nbd_internal_py_aio_opt_extended_headers' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3976:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3977:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3977:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3988:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3990:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:3990:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/168/codeFlows/0/threadFlows/0/locations/14)
# 3988|       completion.callback = NULL; /* we're not going to call it */
# 3989|   
# 3990|->   Py_BEGIN_ALLOW_THREADS;
# 3991|     ret = nbd_aio_opt_extended_headers (h, completion);
# 3992|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def470]
libnbd-1.24.0/python/methods.c:3991:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:3959:1: enter_function: entry to 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3970:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3973:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3973:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3973:7: return_function: returning to 'nbd_internal_py_aio_opt_extended_headers' from 'get_handle'
libnbd-1.24.0/python/methods.c:3974:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3975:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3975:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_extended_headers'
libnbd-1.24.0/python/methods.c:3975:49: return_function: returning to 'nbd_internal_py_aio_opt_extended_headers' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:3976:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3977:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3977:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:3988:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:3991:9: throw: if 'nbd_aio_opt_extended_headers' throws an exception...
libnbd-1.24.0/python/methods.c:3991:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/169/codeFlows/0/threadFlows/0/locations/14)
# 3989|   
# 3990|     Py_BEGIN_ALLOW_THREADS;
# 3991|->   ret = nbd_aio_opt_extended_headers (h, completion);
# 3992|     Py_END_ALLOW_THREADS;
# 3993|     completion_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def471]
libnbd-1.24.0/python/methods.c:4026:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4007:1: enter_function: entry to 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4018:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4021:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4021:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4021:7: return_function: returning to 'nbd_internal_py_aio_opt_structured_reply' from 'get_handle'
libnbd-1.24.0/python/methods.c:4022:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4023:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4023:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4023:49: return_function: returning to 'nbd_internal_py_aio_opt_structured_reply' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4024:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4025:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4025:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4026:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4026:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4026:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/170/codeFlows/0/threadFlows/0/locations/14)
# 4024|     if (completion_user_data == NULL) goto out;
# 4025|     if (py_completion_fn != Py_None) {
# 4026|->     if (!PyCallable_Check (py_completion_fn)) {
# 4027|         PyErr_SetString (PyExc_TypeError,
# 4028|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def472]
libnbd-1.24.0/python/methods.c:4027:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4007:1: enter_function: entry to 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4018:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4021:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4021:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4021:7: return_function: returning to 'nbd_internal_py_aio_opt_structured_reply' from 'get_handle'
libnbd-1.24.0/python/methods.c:4022:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4023:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4023:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4023:49: return_function: returning to 'nbd_internal_py_aio_opt_structured_reply' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4024:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4025:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4025:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4026:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4026:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4027:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4027:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4027:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/171/codeFlows/0/threadFlows/0/locations/14)
# 4025|     if (py_completion_fn != Py_None) {
# 4026|       if (!PyCallable_Check (py_completion_fn)) {
# 4027|->       PyErr_SetString (PyExc_TypeError,
# 4028|                          "callback parameter completion is not callable");
# 4029|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def473]
libnbd-1.24.0/python/methods.c:4038:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4007:1: enter_function: entry to 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4018:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4021:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4021:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4021:7: return_function: returning to 'nbd_internal_py_aio_opt_structured_reply' from 'get_handle'
libnbd-1.24.0/python/methods.c:4022:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4023:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4023:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4023:49: return_function: returning to 'nbd_internal_py_aio_opt_structured_reply' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4024:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4025:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4025:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4036:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4038:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4038:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/172/codeFlows/0/threadFlows/0/locations/14)
# 4036|       completion.callback = NULL; /* we're not going to call it */
# 4037|   
# 4038|->   Py_BEGIN_ALLOW_THREADS;
# 4039|     ret = nbd_aio_opt_structured_reply (h, completion);
# 4040|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def474]
libnbd-1.24.0/python/methods.c:4039:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4007:1: enter_function: entry to 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4018:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4021:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4021:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4021:7: return_function: returning to 'nbd_internal_py_aio_opt_structured_reply' from 'get_handle'
libnbd-1.24.0/python/methods.c:4022:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4023:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4023:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_structured_reply'
libnbd-1.24.0/python/methods.c:4023:49: return_function: returning to 'nbd_internal_py_aio_opt_structured_reply' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4024:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4025:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4025:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4036:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4039:9: throw: if 'nbd_aio_opt_structured_reply' throws an exception...
libnbd-1.24.0/python/methods.c:4039:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/173/codeFlows/0/threadFlows/0/locations/14)
# 4037|   
# 4038|     Py_BEGIN_ALLOW_THREADS;
# 4039|->   ret = nbd_aio_opt_structured_reply (h, completion);
# 4040|     Py_END_ALLOW_THREADS;
# 4041|     completion_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def475]
libnbd-1.24.0/python/methods.c:4078:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4078:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4078:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4078:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/174/codeFlows/0/threadFlows/0/locations/14)
# 4076|     if (completion_user_data == NULL) goto out;
# 4077|     if (py_completion_fn != Py_None) {
# 4078|->     if (!PyCallable_Check (py_completion_fn)) {
# 4079|         PyErr_SetString (PyExc_TypeError,
# 4080|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def476]
libnbd-1.24.0/python/methods.c:4079:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4078:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4078:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4079:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4079:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4079:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/175/codeFlows/0/threadFlows/0/locations/14)
# 4077|     if (py_completion_fn != Py_None) {
# 4078|       if (!PyCallable_Check (py_completion_fn)) {
# 4079|->       PyErr_SetString (PyExc_TypeError,
# 4080|                          "callback parameter completion is not callable");
# 4081|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def477]
libnbd-1.24.0/python/methods.c:4091:8: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4088:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4089:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4089:37: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4090:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4091:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4091:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4091:8: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/176/codeFlows/0/threadFlows/0/locations/14)
# 4089|     list.user_data = list_user_data = alloc_user_data ();
# 4090|     if (list_user_data == NULL) goto out;
# 4091|->   if (!PyCallable_Check (py_list_fn)) {
# 4092|       PyErr_SetString (PyExc_TypeError,
# 4093|                        "callback parameter list is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def478]
libnbd-1.24.0/python/methods.c:4091:8: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4088:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4089:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4089:37: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4090:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4091:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4091:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4091:8: danger: 'list.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/177/codeFlows/0/threadFlows/0/locations/23)
# 4089|     list.user_data = list_user_data = alloc_user_data ();
# 4090|     if (list_user_data == NULL) goto out;
# 4091|->   if (!PyCallable_Check (py_list_fn)) {
# 4092|       PyErr_SetString (PyExc_TypeError,
# 4093|                        "callback parameter list is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def479]
libnbd-1.24.0/python/methods.c:4092:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4088:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4089:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4089:37: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4090:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4091:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4091:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4092:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4092:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4092:5: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/178/codeFlows/0/threadFlows/0/locations/14)
# 4090|     if (list_user_data == NULL) goto out;
# 4091|     if (!PyCallable_Check (py_list_fn)) {
# 4092|->     PyErr_SetString (PyExc_TypeError,
# 4093|                        "callback parameter list is not callable");
# 4094|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def480]
libnbd-1.24.0/python/methods.c:4092:5: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4088:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4089:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4089:37: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4090:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4091:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4091:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4092:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4092:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4092:5: danger: 'list.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/179/codeFlows/0/threadFlows/0/locations/23)
# 4090|     if (list_user_data == NULL) goto out;
# 4091|     if (!PyCallable_Check (py_list_fn)) {
# 4092|->     PyErr_SetString (PyExc_TypeError,
# 4093|                        "callback parameter list is not callable");
# 4094|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def481]
libnbd-1.24.0/python/methods.c:4100:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4088:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4089:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4089:37: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4090:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4091:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4091:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4097:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4097:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4098:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4100:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4100:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/180/codeFlows/0/threadFlows/0/locations/14)
# 4098|     list_user_data->fn = py_list_fn;
# 4099|   
# 4100|->   Py_BEGIN_ALLOW_THREADS;
# 4101|     ret = nbd_aio_opt_list (h, list, completion);
# 4102|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def482]
libnbd-1.24.0/python/methods.c:4100:3: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4088:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4089:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4089:37: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4090:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4091:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4091:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4097:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4097:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4098:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4100:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4100:3: danger: 'list.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/181/codeFlows/0/threadFlows/0/locations/23)
# 4098|     list_user_data->fn = py_list_fn;
# 4099|   
# 4100|->   Py_BEGIN_ALLOW_THREADS;
# 4101|     ret = nbd_aio_opt_list (h, list, completion);
# 4102|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def483]
libnbd-1.24.0/python/methods.c:4101:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4088:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4089:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4089:37: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4090:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4091:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4091:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4097:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4097:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4098:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4101:9: throw: if 'nbd_aio_opt_list' throws an exception...
libnbd-1.24.0/python/methods.c:4101:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/182/codeFlows/0/threadFlows/0/locations/14)
# 4099|   
# 4100|     Py_BEGIN_ALLOW_THREADS;
# 4101|->   ret = nbd_aio_opt_list (h, list, completion);
# 4102|     Py_END_ALLOW_THREADS;
# 4103|     list_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def484]
libnbd-1.24.0/python/methods.c:4101:9: warning[-Wanalyzer-malloc-leak]: leak of 'list.user_data'
libnbd-1.24.0/python/methods.c:4055:1: enter_function: entry to 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4070:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4073:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4073:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4073:7: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'get_handle'
libnbd-1.24.0/python/methods.c:4074:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4075:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4075:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4075:49: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4076:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4077:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4077:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4088:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4089:37: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4089:37: return_function: returning to 'nbd_internal_py_aio_opt_list' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4090:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4091:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4091:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4097:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4097:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list'
libnbd-1.24.0/python/methods.c:4098:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4101:9: throw: if 'nbd_aio_opt_list' throws an exception...
libnbd-1.24.0/python/methods.c:4101:9: danger: 'list.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/183/codeFlows/0/threadFlows/0/locations/23)
# 4099|   
# 4100|     Py_BEGIN_ALLOW_THREADS;
# 4101|->   ret = nbd_aio_opt_list (h, list, completion);
# 4102|     Py_END_ALLOW_THREADS;
# 4103|     list_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def485]
libnbd-1.24.0/python/methods.c:4138:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4119:1: enter_function: entry to 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4130:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4133:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4133:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4133:7: return_function: returning to 'nbd_internal_py_aio_opt_info' from 'get_handle'
libnbd-1.24.0/python/methods.c:4134:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4135:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4135:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4135:49: return_function: returning to 'nbd_internal_py_aio_opt_info' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4136:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4137:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4137:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4138:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4138:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4138:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/184/codeFlows/0/threadFlows/0/locations/14)
# 4136|     if (completion_user_data == NULL) goto out;
# 4137|     if (py_completion_fn != Py_None) {
# 4138|->     if (!PyCallable_Check (py_completion_fn)) {
# 4139|         PyErr_SetString (PyExc_TypeError,
# 4140|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def486]
libnbd-1.24.0/python/methods.c:4139:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4119:1: enter_function: entry to 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4130:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4133:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4133:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4133:7: return_function: returning to 'nbd_internal_py_aio_opt_info' from 'get_handle'
libnbd-1.24.0/python/methods.c:4134:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4135:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4135:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4135:49: return_function: returning to 'nbd_internal_py_aio_opt_info' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4136:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4137:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4137:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4138:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4138:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4139:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4139:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4139:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/185/codeFlows/0/threadFlows/0/locations/14)
# 4137|     if (py_completion_fn != Py_None) {
# 4138|       if (!PyCallable_Check (py_completion_fn)) {
# 4139|->       PyErr_SetString (PyExc_TypeError,
# 4140|                          "callback parameter completion is not callable");
# 4141|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def487]
libnbd-1.24.0/python/methods.c:4150:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4119:1: enter_function: entry to 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4130:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4133:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4133:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4133:7: return_function: returning to 'nbd_internal_py_aio_opt_info' from 'get_handle'
libnbd-1.24.0/python/methods.c:4134:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4135:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4135:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4135:49: return_function: returning to 'nbd_internal_py_aio_opt_info' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4136:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4137:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4137:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4148:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4150:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4150:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/186/codeFlows/0/threadFlows/0/locations/14)
# 4148|       completion.callback = NULL; /* we're not going to call it */
# 4149|   
# 4150|->   Py_BEGIN_ALLOW_THREADS;
# 4151|     ret = nbd_aio_opt_info (h, completion);
# 4152|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def488]
libnbd-1.24.0/python/methods.c:4151:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4119:1: enter_function: entry to 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4130:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4133:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4133:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4133:7: return_function: returning to 'nbd_internal_py_aio_opt_info' from 'get_handle'
libnbd-1.24.0/python/methods.c:4134:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4135:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4135:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_info'
libnbd-1.24.0/python/methods.c:4135:49: return_function: returning to 'nbd_internal_py_aio_opt_info' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4136:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4137:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4137:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4148:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4151:9: throw: if 'nbd_aio_opt_info' throws an exception...
libnbd-1.24.0/python/methods.c:4151:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/187/codeFlows/0/threadFlows/0/locations/14)
# 4149|   
# 4150|     Py_BEGIN_ALLOW_THREADS;
# 4151|->   ret = nbd_aio_opt_info (h, completion);
# 4152|     Py_END_ALLOW_THREADS;
# 4153|     completion_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def489]
libnbd-1.24.0/python/methods.c:4190:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4190:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4190:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4190:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/188/codeFlows/0/threadFlows/0/locations/14)
# 4188|     if (completion_user_data == NULL) goto out;
# 4189|     if (py_completion_fn != Py_None) {
# 4190|->     if (!PyCallable_Check (py_completion_fn)) {
# 4191|         PyErr_SetString (PyExc_TypeError,
# 4192|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def490]
libnbd-1.24.0/python/methods.c:4191:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4190:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4190:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4191:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4191:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4191:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/189/codeFlows/0/threadFlows/0/locations/14)
# 4189|     if (py_completion_fn != Py_None) {
# 4190|       if (!PyCallable_Check (py_completion_fn)) {
# 4191|->       PyErr_SetString (PyExc_TypeError,
# 4192|                          "callback parameter completion is not callable");
# 4193|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def491]
libnbd-1.24.0/python/methods.c:4203:8: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4200:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4201:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4201:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4202:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4203:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4203:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4203:8: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/190/codeFlows/0/threadFlows/0/locations/14)
# 4201|     context.user_data = context_user_data = alloc_user_data ();
# 4202|     if (context_user_data == NULL) goto out;
# 4203|->   if (!PyCallable_Check (py_context_fn)) {
# 4204|       PyErr_SetString (PyExc_TypeError,
# 4205|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def492]
libnbd-1.24.0/python/methods.c:4203:8: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4200:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4201:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4201:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4202:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4203:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4203:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4203:8: danger: 'context.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/191/codeFlows/0/threadFlows/0/locations/23)
# 4201|     context.user_data = context_user_data = alloc_user_data ();
# 4202|     if (context_user_data == NULL) goto out;
# 4203|->   if (!PyCallable_Check (py_context_fn)) {
# 4204|       PyErr_SetString (PyExc_TypeError,
# 4205|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def493]
libnbd-1.24.0/python/methods.c:4204:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4200:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4201:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4201:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4202:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4203:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4203:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4204:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4204:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4204:5: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/192/codeFlows/0/threadFlows/0/locations/14)
# 4202|     if (context_user_data == NULL) goto out;
# 4203|     if (!PyCallable_Check (py_context_fn)) {
# 4204|->     PyErr_SetString (PyExc_TypeError,
# 4205|                        "callback parameter context is not callable");
# 4206|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def494]
libnbd-1.24.0/python/methods.c:4204:5: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4200:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4201:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4201:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4202:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4203:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4203:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4204:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4204:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4204:5: danger: 'context.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/193/codeFlows/0/threadFlows/0/locations/23)
# 4202|     if (context_user_data == NULL) goto out;
# 4203|     if (!PyCallable_Check (py_context_fn)) {
# 4204|->     PyErr_SetString (PyExc_TypeError,
# 4205|                        "callback parameter context is not callable");
# 4206|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def495]
libnbd-1.24.0/python/methods.c:4212:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4200:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4201:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4201:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4202:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4203:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4203:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4209:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4209:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4210:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4212:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4212:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/194/codeFlows/0/threadFlows/0/locations/14)
# 4210|     context_user_data->fn = py_context_fn;
# 4211|   
# 4212|->   Py_BEGIN_ALLOW_THREADS;
# 4213|     ret = nbd_aio_opt_list_meta_context (h, context, completion);
# 4214|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def496]
libnbd-1.24.0/python/methods.c:4212:3: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4200:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4201:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4201:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4202:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4203:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4203:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4209:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4209:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4210:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4212:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4212:3: danger: 'context.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/195/codeFlows/0/threadFlows/0/locations/23)
# 4210|     context_user_data->fn = py_context_fn;
# 4211|   
# 4212|->   Py_BEGIN_ALLOW_THREADS;
# 4213|     ret = nbd_aio_opt_list_meta_context (h, context, completion);
# 4214|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def497]
libnbd-1.24.0/python/methods.c:4213:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4200:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4201:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4201:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4202:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4203:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4203:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4209:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4209:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4210:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4213:9: throw: if 'nbd_aio_opt_list_meta_context' throws an exception...
libnbd-1.24.0/python/methods.c:4213:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/196/codeFlows/0/threadFlows/0/locations/14)
# 4211|   
# 4212|     Py_BEGIN_ALLOW_THREADS;
# 4213|->   ret = nbd_aio_opt_list_meta_context (h, context, completion);
# 4214|     Py_END_ALLOW_THREADS;
# 4215|     context_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def498]
libnbd-1.24.0/python/methods.c:4213:9: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4167:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4182:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4185:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4185:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4185:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4186:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4187:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4187:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4187:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4188:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4189:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4189:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4200:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4201:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4201:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4202:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4203:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4203:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4209:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4209:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list_meta_context'
libnbd-1.24.0/python/methods.c:4210:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4213:9: throw: if 'nbd_aio_opt_list_meta_context' throws an exception...
libnbd-1.24.0/python/methods.c:4213:9: danger: 'context.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/197/codeFlows/0/threadFlows/0/locations/23)
# 4211|   
# 4212|     Py_BEGIN_ALLOW_THREADS;
# 4213|->   ret = nbd_aio_opt_list_meta_context (h, context, completion);
# 4214|     Py_END_ALLOW_THREADS;
# 4215|     context_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def499]
libnbd-1.24.0/python/methods.c:4257:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4257:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4257:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4257:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/198/codeFlows/0/threadFlows/0/locations/14)
# 4255|     if (completion_user_data == NULL) goto out;
# 4256|     if (py_completion_fn != Py_None) {
# 4257|->     if (!PyCallable_Check (py_completion_fn)) {
# 4258|         PyErr_SetString (PyExc_TypeError,
# 4259|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def500]
libnbd-1.24.0/python/methods.c:4258:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4257:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4257:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4258:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4258:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4258:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/199/codeFlows/0/threadFlows/0/locations/14)
# 4256|     if (py_completion_fn != Py_None) {
# 4257|       if (!PyCallable_Check (py_completion_fn)) {
# 4258|->       PyErr_SetString (PyExc_TypeError,
# 4259|                          "callback parameter completion is not callable");
# 4260|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def501]
libnbd-1.24.0/python/methods.c:4268:13: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4267:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4268:13: throw: if 'nbd_internal_py_get_string_list' throws an exception...
libnbd-1.24.0/python/methods.c:4268:13: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/200/codeFlows/0/threadFlows/0/locations/14)
# 4266|     else
# 4267|       completion.callback = NULL; /* we're not going to call it */
# 4268|->   queries = nbd_internal_py_get_string_list (py_queries);
# 4269|     if (!queries) goto out;
# 4270|     context.user_data = context_user_data = alloc_user_data ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def502]
libnbd-1.24.0/python/methods.c:4272:8: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4267:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4269:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4270:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4270:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4270:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4271:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4272:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4272:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4272:8: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/201/codeFlows/0/threadFlows/0/locations/14)
# 4270|     context.user_data = context_user_data = alloc_user_data ();
# 4271|     if (context_user_data == NULL) goto out;
# 4272|->   if (!PyCallable_Check (py_context_fn)) {
# 4273|       PyErr_SetString (PyExc_TypeError,
# 4274|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def503]
libnbd-1.24.0/python/methods.c:4272:8: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4267:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4269:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4270:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4270:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4270:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4271:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4272:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4272:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4272:8: danger: 'context.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/202/codeFlows/0/threadFlows/0/locations/25)
# 4270|     context.user_data = context_user_data = alloc_user_data ();
# 4271|     if (context_user_data == NULL) goto out;
# 4272|->   if (!PyCallable_Check (py_context_fn)) {
# 4273|       PyErr_SetString (PyExc_TypeError,
# 4274|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def504]
libnbd-1.24.0/python/methods.c:4273:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4267:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4269:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4270:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4270:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4270:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4271:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4272:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4272:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4273:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4273:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4273:5: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/203/codeFlows/0/threadFlows/0/locations/14)
# 4271|     if (context_user_data == NULL) goto out;
# 4272|     if (!PyCallable_Check (py_context_fn)) {
# 4273|->     PyErr_SetString (PyExc_TypeError,
# 4274|                        "callback parameter context is not callable");
# 4275|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def505]
libnbd-1.24.0/python/methods.c:4273:5: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4267:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4269:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4270:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4270:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4270:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4271:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4272:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4272:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4273:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4273:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4273:5: danger: 'context.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/204/codeFlows/0/threadFlows/0/locations/25)
# 4271|     if (context_user_data == NULL) goto out;
# 4272|     if (!PyCallable_Check (py_context_fn)) {
# 4273|->     PyErr_SetString (PyExc_TypeError,
# 4274|                        "callback parameter context is not callable");
# 4275|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def506]
libnbd-1.24.0/python/methods.c:4281:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4267:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4269:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4270:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4270:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4270:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4271:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4272:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4272:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4278:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4278:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4279:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4281:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4281:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/205/codeFlows/0/threadFlows/0/locations/14)
# 4279|     context_user_data->fn = py_context_fn;
# 4280|   
# 4281|->   Py_BEGIN_ALLOW_THREADS;
# 4282|     ret = nbd_aio_opt_list_meta_context_queries (h, queries, context,
# 4283|                                                  completion);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def507]
libnbd-1.24.0/python/methods.c:4281:3: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4267:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4269:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4270:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4270:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4270:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4271:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4272:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4272:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4278:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4278:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4279:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4281:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4281:3: danger: 'context.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/206/codeFlows/0/threadFlows/0/locations/25)
# 4279|     context_user_data->fn = py_context_fn;
# 4280|   
# 4281|->   Py_BEGIN_ALLOW_THREADS;
# 4282|     ret = nbd_aio_opt_list_meta_context_queries (h, queries, context,
# 4283|                                                  completion);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def508]
libnbd-1.24.0/python/methods.c:4282:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4267:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4269:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4270:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4270:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4270:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4271:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4272:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4272:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4278:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4278:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4279:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4282:9: throw: if 'nbd_aio_opt_list_meta_context_queries' throws an exception...
libnbd-1.24.0/python/methods.c:4282:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/207/codeFlows/0/threadFlows/0/locations/14)
# 4280|   
# 4281|     Py_BEGIN_ALLOW_THREADS;
# 4282|->   ret = nbd_aio_opt_list_meta_context_queries (h, queries, context,
# 4283|                                                  completion);
# 4284|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def509]
libnbd-1.24.0/python/methods.c:4282:9: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4267:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4269:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4270:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4270:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4270:43: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4271:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4272:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4272:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4278:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4278:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4279:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4282:9: throw: if 'nbd_aio_opt_list_meta_context_queries' throws an exception...
libnbd-1.24.0/python/methods.c:4282:9: danger: 'context.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/208/codeFlows/0/threadFlows/0/locations/25)
# 4280|   
# 4281|     Py_BEGIN_ALLOW_THREADS;
# 4282|->   ret = nbd_aio_opt_list_meta_context_queries (h, queries, context,
# 4283|                                                  completion);
# 4284|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def510]
libnbd-1.24.0/python/methods.c:4294:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion_user_data'
libnbd-1.24.0/python/methods.c:4230:1: enter_function: entry to 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4248:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4252:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4252:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4252:7: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4253:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4254:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4254:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_list_meta_context_queries'
libnbd-1.24.0/python/methods.c:4254:49: return_function: returning to 'nbd_internal_py_aio_opt_list_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4255:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4256:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4256:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4257:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4257:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4258:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4294:3: throw: if 'nbd_internal_py_free_string_list' throws an exception...
libnbd-1.24.0/python/methods.c:4294:3: danger: 'completion_user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/209/codeFlows/0/threadFlows/0/locations/14)
# 4292|   
# 4293|    out:
# 4294|->   nbd_internal_py_free_string_list (queries);
# 4295|     free_user_data (context_user_data);
# 4296|     free_user_data (completion_user_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def511]
libnbd-1.24.0/python/methods.c:4324:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4324:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4324:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4324:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/210/codeFlows/0/threadFlows/0/locations/14)
# 4322|     if (completion_user_data == NULL) goto out;
# 4323|     if (py_completion_fn != Py_None) {
# 4324|->     if (!PyCallable_Check (py_completion_fn)) {
# 4325|         PyErr_SetString (PyExc_TypeError,
# 4326|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def512]
libnbd-1.24.0/python/methods.c:4325:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4324:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4324:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4325:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4325:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4325:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/211/codeFlows/0/threadFlows/0/locations/14)
# 4323|     if (py_completion_fn != Py_None) {
# 4324|       if (!PyCallable_Check (py_completion_fn)) {
# 4325|->       PyErr_SetString (PyExc_TypeError,
# 4326|                          "callback parameter completion is not callable");
# 4327|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def513]
libnbd-1.24.0/python/methods.c:4337:8: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4334:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4335:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4335:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4336:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4337:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4337:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4337:8: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/213/codeFlows/0/threadFlows/0/locations/14)
# 4335|     context.user_data = context_user_data = alloc_user_data ();
# 4336|     if (context_user_data == NULL) goto out;
# 4337|->   if (!PyCallable_Check (py_context_fn)) {
# 4338|       PyErr_SetString (PyExc_TypeError,
# 4339|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def514]
libnbd-1.24.0/python/methods.c:4337:8: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4334:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4335:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4335:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4336:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4337:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4337:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4337:8: danger: 'context.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/212/codeFlows/0/threadFlows/0/locations/23)
# 4335|     context.user_data = context_user_data = alloc_user_data ();
# 4336|     if (context_user_data == NULL) goto out;
# 4337|->   if (!PyCallable_Check (py_context_fn)) {
# 4338|       PyErr_SetString (PyExc_TypeError,
# 4339|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def515]
libnbd-1.24.0/python/methods.c:4338:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4334:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4335:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4335:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4336:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4337:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4337:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4338:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4338:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4338:5: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/214/codeFlows/0/threadFlows/0/locations/14)
# 4336|     if (context_user_data == NULL) goto out;
# 4337|     if (!PyCallable_Check (py_context_fn)) {
# 4338|->     PyErr_SetString (PyExc_TypeError,
# 4339|                        "callback parameter context is not callable");
# 4340|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
libnbd-1.24.0/python/methods.c:4338:5: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4334:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4335:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4335:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4336:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4337:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4337:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4338:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4338:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4338:5: danger: 'context.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/215/codeFlows/0/threadFlows/0/locations/23)
# 4336|     if (context_user_data == NULL) goto out;
# 4337|     if (!PyCallable_Check (py_context_fn)) {
# 4338|->     PyErr_SetString (PyExc_TypeError,
# 4339|                        "callback parameter context is not callable");
# 4340|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def517]
libnbd-1.24.0/python/methods.c:4346:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4334:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4335:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4335:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4336:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4337:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4337:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4343:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4343:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4344:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4346:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4346:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/216/codeFlows/0/threadFlows/0/locations/14)
# 4344|     context_user_data->fn = py_context_fn;
# 4345|   
# 4346|->   Py_BEGIN_ALLOW_THREADS;
# 4347|     ret = nbd_aio_opt_set_meta_context (h, context, completion);
# 4348|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def518]
libnbd-1.24.0/python/methods.c:4346:3: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4334:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4335:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4335:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4336:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4337:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4337:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4343:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4343:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4344:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4346:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4346:3: danger: 'context.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/217/codeFlows/0/threadFlows/0/locations/23)
# 4344|     context_user_data->fn = py_context_fn;
# 4345|   
# 4346|->   Py_BEGIN_ALLOW_THREADS;
# 4347|     ret = nbd_aio_opt_set_meta_context (h, context, completion);
# 4348|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def519]
libnbd-1.24.0/python/methods.c:4347:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4334:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4335:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4335:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4336:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4337:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4337:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4343:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4343:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4344:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4347:9: throw: if 'nbd_aio_opt_set_meta_context' throws an exception...
libnbd-1.24.0/python/methods.c:4347:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/218/codeFlows/0/threadFlows/0/locations/14)
# 4345|   
# 4346|     Py_BEGIN_ALLOW_THREADS;
# 4347|->   ret = nbd_aio_opt_set_meta_context (h, context, completion);
# 4348|     Py_END_ALLOW_THREADS;
# 4349|     context_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def520]
libnbd-1.24.0/python/methods.c:4347:9: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4301:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4316:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4319:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4319:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4319:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'get_handle'
libnbd-1.24.0/python/methods.c:4320:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4321:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4321:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4321:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4322:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4323:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4323:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4334:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4335:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4335:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4336:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4337:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4337:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4343:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4343:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_set_meta_context'
libnbd-1.24.0/python/methods.c:4344:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4347:9: throw: if 'nbd_aio_opt_set_meta_context' throws an exception...
libnbd-1.24.0/python/methods.c:4347:9: danger: 'context.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/219/codeFlows/0/threadFlows/0/locations/23)
# 4345|   
# 4346|     Py_BEGIN_ALLOW_THREADS;
# 4347|->   ret = nbd_aio_opt_set_meta_context (h, context, completion);
# 4348|     Py_END_ALLOW_THREADS;
# 4349|     context_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def521]
libnbd-1.24.0/python/methods.c:4391:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4391:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4391:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4391:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/220/codeFlows/0/threadFlows/0/locations/14)
# 4389|     if (completion_user_data == NULL) goto out;
# 4390|     if (py_completion_fn != Py_None) {
# 4391|->     if (!PyCallable_Check (py_completion_fn)) {
# 4392|         PyErr_SetString (PyExc_TypeError,
# 4393|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def522]
libnbd-1.24.0/python/methods.c:4392:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4391:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4391:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4392:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4392:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4392:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/221/codeFlows/0/threadFlows/0/locations/14)
# 4390|     if (py_completion_fn != Py_None) {
# 4391|       if (!PyCallable_Check (py_completion_fn)) {
# 4392|->       PyErr_SetString (PyExc_TypeError,
# 4393|                          "callback parameter completion is not callable");
# 4394|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def523]
libnbd-1.24.0/python/methods.c:4402:13: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4401:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4402:13: throw: if 'nbd_internal_py_get_string_list' throws an exception...
libnbd-1.24.0/python/methods.c:4402:13: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/222/codeFlows/0/threadFlows/0/locations/14)
# 4400|     else
# 4401|       completion.callback = NULL; /* we're not going to call it */
# 4402|->   queries = nbd_internal_py_get_string_list (py_queries);
# 4403|     if (!queries) goto out;
# 4404|     context.user_data = context_user_data = alloc_user_data ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def524]
libnbd-1.24.0/python/methods.c:4406:8: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4401:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4403:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4404:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4404:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4404:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4405:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4406:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4406:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4406:8: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/223/codeFlows/0/threadFlows/0/locations/14)
# 4404|     context.user_data = context_user_data = alloc_user_data ();
# 4405|     if (context_user_data == NULL) goto out;
# 4406|->   if (!PyCallable_Check (py_context_fn)) {
# 4407|       PyErr_SetString (PyExc_TypeError,
# 4408|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def525]
libnbd-1.24.0/python/methods.c:4406:8: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4401:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4403:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4404:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4404:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4404:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4405:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4406:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4406:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4406:8: danger: 'context.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/224/codeFlows/0/threadFlows/0/locations/25)
# 4404|     context.user_data = context_user_data = alloc_user_data ();
# 4405|     if (context_user_data == NULL) goto out;
# 4406|->   if (!PyCallable_Check (py_context_fn)) {
# 4407|       PyErr_SetString (PyExc_TypeError,
# 4408|                        "callback parameter context is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def526]
libnbd-1.24.0/python/methods.c:4407:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4401:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4403:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4404:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4404:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4404:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4405:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4406:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4406:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4407:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4407:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4407:5: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/225/codeFlows/0/threadFlows/0/locations/14)
# 4405|     if (context_user_data == NULL) goto out;
# 4406|     if (!PyCallable_Check (py_context_fn)) {
# 4407|->     PyErr_SetString (PyExc_TypeError,
# 4408|                        "callback parameter context is not callable");
# 4409|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def527]
libnbd-1.24.0/python/methods.c:4407:5: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4401:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4403:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4404:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4404:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4404:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4405:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4406:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4406:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4407:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4407:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4407:5: danger: 'context.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/226/codeFlows/0/threadFlows/0/locations/25)
# 4405|     if (context_user_data == NULL) goto out;
# 4406|     if (!PyCallable_Check (py_context_fn)) {
# 4407|->     PyErr_SetString (PyExc_TypeError,
# 4408|                        "callback parameter context is not callable");
# 4409|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
libnbd-1.24.0/python/methods.c:4415:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4401:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4403:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4404:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4404:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4404:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4405:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4406:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4406:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4412:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4412:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4413:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4415:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4415:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/227/codeFlows/0/threadFlows/0/locations/14)
# 4413|     context_user_data->fn = py_context_fn;
# 4414|   
# 4415|->   Py_BEGIN_ALLOW_THREADS;
# 4416|     ret = nbd_aio_opt_set_meta_context_queries (h, queries, context,
# 4417|                                                 completion);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def529]
libnbd-1.24.0/python/methods.c:4415:3: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4401:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4403:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4404:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4404:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4404:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4405:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4406:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4406:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4412:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4412:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4413:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4415:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4415:3: danger: 'context.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/228/codeFlows/0/threadFlows/0/locations/25)
# 4413|     context_user_data->fn = py_context_fn;
# 4414|   
# 4415|->   Py_BEGIN_ALLOW_THREADS;
# 4416|     ret = nbd_aio_opt_set_meta_context_queries (h, queries, context,
# 4417|                                                 completion);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
libnbd-1.24.0/python/methods.c:4416:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4401:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4403:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4404:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4404:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4404:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4405:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4406:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4406:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4412:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4412:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4413:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4416:9: throw: if 'nbd_aio_opt_set_meta_context_queries' throws an exception...
libnbd-1.24.0/python/methods.c:4416:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/229/codeFlows/0/threadFlows/0/locations/14)
# 4414|   
# 4415|     Py_BEGIN_ALLOW_THREADS;
# 4416|->   ret = nbd_aio_opt_set_meta_context_queries (h, queries, context,
# 4417|                                                 completion);
# 4418|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def531]
libnbd-1.24.0/python/methods.c:4416:9: warning[-Wanalyzer-malloc-leak]: leak of 'context.user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4401:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4403:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4404:43: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4404:43: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4404:43: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4405:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4406:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4406:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4412:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4412:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4413:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4416:9: throw: if 'nbd_aio_opt_set_meta_context_queries' throws an exception...
libnbd-1.24.0/python/methods.c:4416:9: danger: 'context.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/230/codeFlows/0/threadFlows/0/locations/25)
# 4414|   
# 4415|     Py_BEGIN_ALLOW_THREADS;
# 4416|->   ret = nbd_aio_opt_set_meta_context_queries (h, queries, context,
# 4417|                                                 completion);
# 4418|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def532]
libnbd-1.24.0/python/methods.c:4428:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion_user_data'
libnbd-1.24.0/python/methods.c:4364:1: enter_function: entry to 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4382:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4386:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4386:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4386:7: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'get_handle'
libnbd-1.24.0/python/methods.c:4387:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4388:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4388:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_opt_set_meta_context_queries'
libnbd-1.24.0/python/methods.c:4388:49: return_function: returning to 'nbd_internal_py_aio_opt_set_meta_context_queries' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4389:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4390:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4390:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4391:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4391:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4392:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4428:3: throw: if 'nbd_internal_py_free_string_list' throws an exception...
libnbd-1.24.0/python/methods.c:4428:3: danger: 'completion_user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/231/codeFlows/0/threadFlows/0/locations/14)
# 4426|   
# 4427|    out:
# 4428|->   nbd_internal_py_free_string_list (queries);
# 4429|     free_user_data (context_user_data);
# 4430|     free_user_data (completion_user_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def533]
libnbd-1.24.0/python/methods.c:4461:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4435:1: enter_function: entry to 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4453:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4456:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4456:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4456:7: return_function: returning to 'nbd_internal_py_aio_pread' from 'get_handle'
libnbd-1.24.0/python/methods.c:4457:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4458:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4458:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4458:49: return_function: returning to 'nbd_internal_py_aio_pread' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4459:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4460:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4460:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4461:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4461:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4461:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/232/codeFlows/0/threadFlows/0/locations/14)
# 4459|     if (completion_user_data == NULL) goto out;
# 4460|     if (py_completion_fn != Py_None) {
# 4461|->     if (!PyCallable_Check (py_completion_fn)) {
# 4462|         PyErr_SetString (PyExc_TypeError,
# 4463|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def534]
libnbd-1.24.0/python/methods.c:4462:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4435:1: enter_function: entry to 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4453:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4456:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4456:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4456:7: return_function: returning to 'nbd_internal_py_aio_pread' from 'get_handle'
libnbd-1.24.0/python/methods.c:4457:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4458:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4458:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4458:49: return_function: returning to 'nbd_internal_py_aio_pread' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4459:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4460:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4460:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4461:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4461:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4462:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4462:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4462:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/233/codeFlows/0/threadFlows/0/locations/14)
# 4460|     if (py_completion_fn != Py_None) {
# 4461|       if (!PyCallable_Check (py_completion_fn)) {
# 4462|->       PyErr_SetString (PyExc_TypeError,
# 4463|                          "callback parameter completion is not callable");
# 4464|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def535]
libnbd-1.24.0/python/methods.c:4473:14: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4435:1: enter_function: entry to 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4453:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4456:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4456:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4456:7: return_function: returning to 'nbd_internal_py_aio_pread' from 'get_handle'
libnbd-1.24.0/python/methods.c:4457:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4458:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4458:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4458:49: return_function: returning to 'nbd_internal_py_aio_pread' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4459:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4460:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4460:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4471:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4473:14: throw: if 'nbd_internal_py_get_aio_view' throws an exception...
libnbd-1.24.0/python/methods.c:4473:14: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/234/codeFlows/0/threadFlows/0/locations/14)
# 4471|       completion.callback = NULL; /* we're not going to call it */
# 4472|     flags_u32 = flags;
# 4473|->   buf_view = nbd_internal_py_get_aio_view (buf, PyBUF_WRITE);
# 4474|     if (!buf_view) goto out;
# 4475|     py_buf = PyMemoryView_GET_BUFFER (buf_view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def536]
libnbd-1.24.0/python/methods.c:4479:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4435:1: enter_function: entry to 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4453:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4456:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4456:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4456:7: return_function: returning to 'nbd_internal_py_aio_pread' from 'get_handle'
libnbd-1.24.0/python/methods.c:4457:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4458:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4458:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4458:49: return_function: returning to 'nbd_internal_py_aio_pread' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4459:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4460:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4460:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4471:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4474:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4476:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4479:7: throw: if 'nbd_internal_py_init_aio_buffer' throws an exception...
libnbd-1.24.0/python/methods.c:4479:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/235/codeFlows/0/threadFlows/0/locations/14)
# 4477|     offset_u64 = offset;
# 4478|   
# 4479|->   if (nbd_internal_py_init_aio_buffer (buf) < 0) goto out;
# 4480|     Py_BEGIN_ALLOW_THREADS;
# 4481|     ret = nbd_aio_pread (h, py_buf->buf, py_buf->len, offset_u64, completion,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def537]
libnbd-1.24.0/python/methods.c:4480:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4435:1: enter_function: entry to 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4453:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4456:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4456:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4456:7: return_function: returning to 'nbd_internal_py_aio_pread' from 'get_handle'
libnbd-1.24.0/python/methods.c:4457:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4458:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4458:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4458:49: return_function: returning to 'nbd_internal_py_aio_pread' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4459:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4460:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4460:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4471:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4474:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4476:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4479:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4480:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4480:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4480:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/236/codeFlows/0/threadFlows/0/locations/14)
# 4478|   
# 4479|     if (nbd_internal_py_init_aio_buffer (buf) < 0) goto out;
# 4480|->   Py_BEGIN_ALLOW_THREADS;
# 4481|     ret = nbd_aio_pread (h, py_buf->buf, py_buf->len, offset_u64, completion,
# 4482|                          flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def538]
libnbd-1.24.0/python/methods.c:4481:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4435:1: enter_function: entry to 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4453:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4456:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4456:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4456:7: return_function: returning to 'nbd_internal_py_aio_pread' from 'get_handle'
libnbd-1.24.0/python/methods.c:4457:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4458:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4458:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread'
libnbd-1.24.0/python/methods.c:4458:49: return_function: returning to 'nbd_internal_py_aio_pread' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4459:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4460:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4460:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4471:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4474:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4476:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4479:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4480:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4481:9: throw: if 'nbd_aio_pread' throws an exception...
libnbd-1.24.0/python/methods.c:4481:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/237/codeFlows/0/threadFlows/0/locations/14)
# 4479|     if (nbd_internal_py_init_aio_buffer (buf) < 0) goto out;
# 4480|     Py_BEGIN_ALLOW_THREADS;
# 4481|->   ret = nbd_aio_pread (h, py_buf->buf, py_buf->len, offset_u64, completion,
# 4482|                          flags_u32);
# 4483|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def539]
libnbd-1.24.0/python/methods.c:4528:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4528:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4528:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4528:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/238/codeFlows/0/threadFlows/0/locations/14)
# 4526|     if (completion_user_data == NULL) goto out;
# 4527|     if (py_completion_fn != Py_None) {
# 4528|->     if (!PyCallable_Check (py_completion_fn)) {
# 4529|         PyErr_SetString (PyExc_TypeError,
# 4530|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def540]
libnbd-1.24.0/python/methods.c:4529:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4528:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4528:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4529:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4529:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4529:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/239/codeFlows/0/threadFlows/0/locations/14)
# 4527|     if (py_completion_fn != Py_None) {
# 4528|       if (!PyCallable_Check (py_completion_fn)) {
# 4529|->       PyErr_SetString (PyExc_TypeError,
# 4530|                          "callback parameter completion is not callable");
# 4531|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def541]
libnbd-1.24.0/python/methods.c:4540:14: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4540:14: throw: if 'nbd_internal_py_get_aio_view' throws an exception...
libnbd-1.24.0/python/methods.c:4540:14: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/240/codeFlows/0/threadFlows/0/locations/14)
# 4538|       completion.callback = NULL; /* we're not going to call it */
# 4539|     flags_u32 = flags;
# 4540|->   buf_view = nbd_internal_py_get_aio_view (buf, PyBUF_WRITE);
# 4541|     if (!buf_view) goto out;
# 4542|     py_buf = PyMemoryView_GET_BUFFER (buf_view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def542]
libnbd-1.24.0/python/methods.c:4547:8: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4547:8: danger: 'chunk.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/242/codeFlows/0/threadFlows/0/locations/25)
# 4545|     chunk.user_data = chunk_user_data = alloc_user_data ();
# 4546|     if (chunk_user_data == NULL) goto out;
# 4547|->   if (!PyCallable_Check (py_chunk_fn)) {
# 4548|       PyErr_SetString (PyExc_TypeError,
# 4549|                        "callback parameter chunk is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def543]
libnbd-1.24.0/python/methods.c:4547:8: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4547:8: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/241/codeFlows/0/threadFlows/0/locations/14)
# 4545|     chunk.user_data = chunk_user_data = alloc_user_data ();
# 4546|     if (chunk_user_data == NULL) goto out;
# 4547|->   if (!PyCallable_Check (py_chunk_fn)) {
# 4548|       PyErr_SetString (PyExc_TypeError,
# 4549|                        "callback parameter chunk is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def544]
libnbd-1.24.0/python/methods.c:4548:5: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4548:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4548:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4548:5: danger: 'chunk.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/244/codeFlows/0/threadFlows/0/locations/25)
# 4546|     if (chunk_user_data == NULL) goto out;
# 4547|     if (!PyCallable_Check (py_chunk_fn)) {
# 4548|->     PyErr_SetString (PyExc_TypeError,
# 4549|                        "callback parameter chunk is not callable");
# 4550|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def545]
libnbd-1.24.0/python/methods.c:4548:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4548:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4548:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4548:5: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/243/codeFlows/0/threadFlows/0/locations/14)
# 4546|     if (chunk_user_data == NULL) goto out;
# 4547|     if (!PyCallable_Check (py_chunk_fn)) {
# 4548|->     PyErr_SetString (PyExc_TypeError,
# 4549|                        "callback parameter chunk is not callable");
# 4550|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def546]
libnbd-1.24.0/python/methods.c:4555:27: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4553:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4553:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4554:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4555:27: throw: if 'nbd_internal_py_get_aio_view' throws an exception...
libnbd-1.24.0/python/methods.c:4555:27: danger: 'chunk.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/246/codeFlows/0/threadFlows/0/locations/25)
# 4553|     Py_INCREF (py_chunk_fn);
# 4554|     chunk_user_data->fn = py_chunk_fn;
# 4555|->   chunk_user_data->view = nbd_internal_py_get_aio_view (buf, PyBUF_WRITE);
# 4556|     if (!chunk_user_data->view) goto out;
# 4557|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def547]
libnbd-1.24.0/python/methods.c:4555:27: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4553:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4553:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4554:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4555:27: throw: if 'nbd_internal_py_get_aio_view' throws an exception...
libnbd-1.24.0/python/methods.c:4555:27: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/245/codeFlows/0/threadFlows/0/locations/14)
# 4553|     Py_INCREF (py_chunk_fn);
# 4554|     chunk_user_data->fn = py_chunk_fn;
# 4555|->   chunk_user_data->view = nbd_internal_py_get_aio_view (buf, PyBUF_WRITE);
# 4556|     if (!chunk_user_data->view) goto out;
# 4557|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def548]
libnbd-1.24.0/python/methods.c:4558:7: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4553:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4553:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4554:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4556:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4558:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4558:7: throw: if 'nbd_internal_py_init_aio_buffer' throws an exception...
libnbd-1.24.0/python/methods.c:4558:7: danger: 'chunk.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/248/codeFlows/0/threadFlows/0/locations/25)
# 4556|     if (!chunk_user_data->view) goto out;
# 4557|   
# 4558|->   if (nbd_internal_py_init_aio_buffer (buf) < 0) goto out;
# 4559|     Py_BEGIN_ALLOW_THREADS;
# 4560|     ret = nbd_aio_pread_structured (h, py_buf->buf, py_buf->len, offset_u64,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def549]
libnbd-1.24.0/python/methods.c:4558:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4553:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4553:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4554:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4556:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4558:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4558:7: throw: if 'nbd_internal_py_init_aio_buffer' throws an exception...
libnbd-1.24.0/python/methods.c:4558:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/247/codeFlows/0/threadFlows/0/locations/14)
# 4556|     if (!chunk_user_data->view) goto out;
# 4557|   
# 4558|->   if (nbd_internal_py_init_aio_buffer (buf) < 0) goto out;
# 4559|     Py_BEGIN_ALLOW_THREADS;
# 4560|     ret = nbd_aio_pread_structured (h, py_buf->buf, py_buf->len, offset_u64,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def550]
libnbd-1.24.0/python/methods.c:4559:3: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4553:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4553:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4554:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4556:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4558:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4558:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4559:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4559:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4559:3: danger: 'chunk.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/250/codeFlows/0/threadFlows/0/locations/25)
# 4557|   
# 4558|     if (nbd_internal_py_init_aio_buffer (buf) < 0) goto out;
# 4559|->   Py_BEGIN_ALLOW_THREADS;
# 4560|     ret = nbd_aio_pread_structured (h, py_buf->buf, py_buf->len, offset_u64,
# 4561|                                     chunk, completion, flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def551]
libnbd-1.24.0/python/methods.c:4559:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4553:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4553:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4554:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4556:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4558:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4558:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4559:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4559:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4559:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/249/codeFlows/0/threadFlows/0/locations/14)
# 4557|   
# 4558|     if (nbd_internal_py_init_aio_buffer (buf) < 0) goto out;
# 4559|->   Py_BEGIN_ALLOW_THREADS;
# 4560|     ret = nbd_aio_pread_structured (h, py_buf->buf, py_buf->len, offset_u64,
# 4561|                                     chunk, completion, flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def552]
libnbd-1.24.0/python/methods.c:4560:9: warning[-Wanalyzer-malloc-leak]: leak of 'chunk.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4553:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4553:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4554:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4556:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4558:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4558:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4559:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4560:9: throw: if 'nbd_aio_pread_structured' throws an exception...
libnbd-1.24.0/python/methods.c:4560:9: danger: 'chunk.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/252/codeFlows/0/threadFlows/0/locations/25)
# 4558|     if (nbd_internal_py_init_aio_buffer (buf) < 0) goto out;
# 4559|     Py_BEGIN_ALLOW_THREADS;
# 4560|->   ret = nbd_aio_pread_structured (h, py_buf->buf, py_buf->len, offset_u64,
# 4561|                                     chunk, completion, flags_u32);
# 4562|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def553]
libnbd-1.24.0/python/methods.c:4560:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4497:1: enter_function: entry to 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4519:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4523:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4523:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4523:7: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'get_handle'
libnbd-1.24.0/python/methods.c:4524:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4525:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4525:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4525:49: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4526:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4527:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4527:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4538:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4541:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4543:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4545:39: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4545:39: return_function: returning to 'nbd_internal_py_aio_pread_structured' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4546:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4547:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4547:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4553:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4553:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_pread_structured'
libnbd-1.24.0/python/methods.c:4554:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4556:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4558:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4558:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4559:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4560:9: throw: if 'nbd_aio_pread_structured' throws an exception...
libnbd-1.24.0/python/methods.c:4560:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/251/codeFlows/0/threadFlows/0/locations/14)
# 4558|     if (nbd_internal_py_init_aio_buffer (buf) < 0) goto out;
# 4559|     Py_BEGIN_ALLOW_THREADS;
# 4560|->   ret = nbd_aio_pread_structured (h, py_buf->buf, py_buf->len, offset_u64,
# 4561|                                     chunk, completion, flags_u32);
# 4562|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def554]
libnbd-1.24.0/python/methods.c:4604:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4578:1: enter_function: entry to 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4596:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4599:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4599:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4599:7: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'get_handle'
libnbd-1.24.0/python/methods.c:4600:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4601:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4601:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4601:49: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4602:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4603:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4603:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4604:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4604:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4604:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/253/codeFlows/0/threadFlows/0/locations/14)
# 4602|     if (completion_user_data == NULL) goto out;
# 4603|     if (py_completion_fn != Py_None) {
# 4604|->     if (!PyCallable_Check (py_completion_fn)) {
# 4605|         PyErr_SetString (PyExc_TypeError,
# 4606|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def555]
libnbd-1.24.0/python/methods.c:4605:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4578:1: enter_function: entry to 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4596:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4599:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4599:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4599:7: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'get_handle'
libnbd-1.24.0/python/methods.c:4600:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4601:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4601:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4601:49: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4602:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4603:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4603:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4604:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4604:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4605:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4605:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4605:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/254/codeFlows/0/threadFlows/0/locations/14)
# 4603|     if (py_completion_fn != Py_None) {
# 4604|       if (!PyCallable_Check (py_completion_fn)) {
# 4605|->       PyErr_SetString (PyExc_TypeError,
# 4606|                          "callback parameter completion is not callable");
# 4607|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def556]
libnbd-1.24.0/python/methods.c:4616:14: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4578:1: enter_function: entry to 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4596:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4599:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4599:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4599:7: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'get_handle'
libnbd-1.24.0/python/methods.c:4600:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4601:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4601:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4601:49: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4602:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4603:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4603:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4614:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4616:14: throw: if 'nbd_internal_py_get_aio_view' throws an exception...
libnbd-1.24.0/python/methods.c:4616:14: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/255/codeFlows/0/threadFlows/0/locations/14)
# 4614|       completion.callback = NULL; /* we're not going to call it */
# 4615|     flags_u32 = flags;
# 4616|->   buf_view = nbd_internal_py_get_aio_view (buf, PyBUF_READ);
# 4617|     if (!buf_view) goto out;
# 4618|     py_buf = PyMemoryView_GET_BUFFER (buf_view);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def557]
libnbd-1.24.0/python/methods.c:4622:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4578:1: enter_function: entry to 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4596:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4599:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4599:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4599:7: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'get_handle'
libnbd-1.24.0/python/methods.c:4600:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4601:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4601:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4601:49: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4602:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4603:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4603:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4614:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4617:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4619:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4622:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4622:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/256/codeFlows/0/threadFlows/0/locations/14)
# 4620|     offset_u64 = offset;
# 4621|   
# 4622|->   Py_BEGIN_ALLOW_THREADS;
# 4623|     ret = nbd_aio_pwrite (h, py_buf->buf, py_buf->len, offset_u64, completion,
# 4624|                           flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def558]
libnbd-1.24.0/python/methods.c:4623:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4578:1: enter_function: entry to 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4596:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4599:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4599:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4599:7: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'get_handle'
libnbd-1.24.0/python/methods.c:4600:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4601:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4601:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_pwrite'
libnbd-1.24.0/python/methods.c:4601:49: return_function: returning to 'nbd_internal_py_aio_pwrite' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4602:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4603:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4603:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4614:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4617:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4619:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4623:9: throw: if 'nbd_aio_pwrite' throws an exception...
libnbd-1.24.0/python/methods.c:4623:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/257/codeFlows/0/threadFlows/0/locations/14)
# 4621|   
# 4622|     Py_BEGIN_ALLOW_THREADS;
# 4623|->   ret = nbd_aio_pwrite (h, py_buf->buf, py_buf->len, offset_u64, completion,
# 4624|                           flags_u32);
# 4625|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def559]
libnbd-1.24.0/python/methods.c:4690:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4669:1: enter_function: entry to 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4682:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4685:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4685:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4685:7: return_function: returning to 'nbd_internal_py_aio_flush' from 'get_handle'
libnbd-1.24.0/python/methods.c:4686:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4687:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4687:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4687:49: return_function: returning to 'nbd_internal_py_aio_flush' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4688:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4689:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4689:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4690:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4690:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4690:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/258/codeFlows/0/threadFlows/0/locations/14)
# 4688|     if (completion_user_data == NULL) goto out;
# 4689|     if (py_completion_fn != Py_None) {
# 4690|->     if (!PyCallable_Check (py_completion_fn)) {
# 4691|         PyErr_SetString (PyExc_TypeError,
# 4692|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def560]
libnbd-1.24.0/python/methods.c:4691:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4669:1: enter_function: entry to 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4682:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4685:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4685:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4685:7: return_function: returning to 'nbd_internal_py_aio_flush' from 'get_handle'
libnbd-1.24.0/python/methods.c:4686:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4687:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4687:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4687:49: return_function: returning to 'nbd_internal_py_aio_flush' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4688:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4689:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4689:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4690:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4690:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4691:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4691:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4691:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/259/codeFlows/0/threadFlows/0/locations/14)
# 4689|     if (py_completion_fn != Py_None) {
# 4690|       if (!PyCallable_Check (py_completion_fn)) {
# 4691|->       PyErr_SetString (PyExc_TypeError,
# 4692|                          "callback parameter completion is not callable");
# 4693|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def561]
libnbd-1.24.0/python/methods.c:4703:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4669:1: enter_function: entry to 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4682:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4685:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4685:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4685:7: return_function: returning to 'nbd_internal_py_aio_flush' from 'get_handle'
libnbd-1.24.0/python/methods.c:4686:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4687:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4687:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4687:49: return_function: returning to 'nbd_internal_py_aio_flush' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4688:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4689:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4689:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4700:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4703:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4703:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/260/codeFlows/0/threadFlows/0/locations/14)
# 4701|     flags_u32 = flags;
# 4702|   
# 4703|->   Py_BEGIN_ALLOW_THREADS;
# 4704|     ret = nbd_aio_flush (h, completion, flags_u32);
# 4705|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def562]
libnbd-1.24.0/python/methods.c:4704:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4669:1: enter_function: entry to 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4682:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4685:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4685:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4685:7: return_function: returning to 'nbd_internal_py_aio_flush' from 'get_handle'
libnbd-1.24.0/python/methods.c:4686:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4687:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4687:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_flush'
libnbd-1.24.0/python/methods.c:4687:49: return_function: returning to 'nbd_internal_py_aio_flush' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4688:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4689:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4689:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4700:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4704:9: throw: if 'nbd_aio_flush' throws an exception...
libnbd-1.24.0/python/methods.c:4704:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/261/codeFlows/0/threadFlows/0/locations/14)
# 4702|   
# 4703|     Py_BEGIN_ALLOW_THREADS;
# 4704|->   ret = nbd_aio_flush (h, completion, flags_u32);
# 4705|     Py_END_ALLOW_THREADS;
# 4706|     completion_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def563]
libnbd-1.24.0/python/methods.c:4744:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4719:1: enter_function: entry to 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4736:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4739:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4739:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4739:7: return_function: returning to 'nbd_internal_py_aio_trim' from 'get_handle'
libnbd-1.24.0/python/methods.c:4740:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4741:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4741:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4741:49: return_function: returning to 'nbd_internal_py_aio_trim' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4742:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4743:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4743:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4744:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4744:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4744:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/262/codeFlows/0/threadFlows/0/locations/14)
# 4742|     if (completion_user_data == NULL) goto out;
# 4743|     if (py_completion_fn != Py_None) {
# 4744|->     if (!PyCallable_Check (py_completion_fn)) {
# 4745|         PyErr_SetString (PyExc_TypeError,
# 4746|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def564]
libnbd-1.24.0/python/methods.c:4745:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4719:1: enter_function: entry to 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4736:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4739:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4739:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4739:7: return_function: returning to 'nbd_internal_py_aio_trim' from 'get_handle'
libnbd-1.24.0/python/methods.c:4740:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4741:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4741:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4741:49: return_function: returning to 'nbd_internal_py_aio_trim' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4742:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4743:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4743:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4744:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4744:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4745:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4745:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4745:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/263/codeFlows/0/threadFlows/0/locations/14)
# 4743|     if (py_completion_fn != Py_None) {
# 4744|       if (!PyCallable_Check (py_completion_fn)) {
# 4745|->       PyErr_SetString (PyExc_TypeError,
# 4746|                          "callback parameter completion is not callable");
# 4747|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def565]
libnbd-1.24.0/python/methods.c:4759:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4719:1: enter_function: entry to 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4736:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4739:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4739:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4739:7: return_function: returning to 'nbd_internal_py_aio_trim' from 'get_handle'
libnbd-1.24.0/python/methods.c:4740:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4741:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4741:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4741:49: return_function: returning to 'nbd_internal_py_aio_trim' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4742:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4743:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4743:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4754:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4759:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4759:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/264/codeFlows/0/threadFlows/0/locations/14)
# 4757|     offset_u64 = offset;
# 4758|   
# 4759|->   Py_BEGIN_ALLOW_THREADS;
# 4760|     ret = nbd_aio_trim (h, count_u64, offset_u64, completion, flags_u32);
# 4761|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def566]
libnbd-1.24.0/python/methods.c:4760:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4719:1: enter_function: entry to 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4736:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4739:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4739:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4739:7: return_function: returning to 'nbd_internal_py_aio_trim' from 'get_handle'
libnbd-1.24.0/python/methods.c:4740:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4741:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4741:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_trim'
libnbd-1.24.0/python/methods.c:4741:49: return_function: returning to 'nbd_internal_py_aio_trim' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4742:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4743:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4743:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4754:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4760:9: throw: if 'nbd_aio_trim' throws an exception...
libnbd-1.24.0/python/methods.c:4760:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/265/codeFlows/0/threadFlows/0/locations/14)
# 4758|   
# 4759|     Py_BEGIN_ALLOW_THREADS;
# 4760|->   ret = nbd_aio_trim (h, count_u64, offset_u64, completion, flags_u32);
# 4761|     Py_END_ALLOW_THREADS;
# 4762|     completion_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def567]
libnbd-1.24.0/python/methods.c:4800:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4775:1: enter_function: entry to 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4792:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4795:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4795:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4795:7: return_function: returning to 'nbd_internal_py_aio_cache' from 'get_handle'
libnbd-1.24.0/python/methods.c:4796:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4797:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4797:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4797:49: return_function: returning to 'nbd_internal_py_aio_cache' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4798:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4799:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4799:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4800:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4800:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4800:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/266/codeFlows/0/threadFlows/0/locations/14)
# 4798|     if (completion_user_data == NULL) goto out;
# 4799|     if (py_completion_fn != Py_None) {
# 4800|->     if (!PyCallable_Check (py_completion_fn)) {
# 4801|         PyErr_SetString (PyExc_TypeError,
# 4802|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def568]
libnbd-1.24.0/python/methods.c:4801:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4775:1: enter_function: entry to 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4792:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4795:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4795:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4795:7: return_function: returning to 'nbd_internal_py_aio_cache' from 'get_handle'
libnbd-1.24.0/python/methods.c:4796:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4797:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4797:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4797:49: return_function: returning to 'nbd_internal_py_aio_cache' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4798:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4799:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4799:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4800:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4800:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4801:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4801:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4801:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/267/codeFlows/0/threadFlows/0/locations/14)
# 4799|     if (py_completion_fn != Py_None) {
# 4800|       if (!PyCallable_Check (py_completion_fn)) {
# 4801|->       PyErr_SetString (PyExc_TypeError,
# 4802|                          "callback parameter completion is not callable");
# 4803|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def569]
libnbd-1.24.0/python/methods.c:4815:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4775:1: enter_function: entry to 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4792:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4795:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4795:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4795:7: return_function: returning to 'nbd_internal_py_aio_cache' from 'get_handle'
libnbd-1.24.0/python/methods.c:4796:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4797:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4797:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4797:49: return_function: returning to 'nbd_internal_py_aio_cache' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4798:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4799:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4799:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4810:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4815:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4815:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/268/codeFlows/0/threadFlows/0/locations/14)
# 4813|     offset_u64 = offset;
# 4814|   
# 4815|->   Py_BEGIN_ALLOW_THREADS;
# 4816|     ret = nbd_aio_cache (h, count_u64, offset_u64, completion, flags_u32);
# 4817|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def570]
libnbd-1.24.0/python/methods.c:4816:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4775:1: enter_function: entry to 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4792:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4795:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4795:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4795:7: return_function: returning to 'nbd_internal_py_aio_cache' from 'get_handle'
libnbd-1.24.0/python/methods.c:4796:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4797:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4797:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_cache'
libnbd-1.24.0/python/methods.c:4797:49: return_function: returning to 'nbd_internal_py_aio_cache' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4798:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4799:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4799:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4810:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4816:9: throw: if 'nbd_aio_cache' throws an exception...
libnbd-1.24.0/python/methods.c:4816:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/269/codeFlows/0/threadFlows/0/locations/14)
# 4814|   
# 4815|     Py_BEGIN_ALLOW_THREADS;
# 4816|->   ret = nbd_aio_cache (h, count_u64, offset_u64, completion, flags_u32);
# 4817|     Py_END_ALLOW_THREADS;
# 4818|     completion_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
libnbd-1.24.0/python/methods.c:4856:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4831:1: enter_function: entry to 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4848:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4851:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4851:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4851:7: return_function: returning to 'nbd_internal_py_aio_zero' from 'get_handle'
libnbd-1.24.0/python/methods.c:4852:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4853:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4853:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4853:49: return_function: returning to 'nbd_internal_py_aio_zero' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4854:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4855:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4855:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4856:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4856:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4856:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/270/codeFlows/0/threadFlows/0/locations/14)
# 4854|     if (completion_user_data == NULL) goto out;
# 4855|     if (py_completion_fn != Py_None) {
# 4856|->     if (!PyCallable_Check (py_completion_fn)) {
# 4857|         PyErr_SetString (PyExc_TypeError,
# 4858|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def572]
libnbd-1.24.0/python/methods.c:4857:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4831:1: enter_function: entry to 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4848:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4851:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4851:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4851:7: return_function: returning to 'nbd_internal_py_aio_zero' from 'get_handle'
libnbd-1.24.0/python/methods.c:4852:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4853:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4853:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4853:49: return_function: returning to 'nbd_internal_py_aio_zero' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4854:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4855:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4855:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4856:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4856:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4857:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4857:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4857:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/271/codeFlows/0/threadFlows/0/locations/14)
# 4855|     if (py_completion_fn != Py_None) {
# 4856|       if (!PyCallable_Check (py_completion_fn)) {
# 4857|->       PyErr_SetString (PyExc_TypeError,
# 4858|                          "callback parameter completion is not callable");
# 4859|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def573]
libnbd-1.24.0/python/methods.c:4871:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4831:1: enter_function: entry to 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4848:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4851:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4851:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4851:7: return_function: returning to 'nbd_internal_py_aio_zero' from 'get_handle'
libnbd-1.24.0/python/methods.c:4852:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4853:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4853:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4853:49: return_function: returning to 'nbd_internal_py_aio_zero' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4854:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4855:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4855:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4866:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4871:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4871:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/272/codeFlows/0/threadFlows/0/locations/14)
# 4869|     offset_u64 = offset;
# 4870|   
# 4871|->   Py_BEGIN_ALLOW_THREADS;
# 4872|     ret = nbd_aio_zero (h, count_u64, offset_u64, completion, flags_u32);
# 4873|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def574]
libnbd-1.24.0/python/methods.c:4872:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4831:1: enter_function: entry to 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4848:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4851:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4851:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4851:7: return_function: returning to 'nbd_internal_py_aio_zero' from 'get_handle'
libnbd-1.24.0/python/methods.c:4852:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4853:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4853:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_zero'
libnbd-1.24.0/python/methods.c:4853:49: return_function: returning to 'nbd_internal_py_aio_zero' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4854:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4855:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4855:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4866:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4872:9: throw: if 'nbd_aio_zero' throws an exception...
libnbd-1.24.0/python/methods.c:4872:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/273/codeFlows/0/threadFlows/0/locations/14)
# 4870|   
# 4871|     Py_BEGIN_ALLOW_THREADS;
# 4872|->   ret = nbd_aio_zero (h, count_u64, offset_u64, completion, flags_u32);
# 4873|     Py_END_ALLOW_THREADS;
# 4874|     completion_user_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def575]
libnbd-1.24.0/python/methods.c:4916:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4916:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4916:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4916:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/274/codeFlows/0/threadFlows/0/locations/14)
# 4914|     if (completion_user_data == NULL) goto out;
# 4915|     if (py_completion_fn != Py_None) {
# 4916|->     if (!PyCallable_Check (py_completion_fn)) {
# 4917|         PyErr_SetString (PyExc_TypeError,
# 4918|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def576]
libnbd-1.24.0/python/methods.c:4917:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4916:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4916:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4917:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4917:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4917:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/275/codeFlows/0/threadFlows/0/locations/14)
# 4915|     if (py_completion_fn != Py_None) {
# 4916|       if (!PyCallable_Check (py_completion_fn)) {
# 4917|->       PyErr_SetString (PyExc_TypeError,
# 4918|                          "callback parameter completion is not callable");
# 4919|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def577]
libnbd-1.24.0/python/methods.c:4932:8: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4926:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4930:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4930:41: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4931:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4932:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4932:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4932:8: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/276/codeFlows/0/threadFlows/0/locations/14)
# 4930|     extent.user_data = extent_user_data = alloc_user_data ();
# 4931|     if (extent_user_data == NULL) goto out;
# 4932|->   if (!PyCallable_Check (py_extent_fn)) {
# 4933|       PyErr_SetString (PyExc_TypeError,
# 4934|                        "callback parameter extent is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def578]
libnbd-1.24.0/python/methods.c:4932:8: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4926:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4930:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4930:41: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4931:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4932:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4932:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4932:8: danger: 'extent.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/277/codeFlows/0/threadFlows/0/locations/23)
# 4930|     extent.user_data = extent_user_data = alloc_user_data ();
# 4931|     if (extent_user_data == NULL) goto out;
# 4932|->   if (!PyCallable_Check (py_extent_fn)) {
# 4933|       PyErr_SetString (PyExc_TypeError,
# 4934|                        "callback parameter extent is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def579]
libnbd-1.24.0/python/methods.c:4933:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4926:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4930:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4930:41: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4931:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4932:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4932:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4933:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4933:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4933:5: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/278/codeFlows/0/threadFlows/0/locations/14)
# 4931|     if (extent_user_data == NULL) goto out;
# 4932|     if (!PyCallable_Check (py_extent_fn)) {
# 4933|->     PyErr_SetString (PyExc_TypeError,
# 4934|                        "callback parameter extent is not callable");
# 4935|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def580]
libnbd-1.24.0/python/methods.c:4933:5: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4926:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4930:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4930:41: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4931:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4932:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4932:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4933:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4933:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4933:5: danger: 'extent.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/279/codeFlows/0/threadFlows/0/locations/23)
# 4931|     if (extent_user_data == NULL) goto out;
# 4932|     if (!PyCallable_Check (py_extent_fn)) {
# 4933|->     PyErr_SetString (PyExc_TypeError,
# 4934|                        "callback parameter extent is not callable");
# 4935|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def581]
libnbd-1.24.0/python/methods.c:4941:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4926:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4930:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4930:41: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4931:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4932:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4932:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4938:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4938:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4939:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4941:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4941:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/281/codeFlows/0/threadFlows/0/locations/14)
# 4939|     extent_user_data->fn = py_extent_fn;
# 4940|   
# 4941|->   Py_BEGIN_ALLOW_THREADS;
# 4942|     ret = nbd_aio_block_status (h, count_u64, offset_u64, extent, completion,
# 4943|                                 flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def582]
libnbd-1.24.0/python/methods.c:4941:3: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4926:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4930:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4930:41: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4931:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4932:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4932:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4938:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4938:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4939:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4941:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:4941:3: danger: 'extent.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/280/codeFlows/0/threadFlows/0/locations/23)
# 4939|     extent_user_data->fn = py_extent_fn;
# 4940|   
# 4941|->   Py_BEGIN_ALLOW_THREADS;
# 4942|     ret = nbd_aio_block_status (h, count_u64, offset_u64, extent, completion,
# 4943|                                 flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def583]
libnbd-1.24.0/python/methods.c:4942:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4926:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4930:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4930:41: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4931:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4932:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4932:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4938:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4938:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4939:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4942:9: throw: if 'nbd_aio_block_status' throws an exception...
libnbd-1.24.0/python/methods.c:4942:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/282/codeFlows/0/threadFlows/0/locations/14)
# 4940|   
# 4941|     Py_BEGIN_ALLOW_THREADS;
# 4942|->   ret = nbd_aio_block_status (h, count_u64, offset_u64, extent, completion,
# 4943|                                 flags_u32);
# 4944|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def584]
libnbd-1.24.0/python/methods.c:4942:9: warning[-Wanalyzer-malloc-leak]: leak of 'extent.user_data'
libnbd-1.24.0/python/methods.c:4887:1: enter_function: entry to 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4908:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4911:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4911:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4911:7: return_function: returning to 'nbd_internal_py_aio_block_status' from 'get_handle'
libnbd-1.24.0/python/methods.c:4912:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4913:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4913:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4913:49: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4914:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4915:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4915:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4926:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4930:41: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4930:41: return_function: returning to 'nbd_internal_py_aio_block_status' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4931:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4932:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4932:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4938:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4938:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status'
libnbd-1.24.0/python/methods.c:4939:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4942:9: throw: if 'nbd_aio_block_status' throws an exception...
libnbd-1.24.0/python/methods.c:4942:9: danger: 'extent.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/283/codeFlows/0/threadFlows/0/locations/23)
# 4940|   
# 4941|     Py_BEGIN_ALLOW_THREADS;
# 4942|->   ret = nbd_aio_block_status (h, count_u64, offset_u64, extent, completion,
# 4943|                                 flags_u32);
# 4944|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def585]
libnbd-1.24.0/python/methods.c:4990:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4990:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4990:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:4990:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/284/codeFlows/0/threadFlows/0/locations/14)
# 4988|     if (completion_user_data == NULL) goto out;
# 4989|     if (py_completion_fn != Py_None) {
# 4990|->     if (!PyCallable_Check (py_completion_fn)) {
# 4991|         PyErr_SetString (PyExc_TypeError,
# 4992|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def586]
libnbd-1.24.0/python/methods.c:4991:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4990:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4990:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:4991:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:4991:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:4991:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/285/codeFlows/0/threadFlows/0/locations/14)
# 4989|     if (py_completion_fn != Py_None) {
# 4990|       if (!PyCallable_Check (py_completion_fn)) {
# 4991|->       PyErr_SetString (PyExc_TypeError,
# 4992|                          "callback parameter completion is not callable");
# 4993|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def587]
libnbd-1.24.0/python/methods.c:5006:8: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5000:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5004:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5004:45: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5005:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5006:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5006:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:5006:8: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/286/codeFlows/0/threadFlows/0/locations/14)
# 5004|     extent64.user_data = extent64_user_data = alloc_user_data ();
# 5005|     if (extent64_user_data == NULL) goto out;
# 5006|->   if (!PyCallable_Check (py_extent64_fn)) {
# 5007|       PyErr_SetString (PyExc_TypeError,
# 5008|                        "callback parameter extent64 is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def588]
libnbd-1.24.0/python/methods.c:5006:8: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5000:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5004:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5004:45: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5005:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5006:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5006:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:5006:8: danger: 'extent64.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/287/codeFlows/0/threadFlows/0/locations/23)
# 5004|     extent64.user_data = extent64_user_data = alloc_user_data ();
# 5005|     if (extent64_user_data == NULL) goto out;
# 5006|->   if (!PyCallable_Check (py_extent64_fn)) {
# 5007|       PyErr_SetString (PyExc_TypeError,
# 5008|                        "callback parameter extent64 is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def589]
libnbd-1.24.0/python/methods.c:5007:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5000:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5004:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5004:45: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5005:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5006:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5006:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:5007:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5007:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:5007:5: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/288/codeFlows/0/threadFlows/0/locations/14)
# 5005|     if (extent64_user_data == NULL) goto out;
# 5006|     if (!PyCallable_Check (py_extent64_fn)) {
# 5007|->     PyErr_SetString (PyExc_TypeError,
# 5008|                        "callback parameter extent64 is not callable");
# 5009|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def590]
libnbd-1.24.0/python/methods.c:5007:5: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5000:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5004:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5004:45: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5005:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5006:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5006:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:5007:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5007:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:5007:5: danger: 'extent64.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/289/codeFlows/0/threadFlows/0/locations/23)
# 5005|     if (extent64_user_data == NULL) goto out;
# 5006|     if (!PyCallable_Check (py_extent64_fn)) {
# 5007|->     PyErr_SetString (PyExc_TypeError,
# 5008|                        "callback parameter extent64 is not callable");
# 5009|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def591]
libnbd-1.24.0/python/methods.c:5015:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5000:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5004:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5004:45: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5005:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5006:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5006:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5012:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5012:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5013:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5015:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:5015:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/290/codeFlows/0/threadFlows/0/locations/14)
# 5013|     extent64_user_data->fn = py_extent64_fn;
# 5014|   
# 5015|->   Py_BEGIN_ALLOW_THREADS;
# 5016|     ret = nbd_aio_block_status_64 (h, count_u64, offset_u64, extent64,
# 5017|                                    completion, flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def592]
libnbd-1.24.0/python/methods.c:5015:3: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5000:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5004:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5004:45: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5005:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5006:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5006:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5012:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5012:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5013:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5015:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:5015:3: danger: 'extent64.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/291/codeFlows/0/threadFlows/0/locations/23)
# 5013|     extent64_user_data->fn = py_extent64_fn;
# 5014|   
# 5015|->   Py_BEGIN_ALLOW_THREADS;
# 5016|     ret = nbd_aio_block_status_64 (h, count_u64, offset_u64, extent64,
# 5017|                                    completion, flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def593]
libnbd-1.24.0/python/methods.c:5016:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5000:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5004:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5004:45: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5005:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5006:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5006:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5012:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5012:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5013:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5016:9: throw: if 'nbd_aio_block_status_64' throws an exception...
libnbd-1.24.0/python/methods.c:5016:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/292/codeFlows/0/threadFlows/0/locations/14)
# 5014|   
# 5015|     Py_BEGIN_ALLOW_THREADS;
# 5016|->   ret = nbd_aio_block_status_64 (h, count_u64, offset_u64, extent64,
# 5017|                                    completion, flags_u32);
# 5018|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def594]
libnbd-1.24.0/python/methods.c:5016:9: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:4960:1: enter_function: entry to 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4981:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4985:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4985:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4985:7: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'get_handle'
libnbd-1.24.0/python/methods.c:4986:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4987:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4987:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:4987:49: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:4988:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:4989:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:4989:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5000:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5004:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5004:45: return_function: returning to 'nbd_internal_py_aio_block_status_64' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5005:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5006:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5006:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5012:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5012:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status_64'
libnbd-1.24.0/python/methods.c:5013:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5016:9: throw: if 'nbd_aio_block_status_64' throws an exception...
libnbd-1.24.0/python/methods.c:5016:9: danger: 'extent64.user_data' leaks here; was allocated at [(24)](sarif:/runs/0/results/293/codeFlows/0/threadFlows/0/locations/23)
# 5014|   
# 5015|     Py_BEGIN_ALLOW_THREADS;
# 5016|->   ret = nbd_aio_block_status_64 (h, count_u64, offset_u64, extent64,
# 5017|                                    completion, flags_u32);
# 5018|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def595]
libnbd-1.24.0/python/methods.c:5066:10: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:5066:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5066:10: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:5066:10: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/294/codeFlows/0/threadFlows/0/locations/14)
# 5064|     if (completion_user_data == NULL) goto out;
# 5065|     if (py_completion_fn != Py_None) {
# 5066|->     if (!PyCallable_Check (py_completion_fn)) {
# 5067|         PyErr_SetString (PyExc_TypeError,
# 5068|                          "callback parameter completion is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def596]
libnbd-1.24.0/python/methods.c:5067:7: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:5066:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5066:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:5067:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5067:7: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:5067:7: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/295/codeFlows/0/threadFlows/0/locations/14)
# 5065|     if (py_completion_fn != Py_None) {
# 5066|       if (!PyCallable_Check (py_completion_fn)) {
# 5067|->       PyErr_SetString (PyExc_TypeError,
# 5068|                          "callback parameter completion is not callable");
# 5069|         goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def597]
libnbd-1.24.0/python/methods.c:5080:14: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5076:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5080:14: throw: if 'nbd_internal_py_get_string_list' throws an exception...
libnbd-1.24.0/python/methods.c:5080:14: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/296/codeFlows/0/threadFlows/0/locations/14)
# 5078|     count_u64 = count;
# 5079|     offset_u64 = offset;
# 5080|->   contexts = nbd_internal_py_get_string_list (py_contexts);
# 5081|     if (!contexts) goto out;
# 5082|     extent64.user_data = extent64_user_data = alloc_user_data ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def598]
libnbd-1.24.0/python/methods.c:5084:8: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5076:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5081:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5082:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5082:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5082:45: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5083:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5084:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5084:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:5084:8: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/297/codeFlows/0/threadFlows/0/locations/14)
# 5082|     extent64.user_data = extent64_user_data = alloc_user_data ();
# 5083|     if (extent64_user_data == NULL) goto out;
# 5084|->   if (!PyCallable_Check (py_extent64_fn)) {
# 5085|       PyErr_SetString (PyExc_TypeError,
# 5086|                        "callback parameter extent64 is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def599]
libnbd-1.24.0/python/methods.c:5084:8: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5076:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5081:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5082:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5082:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5082:45: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5083:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5084:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5084:8: throw: if 'PyCallable_Check' throws an exception...
libnbd-1.24.0/python/methods.c:5084:8: danger: 'extent64.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/298/codeFlows/0/threadFlows/0/locations/25)
# 5082|     extent64.user_data = extent64_user_data = alloc_user_data ();
# 5083|     if (extent64_user_data == NULL) goto out;
# 5084|->   if (!PyCallable_Check (py_extent64_fn)) {
# 5085|       PyErr_SetString (PyExc_TypeError,
# 5086|                        "callback parameter extent64 is not callable");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def600]
libnbd-1.24.0/python/methods.c:5085:5: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5076:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5081:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5082:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5082:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5082:45: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5083:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5084:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5084:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:5085:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5085:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:5085:5: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/299/codeFlows/0/threadFlows/0/locations/14)
# 5083|     if (extent64_user_data == NULL) goto out;
# 5084|     if (!PyCallable_Check (py_extent64_fn)) {
# 5085|->     PyErr_SetString (PyExc_TypeError,
# 5086|                        "callback parameter extent64 is not callable");
# 5087|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def601]
libnbd-1.24.0/python/methods.c:5085:5: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5076:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5081:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5082:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5082:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5082:45: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5083:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5084:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5084:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:5085:5: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5085:5: throw: if 'PyErr_SetString' throws an exception...
libnbd-1.24.0/python/methods.c:5085:5: danger: 'extent64.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/300/codeFlows/0/threadFlows/0/locations/25)
# 5083|     if (extent64_user_data == NULL) goto out;
# 5084|     if (!PyCallable_Check (py_extent64_fn)) {
# 5085|->     PyErr_SetString (PyExc_TypeError,
# 5086|                        "callback parameter extent64 is not callable");
# 5087|       goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def602]
libnbd-1.24.0/python/methods.c:5093:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5076:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5081:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5082:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5082:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5082:45: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5083:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5084:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5084:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5090:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5090:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5091:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5093:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:5093:3: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/301/codeFlows/0/threadFlows/0/locations/14)
# 5091|     extent64_user_data->fn = py_extent64_fn;
# 5092|   
# 5093|->   Py_BEGIN_ALLOW_THREADS;
# 5094|     ret = nbd_aio_block_status_filter (h, count_u64, offset_u64, contexts,
# 5095|                                        extent64, completion, flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def603]
libnbd-1.24.0/python/methods.c:5093:3: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5076:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5081:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5082:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5082:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5082:45: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5083:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5084:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5084:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5090:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5090:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5091:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5093:3: throw: if 'PyEval_SaveThread' throws an exception...
libnbd-1.24.0/python/methods.c:5093:3: danger: 'extent64.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/302/codeFlows/0/threadFlows/0/locations/25)
# 5091|     extent64_user_data->fn = py_extent64_fn;
# 5092|   
# 5093|->   Py_BEGIN_ALLOW_THREADS;
# 5094|     ret = nbd_aio_block_status_filter (h, count_u64, offset_u64, contexts,
# 5095|                                        extent64, completion, flags_u32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def604]
libnbd-1.24.0/python/methods.c:5094:9: warning[-Wanalyzer-malloc-leak]: leak of 'completion.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5076:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5081:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5082:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5082:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5082:45: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5083:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5084:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5084:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5090:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5090:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5091:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5094:9: throw: if 'nbd_aio_block_status_filter' throws an exception...
libnbd-1.24.0/python/methods.c:5094:9: danger: 'completion.user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/303/codeFlows/0/threadFlows/0/locations/14)
# 5092|   
# 5093|     Py_BEGIN_ALLOW_THREADS;
# 5094|->   ret = nbd_aio_block_status_filter (h, count_u64, offset_u64, contexts,
# 5095|                                        extent64, completion, flags_u32);
# 5096|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def605]
libnbd-1.24.0/python/methods.c:5094:9: warning[-Wanalyzer-malloc-leak]: leak of 'extent64.user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5076:5: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5081:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5082:45: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5082:45: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5082:45: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5083:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5084:8: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5084:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5090:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5090:3: call_function: inlined call to 'Py_INCREF' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5091:3: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5094:9: throw: if 'nbd_aio_block_status_filter' throws an exception...
libnbd-1.24.0/python/methods.c:5094:9: danger: 'extent64.user_data' leaks here; was allocated at [(26)](sarif:/runs/0/results/304/codeFlows/0/threadFlows/0/locations/25)
# 5092|   
# 5093|     Py_BEGIN_ALLOW_THREADS;
# 5094|->   ret = nbd_aio_block_status_filter (h, count_u64, offset_u64, contexts,
# 5095|                                        extent64, completion, flags_u32);
# 5096|     Py_END_ALLOW_THREADS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def606]
libnbd-1.24.0/python/methods.c:5106:3: warning[-Wanalyzer-malloc-leak]: leak of 'completion_user_data'
libnbd-1.24.0/python/methods.c:5034:1: enter_function: entry to 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5057:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5061:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5061:7: call_function: calling 'get_handle' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5061:7: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'get_handle'
libnbd-1.24.0/python/methods.c:5062:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5063:49: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5063:49: call_function: calling 'alloc_user_data' from 'nbd_internal_py_aio_block_status_filter'
libnbd-1.24.0/python/methods.c:5063:49: return_function: returning to 'nbd_internal_py_aio_block_status_filter' from 'alloc_user_data'
libnbd-1.24.0/python/methods.c:5064:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5065:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5065:6: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:5066:10: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5066:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/methods.c:5067:7: branch_true: ...to here
libnbd-1.24.0/python/methods.c:5106:3: throw: if 'nbd_internal_py_free_string_list' throws an exception...
libnbd-1.24.0/python/methods.c:5106:3: danger: 'completion_user_data' leaks here; was allocated at [(15)](sarif:/runs/0/results/305/codeFlows/0/threadFlows/0/locations/14)
# 5104|   
# 5105|    out:
# 5106|->   nbd_internal_py_free_string_list (contexts);
# 5107|     free_user_data (extent64_user_data);
# 5108|     free_user_data (completion_user_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def607]
libnbd-1.24.0/python/methods.c:5688:3: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_uri(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:5674:1: enter_function: entry to 'nbd_internal_py_get_uri'
libnbd-1.24.0/python/methods.c:5681:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5683:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5683:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_uri'
libnbd-1.24.0/python/methods.c:5683:7: return_function: returning to 'nbd_internal_py_get_uri' from 'get_handle'
libnbd-1.24.0/python/methods.c:5684:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5686:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5687:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:5688:3: throw: if 'PyEval_RestoreThread' throws an exception...
libnbd-1.24.0/python/methods.c:5688:3: danger: 'nbd_get_uri(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/306/codeFlows/0/threadFlows/0/locations/12)
# 5686|     Py_BEGIN_ALLOW_THREADS;
# 5687|     ret = nbd_get_uri (h);
# 5688|->   Py_END_ALLOW_THREADS;
# 5689|     if (ret == NULL) {
# 5690|       raise_exception ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def608]
libnbd-1.24.0/python/methods.c:5693:12: warning[-Wanalyzer-malloc-leak]: leak of 'nbd_get_uri(get_handle(py_h))'
libnbd-1.24.0/python/methods.c:5674:1: enter_function: entry to 'nbd_internal_py_get_uri'
libnbd-1.24.0/python/methods.c:5681:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5683:7: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5683:7: call_function: calling 'get_handle' from 'nbd_internal_py_get_uri'
libnbd-1.24.0/python/methods.c:5683:7: return_function: returning to 'nbd_internal_py_get_uri' from 'get_handle'
libnbd-1.24.0/python/methods.c:5684:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5686:3: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5687:9: acquire_memory: allocated here
libnbd-1.24.0/python/methods.c:5689:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/methods.c:5693:12: branch_false: ...to here
libnbd-1.24.0/python/methods.c:5693:12: throw: if 'PyUnicode_FromString' throws an exception...
libnbd-1.24.0/python/methods.c:5693:12: danger: 'nbd_get_uri(get_handle(py_h))' leaks here; was allocated at [(13)](sarif:/runs/0/results/307/codeFlows/0/threadFlows/0/locations/12)
# 5691|       goto out;
# 5692|     }
# 5693|->   py_ret = PyUnicode_FromString (ret);
# 5694|     free (ret);
# 5695|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def609]
libnbd-1.24.0/python/utils.c:64:23: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libnbd-1.24.0/python/utils.c:38:1: enter_function: entry to 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:43:3: branch_true: following 'true' branch (when 'obj' is non-NULL)...
libnbd-1.24.0/python/utils.c:45:8: call_function: inlined call to '_Py_TYPE' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:45:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:50:21: branch_false: ...to here
libnbd-1.24.0/python/utils.c:51:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:56:3: branch_false: ...to here
libnbd-1.24.0/python/utils.c:58:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libnbd-1.24.0/python/utils.c:58:6: branch_false: ...to here
libnbd-1.24.0/python/utils.c:63:15: branch_true: following 'true' branch (when 'i < len')...
libnbd-1.24.0/python/utils.c:64:23: branch_true: ...to here
libnbd-1.24.0/python/utils.c:65:8: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:67:20: branch_false: ...to here
libnbd-1.24.0/python/utils.c:67:20: call_function: calling 'PyBytes_AS_STRING' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:67:20: return_function: returning to 'nbd_internal_py_get_string_list' from 'PyBytes_AS_STRING'
libnbd-1.24.0/python/utils.c:67:12: acquire_memory: allocated here
libnbd-1.24.0/python/utils.c:68:5: call_function: inlined call to 'Py_DECREF' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:69:8: branch_true: ...to here
libnbd-1.24.0/python/utils.c:69:8: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:63:24: branch_false: ...to here
libnbd-1.24.0/python/utils.c:63:15: branch_true: following 'true' branch (when 'i < len')...
libnbd-1.24.0/python/utils.c:64:23: branch_true: ...to here
libnbd-1.24.0/python/utils.c:64:23: throw: if 'PyList_GetItem' throws an exception...
libnbd-1.24.0/python/utils.c:64:23: danger: '<unknown>' leaks here; was allocated at [(20)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/19)
#   62|   
#   63|     for (i = 0; i < len; ++i) {
#   64|->     PyObject *bytes = PyUnicode_AsUTF8String (PyList_GetItem (obj, i));
#   65|       if (!bytes)
#   66|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def610]
libnbd-1.24.0/python/utils.c:64:23: warning[-Wanalyzer-malloc-leak]: leak of 'r'
libnbd-1.24.0/python/utils.c:38:1: enter_function: entry to 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:43:3: branch_true: following 'true' branch (when 'obj' is non-NULL)...
libnbd-1.24.0/python/utils.c:45:8: call_function: inlined call to '_Py_TYPE' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:45:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:50:21: branch_false: ...to here
libnbd-1.24.0/python/utils.c:51:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:56:3: branch_false: ...to here
libnbd-1.24.0/python/utils.c:57:7: acquire_memory: allocated here
libnbd-1.24.0/python/utils.c:58:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libnbd-1.24.0/python/utils.c:58:6: branch_false: ...to here
libnbd-1.24.0/python/utils.c:63:15: branch_true: following 'true' branch (when 'i < len')...
libnbd-1.24.0/python/utils.c:64:23: branch_true: ...to here
libnbd-1.24.0/python/utils.c:64:23: throw: if 'PyList_GetItem' throws an exception...
libnbd-1.24.0/python/utils.c:64:23: danger: 'r' leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#   62|   
#   63|     for (i = 0; i < len; ++i) {
#   64|->     PyObject *bytes = PyUnicode_AsUTF8String (PyList_GetItem (obj, i));
#   65|       if (!bytes)
#   66|         goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def611]
libnbd-1.24.0/python/utils.c:70:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libnbd-1.24.0/python/utils.c:38:1: enter_function: entry to 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:43:3: branch_true: following 'true' branch (when 'obj' is non-NULL)...
libnbd-1.24.0/python/utils.c:45:8: call_function: inlined call to '_Py_TYPE' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:45:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:50:21: branch_false: ...to here
libnbd-1.24.0/python/utils.c:51:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:56:3: branch_false: ...to here
libnbd-1.24.0/python/utils.c:58:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libnbd-1.24.0/python/utils.c:58:6: branch_false: ...to here
libnbd-1.24.0/python/utils.c:63:15: branch_true: following 'true' branch (when 'i < len')...
libnbd-1.24.0/python/utils.c:64:23: branch_true: ...to here
libnbd-1.24.0/python/utils.c:65:8: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:67:20: branch_false: ...to here
libnbd-1.24.0/python/utils.c:67:20: call_function: calling 'PyBytes_AS_STRING' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:67:20: return_function: returning to 'nbd_internal_py_get_string_list' from 'PyBytes_AS_STRING'
libnbd-1.24.0/python/utils.c:67:12: acquire_memory: allocated here
libnbd-1.24.0/python/utils.c:68:5: call_function: inlined call to 'Py_DECREF' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:69:8: branch_true: ...to here
libnbd-1.24.0/python/utils.c:69:8: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:63:24: branch_false: ...to here
libnbd-1.24.0/python/utils.c:63:15: branch_true: following 'true' branch (when 'i < len')...
libnbd-1.24.0/python/utils.c:64:23: branch_true: ...to here
libnbd-1.24.0/python/utils.c:65:8: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:67:20: branch_false: ...to here
libnbd-1.24.0/python/utils.c:67:20: call_function: calling 'PyBytes_AS_STRING' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:67:20: return_function: returning to 'nbd_internal_py_get_string_list' from 'PyBytes_AS_STRING'
libnbd-1.24.0/python/utils.c:68:5: call_function: inlined call to 'Py_DECREF' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:69:8: branch_true: ...to here
libnbd-1.24.0/python/utils.c:69:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/utils.c:70:7: branch_true: ...to here
libnbd-1.24.0/python/utils.c:70:7: throw: if 'PyErr_NoMemory' throws an exception...
libnbd-1.24.0/python/utils.c:70:7: danger: '<unknown>' leaks here; was allocated at [(20)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/19)
#   68|       Py_DECREF (bytes);
#   69|       if (r[i] == NULL) {
#   70|->       PyErr_NoMemory ();
#   71|         goto err;
#   72|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def612]
libnbd-1.24.0/python/utils.c:70:7: warning[-Wanalyzer-malloc-leak]: leak of 'r'
libnbd-1.24.0/python/utils.c:38:1: enter_function: entry to 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:43:3: branch_true: following 'true' branch (when 'obj' is non-NULL)...
libnbd-1.24.0/python/utils.c:45:8: call_function: inlined call to '_Py_TYPE' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:45:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:50:21: branch_false: ...to here
libnbd-1.24.0/python/utils.c:51:6: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:56:3: branch_false: ...to here
libnbd-1.24.0/python/utils.c:57:7: acquire_memory: allocated here
libnbd-1.24.0/python/utils.c:58:6: branch_false: following 'false' branch (when 'r' is non-NULL)...
libnbd-1.24.0/python/utils.c:58:6: branch_false: ...to here
libnbd-1.24.0/python/utils.c:63:15: branch_true: following 'true' branch (when 'i < len')...
libnbd-1.24.0/python/utils.c:64:23: branch_true: ...to here
libnbd-1.24.0/python/utils.c:65:8: branch_false: following 'false' branch...
libnbd-1.24.0/python/utils.c:67:20: branch_false: ...to here
libnbd-1.24.0/python/utils.c:67:20: call_function: calling 'PyBytes_AS_STRING' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:67:20: return_function: returning to 'nbd_internal_py_get_string_list' from 'PyBytes_AS_STRING'
libnbd-1.24.0/python/utils.c:68:5: call_function: inlined call to 'Py_DECREF' from 'nbd_internal_py_get_string_list'
libnbd-1.24.0/python/utils.c:69:8: branch_true: ...to here
libnbd-1.24.0/python/utils.c:69:8: branch_true: following 'true' branch...
libnbd-1.24.0/python/utils.c:70:7: branch_true: ...to here
libnbd-1.24.0/python/utils.c:70:7: throw: if 'PyErr_NoMemory' throws an exception...
libnbd-1.24.0/python/utils.c:70:7: danger: 'r' leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
#   68|       Py_DECREF (bytes);
#   69|       if (r[i] == NULL) {
#   70|->       PyErr_NoMemory ();
#   71|         goto err;
#   72|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def613]
libnbd-1.24.0/ublk/nbdublk.c:491:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nbd_create()’
libnbd-1.24.0/ublk/nbdublk.c:486:7: acquire_memory: allocated here
libnbd-1.24.0/ublk/nbdublk.c:487:6: branch_false: following ‘false’ branch...
libnbd-1.24.0/ublk/nbdublk.c:491:3: branch_false: ...to here
libnbd-1.24.0/ublk/nbdublk.c:491:3: throw: if ‘nbd_set_debug’ throws an exception...
libnbd-1.24.0/ublk/nbdublk.c:491:3: danger: ‘nbd_create()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  489|       exit (EXIT_FAILURE);
#  490|     }
#  491|->   nbd_set_debug (h, verbose);
#  492|   
#  493|     /* Connect to the NBD server synchronously. */

Scan Properties

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