Task #130959 - fixed.err

back to task #130959
download
Error: CPPCHECK_WARNING (CWE-476):
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:59: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#   57|         f = fopen ("pixbuf-randomly-modified-image", "w");
#   58|         g_assert (f != NULL);
#   59|->       fwrite (img_copy, size, 1, f);
#   60|         g_assert (!ferror (f));
#   61|         fclose (f);

Error: GCC_ANALYZER_WARNING (CWE-775):
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:60:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("pixbuf-randomly-modified-image", "w")’
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:48:15: branch_true: following ‘true’ branch (when ‘i < n’)...
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:53:21: branch_true: ...to here
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:57:11: acquire_resource: opened here
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:58:7: branch_true: following ‘true’ branch...
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:59:7: branch_true: ...to here
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:60:7: danger: ‘fopen("pixbuf-randomly-modified-image", "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   58|         g_assert (f != NULL);
#   59|         fwrite (img_copy, size, 1, f);
#   60|->       g_assert (!ferror (f));
#   61|         fclose (f);
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-401):
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:60:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("pixbuf-randomly-modified-image", "w")’
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:48:15: branch_true: following ‘true’ branch (when ‘i < n’)...
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:53:21: branch_true: ...to here
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:57:11: acquire_memory: allocated here
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:58:7: branch_true: following ‘true’ branch...
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:59:7: branch_true: ...to here
gdk-pixbuf-2.44.4/tests/pixbuf-randomly-modified.c:60:7: danger: ‘fopen("pixbuf-randomly-modified-image", "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   58|         g_assert (f != NULL);
#   59|         fwrite (img_copy, size, 1, f);
#   60|->       g_assert (!ferror (f));
#   61|         fclose (f);
#   62|