Error: CPPCHECK_WARNING (CWE-401): [#def1] crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1256: error[memleak]: Memory leak: ret # 1254| ret->idmap = make_runtime_spec_schema_features_linux_mount_extensions_idmap (get_val (tree, "idmap", yajl_t_object), ctx, err); # 1255| if (ret->idmap == NULL && *err != 0) # 1256|-> return NULL; # 1257| # 1258| if (tree->type == yajl_t_object) Error: CLANG_WARNING: [#def2] crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1256:14: warning[unix.Malloc]: Potential leak of memory pointed to by 'ret' # 1254| ret->idmap = make_runtime_spec_schema_features_linux_mount_extensions_idmap (get_val (tree, "idmap", yajl_t_object), ctx, err); # 1255| if (ret->idmap == NULL && *err != 0) # 1256|-> return NULL; # 1257| # 1258| if (tree->type == yajl_t_object) Error: CPPCHECK_WARNING (CWE-401): [#def3] crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1269: error[memleak]: Memory leak: ret # 1267| resi = calloc (1, sizeof(*tree)); # 1268| if (resi == NULL) # 1269|-> return NULL; # 1270| # 1271| resi->type = yajl_t_object; Error: CPPCHECK_WARNING (CWE-401): [#def4] crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1276: error[memleak]: Memory leak: ret # 1274| { # 1275| yajl_tree_free (resi); # 1276|-> return NULL; # 1277| } # 1278| resi->u.object.values = calloc (cnt, sizeof (yajl_val)); Error: CLANG_WARNING: [#def5] crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1276:17: warning[unix.Malloc]: Potential leak of memory pointed to by 'resi' # 1274| { # 1275| yajl_tree_free (resi); # 1276|-> return NULL; # 1277| } # 1278| resi->u.object.values = calloc (cnt, sizeof (yajl_val)); Error: CPPCHECK_WARNING (CWE-401): [#def6] crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1282: error[memleak]: Memory leak: ret # 1280| { # 1281| yajl_tree_free (resi); # 1282|-> return NULL; # 1283| } # 1284| } Error: CLANG_WARNING: [#def7] crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1378:22: warning[unix.Malloc]: Potential leak of memory pointed to by 'ret' # 1376| ret->namespaces = calloc (len + 1, sizeof (*ret->namespaces)); # 1377| if (ret->namespaces == NULL) # 1378|-> return NULL; # 1379| for (i = 0; i < len; i++) # 1380| { Error: CLANG_WARNING: [#def8] crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1456:17: warning[unix.Malloc]: Potential leak of memory pointed to by 'resi' # 1454| { # 1455| yajl_tree_free (resi); # 1456|-> return NULL; # 1457| } # 1458| resi->u.object.values = calloc (cnt, sizeof (yajl_val)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] crun-1.15-build/crun-1.15/src/libcrun/container.c:24: included_from: Included from here. crun-1.15-build/crun-1.15/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_get_features' crun-1.15-build/crun-1.15/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(144)' crun-1.15-build/crun-1.15/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-1.15/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] crun-1.15-build/crun-1.15/src/libcrun/container.c:24: included_from: Included from here. crun-1.15-build/crun-1.15/src/libcrun/utils.h: scope_hint: In function ‘libcrun_container_get_features’ crun-1.15-build/crun-1.15/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc0(144)’ crun-1.15-build/crun-1.15/src/libcrun/utils.h:56:40: note: in definition of macro ‘UNLIKELY’ crun-1.15-build/crun-1.15/src/libcrun/utils.h:56:40: note: in definition of macro ‘UNLIKELY’ # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res;
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-235.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | crun-1.14.4-1.fc40 |
diffbase-store-results-to | /tmp/tmpihc5ui3j/crun-1.14.4-1.fc40.tar.xz |
diffbase-time-created | 2024-07-03 12:11:30 |
diffbase-time-finished | 2024-07-03 12:16:47 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpihc5ui3j/crun-1.14.4-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpihc5ui3j/crun-1.14.4-1.fc40.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-235.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | crun-1.15-1.fc41 |
store-results-to | /tmp/tmpdouv5jsl/crun-1.15-1.fc41.tar.xz |
time-created | 2024-07-03 12:17:18 |
time-finished | 2024-07-03 12:22:11 |
title | Newly introduced defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpdouv5jsl/crun-1.15-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpdouv5jsl/crun-1.15-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |