libtdb-1.4.14-3.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
tdb-1.4.14/common/io.c:703:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
tdb-1.4.14/common/io.c:696:38: acquire_memory: allocated here
tdb-1.4.14/common/io.c:696:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
tdb-1.4.14/common/io.c:703:13: branch_false: ...to here
tdb-1.4.14/common/io.c:703:13: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  701|   		return NULL;
#  702|   	}
#  703|-> 	if (tdb->methods->tdb_read(tdb, offset, buf, len, 0) == -1) {
#  704|   		SAFE_FREE(buf);
#  705|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
tdb-1.4.14/common/lock.c:58:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#   56|   	cmd = waitflag ? F_SETLKW : F_SETLK;
#   57|   
#   58|-> 	return fcntl(tdb->fd, cmd, &fl);
#   59|   }
#   60|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
tdb-1.4.14/common/lock.c:58:16: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#   56|   	cmd = waitflag ? F_SETLKW : F_SETLK;
#   57|   
#   58|-> 	return fcntl(tdb->fd, cmd, &fl);
#   59|   }
#   60|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
tdb-1.4.14/common/lock.c:216:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  214|   		 * locks. */
#  215|   		if (!(flags & TDB_LOCK_PROBE) && errno != EAGAIN) {
#  216|-> 			TDB_LOG((tdb, TDB_DEBUG_TRACE,"tdb_brlock failed (fd=%d) at offset %u rw_type=%d flags=%d len=%zu\n",
#  217|   				 tdb->fd, offset, rw_type, flags, len));
#  218|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
tdb-1.4.14/common/lock.c:216:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  214|   		 * locks. */
#  215|   		if (!(flags & TDB_LOCK_PROBE) && errno != EAGAIN) {
#  216|-> 			TDB_LOG((tdb, TDB_DEBUG_TRACE,"tdb_brlock failed (fd=%d) at offset %u rw_type=%d flags=%d len=%zu\n",
#  217|   				 tdb->fd, offset, rw_type, flags, len));
#  218|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
tdb-1.4.14/common/mutex.c:597:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘m’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:432:13: branch_false: ...to here
tdb-1.4.14/common/open.c:432:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:440:15: branch_false: ...to here
tdb-1.4.14/common/open.c:440:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:445:13: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#  595|   	}
#  596|   
#  597|-> 	m->allrecord_lock = F_UNLCK;
#  598|   
#  599|   	ret = pthread_mutex_init(&m->allrecord_mutex, &ma);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
tdb-1.4.14/common/mutex.c:807:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
 branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
#  805|   		 * exit.
#  806|   		 */
#  807|-> 		pid = waitpid(*child_pid, NULL, options);
#  808|   		if (pid == -1) {
#  809|   			if (errno == EINTR) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
tdb-1.4.14/common/mutex.c:807:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
 branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
#  805|   		 * exit.
#  806|   		 */
#  807|-> 		pid = waitpid(*child_pid, NULL, options);
#  808|   		if (pid == -1) {
#  809|   			if (errno == EINTR) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
tdb-1.4.14/common/mutex.c:807:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  805|   		 * exit.
#  806|   		 */
#  807|-> 		pid = waitpid(*child_pid, NULL, options);
#  808|   		if (pid == -1) {
#  809|   			if (errno == EINTR) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
tdb-1.4.14/common/mutex.c:807:23: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  805|   		 * exit.
#  806|   		 */
#  807|-> 		pid = waitpid(*child_pid, NULL, options);
#  808|   		if (pid == -1) {
#  809|   			if (errno == EINTR) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
tdb-1.4.14/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:869:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)...
tdb-1.4.14/common/mutex.c:1001:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1010:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1010:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1013:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:845:24: danger: ‘pipe_down[0]’ leaks here
#  843|   
#  844|   	if (initialized) {
#  845|-> 		return tdb_mutex_locking_cached;
#  846|   	}
#  847|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
tdb-1.4.14/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:869:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)...
tdb-1.4.14/common/mutex.c:1001:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1010:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1010:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1013:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:845:24: danger: ‘pipe_down[1]’ leaks here
#  843|   
#  844|   	if (initialized) {
#  845|-> 		return tdb_mutex_locking_cached;
#  846|   	}
#  847|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
tdb-1.4.14/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1010:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1010:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1013:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:845:24: danger: ‘pipe_up[0]’ leaks here
#  843|   
#  844|   	if (initialized) {
#  845|-> 		return tdb_mutex_locking_cached;
#  846|   	}
#  847|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
tdb-1.4.14/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1010:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1010:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1013:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:845:24: danger: ‘pipe_up[1]’ leaks here
#  843|   
#  844|   	if (initialized) {
#  845|-> 		return tdb_mutex_locking_cached;
#  846|   	}
#  847|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
tdb-1.4.14/common/mutex.c:904:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:904:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:904:17: danger: ‘pipe_down[0]’ leaks here
#  902|   	if (tdb_robust_mutex_pid == 0) {
#  903|   		size_t nwritten;
#  904|-> 		close(pipe_down[1]);
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
tdb-1.4.14/common/mutex.c:904:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:904:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:904:17: danger: ‘pipe_down[1]’ leaks here
#  902|   	if (tdb_robust_mutex_pid == 0) {
#  903|   		size_t nwritten;
#  904|-> 		close(pipe_down[1]);
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
tdb-1.4.14/common/mutex.c:904:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:904:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:904:17: danger: ‘pipe_up[0]’ leaks here
#  902|   	if (tdb_robust_mutex_pid == 0) {
#  903|   		size_t nwritten;
#  904|-> 		close(pipe_down[1]);
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
tdb-1.4.14/common/mutex.c:904:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:904:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:904:17: danger: ‘pipe_up[1]’ leaks here
#  902|   	if (tdb_robust_mutex_pid == 0) {
#  903|   		size_t nwritten;
#  904|-> 		close(pipe_down[1]);
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
tdb-1.4.14/common/mutex.c:904:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  902|   	if (tdb_robust_mutex_pid == 0) {
#  903|   		size_t nwritten;
#  904|-> 		close(pipe_down[1]);
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
tdb-1.4.14/common/mutex.c:904:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  902|   	if (tdb_robust_mutex_pid == 0) {
#  903|   		size_t nwritten;
#  904|-> 		close(pipe_down[1]);
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
tdb-1.4.14/common/mutex.c:905:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:904:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:905:17: danger: ‘pipe_down[0]’ leaks here
#  903|   		size_t nwritten;
#  904|   		close(pipe_down[1]);
#  905|-> 		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);
#  907|   		nwritten = write(pipe_up[1], &ret, sizeof(ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def22]
tdb-1.4.14/common/mutex.c:905:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:904:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:905:17: danger: ‘pipe_up[0]’ leaks here
#  903|   		size_t nwritten;
#  904|   		close(pipe_down[1]);
#  905|-> 		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);
#  907|   		nwritten = write(pipe_up[1], &ret, sizeof(ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
tdb-1.4.14/common/mutex.c:905:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:904:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:905:17: danger: ‘pipe_up[1]’ leaks here
#  903|   		size_t nwritten;
#  904|   		close(pipe_down[1]);
#  905|-> 		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);
#  907|   		nwritten = write(pipe_up[1], &ret, sizeof(ret));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
tdb-1.4.14/common/mutex.c:905:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  903|   		size_t nwritten;
#  904|   		close(pipe_down[1]);
#  905|-> 		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);
#  907|   		nwritten = write(pipe_up[1], &ret, sizeof(ret));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
tdb-1.4.14/common/mutex.c:905:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  903|   		size_t nwritten;
#  904|   		close(pipe_down[1]);
#  905|-> 		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);
#  907|   		nwritten = write(pipe_up[1], &ret, sizeof(ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def26]
tdb-1.4.14/common/mutex.c:907:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:904:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:907:28: danger: ‘pipe_down[0]’ leaks here
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);
#  907|-> 		nwritten = write(pipe_up[1], &ret, sizeof(ret));
#  908|   		if (nwritten != sizeof(ret)) {
#  909|   			_exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def27]
tdb-1.4.14/common/mutex.c:907:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:904:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:907:28: danger: ‘pipe_up[1]’ leaks here
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);
#  907|-> 		nwritten = write(pipe_up[1], &ret, sizeof(ret));
#  908|   		if (nwritten != sizeof(ret)) {
#  909|   			_exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
tdb-1.4.14/common/mutex.c:907:28: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);
#  907|-> 		nwritten = write(pipe_up[1], &ret, sizeof(ret));
#  908|   		if (nwritten != sizeof(ret)) {
#  909|   			_exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
tdb-1.4.14/common/mutex.c:907:28: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  905|   		close(pipe_up[0]);
#  906|   		ret = pthread_mutex_lock(m);
#  907|-> 		nwritten = write(pipe_up[1], &ret, sizeof(ret));
#  908|   		if (nwritten != sizeof(ret)) {
#  909|   			_exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
tdb-1.4.14/common/mutex.c:924:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:924:9: danger: ‘pipe_down[0]’ leaks here
#  922|   		goto cleanup;
#  923|   	}
#  924|-> 	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|   	close(pipe_up[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
tdb-1.4.14/common/mutex.c:924:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:924:9: danger: ‘pipe_down[1]’ leaks here
#  922|   		goto cleanup;
#  923|   	}
#  924|-> 	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|   	close(pipe_up[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
tdb-1.4.14/common/mutex.c:924:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:924:9: danger: ‘pipe_up[0]’ leaks here
#  922|   		goto cleanup;
#  923|   	}
#  924|-> 	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|   	close(pipe_up[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def33]
tdb-1.4.14/common/mutex.c:924:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:924:9: danger: ‘pipe_up[1]’ leaks here
#  922|   		goto cleanup;
#  923|   	}
#  924|-> 	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|   	close(pipe_up[1]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
tdb-1.4.14/common/mutex.c:924:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  922|   		goto cleanup;
#  923|   	}
#  924|-> 	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|   	close(pipe_up[1]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
tdb-1.4.14/common/mutex.c:924:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  922|   		goto cleanup;
#  923|   	}
#  924|-> 	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|   	close(pipe_up[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def36]
tdb-1.4.14/common/mutex.c:926:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:926:9: danger: ‘pipe_down[1]’ leaks here
#  924|   	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|-> 	close(pipe_up[1]);
#  927|   	pipe_up[1] = -1;
#  928|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
tdb-1.4.14/common/mutex.c:926:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:926:9: danger: ‘pipe_up[0]’ leaks here
#  924|   	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|-> 	close(pipe_up[1]);
#  927|   	pipe_up[1] = -1;
#  928|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
tdb-1.4.14/common/mutex.c:926:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:926:9: danger: ‘pipe_up[1]’ leaks here
#  924|   	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|-> 	close(pipe_up[1]);
#  927|   	pipe_up[1] = -1;
#  928|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
tdb-1.4.14/common/mutex.c:926:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  924|   	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|-> 	close(pipe_up[1]);
#  927|   	pipe_up[1] = -1;
#  928|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
tdb-1.4.14/common/mutex.c:926:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  924|   	close(pipe_down[0]);
#  925|   	pipe_down[0] = -1;
#  926|-> 	close(pipe_up[1]);
#  927|   	pipe_up[1] = -1;
#  928|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
tdb-1.4.14/common/mutex.c:942:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:930:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:934:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:935:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:942:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:942:13: danger: ‘pipe_down[1]’ leaks here
#  940|   	}
#  941|   
#  942|-> 	if (write(pipe_down[1], &c, 1) != 1) {
#  943|   		goto cleanup;
#  944|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
tdb-1.4.14/common/mutex.c:942:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:873:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:877:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:878:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:881:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:882:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:885:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:886:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:889:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:890:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:895:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:895:13: call_function: calling ‘tdb_robust_mutex_setup_sigchild’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:895:13: return_function: returning to ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_robust_mutex_setup_sigchild’
tdb-1.4.14/common/mutex.c:902:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:921:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:921:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:924:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:930:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:934:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:935:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:942:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:942:13: danger: ‘pipe_up[0]’ leaks here
#  940|   	}
#  941|   
#  942|-> 	if (write(pipe_down[1], &c, 1) != 1) {
#  943|   		goto cleanup;
#  944|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
tdb-1.4.14/common/mutex.c:942:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  940|   	}
#  941|   
#  942|-> 	if (write(pipe_down[1], &c, 1) != 1) {
#  943|   		goto cleanup;
#  944|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
tdb-1.4.14/common/mutex.c:942:13: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:422:22: branch_false: ...to here
tdb-1.4.14/common/open.c:422:22: call_function: calling ‘tdb_runtime_check_for_robust_mutexes’ from ‘tdb_open_ex’
#  940|   	}
#  941|   
#  942|-> 	if (write(pipe_down[1], &c, 1) != 1) {
#  943|   		goto cleanup;
#  944|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
tdb-1.4.14/common/mutex.c:1002:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:869:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)...
tdb-1.4.14/common/mutex.c:1001:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1002:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1002:17: danger: ‘pipe_down[0]’ leaks here
# 1000|   	}
# 1001|   	if (pipe_down[0] != -1) {
# 1002|-> 		close(pipe_down[0]);
# 1003|   	}
# 1004|   	if (pipe_down[1] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
tdb-1.4.14/common/mutex.c:1002:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:869:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)...
tdb-1.4.14/common/mutex.c:1001:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1002:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1002:17: danger: ‘pipe_down[1]’ leaks here
# 1000|   	}
# 1001|   	if (pipe_down[0] != -1) {
# 1002|-> 		close(pipe_down[0]);
# 1003|   	}
# 1004|   	if (pipe_down[1] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
tdb-1.4.14/common/mutex.c:1002:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1002:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1002:17: danger: ‘pipe_up[0]’ leaks here
# 1000|   	}
# 1001|   	if (pipe_down[0] != -1) {
# 1002|-> 		close(pipe_down[0]);
# 1003|   	}
# 1004|   	if (pipe_down[1] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
tdb-1.4.14/common/mutex.c:1002:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1002:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1002:17: danger: ‘pipe_up[1]’ leaks here
# 1000|   	}
# 1001|   	if (pipe_down[0] != -1) {
# 1002|-> 		close(pipe_down[0]);
# 1003|   	}
# 1004|   	if (pipe_down[1] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
tdb-1.4.14/common/mutex.c:1005:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:869:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)...
tdb-1.4.14/common/mutex.c:1001:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1005:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1005:17: danger: ‘pipe_down[0]’ leaks here
# 1003|   	}
# 1004|   	if (pipe_down[1] != -1) {
# 1005|-> 		close(pipe_down[1]);
# 1006|   	}
# 1007|   	if (pipe_up[0] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
tdb-1.4.14/common/mutex.c:1005:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:869:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)...
tdb-1.4.14/common/mutex.c:1001:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1005:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1005:17: danger: ‘pipe_down[1]’ leaks here
# 1003|   	}
# 1004|   	if (pipe_down[1] != -1) {
# 1005|-> 		close(pipe_down[1]);
# 1006|   	}
# 1007|   	if (pipe_up[0] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
tdb-1.4.14/common/mutex.c:1005:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1005:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1005:17: danger: ‘pipe_up[0]’ leaks here
# 1003|   	}
# 1004|   	if (pipe_down[1] != -1) {
# 1005|-> 		close(pipe_down[1]);
# 1006|   	}
# 1007|   	if (pipe_up[0] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
tdb-1.4.14/common/mutex.c:1005:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1005:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1005:17: danger: ‘pipe_up[1]’ leaks here
# 1003|   	}
# 1004|   	if (pipe_down[1] != -1) {
# 1005|-> 		close(pipe_down[1]);
# 1006|   	}
# 1007|   	if (pipe_up[0] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
tdb-1.4.14/common/mutex.c:1008:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1008:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1008:17: danger: ‘pipe_down[0]’ leaks here
# 1006|   	}
# 1007|   	if (pipe_up[0] != -1) {
# 1008|-> 		close(pipe_up[0]);
# 1009|   	}
# 1010|   	if (pipe_up[1] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
tdb-1.4.14/common/mutex.c:1008:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1008:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1008:17: danger: ‘pipe_down[1]’ leaks here
# 1006|   	}
# 1007|   	if (pipe_up[0] != -1) {
# 1008|-> 		close(pipe_up[0]);
# 1009|   	}
# 1010|   	if (pipe_up[1] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
tdb-1.4.14/common/mutex.c:1008:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1008:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1008:17: danger: ‘pipe_up[0]’ leaks here
# 1006|   	}
# 1007|   	if (pipe_up[0] != -1) {
# 1008|-> 		close(pipe_up[0]);
# 1009|   	}
# 1010|   	if (pipe_up[1] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
tdb-1.4.14/common/mutex.c:1008:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1008:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1008:17: danger: ‘pipe_up[1]’ leaks here
# 1006|   	}
# 1007|   	if (pipe_up[0] != -1) {
# 1008|-> 		close(pipe_up[0]);
# 1009|   	}
# 1010|   	if (pipe_up[1] != -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
tdb-1.4.14/common/mutex.c:1011:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1010:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1010:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1011:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1011:17: danger: ‘pipe_down[0]’ leaks here
# 1009|   	}
# 1010|   	if (pipe_up[1] != -1) {
# 1011|-> 		close(pipe_up[1]);
# 1012|   	}
# 1013|   	if (ptr != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
tdb-1.4.14/common/mutex.c:1011:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1010:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1010:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1011:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1011:17: danger: ‘pipe_down[1]’ leaks here
# 1009|   	}
# 1010|   	if (pipe_up[1] != -1) {
# 1011|-> 		close(pipe_up[1]);
# 1012|   	}
# 1013|   	if (ptr != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
tdb-1.4.14/common/mutex.c:1011:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1010:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1010:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1011:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1011:17: danger: ‘pipe_up[0]’ leaks here
# 1009|   	}
# 1010|   	if (pipe_up[1] != -1) {
# 1011|-> 		close(pipe_up[1]);
# 1012|   	}
# 1013|   	if (ptr != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
tdb-1.4.14/common/mutex.c:1011:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
tdb-1.4.14/common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:844:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:848:9: branch_false: ...to here
tdb-1.4.14/common/mutex.c:851:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:855:9: branch_true: ...to here
tdb-1.4.14/common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)...
tdb-1.4.14/common/mutex.c:863:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:864:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:867:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:868:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:872:15: branch_false: ...to here
tdb-1.4.14/common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’
tdb-1.4.14/common/mutex.c:995:12: branch_true: ...to here
tdb-1.4.14/common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
tdb-1.4.14/common/mutex.c:998:12: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1001:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1004:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1004:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1007:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1007:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/mutex.c:1010:13: branch_false: ...to here
tdb-1.4.14/common/mutex.c:1010:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/mutex.c:1011:17: branch_true: ...to here
tdb-1.4.14/common/mutex.c:1011:17: danger: ‘pipe_up[1]’ leaks here
# 1009|   	}
# 1010|   	if (pipe_up[1] != -1) {
# 1011|-> 		close(pipe_up[1]);
# 1012|   	}
# 1013|   	if (ptr != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
tdb-1.4.14/common/open.c:42:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:432:13: branch_false: ...to here
tdb-1.4.14/common/open.c:432:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:440:15: branch_false: ...to here
tdb-1.4.14/common/open.c:440:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:445:13: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#   40|   	hash_key.dptr = discard_const_p(unsigned char, TDB_MAGIC_FOOD);
#   41|   	hash_key.dsize = sizeof(TDB_MAGIC_FOOD);
#   42|-> 	*magic1_hash = tdb->hash_fn(&hash_key);
#   43|   
#   44|   	hash_key.dptr = (unsigned char *)CONVERT(tdb_magic);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
tdb-1.4.14/common/open.c:42:24: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#   40|   	hash_key.dptr = discard_const_p(unsigned char, TDB_MAGIC_FOOD);
#   41|   	hash_key.dsize = sizeof(TDB_MAGIC_FOOD);
#   42|-> 	*magic1_hash = tdb->hash_fn(&hash_key);
#   43|   
#   44|   	hash_key.dptr = (unsigned char *)CONVERT(tdb_magic);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
tdb-1.4.14/common/open.c:42:24: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:432:13: branch_false: ...to here
tdb-1.4.14/common/open.c:432:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:440:15: branch_false: ...to here
tdb-1.4.14/common/open.c:440:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:445:13: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#   40|   	hash_key.dptr = discard_const_p(unsigned char, TDB_MAGIC_FOOD);
#   41|   	hash_key.dsize = sizeof(TDB_MAGIC_FOOD);
#   42|-> 	*magic1_hash = tdb->hash_fn(&hash_key);
#   43|   
#   44|   	hash_key.dptr = (unsigned char *)CONVERT(tdb_magic);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
tdb-1.4.14/common/open.c:44:42: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#   42|   	*magic1_hash = tdb->hash_fn(&hash_key);
#   43|   
#   44|-> 	hash_key.dptr = (unsigned char *)CONVERT(tdb_magic);
#   45|   	hash_key.dsize = sizeof(tdb_magic);
#   46|   	*magic2_hash = tdb->hash_fn(&hash_key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
tdb-1.4.14/common/open.c:46:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:432:13: branch_false: ...to here
tdb-1.4.14/common/open.c:432:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:440:15: branch_false: ...to here
tdb-1.4.14/common/open.c:440:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:445:13: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#   44|   	hash_key.dptr = (unsigned char *)CONVERT(tdb_magic);
#   45|   	hash_key.dsize = sizeof(tdb_magic);
#   46|-> 	*magic2_hash = tdb->hash_fn(&hash_key);
#   47|   
#   48|   	/* Make sure at least one hash is non-zero! */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
tdb-1.4.14/common/open.c:46:24: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#   44|   	hash_key.dptr = (unsigned char *)CONVERT(tdb_magic);
#   45|   	hash_key.dsize = sizeof(tdb_magic);
#   46|-> 	*magic2_hash = tdb->hash_fn(&hash_key);
#   47|   
#   48|   	/* Make sure at least one hash is non-zero! */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
tdb-1.4.14/common/open.c:46:24: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:432:13: branch_false: ...to here
tdb-1.4.14/common/open.c:432:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:440:15: branch_false: ...to here
tdb-1.4.14/common/open.c:440:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:445:13: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#   44|   	hash_key.dptr = (unsigned char *)CONVERT(tdb_magic);
#   45|   	hash_key.dsize = sizeof(tdb_magic);
#   46|-> 	*magic2_hash = tdb->hash_fn(&hash_key);
#   47|   
#   48|   	/* Make sure at least one hash is non-zero! */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
tdb-1.4.14/common/open.c:120:37: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#  118|   
#  119|   	if (newdb->feature_flags & TDB_FEATURE_FLAG_MUTEX) {
#  120|-> 		newdb->mutex_size = tdb_mutex_size(tdb);
#  121|   		tdb->hdr_ofs = newdb->mutex_size;
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
tdb-1.4.14/common/open.c:125:9: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#  123|   
#  124|   	/* This creates an endian-converted header, as if read from disk */
#  125|-> 	CONVERT(*newdb);
#  126|   	memcpy(header, newdb, sizeof(*header));
#  127|   	/* Don't endian-convert the magic food! */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
tdb-1.4.14/common/open.c:130:14: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#  128|   	memcpy(newdb->magic_food, TDB_MAGIC_FOOD, strlen(TDB_MAGIC_FOOD)+1);
#  129|   
#  130|-> 	if (!tdb_write_all(tdb->fd, newdb, size))
#  131|   		goto fail;
#  132|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
tdb-1.4.14/common/open.c:146:23: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#  144|   			goto fail;
#  145|   		}
#  146|-> 		ret = tdb_mutex_init(tdb);
#  147|   		if (ret == -1) {
#  148|   			goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
tdb-1.4.14/common/open.c:159:22: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
#  157|   			goto fail;
#  158|   		}
#  159|-> 		if (!tdb_write_all(tdb->fd, newdb, size)) {
#  160|   			goto fail;
#  161|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
tdb-1.4.14/common/open.c:242:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  240|   
#  241|   	if (!(tdb->flags & TDB_MUTEX_LOCKING)) {
#  242|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_mutex_open_ok[%s]: "
#  243|   			 "Can use mutexes only with "
#  244|   			 "MUTEX_LOCKING or NOLOCK\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
tdb-1.4.14/common/open.c:242:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  240|   
#  241|   	if (!(tdb->flags & TDB_MUTEX_LOCKING)) {
#  242|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_mutex_open_ok[%s]: "
#  243|   			 "Can use mutexes only with "
#  244|   			 "MUTEX_LOCKING or NOLOCK\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
tdb-1.4.14/common/open.c:286:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:286:9: danger: ‘tdb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  284|   		goto fail;
#  285|   	}
#  286|-> 	tdb_io_init(tdb);
#  287|   
#  288|   	if (tdb_flags & TDB_INTERNAL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
tdb-1.4.14/common/open.c:316:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:310:12: branch_true: following ‘true’ branch (when ‘name’ is NULL)...
tdb-1.4.14/common/open.c:310:29: branch_true: ...to here
tdb-1.4.14/common/open.c:310:13: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:315:17: branch_false: ...to here
tdb-1.4.14/common/open.c:316:17: danger: ‘tdb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  314|   	if (name == NULL) {
#  315|   		tdb->name = discard_const_p(char, "__NULL__");
#  316|-> 		TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: called with name == NULL\n"));
#  317|   		tdb->name = NULL;
#  318|   		errno = EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
tdb-1.4.14/common/open.c:329:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:328:17: branch_true: ...to here
tdb-1.4.14/common/open.c:329:17: danger: ‘tdb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  327|   		 */
#  328|   		tdb->name = discard_const_p(char, name);
#  329|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't strdup(%s)\n",
#  330|   			 name));
#  331|   		tdb->name = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
tdb-1.4.14/common/open.c:358:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:358:17: branch_true: ...to here
tdb-1.4.14/common/open.c:358:17: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/4)
#  356|   
#  357|   	if ((open_flags & O_ACCMODE) == O_WRONLY) {
#  358|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n",
#  359|   			 name));
#  360|   		errno = EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
tdb-1.4.14/common/open.c:358:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:358:17: branch_true: ...to here
tdb-1.4.14/common/open.c:358:17: danger: ‘tdb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  356|   
#  357|   	if ((open_flags & O_ACCMODE) == O_WRONLY) {
#  358|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n",
#  359|   			 name));
#  360|   		errno = EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
tdb-1.4.14/common/open.c:376:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:373:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:374:13: branch_true: ...to here
tdb-1.4.14/common/open.c:373:13: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:375:17: branch_true: ...to here
tdb-1.4.14/common/open.c:376:17: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
#  374|   	    (tdb->flags & TDB_DISALLOW_NESTING)) {
#  375|   		tdb->ecode = TDB_ERR_NESTING;
#  376|-> 		TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: "
#  377|   			"allow_nesting and disallow_nesting are not allowed together!"));
#  378|   		errno = EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
tdb-1.4.14/common/open.c:376:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:373:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:374:13: branch_true: ...to here
tdb-1.4.14/common/open.c:373:13: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:375:17: branch_true: ...to here
tdb-1.4.14/common/open.c:376:17: danger: ‘tdb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  374|   	    (tdb->flags & TDB_DISALLOW_NESTING)) {
#  375|   		tdb->ecode = TDB_ERR_NESTING;
#  376|-> 		TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: "
#  377|   			"allow_nesting and disallow_nesting are not allowed together!"));
#  378|   		errno = EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
tdb-1.4.14/common/open.c:389:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:389:25: branch_true: ...to here
tdb-1.4.14/common/open.c:389:25: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
#  387|   
#  388|   		if (tdb->flags & TDB_INTERNAL) {
#  389|-> 			TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: "
#  390|   				"invalid flags for %s - TDB_MUTEX_LOCKING and "
#  391|   				"TDB_INTERNAL are not allowed together\n", name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
tdb-1.4.14/common/open.c:389:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:389:25: branch_true: ...to here
tdb-1.4.14/common/open.c:389:25: danger: ‘tdb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  387|   
#  388|   		if (tdb->flags & TDB_INTERNAL) {
#  389|-> 			TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: "
#  390|   				"invalid flags for %s - TDB_MUTEX_LOCKING and "
#  391|   				"TDB_INTERNAL are not allowed together\n", name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
tdb-1.4.14/common/open.c:397:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:397:25: branch_true: ...to here
tdb-1.4.14/common/open.c:397:25: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/4)
#  395|   
#  396|   		if (tdb->flags & TDB_NOMMAP) {
#  397|-> 			TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: "
#  398|   				"invalid flags for %s - TDB_MUTEX_LOCKING and "
#  399|   				"TDB_NOMMAP are not allowed together\n", name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
tdb-1.4.14/common/open.c:397:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:397:25: branch_true: ...to here
tdb-1.4.14/common/open.c:397:25: danger: ‘tdb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  395|   
#  396|   		if (tdb->flags & TDB_NOMMAP) {
#  397|-> 			TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: "
#  398|   				"invalid flags for %s - TDB_MUTEX_LOCKING and "
#  399|   				"TDB_NOMMAP are not allowed together\n", name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
tdb-1.4.14/common/open.c:405:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:367:17: branch_true: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:405:25: branch_true: ...to here
tdb-1.4.14/common/open.c:405:25: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/4)
#  403|   
#  404|   		if (tdb->read_only) {
#  405|-> 			TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: "
#  406|   				"invalid flags for %s - TDB_MUTEX_LOCKING "
#  407|   				"not allowed read only\n", name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
tdb-1.4.14/common/open.c:405:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:367:17: branch_true: ...to here
tdb-1.4.14/common/open.c:382:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:388:21: branch_true: ...to here
tdb-1.4.14/common/open.c:388:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:396:21: branch_false: ...to here
tdb-1.4.14/common/open.c:396:20: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:404:21: branch_false: ...to here
tdb-1.4.14/common/open.c:404:20: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:405:25: branch_true: ...to here
tdb-1.4.14/common/open.c:405:25: danger: ‘tdb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
#  403|   
#  404|   		if (tdb->read_only) {
#  405|-> 			TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: "
#  406|   				"invalid flags for %s - TDB_MUTEX_LOCKING "
#  407|   				"not allowed read only\n", name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
tdb-1.4.14/common/open.c:456:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  454|   	}
#  455|   
#  456|-> 	if ((tdb->fd = open(name, open_flags, mode)) == -1) {
#  457|   		TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_open_ex: could not open file %s: %s\n",
#  458|   			 name, strerror(errno)));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
tdb-1.4.14/common/open.c:456:24: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  454|   	}
#  455|   
#  456|-> 	if ((tdb->fd = open(name, open_flags, mode)) == -1) {
#  457|   		TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_open_ex: could not open file %s: %s\n",
#  458|   			 name, strerror(errno)));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
tdb-1.4.14/common/open.c:457:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  455|   
#  456|   	if ((tdb->fd = open(name, open_flags, mode)) == -1) {
#  457|-> 		TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_open_ex: could not open file %s: %s\n",
#  458|   			 name, strerror(errno)));
#  459|   		goto fail;	/* errno set by open(2) */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
tdb-1.4.14/common/open.c:457:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  455|   
#  456|   	if ((tdb->fd = open(name, open_flags, mode)) == -1) {
#  457|-> 		TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_open_ex: could not open file %s: %s\n",
#  458|   			 name, strerror(errno)));
#  459|   		goto fail;	/* errno set by open(2) */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
tdb-1.4.14/common/open.c:463:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  461|   
#  462|   	/* on exec, don't inherit the fd */
#  463|-> 	v = fcntl(tdb->fd, F_GETFD, 0);
#  464|           fcntl(tdb->fd, F_SETFD, v | FD_CLOEXEC);
#  465|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
tdb-1.4.14/common/open.c:463:13: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  461|   
#  462|   	/* on exec, don't inherit the fd */
#  463|-> 	v = fcntl(tdb->fd, F_GETFD, 0);
#  464|           fcntl(tdb->fd, F_SETFD, v | FD_CLOEXEC);
#  465|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
tdb-1.4.14/common/open.c:464:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  462|   	/* on exec, don't inherit the fd */
#  463|   	v = fcntl(tdb->fd, F_GETFD, 0);
#  464|->         fcntl(tdb->fd, F_SETFD, v | FD_CLOEXEC);
#  465|   
#  466|   	/* ensure there is only one process initialising at once */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
tdb-1.4.14/common/open.c:464:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  462|   	/* on exec, don't inherit the fd */
#  463|   	v = fcntl(tdb->fd, F_GETFD, 0);
#  464|->         fcntl(tdb->fd, F_SETFD, v | FD_CLOEXEC);
#  465|   
#  466|   	/* ensure there is only one process initialising at once */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
tdb-1.4.14/common/open.c:468:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  466|   	/* ensure there is only one process initialising at once */
#  467|   	if (tdb_nest_lock(tdb, OPEN_LOCK, F_WRLCK, TDB_LOCK_WAIT) == -1) {
#  468|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: failed to get open lock on %s: %s\n",
#  469|   			 name, strerror(errno)));
#  470|   		goto fail;	/* errno set by tdb_brlock */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
tdb-1.4.14/common/open.c:468:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  466|   	/* ensure there is only one process initialising at once */
#  467|   	if (tdb_nest_lock(tdb, OPEN_LOCK, F_WRLCK, TDB_LOCK_WAIT) == -1) {
#  468|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: failed to get open lock on %s: %s\n",
#  469|   			 name, strerror(errno)));
#  470|   		goto fail;	/* errno set by tdb_brlock */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
tdb-1.4.14/common/open.c:558:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  556|   	tdb->device = st.st_dev;
#  557|   	tdb->inode = st.st_ino;
#  558|-> 	ZERO_STRUCT(st);
#  559|   
#  560|   	if (header.rwlocks != 0 &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
tdb-1.4.14/common/open.c:558:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  556|   	tdb->device = st.st_dev;
#  557|   	tdb->inode = st.st_ino;
#  558|-> 	ZERO_STRUCT(st);
#  559|   
#  560|   	if (header.rwlocks != 0 &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
tdb-1.4.14/common/open.c:563:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  561|   	    header.rwlocks != TDB_FEATURE_FLAG_MAGIC &&
#  562|   	    header.rwlocks != TDB_HASH_RWLOCK_MAGIC) {
#  563|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: spinlocks no longer supported\n"));
#  564|   		errno = ENOSYS;
#  565|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
tdb-1.4.14/common/open.c:563:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  561|   	    header.rwlocks != TDB_FEATURE_FLAG_MAGIC &&
#  562|   	    header.rwlocks != TDB_HASH_RWLOCK_MAGIC) {
#  563|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: spinlocks no longer supported\n"));
#  564|   		errno = ENOSYS;
#  565|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
tdb-1.4.14/common/open.c:569:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  567|   
#  568|   	if (header.hash_size == 0) {
#  569|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: invalid database: 0 hash_size\n"));
#  570|   		errno = ENOSYS;
#  571|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
tdb-1.4.14/common/open.c:569:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  567|   
#  568|   	if (header.hash_size == 0) {
#  569|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: invalid database: 0 hash_size\n"));
#  570|   		errno = ENOSYS;
#  571|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
tdb-1.4.14/common/open.c:581:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  579|   
#  580|   	if (tdb->feature_flags & ~TDB_SUPPORTED_FEATURE_FLAGS) {
#  581|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: unsupported "
#  582|   			 "features in tdb %s: 0x%08x (supported: 0x%08x)\n",
#  583|   			 name, (unsigned)tdb->feature_flags,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
tdb-1.4.14/common/open.c:581:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/test/run-circular-freelist.c:17:5: enter_function: entry to ‘main’
tdb-1.4.14/test/run-circular-freelist.c:23:15: call_function: calling ‘tdb_open_ex’ from ‘main’
#  579|   
#  580|   	if (tdb->feature_flags & ~TDB_SUPPORTED_FEATURE_FLAGS) {
#  581|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: unsupported "
#  582|   			 "features in tdb %s: 0x%08x (supported: 0x%08x)\n",
#  583|   			 name, (unsigned)tdb->feature_flags,

Error: GCC_ANALYZER_WARNING: [#def106]
tdb-1.4.14/common/tdb.c:1158:23: warning[-Wanalyzer-fd-use-without-check]: ‘write’ on possibly invalid file descriptor ‘fd’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:432:13: branch_false: ...to here
tdb-1.4.14/common/open.c:432:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:440:15: branch_false: ...to here
tdb-1.4.14/common/open.c:440:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:445:13: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
# 1156|   	while (count) {
# 1157|   		ssize_t ret;
# 1158|-> 		ret = write(fd, buf, count);
# 1159|   		if (ret < 0)
# 1160|   			return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
tdb-1.4.14/common/tdb.c:1158:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:27: acquire_memory: allocated here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:432:13: branch_false: ...to here
tdb-1.4.14/common/open.c:432:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:440:15: branch_false: ...to here
tdb-1.4.14/common/open.c:440:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:445:13: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
# 1156|   	while (count) {
# 1157|   		ssize_t ret;
# 1158|-> 		ret = write(fd, buf, count);
# 1159|   		if (ret < 0)
# 1160|   			return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
tdb-1.4.14/common/tdb.c:1158:23: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:432:13: branch_false: ...to here
tdb-1.4.14/common/open.c:432:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:440:15: branch_false: ...to here
tdb-1.4.14/common/open.c:440:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:445:13: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
# 1156|   	while (count) {
# 1157|   		ssize_t ret;
# 1158|-> 		ret = write(fd, buf, count);
# 1159|   		if (ret < 0)
# 1160|   			return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
tdb-1.4.14/common/tdb.c:1158:23: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
tdb-1.4.14/common/open.c:261:30: enter_function: entry to ‘tdb_open_ex’
tdb-1.4.14/common/open.c:281:43: acquire_memory: allocated here
tdb-1.4.14/common/open.c:281:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
tdb-1.4.14/common/open.c:286:9: branch_false: ...to here
tdb-1.4.14/common/open.c:303:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
tdb-1.4.14/common/open.c:304:17: branch_true: ...to here
tdb-1.4.14/common/open.c:323:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:336:12: branch_false: ...to here
tdb-1.4.14/common/open.c:355:33: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:355:9: branch_true: ...to here
tdb-1.4.14/common/open.c:357:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:364:12: branch_false: ...to here
tdb-1.4.14/common/open.c:366:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:373:14: branch_false: ...to here
tdb-1.4.14/common/open.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:432:13: branch_false: ...to here
tdb-1.4.14/common/open.c:432:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:440:15: branch_false: ...to here
tdb-1.4.14/common/open.c:440:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/open.c:445:13: branch_false: ...to here
tdb-1.4.14/common/open.c:445:12: branch_true: following ‘true’ branch...
tdb-1.4.14/common/open.c:447:28: branch_true: ...to here
tdb-1.4.14/common/open.c:448:21: call_function: calling ‘tdb_new_database’ from ‘tdb_open_ex’
# 1156|   	while (count) {
# 1157|   		ssize_t ret;
# 1158|-> 		ret = write(fd, buf, count);
# 1159|   		if (ret < 0)
# 1160|   			return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
tdb-1.4.14/common/transaction.c:1298:13: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
tdb-1.4.14/common/transaction.c:1258:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/transaction.c:1264:13: branch_false: ...to here
tdb-1.4.14/common/transaction.c:1264:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/transaction.c:1270:13: branch_false: ...to here
tdb-1.4.14/common/transaction.c:1270:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/transaction.c:1277:13: branch_false: ...to here
tdb-1.4.14/common/transaction.c:1277:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/transaction.c:1282:13: branch_false: ...to here
tdb-1.4.14/common/transaction.c:1282:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/transaction.c:1288:9: branch_false: ...to here
tdb-1.4.14/common/transaction.c:1290:33: acquire_memory: allocated here
tdb-1.4.14/common/transaction.c:1291:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
tdb-1.4.14/common/transaction.c:1298:13: branch_false: ...to here
tdb-1.4.14/common/transaction.c:1298:13: danger: ‘data’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1296|   
# 1297|   	/* read the full recovery data */
# 1298|-> 	if (tdb->methods->tdb_read(tdb, recovery_head + sizeof(rec), data,
# 1299|   				   rec.data_len, 0) == -1) {
# 1300|   		TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to read recovery data\n"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
tdb-1.4.14/common/traverse.c:70:25: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/common/traverse.c:137:12: enter_function: entry to ‘tdb_traverse_internal’
tdb-1.4.14/common/traverse.c:148:20: acquire_memory: allocated here
tdb-1.4.14/common/traverse.c:149:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/traverse.c:156:20: branch_false: ...to here
tdb-1.4.14/common/traverse.c:162:23: call_function: calling ‘tdb_next_lock’ from ‘tdb_traverse_internal’
#   68|   			   system (testing using ldbtest).
#   69|   			*/
#   70|-> 			tdb->methods->next_hash_chain(tdb, &tlock->list);
#   71|   			if (tlock->list == tdb->hash_size) {
#   72|   				continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
tdb-1.4.14/common/traverse.c:76:21: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/common/traverse.c:137:12: enter_function: entry to ‘tdb_traverse_internal’
tdb-1.4.14/common/traverse.c:148:20: acquire_memory: allocated here
tdb-1.4.14/common/traverse.c:149:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/traverse.c:156:20: branch_false: ...to here
tdb-1.4.14/common/traverse.c:162:23: call_function: calling ‘tdb_next_lock’ from ‘tdb_traverse_internal’
#   74|   		}
#   75|   
#   76|-> 		if (tdb_lock(tdb, tlock->list, tlock->lock_rw) == -1)
#   77|   			return TDB_NEXT_LOCK_ERR;
#   78|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
tdb-1.4.14/common/traverse.c:81:29: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/common/traverse.c:137:12: enter_function: entry to ‘tdb_traverse_internal’
tdb-1.4.14/common/traverse.c:148:20: acquire_memory: allocated here
tdb-1.4.14/common/traverse.c:149:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/traverse.c:156:20: branch_false: ...to here
tdb-1.4.14/common/traverse.c:162:23: call_function: calling ‘tdb_next_lock’ from ‘tdb_traverse_internal’
#   79|   		/* No previous record?  Start at top of chain. */
#   80|   		if (!tlock->off) {
#   81|-> 			if (tdb_ofs_read(tdb, TDB_HASH_TOP(tlock->list),
#   82|   				     &tlock->off) == -1)
#   83|   				goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
tdb-1.4.14/common/traverse.c:86:29: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/common/traverse.c:137:12: enter_function: entry to ‘tdb_traverse_internal’
tdb-1.4.14/common/traverse.c:148:20: acquire_memory: allocated here
tdb-1.4.14/common/traverse.c:149:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/traverse.c:156:20: branch_false: ...to here
tdb-1.4.14/common/traverse.c:162:23: call_function: calling ‘tdb_next_lock’ from ‘tdb_traverse_internal’
#   84|   		} else {
#   85|   			/* Otherwise unlock the previous record. */
#   86|-> 			if (tdb_unlock_record(tdb, tlock->off) != 0)
#   87|   				goto fail;
#   88|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
tdb-1.4.14/common/traverse.c:92:29: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/common/traverse.c:137:12: enter_function: entry to ‘tdb_traverse_internal’
tdb-1.4.14/common/traverse.c:148:20: acquire_memory: allocated here
tdb-1.4.14/common/traverse.c:149:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/traverse.c:156:20: branch_false: ...to here
tdb-1.4.14/common/traverse.c:162:23: call_function: calling ‘tdb_next_lock’ from ‘tdb_traverse_internal’
#   90|   		if (want_next) {
#   91|   			/* We have offset of old record: grab next */
#   92|-> 			if (tdb_rec_read(tdb, tlock->off, rec) == -1)
#   93|   				goto fail;
#   94|   			tlock->off = rec->next;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
tdb-1.4.14/common/traverse.c:99:29: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/common/traverse.c:137:12: enter_function: entry to ‘tdb_traverse_internal’
tdb-1.4.14/common/traverse.c:148:20: acquire_memory: allocated here
tdb-1.4.14/common/traverse.c:149:12: branch_false: following ‘false’ branch...
tdb-1.4.14/common/traverse.c:156:20: branch_false: ...to here
tdb-1.4.14/common/traverse.c:162:23: call_function: calling ‘tdb_next_lock’ from ‘tdb_traverse_internal’
#   97|   		/* Iterate through chain */
#   98|   		while( tlock->off) {
#   99|-> 			if (tdb_rec_read(tdb, tlock->off, rec) == -1)
#  100|   				goto fail;
#  101|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
tdb-1.4.14/common/traverse.c:105:33: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/common/traverse.c:246:14: enter_function: entry to ‘tdb_traverse_read’
tdb-1.4.14/common/traverse.c:254:15: call_function: calling ‘tdb_traverse_internal’ from ‘tdb_traverse_read’
#  103|   			if (tlock->off == rec->next) {
#  104|   				tdb->ecode = TDB_ERR_CORRUPT;
#  105|-> 				TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_next_lock: loop detected.\n"));
#  106|   				goto fail;
#  107|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
tdb-1.4.14/common/traverse.c:111:37: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/common/traverse.c:246:14: enter_function: entry to ‘tdb_traverse_read’
tdb-1.4.14/common/traverse.c:254:15: call_function: calling ‘tdb_traverse_internal’ from ‘tdb_traverse_read’
#  109|   			if (!TDB_DEAD(rec)) {
#  110|   				/* Woohoo: we found one! */
#  111|-> 				if (tdb_lock_record(tdb, tlock->off) != 0)
#  112|   					goto fail;
#  113|   				return tlock->off;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
tdb-1.4.14/common/traverse.c:118:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/common/traverse.c:246:14: enter_function: entry to ‘tdb_traverse_read’
tdb-1.4.14/common/traverse.c:254:15: call_function: calling ‘tdb_traverse_internal’ from ‘tdb_traverse_read’
#  116|   			tlock->off = rec->next;
#  117|   		}
#  118|-> 		tdb_unlock(tdb, tlock->list, tlock->lock_rw);
#  119|   		want_next = 0;
#  120|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
tdb-1.4.14/lib/replace/tests/os2_delete.c:109:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("test.dir/test0.txt")’
tdb-1.4.14/lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’
tdb-1.4.14/lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’
tdb-1.4.14/lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’
tdb-1.4.14/lib/replace/tests/os2_delete.c:106:13: acquire_memory: allocated here
tdb-1.4.14/lib/replace/tests/os2_delete.c:107:12: branch_true: following ‘true’ branch...
tdb-1.4.14/lib/replace/tests/os2_delete.c:107:24: branch_true: ...to here
tdb-1.4.14/lib/replace/tests/os2_delete.c:109:12: branch_true: following ‘true’ branch...
tdb-1.4.14/lib/replace/tests/os2_delete.c:109:24: branch_true: ...to here
tdb-1.4.14/lib/replace/tests/os2_delete.c:109:24: danger: ‘opendir("test.dir/test0.txt")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  107|   	if (d != NULL) FAILED("opendir() on file succeed");
#  108|   	if (errno != ENOTDIR) FAILED("opendir() on file didn't give ENOTDIR");
#  109|-> 	if (d != NULL) closedir(d);
#  110|   
#  111|   	d = opendir(TESTDIR);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
tdb-1.4.14/lib/replace/tests/os2_delete.c:114:14: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("test.dir")’
tdb-1.4.14/lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’
tdb-1.4.14/lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’
tdb-1.4.14/lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’
tdb-1.4.14/lib/replace/tests/os2_delete.c:109:12: branch_false: following ‘false’ branch...
tdb-1.4.14/lib/replace/tests/os2_delete.c:111:13: branch_false: ...to here
tdb-1.4.14/lib/replace/tests/os2_delete.c:111:13: acquire_memory: allocated here
tdb-1.4.14/lib/replace/tests/os2_delete.c:114:14: danger: ‘opendir("test.dir")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  112|   
#  113|   	/* skip past . and .. */
#  114|-> 	de = readdir(d);
#  115|   	strcmp(de->d_name, ".") == 0 || FAILED("match .");
#  116|   	de = readdir(d);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def122]
tdb-1.4.14/lib/replace/tests/os2_delete.c:114:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir("test.dir")’ where non-null expected
tdb-1.4.14/lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’
tdb-1.4.14/lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’
tdb-1.4.14/lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’
tdb-1.4.14/lib/replace/tests/os2_delete.c:109:12: branch_false: following ‘false’ branch...
tdb-1.4.14/lib/replace/tests/os2_delete.c:111:13: branch_false: ...to here
tdb-1.4.14/lib/replace/tests/os2_delete.c:111:13: acquire_memory: this call could return NULL
tdb-1.4.14/lib/replace/tests/os2_delete.c:114:14: danger: argument 1 (‘opendir("test.dir")’) from [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
#  112|   
#  113|   	/* skip past . and .. */
#  114|-> 	de = readdir(d);
#  115|   	strcmp(de->d_name, ".") == 0 || FAILED("match .");
#  116|   	de = readdir(d);

Error: CPPCHECK_WARNING (CWE-476): [#def123]
tdb-1.4.14/lib/replace/tests/testsuite.c:172: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: x
#  170|   	x = strdup("bla");
#  171|   
#  172|-> 	cmp = strcmp("bla", x);
#  173|   	if (cmp != 0) {
#  174|   		printf("failure: strdup [\nfailed: expected \"bla\", got \"%s\"\n]\n",

Error: GCC_ANALYZER_WARNING (CWE-688): [#def124]
tdb-1.4.14/lib/replace/tests/testsuite.c:172:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
tdb-1.4.14/lib/replace/tests/testsuite.c:170:13: acquire_memory: this call could return NULL
tdb-1.4.14/lib/replace/tests/testsuite.c:172:15: danger: argument 2 (‘x’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#  170|   	x = strdup("bla");
#  171|   
#  172|-> 	cmp = strcmp("bla", x);
#  173|   	if (cmp != 0) {
#  174|   		printf("failure: strdup [\nfailed: expected \"bla\", got \"%s\"\n]\n",

Error: GCC_ANALYZER_WARNING (CWE-476): [#def125]
tdb-1.4.14/lib/replace/tests/testsuite.c:271:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘x’
tdb-1.4.14/lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL
tdb-1.4.14/lib/replace/tests/testsuite.c:271:15: danger: ‘x’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  269|   	printf("test: strndup\n");
#  270|   	x = strndup("bla", 0);
#  271|-> 	cmp = strcmp(x, "");
#  272|   	free(x);
#  273|   	if (cmp != 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def126]
tdb-1.4.14/lib/replace/tests/testsuite.c:279:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
tdb-1.4.14/lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL
tdb-1.4.14/lib/replace/tests/testsuite.c:273:12: branch_false: following ‘false’ branch...
tdb-1.4.14/lib/replace/tests/testsuite.c:278:13: branch_false: ...to here
tdb-1.4.14/lib/replace/tests/testsuite.c:278:13: acquire_memory: this call could return NULL
tdb-1.4.14/lib/replace/tests/testsuite.c:279:15: danger: argument 1 (‘x’) from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#  277|   
#  278|   	x = strndup("bla", 2);
#  279|-> 	cmp = strcmp(x, "bl");
#  280|   	free(x);
#  281|   	if (cmp != 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
tdb-1.4.14/lib/replace/tests/testsuite.c:1114:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
tdb-1.4.14/lib/replace/tests/testsuite.c:1102:19: branch_true: following ‘true’ branch (when ‘i != 100’)...
tdb-1.4.14/lib/replace/tests/testsuite.c:1103:22: branch_true: ...to here
tdb-1.4.14/lib/replace/tests/testsuite.c:1103:22: acquire_resource: opened here
tdb-1.4.14/lib/replace/tests/testsuite.c:1104:20: branch_false: following ‘false’ branch (when ‘fd != -1’)...
tdb-1.4.14/lib/replace/tests/testsuite.c:1112:20: branch_false: ...to here
tdb-1.4.14/lib/replace/tests/testsuite.c:1114:25: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1112|   		if (fd >= 1000) {
# 1113|   			printf("fd=%d\n", fd);
# 1114|-> 			closefrom(3);
# 1115|   			return false;
# 1116|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
tdb-1.4.14/pytdb.c:54:37: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
tdb-1.4.14/pytdb.c:360:18: enter_function: entry to ‘obj_storev’
tdb-1.4.14/pytdb.c:368:9: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:370:14: branch_false: ...to here
tdb-1.4.14/pytdb.c:370:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:375:22: branch_false: ...to here
tdb-1.4.14/pytdb.c:378:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:382:13: branch_false: ...to here
tdb-1.4.14/pytdb.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:386:12: branch_false: ...to here
tdb-1.4.14/pytdb.c:386:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:390:18: branch_false: ...to here
tdb-1.4.14/pytdb.c:390:18: acquire_memory: allocated here
tdb-1.4.14/pytdb.c:391:12: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
tdb-1.4.14/pytdb.c:395:19: branch_true: following ‘true’ branch...
tdb-1.4.14/pytdb.c:396:28: branch_true: ...to here
tdb-1.4.14/pytdb.c:397:25: call_function: calling ‘PyBytes_AsTDB_DATA’ from ‘obj_storev’
#   52|   {
#   53|   	TDB_DATA ret;
#   54|-> 	ret.dptr = (unsigned char *)PyBytes_AsString(data);
#   55|   	ret.dsize = PyBytes_Size(data);
#   56|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
tdb-1.4.14/pytdb.c:55:21: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
tdb-1.4.14/pytdb.c:360:18: enter_function: entry to ‘obj_storev’
tdb-1.4.14/pytdb.c:368:9: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:370:14: branch_false: ...to here
tdb-1.4.14/pytdb.c:370:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:375:22: branch_false: ...to here
tdb-1.4.14/pytdb.c:378:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:382:13: branch_false: ...to here
tdb-1.4.14/pytdb.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:386:12: branch_false: ...to here
tdb-1.4.14/pytdb.c:386:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:390:18: branch_false: ...to here
tdb-1.4.14/pytdb.c:390:18: acquire_memory: allocated here
tdb-1.4.14/pytdb.c:391:12: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
tdb-1.4.14/pytdb.c:395:19: branch_true: following ‘true’ branch...
tdb-1.4.14/pytdb.c:396:28: branch_true: ...to here
tdb-1.4.14/pytdb.c:397:25: call_function: calling ‘PyBytes_AsTDB_DATA’ from ‘obj_storev’
#   53|   	TDB_DATA ret;
#   54|   	ret.dptr = (unsigned char *)PyBytes_AsString(data);
#   55|-> 	ret.dsize = PyBytes_Size(data);
#   56|   	return ret;
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
tdb-1.4.14/pytdb.c:396:28: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
tdb-1.4.14/pytdb.c:368:9: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:370:14: branch_false: ...to here
tdb-1.4.14/pytdb.c:370:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:375:22: branch_false: ...to here
tdb-1.4.14/pytdb.c:378:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:382:13: branch_false: ...to here
tdb-1.4.14/pytdb.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:386:12: branch_false: ...to here
tdb-1.4.14/pytdb.c:386:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:390:18: branch_false: ...to here
tdb-1.4.14/pytdb.c:390:18: acquire_memory: allocated here
tdb-1.4.14/pytdb.c:391:12: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
tdb-1.4.14/pytdb.c:395:19: branch_true: following ‘true’ branch...
tdb-1.4.14/pytdb.c:396:28: branch_true: ...to here
tdb-1.4.14/pytdb.c:396:28: danger: ‘values’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  394|   	}
#  395|   	for (i=0; i<num_values; i++) {
#  396|-> 		py_value = PyList_GetItem(py_values, i);
#  397|   		value = PyBytes_AsTDB_DATA(py_value);
#  398|   		if (!value.dptr) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
tdb-1.4.14/pytdb.c:405:15: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
tdb-1.4.14/pytdb.c:368:9: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:370:14: branch_false: ...to here
tdb-1.4.14/pytdb.c:370:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:375:22: branch_false: ...to here
tdb-1.4.14/pytdb.c:378:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:382:13: branch_false: ...to here
tdb-1.4.14/pytdb.c:382:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:386:12: branch_false: ...to here
tdb-1.4.14/pytdb.c:386:12: branch_false: following ‘false’ branch...
tdb-1.4.14/pytdb.c:390:18: branch_false: ...to here
tdb-1.4.14/pytdb.c:390:18: acquire_memory: allocated here
tdb-1.4.14/pytdb.c:391:12: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
tdb-1.4.14/pytdb.c:405:15: danger: ‘values’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  403|   	}
#  404|   
#  405|-> 	ret = tdb_storev(self->ctx, key, values, (int)num_values, flag);
#  406|   	free(values);
#  407|   	PyErr_TDB_ERROR_IS_ERR_RAISE(ret, self->ctx);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
tdb-1.4.14/test/external-agent.c:26:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   24|   
#   25|   	if (op != OPEN && op != OPEN_WITH_CLEAR_IF_FIRST && !tdb) {
#   26|-> 		diag("external: No tdb open!");
#   27|   		return OTHER_FAILURE;
#   28|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def133]
tdb-1.4.14/test/external-agent.c:26:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   24|   
#   25|   	if (op != OPEN && op != OPEN_WITH_CLEAR_IF_FIRST && !tdb) {
#   26|-> 		diag("external: No tdb open!");
#   27|   		return OTHER_FAILURE;
#   28|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
tdb-1.4.14/test/external-agent.c:26:17: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   24|   
#   25|   	if (op != OPEN && op != OPEN_WITH_CLEAR_IF_FIRST && !tdb) {
#   26|-> 		diag("external: No tdb open!");
#   27|   		return OTHER_FAILURE;
#   28|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def135]
tdb-1.4.14/test/external-agent.c:37:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   35|   	case OPEN:
#   36|   		if (tdb) {
#   37|-> 			diag("Already have tdb %s open", tdb_name(tdb));
#   38|   			return OTHER_FAILURE;
#   39|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def136]
tdb-1.4.14/test/external-agent.c:37:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   35|   	case OPEN:
#   36|   		if (tdb) {
#   37|-> 			diag("Already have tdb %s open", tdb_name(tdb));
#   38|   			return OTHER_FAILURE;
#   39|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
tdb-1.4.14/test/external-agent.c:37:25: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   35|   	case OPEN:
#   36|   		if (tdb) {
#   37|-> 			diag("Already have tdb %s open", tdb_name(tdb));
#   38|   			return OTHER_FAILURE;
#   39|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def138]
tdb-1.4.14/test/external-agent.c:40:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   38|   			return OTHER_FAILURE;
#   39|   		}
#   40|-> 		tdb = tdb_open_ex(name, 0, TDB_DEFAULT, O_RDWR, 0,
#   41|   				  &taplogctx, NULL);
#   42|   		if (!tdb) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def139]
tdb-1.4.14/test/external-agent.c:40:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   38|   			return OTHER_FAILURE;
#   39|   		}
#   40|-> 		tdb = tdb_open_ex(name, 0, TDB_DEFAULT, O_RDWR, 0,
#   41|   				  &taplogctx, NULL);
#   42|   		if (!tdb) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
tdb-1.4.14/test/external-agent.c:40:23: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   38|   			return OTHER_FAILURE;
#   39|   		}
#   40|-> 		tdb = tdb_open_ex(name, 0, TDB_DEFAULT, O_RDWR, 0,
#   41|   				  &taplogctx, NULL);
#   42|   		if (!tdb) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def141]
tdb-1.4.14/test/external-agent.c:44:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   42|   		if (!tdb) {
#   43|   			if (!locking_would_block)
#   44|-> 				diag("Opening tdb gave %s", strerror(errno));
#   45|   			ret = OTHER_FAILURE;
#   46|   		} else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def142]
tdb-1.4.14/test/external-agent.c:44:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   42|   		if (!tdb) {
#   43|   			if (!locking_would_block)
#   44|-> 				diag("Opening tdb gave %s", strerror(errno));
#   45|   			ret = OTHER_FAILURE;
#   46|   		} else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
tdb-1.4.14/test/external-agent.c:44:33: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   42|   		if (!tdb) {
#   43|   			if (!locking_would_block)
#   44|-> 				diag("Opening tdb gave %s", strerror(errno));
#   45|   			ret = OTHER_FAILURE;
#   46|   		} else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def144]
tdb-1.4.14/test/external-agent.c:52:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   50|   		if (tdb)
#   51|   			return OTHER_FAILURE;
#   52|-> 		tdb = tdb_open_ex(name, 0, TDB_CLEAR_IF_FIRST, O_RDWR, 0,
#   53|   				  &taplogctx, NULL);
#   54|   		ret = tdb ? SUCCESS : OTHER_FAILURE;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def145]
tdb-1.4.14/test/external-agent.c:52:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   50|   		if (tdb)
#   51|   			return OTHER_FAILURE;
#   52|-> 		tdb = tdb_open_ex(name, 0, TDB_CLEAR_IF_FIRST, O_RDWR, 0,
#   53|   				  &taplogctx, NULL);
#   54|   		ret = tdb ? SUCCESS : OTHER_FAILURE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
tdb-1.4.14/test/external-agent.c:52:23: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   50|   		if (tdb)
#   51|   			return OTHER_FAILURE;
#   52|-> 		tdb = tdb_open_ex(name, 0, TDB_CLEAR_IF_FIRST, O_RDWR, 0,
#   53|   				  &taplogctx, NULL);
#   54|   		ret = tdb ? SUCCESS : OTHER_FAILURE;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def147]
tdb-1.4.14/test/external-agent.c:57:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   55|   		break;
#   56|   	case TRANSACTION_START:
#   57|-> 		ret = tdb_transaction_start(tdb) == 0 ? SUCCESS : OTHER_FAILURE;
#   58|   		break;
#   59|   	case FETCH:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def148]
tdb-1.4.14/test/external-agent.c:57:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   55|   		break;
#   56|   	case TRANSACTION_START:
#   57|-> 		ret = tdb_transaction_start(tdb) == 0 ? SUCCESS : OTHER_FAILURE;
#   58|   		break;
#   59|   	case FETCH:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
tdb-1.4.14/test/external-agent.c:57:23: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   55|   		break;
#   56|   	case TRANSACTION_START:
#   57|-> 		ret = tdb_transaction_start(tdb) == 0 ? SUCCESS : OTHER_FAILURE;
#   58|   		break;
#   59|   	case FETCH:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def150]
tdb-1.4.14/test/external-agent.c:60:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   58|   		break;
#   59|   	case FETCH:
#   60|-> 		data = tdb_fetch(tdb, k);
#   61|   		if (data.dptr == NULL) {
#   62|   			if (tdb_error(tdb) == TDB_ERR_NOEXIST)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def151]
tdb-1.4.14/test/external-agent.c:60:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   58|   		break;
#   59|   	case FETCH:
#   60|-> 		data = tdb_fetch(tdb, k);
#   61|   		if (data.dptr == NULL) {
#   62|   			if (tdb_error(tdb) == TDB_ERR_NOEXIST)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
tdb-1.4.14/test/external-agent.c:60:24: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:115:15: enter_function: entry to ‘prepare_external_agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:150:26: call_function: calling ‘do_operation’ from ‘prepare_external_agent’
#   58|   		break;
#   59|   	case FETCH:
#   60|-> 		data = tdb_fetch(tdb, k);
#   61|   		if (data.dptr == NULL) {
#   62|   			if (tdb_error(tdb) == TDB_ERR_NOEXIST)

Error: CPPCHECK_WARNING (CWE-476): [#def153]
tdb-1.4.14/test/external-agent.c:127: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: agent
#  125|   	}
#  126|   
#  127|-> 	agent->pid = fork();
#  128|   	if (agent->pid < 0) {
#  129|   		fprintf(stderr, "fork failed: %s\n", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def154]
tdb-1.4.14/test/external-agent.c:127:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: this call could return NULL
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:127:9: danger: ‘agent’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  125|   	}
#  126|   
#  127|-> 	agent->pid = fork();
#  128|   	if (agent->pid < 0) {
#  129|   		fprintf(stderr, "fork failed: %s\n", strerror(errno));

Error: CPPCHECK_WARNING (CWE-476): [#def155]
tdb-1.4.14/test/external-agent.c:128: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: agent
#  126|   
#  127|   	agent->pid = fork();
#  128|-> 	if (agent->pid < 0) {
#  129|   		fprintf(stderr, "fork failed: %s\n", strerror(errno));
#  130|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
tdb-1.4.14/test/external-agent.c:134:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_true: following ‘true’ branch...
tdb-1.4.14/test/external-agent.c:134:17: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:134:17: danger: ‘command[0]’ leaks here
#  132|   
#  133|   	if (agent->pid != 0) {
#  134|-> 		close(command[0]);
#  135|   		close(response[1]);
#  136|   		agent->cmdfd = command[1];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def157]
tdb-1.4.14/test/external-agent.c:134:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[1]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_true: following ‘true’ branch...
tdb-1.4.14/test/external-agent.c:134:17: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:134:17: danger: ‘command[1]’ leaks here
#  132|   
#  133|   	if (agent->pid != 0) {
#  134|-> 		close(command[0]);
#  135|   		close(response[1]);
#  136|   		agent->cmdfd = command[1];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
tdb-1.4.14/test/external-agent.c:134:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[0]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_true: following ‘true’ branch...
tdb-1.4.14/test/external-agent.c:134:17: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:134:17: danger: ‘response[0]’ leaks here
#  132|   
#  133|   	if (agent->pid != 0) {
#  134|-> 		close(command[0]);
#  135|   		close(response[1]);
#  136|   		agent->cmdfd = command[1];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def159]
tdb-1.4.14/test/external-agent.c:134:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_true: following ‘true’ branch...
tdb-1.4.14/test/external-agent.c:134:17: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:134:17: danger: ‘response[1]’ leaks here
#  132|   
#  133|   	if (agent->pid != 0) {
#  134|-> 		close(command[0]);
#  135|   		close(response[1]);
#  136|   		agent->cmdfd = command[1];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
tdb-1.4.14/test/external-agent.c:134:17: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_true: following ‘true’ branch...
tdb-1.4.14/test/external-agent.c:134:17: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:134:17: danger: ‘agent’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#  132|   
#  133|   	if (agent->pid != 0) {
#  134|-> 		close(command[0]);
#  135|   		close(response[1]);
#  136|   		agent->cmdfd = command[1];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def161]
tdb-1.4.14/test/external-agent.c:135:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[1]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_true: following ‘true’ branch...
tdb-1.4.14/test/external-agent.c:134:17: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:135:17: danger: ‘command[1]’ leaks here
#  133|   	if (agent->pid != 0) {
#  134|   		close(command[0]);
#  135|-> 		close(response[1]);
#  136|   		agent->cmdfd = command[1];
#  137|   		agent->responsefd = response[0];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def162]
tdb-1.4.14/test/external-agent.c:135:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[0]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_true: following ‘true’ branch...
tdb-1.4.14/test/external-agent.c:134:17: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:135:17: danger: ‘response[0]’ leaks here
#  133|   	if (agent->pid != 0) {
#  134|   		close(command[0]);
#  135|-> 		close(response[1]);
#  136|   		agent->cmdfd = command[1];
#  137|   		agent->responsefd = response[0];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def163]
tdb-1.4.14/test/external-agent.c:135:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_true: following ‘true’ branch...
tdb-1.4.14/test/external-agent.c:134:17: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:135:17: danger: ‘response[1]’ leaks here
#  133|   	if (agent->pid != 0) {
#  134|   		close(command[0]);
#  135|-> 		close(response[1]);
#  136|   		agent->cmdfd = command[1];
#  137|   		agent->responsefd = response[0];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
tdb-1.4.14/test/external-agent.c:135:17: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_true: following ‘true’ branch...
tdb-1.4.14/test/external-agent.c:134:17: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:135:17: danger: ‘agent’ leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
#  133|   	if (agent->pid != 0) {
#  134|   		close(command[0]);
#  135|-> 		close(response[1]);
#  136|   		agent->cmdfd = command[1];
#  137|   		agent->responsefd = response[0];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def165]
tdb-1.4.14/test/external-agent.c:141:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:141:9: danger: ‘command[0]’ leaks here
#  139|   	}
#  140|   
#  141|-> 	close(command[1]);
#  142|   	close(response[0]);
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
tdb-1.4.14/test/external-agent.c:141:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[1]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:141:9: danger: ‘command[1]’ leaks here
#  139|   	}
#  140|   
#  141|-> 	close(command[1]);
#  142|   	close(response[0]);
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def167]
tdb-1.4.14/test/external-agent.c:141:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[0]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:141:9: danger: ‘response[0]’ leaks here
#  139|   	}
#  140|   
#  141|-> 	close(command[1]);
#  142|   	close(response[0]);
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def168]
tdb-1.4.14/test/external-agent.c:141:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:141:9: danger: ‘response[1]’ leaks here
#  139|   	}
#  140|   
#  141|-> 	close(command[1]);
#  142|   	close(response[0]);
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
tdb-1.4.14/test/external-agent.c:141:9: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:141:9: danger: ‘agent’ leaks here; was allocated at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
#  139|   	}
#  140|   
#  141|-> 	close(command[1]);
#  142|   	close(response[0]);
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def170]
tdb-1.4.14/test/external-agent.c:142:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:142:9: danger: ‘command[0]’ leaks here
#  140|   
#  141|   	close(command[1]);
#  142|-> 	close(response[0]);
#  143|   
#  144|   	/* We want to fail, not block. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def171]
tdb-1.4.14/test/external-agent.c:142:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[0]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:142:9: danger: ‘response[0]’ leaks here
#  140|   
#  141|   	close(command[1]);
#  142|-> 	close(response[0]);
#  143|   
#  144|   	/* We want to fail, not block. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
tdb-1.4.14/test/external-agent.c:142:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:142:9: danger: ‘response[1]’ leaks here
#  140|   
#  141|   	close(command[1]);
#  142|-> 	close(response[0]);
#  143|   
#  144|   	/* We want to fail, not block. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
tdb-1.4.14/test/external-agent.c:142:9: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:142:9: danger: ‘agent’ leaks here; was allocated at [(1)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/0)
#  140|   
#  141|   	close(command[1]);
#  142|-> 	close(response[0]);
#  143|   
#  144|   	/* We want to fail, not block. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
tdb-1.4.14/test/external-agent.c:151:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘command[0]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:151:21: danger: ‘command[0]’ leaks here
#  149|   
#  150|   		result = do_operation(name[0], name+1);
#  151|-> 		if (write(response[1], &result, sizeof(result))
#  152|   		    != sizeof(result))
#  153|   			abort();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def175]
tdb-1.4.14/test/external-agent.c:151:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘response[1]’
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:151:21: danger: ‘response[1]’ leaks here
#  149|   
#  150|   		result = do_operation(name[0], name+1);
#  151|-> 		if (write(response[1], &result, sizeof(result))
#  152|   		    != sizeof(result))
#  153|   			abort();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
tdb-1.4.14/test/external-agent.c:151:21: warning[-Wanalyzer-malloc-leak]: leak of ‘agent’
tdb-1.4.14/test/external-agent.c:120:31: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:122:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:122:35: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:122:13: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:127:22: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:128:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:133:12: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:133:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/external-agent.c:141:9: branch_false: ...to here
tdb-1.4.14/test/external-agent.c:147:16: branch_true: following ‘true’ branch (when ‘ret > 0’)...
tdb-1.4.14/test/external-agent.c:150:39: branch_true: ...to here
tdb-1.4.14/test/external-agent.c:151:21: danger: ‘agent’ leaks here; was allocated at [(1)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/0)
#  149|   
#  150|   		result = do_operation(name[0], name+1);
#  151|-> 		if (write(response[1], &result, sizeof(result))
#  152|   		    != sizeof(result))
#  153|   			abort();

Error: CPPCHECK_WARNING (CWE-476): [#def177]
tdb-1.4.14/test/external-agent.c:186: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: string
#  184|   	string = malloc(len);
#  185|   
#  186|-> 	string[0] = op;
#  187|   	strncpy(string+1, name, len - 1);
#  188|   	string[len-1] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def178]
tdb-1.4.14/test/external-agent.c:186:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘string’
tdb-1.4.14/test/external-agent.c:184:18: acquire_memory: this call could return NULL
tdb-1.4.14/test/external-agent.c:186:9: danger: ‘string’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/0)
#  184|   	string = malloc(len);
#  185|   
#  186|-> 	string[0] = op;
#  187|   	strncpy(string+1, name, len - 1);
#  188|   	string[len-1] = '\0';

Error: CPPCHECK_WARNING (CWE-682): [#def179]
tdb-1.4.14/test/external-agent.c:187: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  185|   
#  186|   	string[0] = op;
#  187|-> 	strncpy(string+1, name, len - 1);
#  188|   	string[len-1] = '\0';
#  189|   

Error: CPPCHECK_WARNING (CWE-476): [#def180]
tdb-1.4.14/test/external-agent.c:188: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: string
#  186|   	string[0] = op;
#  187|   	strncpy(string+1, name, len - 1);
#  188|-> 	string[len-1] = '\0';
#  189|   
#  190|   	if (write(agent->cmdfd, string, len) != len

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
tdb-1.4.14/test/external-agent.c:190:13: warning[-Wanalyzer-malloc-leak]: leak of ‘string’
tdb-1.4.14/test/external-agent.c:184:18: acquire_memory: allocated here
tdb-1.4.14/test/external-agent.c:190:13: danger: ‘string’ leaks here; was allocated at [(1)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/0)
#  188|   	string[len-1] = '\0';
#  189|   
#  190|-> 	if (write(agent->cmdfd, string, len) != len
#  191|   	    || read(agent->responsefd, &res, sizeof(res)) != sizeof(res))
#  192|   		res = AGENT_DIED;

Error: CPPCHECK_WARNING (CWE-476): [#def182]
tdb-1.4.14/test/lock-tracking.c:134: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
#  132|   		if (ret == 0) {
#  133|   			new = malloc(sizeof *new);
#  134|-> 			new->off = fl->l_start;
#  135|   			new->len = fl->l_len;
#  136|   			new->type = fl->l_type;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def183]
tdb-1.4.14/test/lock-tracking.c:134:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new’
tdb-1.4.14/test/lock-tracking.c:30:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/lock-tracking.c:39:9: branch_false: ...to here
tdb-1.4.14/test/lock-tracking.c:54:12: branch_false: following ‘false’ branch...
tdb-1.4.14/test/lock-tracking.c:87:39: branch_false: ...to here
tdb-1.4.14/test/lock-tracking.c:92:37: branch_false: following ‘false’ branch (when ‘i’ is NULL)...
tdb-1.4.14/test/lock-tracking.c:112:20: branch_false: ...to here
tdb-1.4.14/test/lock-tracking.c:112:20: branch_false: following ‘false’ branch (when ‘i’ is NULL)...
tdb-1.4.14/test/lock-tracking.c:132:20: branch_false: ...to here
tdb-1.4.14/test/lock-tracking.c:132:20: branch_true: following ‘true’ branch...
tdb-1.4.14/test/lock-tracking.c:133:31: branch_true: ...to here
tdb-1.4.14/test/lock-tracking.c:133:31: acquire_memory: this call could return NULL
tdb-1.4.14/test/lock-tracking.c:134:25: danger: ‘new’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  132|   		if (ret == 0) {
#  133|   			new = malloc(sizeof *new);
#  134|-> 			new->off = fl->l_start;
#  135|   			new->len = fl->l_len;
#  136|   			new->type = fl->l_type;

Error: CPPCHECK_WARNING (CWE-476): [#def184]
tdb-1.4.14/test/lock-tracking.c:135: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
#  133|   			new = malloc(sizeof *new);
#  134|   			new->off = fl->l_start;
#  135|-> 			new->len = fl->l_len;
#  136|   			new->type = fl->l_type;
#  137|   			new->next = testlocks;

Error: CPPCHECK_WARNING (CWE-476): [#def185]
tdb-1.4.14/test/lock-tracking.c:136: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
#  134|   			new->off = fl->l_start;
#  135|   			new->len = fl->l_len;
#  136|-> 			new->type = fl->l_type;
#  137|   			new->next = testlocks;
#  138|   			testlocks = new;

Error: CPPCHECK_WARNING (CWE-476): [#def186]
tdb-1.4.14/test/lock-tracking.c:137: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
#  135|   			new->len = fl->l_len;
#  136|   			new->type = fl->l_type;
#  137|-> 			new->next = testlocks;
#  138|   			testlocks = new;
#  139|   		}

Error: COMPILER_WARNING (CWE-252): [#def187]
tdb-1.4.14/test/run-fcntl-deadlock.c: scope_hint: In function ‘expect_char’
tdb-1.4.14/test/run-fcntl-deadlock.c:100:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  100 |         read(pipe_r, buf, 1);
#      |         ^~~~~~~~~~~~~~~~~~~~
#   98|   static void expect_char(char c)
#   99|   {
#  100|-> 	read(pipe_r, buf, 1);
#  101|   	if (*buf != c) {
#  102|   		fail("We were expecting %c, but got %c", c, buf[0]);

Error: COMPILER_WARNING (CWE-252): [#def188]
tdb-1.4.14/test/run-fcntl-deadlock.c: scope_hint: In function ‘send_char’
tdb-1.4.14/test/run-fcntl-deadlock.c:108:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  108 |         write(pipe_w, &c, 1);
#      |         ^~~~~~~~~~~~~~~~~~~~
#  106|   static void send_char(char c)
#  107|   {
#  108|-> 	write(pipe_w, &c, 1);
#  109|   }
#  110|   

Error: COMPILER_WARNING (CWE-252): [#def189]
tdb-1.4.14/test/run-fcntl-deadlock.c: scope_hint: In function ‘main’
tdb-1.4.14/test/run-fcntl-deadlock.c:122:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#  122 |         pipe(pipes_1_2);
#      |         ^~~~~~~~~~~~~~~
#  120|   	int ret;
#  121|   
#  122|-> 	pipe(pipes_1_2);
#  123|   	pipe(pipes_2_1);
#  124|   	fd = open(filename, O_RDWR | O_CREAT, 0755);

Error: COMPILER_WARNING (CWE-252): [#def190]
tdb-1.4.14/test/run-fcntl-deadlock.c:123:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#  123 |         pipe(pipes_2_1);
#      |         ^~~~~~~~~~~~~~~
#  121|   
#  122|   	pipe(pipes_1_2);
#  123|-> 	pipe(pipes_2_1);
#  124|   	fd = open(filename, O_RDWR | O_CREAT, 0755);
#  125|   

Error: COMPILER_WARNING (CWE-252): [#def191]
tdb-1.4.14/test/run-mutex-allrecord-block.c: scope_hint: In function ‘do_child’
tdb-1.4.14/test/run-mutex-allrecord-block.c:45:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   45 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   43|   	ok(ret == 0, "tdb_allrecord_lock should succeed");
#   44|   
#   45|-> 	write(to, &c, sizeof(c));
#   46|   
#   47|   	read(from, &c, sizeof(c));

Error: COMPILER_WARNING (CWE-252): [#def192]
tdb-1.4.14/test/run-mutex-allrecord-block.c:47:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   47 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   45|   	write(to, &c, sizeof(c));
#   46|   
#   47|-> 	read(from, &c, sizeof(c));
#   48|   
#   49|   	ret = tdb_allrecord_unlock(tdb, F_WRLCK, false);

Error: COMPILER_WARNING (CWE-252): [#def193]
tdb-1.4.14/test/run-mutex-allrecord-block.c: scope_hint: In function ‘main’
tdb-1.4.14/test/run-mutex-allrecord-block.c:81:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#   81 |         pipe(fromchild);
#      |         ^~~~~~~~~~~~~~~
#   79|   	data.dptr = discard_const_p(uint8_t, "world");
#   80|   
#   81|-> 	pipe(fromchild);
#   82|   	pipe(tochild);
#   83|   

Error: COMPILER_WARNING (CWE-252): [#def194]
tdb-1.4.14/test/run-mutex-allrecord-block.c:82:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#   82 |         pipe(tochild);
#      |         ^~~~~~~~~~~~~
#   80|   
#   81|   	pipe(fromchild);
#   82|-> 	pipe(tochild);
#   83|   
#   84|   	tdb_flags = TDB_INCOMPATIBLE_HASH|

Error: COMPILER_WARNING (CWE-252): [#def195]
tdb-1.4.14/test/run-mutex-allrecord-block.c:97:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   97 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   95|   	close(tochild[0]);
#   96|   
#   97|-> 	read(fromchild[0], &c, sizeof(c));
#   98|   
#   99|   	tdb = tdb_open_ex("mutex-allrecord-block.tdb", 0,

Error: COMPILER_WARNING (CWE-252): [#def196]
tdb-1.4.14/test/run-mutex-allrecord-block.c:107:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  107 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  105|   	ok(ret == -1, "tdb_chainlock_nonblock should not succeed");
#  106|   
#  107|-> 	write(tochild[1], &c, sizeof(c));
#  108|   
#  109|   	ret = tdb_chainlock(tdb, key);

Error: COMPILER_WARNING (CWE-252): [#def197]
tdb-1.4.14/test/run-mutex-allrecord-trylock.c: scope_hint: In function ‘do_child’
tdb-1.4.14/test/run-mutex-allrecord-trylock.c:45:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   45 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   43|   	ok(ret == 0, "tdb_chainlock should succeed");
#   44|   
#   45|-> 	write(to, &c, sizeof(c));
#   46|   
#   47|   	read(from, &c, sizeof(c));

Error: COMPILER_WARNING (CWE-252): [#def198]
tdb-1.4.14/test/run-mutex-allrecord-trylock.c:47:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   47 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   45|   	write(to, &c, sizeof(c));
#   46|   
#   47|-> 	read(from, &c, sizeof(c));
#   48|   
#   49|   	ret = tdb_chainunlock(tdb, key);

Error: COMPILER_WARNING (CWE-252): [#def199]
tdb-1.4.14/test/run-mutex-allrecord-trylock.c: scope_hint: In function ‘main’
tdb-1.4.14/test/run-mutex-allrecord-trylock.c:81:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#   81 |         pipe(fromchild);
#      |         ^~~~~~~~~~~~~~~
#   79|   	data.dptr = discard_const_p(uint8_t, "world");
#   80|   
#   81|-> 	pipe(fromchild);
#   82|   	pipe(tochild);
#   83|   

Error: COMPILER_WARNING (CWE-252): [#def200]
tdb-1.4.14/test/run-mutex-allrecord-trylock.c:82:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#   82 |         pipe(tochild);
#      |         ^~~~~~~~~~~~~
#   80|   
#   81|   	pipe(fromchild);
#   82|-> 	pipe(tochild);
#   83|   
#   84|   	tdb_flags = TDB_INCOMPATIBLE_HASH|

Error: COMPILER_WARNING (CWE-252): [#def201]
tdb-1.4.14/test/run-mutex-allrecord-trylock.c:97:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   97 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   95|   	close(tochild[0]);
#   96|   
#   97|-> 	read(fromchild[0], &c, sizeof(c));
#   98|   
#   99|   	tdb = tdb_open_ex("mutex-allrecord-trylock.tdb", 0, tdb_flags,

Error: COMPILER_WARNING (CWE-252): [#def202]
tdb-1.4.14/test/run-mutex-allrecord-trylock.c:106:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  106 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  104|   	ok(ret == -1, "tdb_allrecord_lock (nowait) should not succeed");
#  105|   
#  106|-> 	write(tochild[1], &c, sizeof(c));
#  107|   
#  108|   	wait_ret = wait(&status);

Error: COMPILER_WARNING (CWE-252): [#def203]
tdb-1.4.14/test/run-mutex-openflags2.c: scope_hint: In function ‘do_child’
tdb-1.4.14/test/run-mutex-openflags2.c:44:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   44 |         read(fd, &c, 1);
#      |         ^~~~~~~~~~~~~~~
#   42|   	char c;
#   43|   
#   44|-> 	read(fd, &c, 1);
#   45|   
#   46|   	tdb = tdb_open_ex("mutex-openflags2.tdb", 0,

Error: COMPILER_WARNING (CWE-252): [#def204]
tdb-1.4.14/test/run-mutex-openflags2.c: scope_hint: In function ‘main’
tdb-1.4.14/test/run-mutex-openflags2.c:138:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  138 |         write(pipefd[1], &c, 1);
#      |         ^~~~~~~~~~~~~~~~~~~~~~~
#  136|   	ok((tdb != NULL), "tdb_open_ex with mutexes should succeed");
#  137|   
#  138|-> 	write(pipefd[1], &c, 1);
#  139|   
#  140|   	wait_ret = wait(&status);

Error: COMPILER_WARNING (CWE-252): [#def205]
tdb-1.4.14/test/run-mutex-transaction1.c: scope_hint: In function ‘do_child’
tdb-1.4.14/test/run-mutex-transaction1.c:48:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   48 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   46|   	ok(ret == 0, "tdb_store(tdb, key, data, TDB_INSERT) should succeed");
#   47|   
#   48|-> 	write(to, &c, sizeof(c));
#   49|   	read(from, &c, sizeof(c));
#   50|   

Error: COMPILER_WARNING (CWE-252): [#def206]
tdb-1.4.14/test/run-mutex-transaction1.c:49:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   49 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   47|   
#   48|   	write(to, &c, sizeof(c));
#   49|-> 	read(from, &c, sizeof(c));
#   50|   
#   51|   	ret = tdb_transaction_cancel(tdb);

Error: COMPILER_WARNING (CWE-252): [#def207]
tdb-1.4.14/test/run-mutex-transaction1.c:54:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   54 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   52|   	ok(ret == 0, "tdb_transaction_cancel should succeed");
#   53|   
#   54|-> 	write(to, &c, sizeof(c));
#   55|   	read(from, &c, sizeof(c));
#   56|   

Error: COMPILER_WARNING (CWE-252): [#def208]
tdb-1.4.14/test/run-mutex-transaction1.c:55:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   55 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   53|   
#   54|   	write(to, &c, sizeof(c));
#   55|-> 	read(from, &c, sizeof(c));
#   56|   
#   57|   	ret = tdb_transaction_start(tdb);

Error: COMPILER_WARNING (CWE-252): [#def209]
tdb-1.4.14/test/run-mutex-transaction1.c:63:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   63 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   61|   	ok(ret == 0, "tdb_store(tdb, key, data, TDB_INSERT) should succeed");
#   62|   
#   63|-> 	write(to, &c, sizeof(c));
#   64|   	read(from, &c, sizeof(c));
#   65|   

Error: COMPILER_WARNING (CWE-252): [#def210]
tdb-1.4.14/test/run-mutex-transaction1.c:64:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   64 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   62|   
#   63|   	write(to, &c, sizeof(c));
#   64|-> 	read(from, &c, sizeof(c));
#   65|   
#   66|   	ret = tdb_transaction_commit(tdb);

Error: COMPILER_WARNING (CWE-252): [#def211]
tdb-1.4.14/test/run-mutex-transaction1.c:69:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   69 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   67|   	ok(ret == 0, "tdb_transaction_commit should succeed");
#   68|   
#   69|-> 	write(to, &c, sizeof(c));
#   70|   	read(from, &c, sizeof(c));
#   71|   

Error: COMPILER_WARNING (CWE-252): [#def212]
tdb-1.4.14/test/run-mutex-transaction1.c:70:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   70 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   68|   
#   69|   	write(to, &c, sizeof(c));
#   70|-> 	read(from, &c, sizeof(c));
#   71|   
#   72|   	ret = tdb_transaction_start(tdb);

Error: COMPILER_WARNING (CWE-252): [#def213]
tdb-1.4.14/test/run-mutex-transaction1.c:78:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   78 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   76|   	ok(ret == 0, "tdb_store(tdb, key, data, TDB_REPLACE) should succeed");
#   77|   
#   78|-> 	write(to, &c, sizeof(c));
#   79|   	read(from, &c, sizeof(c));
#   80|   

Error: COMPILER_WARNING (CWE-252): [#def214]
tdb-1.4.14/test/run-mutex-transaction1.c:79:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   79 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   77|   
#   78|   	write(to, &c, sizeof(c));
#   79|-> 	read(from, &c, sizeof(c));
#   80|   
#   81|   	ret = tdb_transaction_commit(tdb);

Error: COMPILER_WARNING (CWE-252): [#def215]
tdb-1.4.14/test/run-mutex-transaction1.c:84:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   84 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   82|   	ok(ret == 0, "tdb_transaction_commit should succeed");
#   83|   
#   84|-> 	write(to, &c, sizeof(c));
#   85|   	read(from, &c, sizeof(c));
#   86|   

Error: COMPILER_WARNING (CWE-252): [#def216]
tdb-1.4.14/test/run-mutex-transaction1.c:85:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   85 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   83|   
#   84|   	write(to, &c, sizeof(c));
#   85|-> 	read(from, &c, sizeof(c));
#   86|   
#   87|   	return 0;

Error: COMPILER_WARNING (CWE-252): [#def217]
tdb-1.4.14/test/run-mutex-transaction1.c: scope_hint: In function ‘main’
tdb-1.4.14/test/run-mutex-transaction1.c:117:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#  117 |         pipe(fromchild);
#      |         ^~~~~~~~~~~~~~~
#  115|   	data.dptr = discard_const_p(uint8_t, "world");
#  116|   
#  117|-> 	pipe(fromchild);
#  118|   	pipe(tochild);
#  119|   

Error: COMPILER_WARNING (CWE-252): [#def218]
tdb-1.4.14/test/run-mutex-transaction1.c:118:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#  118 |         pipe(tochild);
#      |         ^~~~~~~~~~~~~
#  116|   
#  117|   	pipe(fromchild);
#  118|-> 	pipe(tochild);
#  119|   
#  120|   	tdb_flags = TDB_INCOMPATIBLE_HASH|

Error: COMPILER_WARNING (CWE-252): [#def219]
tdb-1.4.14/test/run-mutex-transaction1.c:133:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  133 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  131|   	close(tochild[0]);
#  132|   
#  133|-> 	read(fromchild[0], &c, sizeof(c));
#  134|   
#  135|   	tdb = tdb_open_ex("mutex-transaction1.tdb", 0,

Error: COMPILER_WARNING (CWE-252): [#def220]
tdb-1.4.14/test/run-mutex-transaction1.c:158:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  158 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  156|   	ok(val.dsize == 0, "tdb_fetch(tdb, key) should return an empty value");
#  157|   
#  158|-> 	write(tochild[1], &c, sizeof(c));
#  159|   
#  160|   	/*

Error: COMPILER_WARNING (CWE-252): [#def221]
tdb-1.4.14/test/run-mutex-transaction1.c:166:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  166 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  164|   	ok(ret == 0, "tdb_transaction_start should succeed");
#  165|   
#  166|-> 	read(fromchild[0], &c, sizeof(c));
#  167|   	write(tochild[1], &c, sizeof(c));
#  168|   

Error: COMPILER_WARNING (CWE-252): [#def222]
tdb-1.4.14/test/run-mutex-transaction1.c:167:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  167 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  165|   
#  166|   	read(fromchild[0], &c, sizeof(c));
#  167|-> 	write(tochild[1], &c, sizeof(c));
#  168|   
#  169|   	ret = tdb_transaction_cancel(tdb);

Error: COMPILER_WARNING (CWE-252): [#def223]
tdb-1.4.14/test/run-mutex-transaction1.c:175:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  175 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  173|   	 * When we canceled the child can start and store...
#  174|   	 */
#  175|-> 	read(fromchild[0], &c, sizeof(c));
#  176|   
#  177|   	/*

Error: COMPILER_WARNING (CWE-252): [#def224]
tdb-1.4.14/test/run-mutex-transaction1.c:186:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  186 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  184|   	ok(val.dsize == 0, "tdb_fetch(tdb, key) should return an empty value");
#  185|   
#  186|-> 	write(tochild[1], &c, sizeof(c));
#  187|   	read(fromchild[0], &c, sizeof(c));
#  188|   

Error: COMPILER_WARNING (CWE-252): [#def225]
tdb-1.4.14/test/run-mutex-transaction1.c:187:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  187 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  185|   
#  186|   	write(tochild[1], &c, sizeof(c));
#  187|-> 	read(fromchild[0], &c, sizeof(c));
#  188|   
#  189|   	/*

Error: COMPILER_WARNING (CWE-252): [#def226]
tdb-1.4.14/test/run-mutex-transaction1.c:200:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  200 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  198|   	ok(memcmp(val.dptr, data.dptr, data.dsize) == 0, "tdb_fetch(tdb, key) should return a value");
#  199|   
#  200|-> 	write(tochild[1], &c, sizeof(c));
#  201|   	read(fromchild[0], &c, sizeof(c));
#  202|   

Error: COMPILER_WARNING (CWE-252): [#def227]
tdb-1.4.14/test/run-mutex-transaction1.c:201:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  201 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  199|   
#  200|   	write(tochild[1], &c, sizeof(c));
#  201|-> 	read(fromchild[0], &c, sizeof(c));
#  202|   
#  203|   	/*

Error: COMPILER_WARNING (CWE-252): [#def228]
tdb-1.4.14/test/run-mutex-transaction1.c:215:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  215 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  213|   	ok(memcmp(val.dptr, data.dptr, data.dsize) == 0, "tdb_fetch(tdb, key) should return a value");
#  214|   
#  215|-> 	write(tochild[1], &c, sizeof(c));
#  216|   	read(fromchild[0], &c, sizeof(c));
#  217|   

Error: COMPILER_WARNING (CWE-252): [#def229]
tdb-1.4.14/test/run-mutex-transaction1.c:216:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  216 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  214|   
#  215|   	write(tochild[1], &c, sizeof(c));
#  216|-> 	read(fromchild[0], &c, sizeof(c));
#  217|   
#  218|   	/*

Error: COMPILER_WARNING (CWE-252): [#def230]
tdb-1.4.14/test/run-mutex-transaction1.c:229:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  229 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  227|   	ok(memcmp(val.dptr, key.dptr, key.dsize) == 0, "tdb_fetch(tdb, key) should return a value");
#  228|   
#  229|-> 	write(tochild[1], &c, sizeof(c));
#  230|   
#  231|   	wait_ret = wait(&status);

Error: COMPILER_WARNING (CWE-252): [#def231]
tdb-1.4.14/test/run-mutex-trylock.c: scope_hint: In function ‘do_child’
tdb-1.4.14/test/run-mutex-trylock.c:45:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   45 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   43|   	ok(ret == 0, "tdb_chainlock should succeed");
#   44|   
#   45|-> 	write(to, &c, sizeof(c));
#   46|   
#   47|   	read(from, &c, sizeof(c));

Error: COMPILER_WARNING (CWE-252): [#def232]
tdb-1.4.14/test/run-mutex-trylock.c:47:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   47 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   45|   	write(to, &c, sizeof(c));
#   46|   
#   47|-> 	read(from, &c, sizeof(c));
#   48|   
#   49|   	ret = tdb_chainunlock(tdb, key);

Error: COMPILER_WARNING (CWE-252): [#def233]
tdb-1.4.14/test/run-mutex-trylock.c:52:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   52 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   50|   	ok(ret == 0, "tdb_chainunlock should succeed");
#   51|   
#   52|-> 	write(to, &c, sizeof(c));
#   53|   
#   54|   	return 0;

Error: COMPILER_WARNING (CWE-252): [#def234]
tdb-1.4.14/test/run-mutex-trylock.c: scope_hint: In function ‘main’
tdb-1.4.14/test/run-mutex-trylock.c:83:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#   83 |         pipe(fromchild);
#      |         ^~~~~~~~~~~~~~~
#   81|   	data.dptr = discard_const_p(uint8_t, "world");
#   82|   
#   83|-> 	pipe(fromchild);
#   84|   	pipe(tochild);
#   85|   

Error: COMPILER_WARNING (CWE-252): [#def235]
tdb-1.4.14/test/run-mutex-trylock.c:84:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#   84 |         pipe(tochild);
#      |         ^~~~~~~~~~~~~
#   82|   
#   83|   	pipe(fromchild);
#   84|-> 	pipe(tochild);
#   85|   
#   86|   	tdb_flags = TDB_INCOMPATIBLE_HASH|

Error: COMPILER_WARNING (CWE-252): [#def236]
tdb-1.4.14/test/run-mutex-trylock.c:99:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   99 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   97|   	close(tochild[0]);
#   98|   
#   99|-> 	read(fromchild[0], &c, sizeof(c));
#  100|   
#  101|   	tdb = tdb_open_ex("mutex-trylock.tdb", 0, tdb_flags,

Error: COMPILER_WARNING (CWE-252): [#def237]
tdb-1.4.14/test/run-mutex-trylock.c:108:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  108 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  106|   	ok(ret == -1, "tdb_chainlock_nonblock should not succeed");
#  107|   
#  108|-> 	write(tochild[1], &c, sizeof(c));
#  109|   
#  110|   	read(fromchild[0], &c, sizeof(c));

Error: COMPILER_WARNING (CWE-252): [#def238]
tdb-1.4.14/test/run-mutex-trylock.c:110:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  110 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  108|   	write(tochild[1], &c, sizeof(c));
#  109|   
#  110|-> 	read(fromchild[0], &c, sizeof(c));
#  111|   
#  112|   	ret = tdb_chainlock_nonblock(tdb, key);

Error: COMPILER_WARNING (CWE-252): [#def239]
tdb-1.4.14/test/run-mutex1.c: scope_hint: In function ‘do_child’
tdb-1.4.14/test/run-mutex1.c:45:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   45 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   43|   	ok(ret == 0, "tdb_chainlock should succeed");
#   44|   
#   45|-> 	write(to, &c, sizeof(c));
#   46|   	read(from, &c, sizeof(c));
#   47|   

Error: COMPILER_WARNING (CWE-252): [#def240]
tdb-1.4.14/test/run-mutex1.c:46:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   46 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   44|   
#   45|   	write(to, &c, sizeof(c));
#   46|-> 	read(from, &c, sizeof(c));
#   47|   
#   48|   	ret = tdb_chainunlock(tdb, key);

Error: COMPILER_WARNING (CWE-252): [#def241]
tdb-1.4.14/test/run-mutex1.c:51:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   51 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   49|   	ok(ret == 0, "tdb_chainunlock should succeed");
#   50|   
#   51|-> 	write(to, &c, sizeof(c));
#   52|   	read(from, &c, sizeof(c));
#   53|   

Error: COMPILER_WARNING (CWE-252): [#def242]
tdb-1.4.14/test/run-mutex1.c:52:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   52 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   50|   
#   51|   	write(to, &c, sizeof(c));
#   52|-> 	read(from, &c, sizeof(c));
#   53|   
#   54|   	ret = tdb_allrecord_lock(tdb, F_WRLCK, TDB_LOCK_WAIT, false);

Error: COMPILER_WARNING (CWE-252): [#def243]
tdb-1.4.14/test/run-mutex1.c:57:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   57 |         write(to, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~
#   55|   	ok(ret == 0, "tdb_allrecord_lock should succeed");
#   56|   
#   57|-> 	write(to, &c, sizeof(c));
#   58|   	read(from, &c, sizeof(c));
#   59|   

Error: COMPILER_WARNING (CWE-252): [#def244]
tdb-1.4.14/test/run-mutex1.c:58:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   58 |         read(from, &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
#   56|   
#   57|   	write(to, &c, sizeof(c));
#   58|-> 	read(from, &c, sizeof(c));
#   59|   
#   60|   	ret = tdb_allrecord_unlock(tdb, F_WRLCK, false);

Error: COMPILER_WARNING (CWE-252): [#def245]
tdb-1.4.14/test/run-mutex1.c: scope_hint: In function ‘main’
tdb-1.4.14/test/run-mutex1.c:92:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#   92 |         pipe(fromchild);
#      |         ^~~~~~~~~~~~~~~
#   90|   	data.dptr = discard_const_p(uint8_t, "world");
#   91|   
#   92|-> 	pipe(fromchild);
#   93|   	pipe(tochild);
#   94|   

Error: COMPILER_WARNING (CWE-252): [#def246]
tdb-1.4.14/test/run-mutex1.c:93:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
#   93 |         pipe(tochild);
#      |         ^~~~~~~~~~~~~
#   91|   
#   92|   	pipe(fromchild);
#   93|-> 	pipe(tochild);
#   94|   
#   95|   	tdb_flags = TDB_INCOMPATIBLE_HASH|

Error: COMPILER_WARNING (CWE-252): [#def247]
tdb-1.4.14/test/run-mutex1.c:108:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  108 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  106|   	close(tochild[0]);
#  107|   
#  108|-> 	read(fromchild[0], &c, sizeof(c));
#  109|   
#  110|   	tdb = tdb_open_ex("mutex1.tdb", 0, tdb_flags,

Error: COMPILER_WARNING (CWE-252): [#def248]
tdb-1.4.14/test/run-mutex1.c:114:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  114 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  112|   	ok(tdb, "tdb_open_ex should succeed");
#  113|   
#  114|-> 	write(tochild[1], &c, sizeof(c));
#  115|   	read(fromchild[0], &c, sizeof(c));
#  116|   

Error: COMPILER_WARNING (CWE-252): [#def249]
tdb-1.4.14/test/run-mutex1.c:115:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  115 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  113|   
#  114|   	write(tochild[1], &c, sizeof(c));
#  115|-> 	read(fromchild[0], &c, sizeof(c));
#  116|   
#  117|   	ret = tdb_allrecord_lock(tdb, F_WRLCK, TDB_LOCK_WAIT, false);

Error: COMPILER_WARNING (CWE-252): [#def250]
tdb-1.4.14/test/run-mutex1.c:126:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  126 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  124|   	ok(ret == 0, "tdb_allrecord_unlock should succeed");
#  125|   
#  126|-> 	write(tochild[1], &c, sizeof(c));
#  127|   	read(fromchild[0], &c, sizeof(c));
#  128|   	write(tochild[1], &c, sizeof(c));

Error: COMPILER_WARNING (CWE-252): [#def251]
tdb-1.4.14/test/run-mutex1.c:127:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  127 |         read(fromchild[0], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  125|   
#  126|   	write(tochild[1], &c, sizeof(c));
#  127|-> 	read(fromchild[0], &c, sizeof(c));
#  128|   	write(tochild[1], &c, sizeof(c));
#  129|   

Error: COMPILER_WARNING (CWE-252): [#def252]
tdb-1.4.14/test/run-mutex1.c:128:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  128 |         write(tochild[1], &c, sizeof(c));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  126|   	write(tochild[1], &c, sizeof(c));
#  127|   	read(fromchild[0], &c, sizeof(c));
#  128|-> 	write(tochild[1], &c, sizeof(c));
#  129|   
#  130|   	ret = tdb_delete(tdb, key);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def253]
tdb-1.4.14/tools/tdbtorture.c:68:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[0]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:433:26: branch_false: following ‘false’ branch (when ‘num_procs <= j’)...
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: following ‘false’ branch (when ‘num_procs != j’)...
tdb-1.4.14/tools/tdbtorture.c:440:21: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:440:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:441:29: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:441:28: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: following ‘true’ branch...
 branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:453:36: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:455:71: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:454:41: call_function: calling ‘run_child’ from ‘main’
#   66|   static void fatal(const char *why)
#   67|   {
#   68|-> 	perror(why);
#   69|   	error_count++;
#   70|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
tdb-1.4.14/tools/tdbtorture.c:68:9: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#   66|   static void fatal(const char *why)
#   67|   {
#   68|-> 	perror(why);
#   69|   	error_count++;
#   70|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
tdb-1.4.14/tools/tdbtorture.c:68:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#   66|   static void fatal(const char *why)
#   67|   {
#   68|-> 	perror(why);
#   69|   	error_count++;
#   70|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
tdb-1.4.14/tools/tdbtorture.c:68:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#   66|   static void fatal(const char *why)
#   67|   {
#   68|-> 	perror(why);
#   69|   	error_count++;
#   70|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
tdb-1.4.14/tools/tdbtorture.c:68:9: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#   66|   static void fatal(const char *why)
#   67|   {
#   68|-> 	perror(why);
#   69|   	error_count++;
#   70|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
tdb-1.4.14/tools/tdbtorture.c:68:9: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#   66|   static void fatal(const char *why)
#   67|   {
#   68|-> 	perror(why);
#   69|   	error_count++;
#   70|   }

Error: CPPCHECK_WARNING (CWE-476): [#def259]
tdb-1.4.14/tools/tdbtorture.c:79: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#   77|   
#   78|   	for (i=0;i<len;i++) {
#   79|-> 		buf[i] = 'a' + (rand() % 26);
#   80|   	}
#   81|   	buf[i] = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def260]
tdb-1.4.14/tools/tdbtorture.c:79:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#   77|   
#   78|   	for (i=0;i<len;i++) {
#   79|-> 		buf[i] = 'a' + (rand() % 26);
#   80|   	}
#   81|   	buf[i] = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def261]
tdb-1.4.14/tools/tdbtorture.c:81: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#   79|   		buf[i] = 'a' + (rand() % 26);
#   80|   	}
#   81|-> 	buf[i] = 0;
#   82|   	return buf;
#   83|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def262]
tdb-1.4.14/tools/tdbtorture.c:81:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#   79|   		buf[i] = 'a' + (rand() % 26);
#   80|   	}
#   81|-> 	buf[i] = 0;
#   82|   	return buf;
#   83|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def263]
tdb-1.4.14/tools/tdbtorture.c:129:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[0]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:433:26: branch_false: following ‘false’ branch (when ‘num_procs <= j’)...
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: following ‘false’ branch (when ‘num_procs != j’)...
tdb-1.4.14/tools/tdbtorture.c:440:21: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:440:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:441:29: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:441:28: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: following ‘true’ branch...
 branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:453:36: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:455:71: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:454:41: call_function: calling ‘run_child’ from ‘main’
#  127|   #if REOPEN_PROB
#  128|   	if (in_transaction == 0 && random() % REOPEN_PROB == 0) {
#  129|-> 		tdb_reopen_all(0);
#  130|   		goto next;
#  131|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
tdb-1.4.14/tools/tdbtorture.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#  127|   #if REOPEN_PROB
#  128|   	if (in_transaction == 0 && random() % REOPEN_PROB == 0) {
#  129|-> 		tdb_reopen_all(0);
#  130|   		goto next;
#  131|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
tdb-1.4.14/tools/tdbtorture.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  127|   #if REOPEN_PROB
#  128|   	if (in_transaction == 0 && random() % REOPEN_PROB == 0) {
#  129|-> 		tdb_reopen_all(0);
#  130|   		goto next;
#  131|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
tdb-1.4.14/tools/tdbtorture.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#  127|   #if REOPEN_PROB
#  128|   	if (in_transaction == 0 && random() % REOPEN_PROB == 0) {
#  129|-> 		tdb_reopen_all(0);
#  130|   		goto next;
#  131|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
tdb-1.4.14/tools/tdbtorture.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  127|   #if REOPEN_PROB
#  128|   	if (in_transaction == 0 && random() % REOPEN_PROB == 0) {
#  129|-> 		tdb_reopen_all(0);
#  130|   		goto next;
#  131|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
tdb-1.4.14/tools/tdbtorture.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  127|   #if REOPEN_PROB
#  128|   	if (in_transaction == 0 && random() % REOPEN_PROB == 0) {
#  129|-> 		tdb_reopen_all(0);
#  130|   		goto next;
#  131|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def269]
tdb-1.4.14/tools/tdbtorture.c:136:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[0]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:433:26: branch_false: following ‘false’ branch (when ‘num_procs <= j’)...
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: following ‘false’ branch (when ‘num_procs != j’)...
tdb-1.4.14/tools/tdbtorture.c:440:21: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:440:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:441:29: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:441:28: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: following ‘true’ branch...
 branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:453:36: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:455:71: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:454:41: call_function: calling ‘run_child’ from ‘main’
#  134|   	if (in_transaction == 0 &&
#  135|   	    (always_transaction || do_transaction())) {
#  136|-> 		if (tdb_transaction_start(db) != 0) {
#  137|   			fatal("tdb_transaction_start failed");
#  138|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
tdb-1.4.14/tools/tdbtorture.c:136:21: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:433:26: branch_false: following ‘false’ branch (when ‘num_procs <= j’)...
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: following ‘false’ branch (when ‘num_procs != j’)...
tdb-1.4.14/tools/tdbtorture.c:440:21: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:440:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:441:29: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:441:28: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: following ‘true’ branch...
 branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:453:36: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:455:71: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:454:41: call_function: calling ‘run_child’ from ‘main’
#  134|   	if (in_transaction == 0 &&
#  135|   	    (always_transaction || do_transaction())) {
#  136|-> 		if (tdb_transaction_start(db) != 0) {
#  137|   			fatal("tdb_transaction_start failed");
#  138|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
tdb-1.4.14/tools/tdbtorture.c:136:21: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  134|   	if (in_transaction == 0 &&
#  135|   	    (always_transaction || do_transaction())) {
#  136|-> 		if (tdb_transaction_start(db) != 0) {
#  137|   			fatal("tdb_transaction_start failed");
#  138|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
tdb-1.4.14/tools/tdbtorture.c:136:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:433:26: branch_false: following ‘false’ branch (when ‘num_procs <= j’)...
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: following ‘false’ branch (when ‘num_procs != j’)...
tdb-1.4.14/tools/tdbtorture.c:440:21: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:440:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:441:29: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:441:28: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: following ‘true’ branch...
 branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:453:36: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:455:71: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:454:41: call_function: calling ‘run_child’ from ‘main’
#  134|   	if (in_transaction == 0 &&
#  135|   	    (always_transaction || do_transaction())) {
#  136|-> 		if (tdb_transaction_start(db) != 0) {
#  137|   			fatal("tdb_transaction_start failed");
#  138|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
tdb-1.4.14/tools/tdbtorture.c:136:21: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  134|   	if (in_transaction == 0 &&
#  135|   	    (always_transaction || do_transaction())) {
#  136|-> 		if (tdb_transaction_start(db) != 0) {
#  137|   			fatal("tdb_transaction_start failed");
#  138|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
tdb-1.4.14/tools/tdbtorture.c:136:21: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  134|   	if (in_transaction == 0 &&
#  135|   	    (always_transaction || do_transaction())) {
#  136|-> 		if (tdb_transaction_start(db) != 0) {
#  137|   			fatal("tdb_transaction_start failed");
#  138|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def275]
tdb-1.4.14/tools/tdbtorture.c:164:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[0]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:433:26: branch_false: following ‘false’ branch (when ‘num_procs <= j’)...
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: following ‘false’ branch (when ‘num_procs != j’)...
tdb-1.4.14/tools/tdbtorture.c:440:21: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:440:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:441:29: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:441:28: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: following ‘true’ branch...
 branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:453:36: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:455:71: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:454:41: call_function: calling ‘run_child’ from ‘main’
#  162|   #if DELETE_PROB
#  163|   	if (random() % DELETE_PROB == 0) {
#  164|-> 		tdb_delete(db, key);
#  165|   		goto next;
#  166|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
tdb-1.4.14/tools/tdbtorture.c:164:17: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#  162|   #if DELETE_PROB
#  163|   	if (random() % DELETE_PROB == 0) {
#  164|-> 		tdb_delete(db, key);
#  165|   		goto next;
#  166|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
tdb-1.4.14/tools/tdbtorture.c:164:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  162|   #if DELETE_PROB
#  163|   	if (random() % DELETE_PROB == 0) {
#  164|-> 		tdb_delete(db, key);
#  165|   		goto next;
#  166|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
tdb-1.4.14/tools/tdbtorture.c:164:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#  162|   #if DELETE_PROB
#  163|   	if (random() % DELETE_PROB == 0) {
#  164|-> 		tdb_delete(db, key);
#  165|   		goto next;
#  166|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
tdb-1.4.14/tools/tdbtorture.c:164:17: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  162|   #if DELETE_PROB
#  163|   	if (random() % DELETE_PROB == 0) {
#  164|-> 		tdb_delete(db, key);
#  165|   		goto next;
#  166|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
tdb-1.4.14/tools/tdbtorture.c:164:17: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  162|   #if DELETE_PROB
#  163|   	if (random() % DELETE_PROB == 0) {
#  164|-> 		tdb_delete(db, key);
#  165|   		goto next;
#  166|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def281]
tdb-1.4.14/tools/tdbtorture.c:171:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[0]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:433:26: branch_false: following ‘false’ branch (when ‘num_procs <= j’)...
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: following ‘false’ branch (when ‘num_procs != j’)...
tdb-1.4.14/tools/tdbtorture.c:440:21: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:440:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:441:29: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:441:28: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: following ‘true’ branch...
 branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:453:36: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:455:71: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:454:41: call_function: calling ‘run_child’ from ‘main’
#  169|   #if STORE_PROB
#  170|   	if (random() % STORE_PROB == 0) {
#  171|-> 		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
#  172|   			fatal("tdb_store failed");
#  173|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
tdb-1.4.14/tools/tdbtorture.c:171:21: warning[-Wanalyzer-malloc-leak]: leak of ‘data.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  169|   #if STORE_PROB
#  170|   	if (random() % STORE_PROB == 0) {
#  171|-> 		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
#  172|   			fatal("tdb_store failed");
#  173|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
tdb-1.4.14/tools/tdbtorture.c:171:21: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#  169|   #if STORE_PROB
#  170|   	if (random() % STORE_PROB == 0) {
#  171|-> 		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
#  172|   			fatal("tdb_store failed");
#  173|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
tdb-1.4.14/tools/tdbtorture.c:171:21: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  169|   #if STORE_PROB
#  170|   	if (random() % STORE_PROB == 0) {
#  171|-> 		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
#  172|   			fatal("tdb_store failed");
#  173|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
tdb-1.4.14/tools/tdbtorture.c:171:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#  169|   #if STORE_PROB
#  170|   	if (random() % STORE_PROB == 0) {
#  171|-> 		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
#  172|   			fatal("tdb_store failed");
#  173|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
tdb-1.4.14/tools/tdbtorture.c:171:21: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  169|   #if STORE_PROB
#  170|   	if (random() % STORE_PROB == 0) {
#  171|-> 		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
#  172|   			fatal("tdb_store failed");
#  173|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
tdb-1.4.14/tools/tdbtorture.c:180:21: warning[-Wanalyzer-malloc-leak]: leak of ‘data.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  178|   #if APPEND_PROB
#  179|   	if (random() % APPEND_PROB == 0) {
#  180|-> 		if (tdb_append(db, key, data) != 0) {
#  181|   			fatal("tdb_append failed");
#  182|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
tdb-1.4.14/tools/tdbtorture.c:180:21: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  178|   #if APPEND_PROB
#  179|   	if (random() % APPEND_PROB == 0) {
#  180|-> 		if (tdb_append(db, key, data) != 0) {
#  181|   			fatal("tdb_append failed");
#  182|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
tdb-1.4.14/tools/tdbtorture.c:189:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  187|   #if LOCKSTORE_PROB
#  188|   	if (random() % LOCKSTORE_PROB == 0) {
#  189|-> 		tdb_chainlock(db, key);
#  190|   		data = tdb_fetch(db, key);
#  191|   		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
tdb-1.4.14/tools/tdbtorture.c:189:17: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  187|   #if LOCKSTORE_PROB
#  188|   	if (random() % LOCKSTORE_PROB == 0) {
#  189|-> 		tdb_chainlock(db, key);
#  190|   		data = tdb_fetch(db, key);
#  191|   		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
tdb-1.4.14/tools/tdbtorture.c:190:24: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  188|   	if (random() % LOCKSTORE_PROB == 0) {
#  189|   		tdb_chainlock(db, key);
#  190|-> 		data = tdb_fetch(db, key);
#  191|   		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
#  192|   			fatal("tdb_store failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
tdb-1.4.14/tools/tdbtorture.c:191:21: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  189|   		tdb_chainlock(db, key);
#  190|   		data = tdb_fetch(db, key);
#  191|-> 		if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
#  192|   			fatal("tdb_store failed");
#  193|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
tdb-1.4.14/tools/tdbtorture.c:195:17: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  193|   		}
#  194|   		if (data.dptr) free(data.dptr);
#  195|-> 		tdb_chainunlock(db, key);
#  196|   		goto next;
#  197|   	} 

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
tdb-1.4.14/tools/tdbtorture.c:202:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  200|   #if TRAVERSE_PROB
#  201|   	if (random() % TRAVERSE_PROB == 0) {
#  202|-> 		tdb_traverse(db, cull_traverse, NULL);
#  203|   		goto next;
#  204|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
tdb-1.4.14/tools/tdbtorture.c:202:17: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  200|   #if TRAVERSE_PROB
#  201|   	if (random() % TRAVERSE_PROB == 0) {
#  202|-> 		tdb_traverse(db, cull_traverse, NULL);
#  203|   		goto next;
#  204|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
tdb-1.4.14/tools/tdbtorture.c:209:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  207|   #if TRAVERSE_READ_PROB
#  208|   	if (random() % TRAVERSE_READ_PROB == 0) {
#  209|-> 		tdb_traverse_read(db, NULL, NULL);
#  210|   		goto next;
#  211|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
tdb-1.4.14/tools/tdbtorture.c:209:17: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  207|   #if TRAVERSE_READ_PROB
#  208|   	if (random() % TRAVERSE_READ_PROB == 0) {
#  209|-> 		tdb_traverse_read(db, NULL, NULL);
#  210|   		goto next;
#  211|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
tdb-1.4.14/tools/tdbtorture.c:214:16: warning[-Wanalyzer-malloc-leak]: leak of ‘key.dptr’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  212|   #endif
#  213|   
#  214|-> 	data = tdb_fetch(db, key);
#  215|   	if (data.dptr) free(data.dptr);
#  216|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
tdb-1.4.14/tools/tdbtorture.c:214:16: warning[-Wanalyzer-malloc-leak]: leak of ‘randbuf(dlen)’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  212|   #endif
#  213|   
#  214|-> 	data = tdb_fetch(db, key);
#  215|   	if (data.dptr) free(data.dptr);
#  216|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def300]
tdb-1.4.14/tools/tdbtorture.c:255:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[0]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:433:26: branch_false: following ‘false’ branch (when ‘num_procs <= j’)...
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:436:20: branch_false: following ‘false’ branch (when ‘num_procs != j’)...
tdb-1.4.14/tools/tdbtorture.c:440:21: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:440:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:441:29: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:441:28: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:444:36: branch_true: following ‘true’ branch...
 branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:453:36: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:455:71: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:454:41: call_function: calling ‘run_child’ from ‘main’
#  253|   	}
#  254|   
#  255|-> 	db = tdb_open_ex(filename, hash_size, tdb_flags,
#  256|   			 O_RDWR | O_CREAT, 0600, &log_ctx, NULL);
#  257|   	if (!db) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
tdb-1.4.14/tools/tdbtorture.c:255:14: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#  253|   	}
#  254|   
#  255|-> 	db = tdb_open_ex(filename, hash_size, tdb_flags,
#  256|   			 O_RDWR | O_CREAT, 0600, &log_ctx, NULL);
#  257|   	if (!db) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
tdb-1.4.14/tools/tdbtorture.c:255:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#  253|   	}
#  254|   
#  255|-> 	db = tdb_open_ex(filename, hash_size, tdb_flags,
#  256|   			 O_RDWR | O_CREAT, 0600, &log_ctx, NULL);
#  257|   	if (!db) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
tdb-1.4.14/tools/tdbtorture.c:255:14: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:373:31: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’
#  253|   	}
#  254|   
#  255|-> 	db = tdb_open_ex(filename, hash_size, tdb_flags,
#  256|   			 O_RDWR | O_CREAT, 0600, &log_ctx, NULL);
#  257|   	if (!db) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def304]
tdb-1.4.14/tools/tdbtorture.c:361:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:361:9: danger: argument 1 (‘test_path("torture.tdb")’) NULL where non-null expected
#  359|   	test_tdb = test_path("torture.tdb");
#  360|   
#  361|-> 	unlink(test_tdb);
#  362|   
#  363|   	if (seed == -1) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def305]
tdb-1.4.14/tools/tdbtorture.c:361:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘test_path("torture.tdb")’ where non-null expected
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:361:9: danger: argument 1 (‘test_path("torture.tdb")’) from [(6)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/5) could be NULL where non-null expected
#  359|   	test_tdb = test_path("torture.tdb");
#  360|   
#  361|-> 	unlink(test_tdb);
#  362|   
#  363|   	if (seed == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
tdb-1.4.14/tools/tdbtorture.c:369:36: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:369:36: danger: ‘test_path("torture.tdb")’ leaks here; was allocated at [(6)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/5)
#  367|   	printf("Testing with %d processes, %d loops, %d hash_size, seed=%d%s\n",
#  368|   	       num_procs, num_loops, hash_size, seed,
#  369|-> 	       (always_transaction ? " (all within transactions)" : ""));
#  370|   
#  371|   	if (num_procs == 1 && !kill_random) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
tdb-1.4.14/tools/tdbtorture.c:384:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_true: following ‘true’ branch (when ‘done’ is NULL)...
tdb-1.4.14/tools/tdbtorture.c:384:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:384:17: danger: ‘pids’ leaks here; was allocated at [(11)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/10)
#  382|   	done = (int *)calloc(sizeof(int), num_procs);
#  383|   	if (done == NULL) {
#  384|-> 		perror("Unable to allocate memory for done");
#  385|   		exit(1);
#  386|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
tdb-1.4.14/tools/tdbtorture.c:389:17: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:389:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:389:17: danger: ‘done’ leaks here; was allocated at [(13)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/12)
#  387|   
#  388|   	if (pipe(pfds) != 0) {
#  389|-> 		perror("Creating pipe");
#  390|   		exit(1);
#  391|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
tdb-1.4.14/tools/tdbtorture.c:389:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:389:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:389:17: danger: ‘pids’ leaks here; was allocated at [(11)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/10)
#  387|   
#  388|   	if (pipe(pfds) != 0) {
#  389|-> 		perror("Creating pipe");
#  390|   		exit(1);
#  391|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def310]
tdb-1.4.14/tools/tdbtorture.c:396:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[i]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:396:25: danger: ‘pfds[i]’ leaks here
#  394|   	for (i=0;i<num_procs;i++) {
#  395|   		if ((pids[i]=fork()) == 0) {
#  396|-> 			close(pfds[0]);
#  397|   			exit(run_child(test_tdb, i, seed, num_loops, 0));
#  398|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
tdb-1.4.14/tools/tdbtorture.c:396:25: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:396:25: danger: ‘done’ leaks here; was allocated at [(13)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/12)
#  394|   	for (i=0;i<num_procs;i++) {
#  395|   		if ((pids[i]=fork()) == 0) {
#  396|-> 			close(pfds[0]);
#  397|   			exit(run_child(test_tdb, i, seed, num_loops, 0));
#  398|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
tdb-1.4.14/tools/tdbtorture.c:396:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:396:25: danger: ‘pids’ leaks here; was allocated at [(11)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/10)
#  394|   	for (i=0;i<num_procs;i++) {
#  395|   		if ((pids[i]=fork()) == 0) {
#  396|-> 			close(pfds[0]);
#  397|   			exit(run_child(test_tdb, i, seed, num_loops, 0));
#  398|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
tdb-1.4.14/tools/tdbtorture.c:396:25: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:396:25: danger: ‘test_path("torture.tdb")’ leaks here; was allocated at [(6)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/5)
#  394|   	for (i=0;i<num_procs;i++) {
#  395|   		if ((pids[i]=fork()) == 0) {
#  396|-> 			close(pfds[0]);
#  397|   			exit(run_child(test_tdb, i, seed, num_loops, 0));
#  398|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
tdb-1.4.14/tools/tdbtorture.c:397:25: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_true: following ‘true’ branch (when ‘num_procs > i’)...
tdb-1.4.14/tools/tdbtorture.c:395:26: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:395:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:396:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:397:25: call_function: calling ‘run_child’ from ‘main’
#  395|   		if ((pids[i]=fork()) == 0) {
#  396|   			close(pfds[0]);
#  397|-> 			exit(run_child(test_tdb, i, seed, num_loops, 0));
#  398|   		}
#  399|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def315]
tdb-1.4.14/tools/tdbtorture.c:414:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[0]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:414:23: danger: ‘pfds[0]’ leaks here
#  412|   		}
#  413|   
#  414|-> 		pid = waitpid(-1, &status, kill_random ? WNOHANG : 0);
#  415|   		if (pid == 0) {
#  416|   			struct timeval tv;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
tdb-1.4.14/tools/tdbtorture.c:414:23: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:414:23: danger: ‘done’ leaks here; was allocated at [(19)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/18)
#  412|   		}
#  413|   
#  414|-> 		pid = waitpid(-1, &status, kill_random ? WNOHANG : 0);
#  415|   		if (pid == 0) {
#  416|   			struct timeval tv;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
tdb-1.4.14/tools/tdbtorture.c:414:23: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:414:23: danger: ‘pids’ leaks here; was allocated at [(17)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/16)
#  412|   		}
#  413|   
#  414|-> 		pid = waitpid(-1, &status, kill_random ? WNOHANG : 0);
#  415|   		if (pid == 0) {
#  416|   			struct timeval tv;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def318]
tdb-1.4.14/tools/tdbtorture.c:421:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[0]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:419:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:421:25: danger: ‘pfds[0]’ leaks here
#  419|   			tv.tv_sec = 0;
#  420|   			tv.tv_usec = 100000;
#  421|-> 			select(0, NULL, NULL, NULL, &tv);
#  422|   
#  423|   			/* Kill someone. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
tdb-1.4.14/tools/tdbtorture.c:421:25: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:419:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:421:25: danger: ‘done’ leaks here; was allocated at [(19)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/18)
#  419|   			tv.tv_sec = 0;
#  420|   			tv.tv_usec = 100000;
#  421|-> 			select(0, NULL, NULL, NULL, &tv);
#  422|   
#  423|   			/* Kill someone. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def320]
tdb-1.4.14/tools/tdbtorture.c:421:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:419:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:421:25: danger: ‘pids’ leaks here; was allocated at [(17)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/16)
#  419|   			tv.tv_sec = 0;
#  420|   			tv.tv_usec = 100000;
#  421|-> 			select(0, NULL, NULL, NULL, &tv);
#  422|   
#  423|   			/* Kill someone. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def321]
tdb-1.4.14/tools/tdbtorture.c:429:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfds[0]’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:429:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:429:25: danger: ‘pfds[0]’ leaks here
#  427|   
#  428|   		if (pid == -1) {
#  429|-> 			perror("failed to wait for child\n");
#  430|   			exit(1);
#  431|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
tdb-1.4.14/tools/tdbtorture.c:429:25: warning[-Wanalyzer-malloc-leak]: leak of ‘done’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:382:23: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:429:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:429:25: danger: ‘done’ leaks here; was allocated at [(19)](sarif:/runs/0/results/77/codeFlows/0/threadFlows/0/locations/18)
#  427|   
#  428|   		if (pid == -1) {
#  429|-> 			perror("failed to wait for child\n");
#  430|   			exit(1);
#  431|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
tdb-1.4.14/tools/tdbtorture.c:429:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pids’
tdb-1.4.14/tools/tdbtorture.c:313:5: enter_function: entry to ‘main’
tdb-1.4.14/tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
tdb-1.4.14/tools/tdbtorture.c:328:17: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’
tdb-1.4.14/tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’
tdb-1.4.14/tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)...
tdb-1.4.14/tools/tdbtorture.c:364:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:377:25: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:377:25: acquire_memory: allocated here
tdb-1.4.14/tools/tdbtorture.c:378:12: branch_false: following ‘false’ branch (when ‘pids’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:382:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:383:12: branch_false: following ‘false’ branch (when ‘done’ is non-NULL)...
tdb-1.4.14/tools/tdbtorture.c:388:13: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:388:12: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:392:22: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:394:18: branch_false: following ‘false’ branch (when ‘num_procs <= i’)...
 branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:401:16: branch_true: following ‘true’ branch (when ‘num_procs != 0’)...
tdb-1.4.14/tools/tdbtorture.c:405:21: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:405:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:414:23: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:415:20: branch_false: following ‘false’ branch...
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_false: ...to here
tdb-1.4.14/tools/tdbtorture.c:428:20: branch_true: following ‘true’ branch...
tdb-1.4.14/tools/tdbtorture.c:429:25: branch_true: ...to here
tdb-1.4.14/tools/tdbtorture.c:429:25: danger: ‘pids’ leaks here; was allocated at [(17)](sarif:/runs/0/results/76/codeFlows/0/threadFlows/0/locations/16)
#  427|   
#  428|   		if (pid == -1) {
#  429|-> 			perror("failed to wait for child\n");
#  430|   			exit(1);
#  431|   		}

Scan Properties

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