Task #78313 - python-systemd-235-17.fc44/scan-results.err

back to task #78313
download
Error: GCC_ANALYZER_WARNING (CWE-401):
python-systemd-235/systemd/_reader.c:149:21: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
python-systemd-235/systemd/_reader.c:133:12: enter_function: entry to ‘strv_converter’
python-systemd-235/systemd/_reader.c:137:9: branch_false: following ‘false’ branch (when ‘_result’ is non-NULL)...
python-systemd-235/systemd/_reader.c:139:14: branch_false: ...to here
python-systemd-235/systemd/_reader.c:139:12: branch_false: following ‘false’ branch...
python-systemd-235/systemd/_reader.c:142:15: branch_false: ...to here
python-systemd-235/systemd/_reader.c:144:12: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
python-systemd-235/systemd/_reader.c:149:21: branch_true: following ‘true’ branch...
python-systemd-235/systemd/_reader.c:151:47: branch_true: ...to here
python-systemd-235/systemd/_reader.c:155:21: call_function: calling ‘str_converter’ from ‘strv_converter’
python-systemd-235/systemd/_reader.c:155:21: return_function: returning to ‘strv_converter’ from ‘str_converter’
python-systemd-235/systemd/_reader.c:156:20: branch_false: following ‘false’ branch...
python-systemd-235/systemd/_reader.c:159:21: branch_false: ...to here
python-systemd-235/systemd/_reader.c:159:21: acquire_memory: allocated here
python-systemd-235/systemd/_reader.c:160:20: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
python-systemd-235/systemd/_reader.c:165:17: branch_false: ...to here
python-systemd-235/systemd/_reader.c:149:21: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
python-systemd-235/systemd/_reader.c:149:21: danger: ‘s’ leaks here; was allocated at [(17)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/16)
#  147|           }
#  148|   
#  149|->         for (i = 0; i < len; i++) {
#  150|                   PyObject *item;
#  151|                   _cleanup_Py_DECREF_ PyObject *bytes = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401):
python-systemd-235/systemd/_reader.c:215:24: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)PySequence_Size(obj), 4)’
python-systemd-235/systemd/_reader.c:194:12: enter_function: entry to ‘intlist_converter’
python-systemd-235/systemd/_reader.c:198:9: branch_false: following ‘false’ branch (when ‘_result’ is non-NULL)...
python-systemd-235/systemd/_reader.c:199:9: branch_false: ...to here
python-systemd-235/systemd/_reader.c:199:9: branch_false: following ‘false’ branch (when ‘_len’ is non-NULL)...
python-systemd-235/systemd/_reader.c:201:14: branch_false: ...to here
python-systemd-235/systemd/_reader.c:201:12: branch_false: following ‘false’ branch...
python-systemd-235/systemd/_reader.c:204:15: branch_false: ...to here
python-systemd-235/systemd/_reader.c:205:18: acquire_memory: allocated here
python-systemd-235/systemd/_reader.c:206:12: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
python-systemd-235/systemd/_reader.c:211:21: branch_true: following ‘true’ branch...
python-systemd-235/systemd/_reader.c:215:24: call_function: inlined call to ‘_Py_TYPE’ from ‘intlist_converter’
python-systemd-235/systemd/_reader.c:215:24: danger: ‘calloc((long unsigned int)PySequence_Size(obj), 4)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  213|                   int fd;
#  214|   
#  215|->                 item = PySequence_ITEM(obj, i);
#  216|                   if (long_as_fd(item, &fd) < 0)
#  217|                           return 0;

Error: GCC_ANALYZER_WARNING (CWE-401):
python-systemd-235/systemd/_reader.c:351:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
python-systemd-235/systemd/_reader.c:253:12: enter_function: entry to ‘Reader_init’
python-systemd-235/systemd/_reader.c:259:12: branch_false: following ‘false’ branch...
python-systemd-235/systemd/_reader.c:266:13: branch_false: ...to here
python-systemd-235/systemd/_reader.c:266:12: branch_false: following ‘false’ branch...
python-systemd-235/systemd/_reader.c:272:12: branch_false: ...to here
python-systemd-235/systemd/_reader.c:272:12: branch_false: following ‘false’ branch...
python-systemd-235/systemd/_reader.c:298:19: branch_false: ...to here
python-systemd-235/systemd/_reader.c:298:19: branch_true: following ‘true’ branch...
python-systemd-235/systemd/_reader.c:299:47: branch_true: ...to here
python-systemd-235/systemd/_reader.c:305:30: call_function: calling ‘strv_converter’ from ‘Reader_init’
python-systemd-235/systemd/_reader.c:303:52: call_function: inlined call to ‘strv_freep’ from ‘Reader_init’
python-systemd-235/systemd/_reader.c:351:1: danger: ‘<unknown>’ leaks here; was allocated at [(27)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/26)
#  349|   
#  350|           return set_error(r, NULL, "Opening the journal failed");
#  351|-> }
#  352|   
#  353|   PyDoc_STRVAR(Reader_fileno__doc__,

Error: GCC_ANALYZER_WARNING (CWE-401):
python-systemd-235/systemd/_reader.c:351:1: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
python-systemd-235/systemd/_reader.c:253:12: enter_function: entry to ‘Reader_init’
python-systemd-235/systemd/_reader.c:259:12: branch_false: following ‘false’ branch...
python-systemd-235/systemd/_reader.c:266:13: branch_false: ...to here
python-systemd-235/systemd/_reader.c:266:12: branch_false: following ‘false’ branch...
python-systemd-235/systemd/_reader.c:272:12: branch_false: ...to here
python-systemd-235/systemd/_reader.c:272:12: branch_false: following ‘false’ branch...
python-systemd-235/systemd/_reader.c:298:19: branch_false: ...to here
python-systemd-235/systemd/_reader.c:298:19: branch_true: following ‘true’ branch...
python-systemd-235/systemd/_reader.c:299:47: branch_true: ...to here
python-systemd-235/systemd/_reader.c:305:30: call_function: calling ‘strv_converter’ from ‘Reader_init’
python-systemd-235/systemd/_reader.c:303:52: call_function: inlined call to ‘strv_freep’ from ‘Reader_init’
python-systemd-235/systemd/_reader.c:351:1: danger: ‘files’ leaks here; was allocated at [(16)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/15)
#  349|   
#  350|           return set_error(r, NULL, "Opening the journal failed");
#  351|-> }
#  352|   
#  353|   PyDoc_STRVAR(Reader_fileno__doc__,