summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-04zink: Return early if the file descriptor could not have been ↵Corentin Noël1-1/+6
duplicated/acquired Do not continue and call drmIoctl on an invalid file descriptor. Fix defect reported by Coverity Scan. Argument cannot be negative The negative argument will be interpreted as a very large unsigned value. CID: 1544377 Cc: mesa-stable Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27788>
2024-02-28intel/clc: Fix file descriptor leakVinson Lee1-0/+1
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable fp going out of scope leaks the storage it points to. Fixes: 4fd7495c6938 ("intel/clc: add ability to output NIR") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27778>
2024-01-31nvk: mem cannot be null in binding buffers/images.Dave Airlie2-27/+14
Tom on discord pointed out a coverity warning in this area about mem dereferences. Vulkan API states that mem must be non-NULL, so remove those paths that are unused. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27255>
2024-01-31intel/hasvk: assume() we don't get ISL_NUM_FORMATSDylan Baker1-0/+1
Because coverity CID: 1559412 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27369>
2024-01-31intel/vulkan: assume() that we don't use "ISL_NUM_FORMATS"Dylan Baker1-0/+1
Which coverity thinks will happen, even though we never return ISL_NUM_FORMATS. CID: 1559463 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27369>
2024-01-29zink: Initialize zink_bindless_descriptor to zero on creationCorentin Noël1-1/+1
Make sure to have all fields to 0 as we are then using pipe_resource_reference on some of its fields. Fix defect reported by Coverity Scan. Uninitialized pointer read Incorrect values could be read from, or even written to, an arbitrary memory location, causing incorrect computations. CID: 1520759 Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27259>
2024-01-29zink: Initialize zink_shader_objectCorentin Noël1-1/+1
Fix defect reported by Coverity Scan. Uninitialized scalar variable The variable will contain an arbitrary value left from earlier computations. CID: 1528166 Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27259>
2024-01-22v3dv/bo: use mtx_lock/unlock on cache_init tooAlejandro Piñeiro1-0/+2
To handle coverity warning: 4. thread2_modifies_field: Thread2 sets cache_size to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1. CID 1559509 (#1 of 1): Check of thread-shared field evades lock acquisition (LOCK_EVASION)6. thread1_overwrites_value_in_field: Thread1 sets cache_size to a new value. Now the two threads have an inconsistent view of cache_size and updates to fields correlated with cache_size may be lost. 521 cache->cache_size += bo->size; Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26951>
2024-01-22broadcom/compiler: fix coverity warning (unitialized pointer read)Alejandro Piñeiro1-7/+9
Full coverity warning: CID 1558604: Uninitialized pointer read (UNINIT)12. uninit_use_in_call: Using uninitialized value *results when calling nir_vec. 236 return nir_vec(b, results, DIV_ROUND_UP(num_components, 2)); To fix it we initialize the variables, provide a unreachable on the switch that sets the results values. As we are here we also move a comment to make things more clear. Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26951>
2024-01-15intel/disasm: Remove duplicate variable reg_fileVinson Lee1-8/+4
Fix defects reported by Coverity Scan. Evaluation order violation (EVALUATION_ORDER) write_write_typo: In reg_file = reg_file = brw_inst_dpas_3src_dst_reg_file(devinfo, inst), reg_file is written twice with the same value. Fixes: 1c92dad5cb7 ("intel/disasm: Disassembly support for DPAS") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27056>
2024-01-11zink: Use memmove when dealing with overlapping memoryCorentin Noël1-1/+1
Fix defect reported by Coverity Scan. Overlapping buffer in memory copy Results in an undefined behavior CID: 1515598 Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26922>
2024-01-11zink: Avoid the use of negative array offsetsCorentin Noël1-2/+7
Fix defect reported by Coverity Scan. Negative array index read A memory location at a negative offset from the beginning of the array will be read, resulting in incorrect values. CID: 1515600 Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26922>
2024-01-08virgl: Assert build_id_note before dereferencing itCorentin Noël1-1/+3
Fix defect reported by Coverity Scan. Dereference null return value If the function actually returns a null value, a null pointer dereference will occur. CID: 1492763 Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26924>
2023-11-20nir: Fix decomposed_prmcnt copy-paste errorVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Copy-paste error (COPY_PASTE_ERROR) copy_paste_error: prmcnt in prmcnt = -1 looks like a copy-paste error. Fixes: cc3f20ca6c1 ("nir: Also gather decomposed primitive count") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26159>
2023-11-15ac/surface/tests: Remove duplicate variable block_size_bitsVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Evaluation order violation (EVALUATION_ORDER) write_write_typo: In block_size_bits = block_size_bits = ((surf.u.gfx9.swizzle_mode >= ADDR_SW_256KB_Z_X) ? 18 : 16), block_size_bits is written twice with the same value. Fixes: 44eaf50a34b ("ac/surface/tests: cosmetic changes") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26160>
2023-10-17broadcom/qpu: Remove duplicate variable opcodeVinson Lee1-2/+2
Fix defect reported by Coverity Scan. Evaluation order violation (EVALUATION_ORDER) write_write_typo: In opcode = opcode = desc->opcode_first, opcode is written twice with the same value. Fixes: 3b20208f03f ("broadcom/qpu: add pack/unpack support for v71") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25735>
2023-10-08anv: Fix transfer type assertVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Constant expression result (CONSTANT_EXPRESSION_RESULT) always_true_or: The or condition type != ANV_TIMESTAMP_CAPTURE_AT_CS_STALL || type != ANV_TIMESTAMP_REWRITE_COMPUTE_WALKER will always be true because type cannot be equal to two different values at the same time, so it must be not equal to at least one of them. Fixes: 5112b421462 ("anv: Handle end of pipe with MI_FLUSH_DW on transfer queue") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25605>
2023-08-26vk/wsi/x11: Remove dead codeVinson Lee1-2/+0
Fix defect reported by Coverity Scan. Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: return VK_ERROR_SURFACE_LOS.... Fixes: fb9f697fbb8 ("vk/wsi/x11: move surface alpha check from get_caps to creation") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24802>
2023-08-26nv50: Remove unused valueVinson Lee1-2/+1
Fix defect reported by Coverity Scan. Unused value (UNUSED_VALUE) assigned_pointer: Assigning value from &nv50->vtxbuf[b] to vb here, but that stored value is overwritten before it can be used. Fixes: 76725452239 ("gallium: move vertex stride to CSO") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24801>
2023-08-14intel/decoder: Fix memory leak on error pathVinson Lee1-1/+3
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable text_data going out of scope leaks the storage it points to. Fixes: b4c8d2dc455 ("intel/decoder: Add intel_spec_load_common()") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24659>
2023-08-09lavapipe: Fix struct initializationVinson Lee1-4/+4
Fix defect reported by Coverity Scan. Evaluation order violation (EVALUATION_ORDER) write_write_typo: In box.x = box.x = copy->imageOffset.x, box.x is written twice with the same value. Fixes: 9e9d90c6c38 ("lavapipe: VK_EXT_host_image_copy") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24531>
2023-08-08nvk: Fix assertVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT) assign_where_compare_meant: use of "=" where "==" may have been intended Fixes: e41031d8ffd ("nvk: Enable multiplane images and image views") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24530>
2023-07-25state_tracker: fix dereference before null checkIllia Polishchuk1-1/+3
Coverity error CID 1528178 (#1 of 1): Dereference before null check (REVERSE_INULL) Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20893>
2023-07-25iris: remove NULL check for already dereferenced pointer earlierIllia Polishchuk1-1/+1
Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com> Found by Coverity. CID: 1528158 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20893>
2023-07-25i915: change format in dbg stringIllia Abernikhin1-1/+1
Actually, uintptr_t is of type unsigned long, but the debug line uses the %d format specifier, which expects an int. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com> Found by Coverity. CID: 1515961 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20893>
2023-07-25state_tracker: moving initialisation of whandle out from if statementIllia Abernikhin1-1/+2
whandle initialization inside if statement but used also outside Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Found by Coverity. CID: 1516746 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20893>
2023-06-23frontends/va: fix some coverity scan reported issuesThong Thai7-8/+26
Added some checks for NULL pointer dereferencing and loop bounds. v2: Use ARRAY_SIZE instead of magic numbers (@jenatali) Signed-off-by: Thong Thai <thong.thai@amd.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23598>
2023-06-11r600/sfn: Remove duplicate assignmentVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Self assignment (NO_EFFECT) self_assign: Assigning sh->info.fs.depth_layout to itself has no effect. Fixes: bbd265b8e8b ("r600+sfn: Assign ps_conservative_z and switch to NIR defines") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23414>
2023-06-10frontends/va: Fix missing unlockVinson Lee1-1/+3
Fix defect reported by Coverity Scan. Missing unlock (LOCK) missing_unlock: Returning without unlocking drv->mutex. Fixes: af695149e96 ("frontends/va: pass in film_grain_target as new output") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23488>
2023-06-07vulkan/wsi: Remove duplicate NULL checkVinson Lee1-3/+0
Fix defect reported by Coverity Scan. Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: return NULL;. Fixes: eadc64ab248 ("vulkan/wsi/display: do not dereference a NULL pointer") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23415>
2023-06-07tu: Fix missing unlockVinson Lee1-0/+1
Fix defect reported by Coverity Scan. Missing unlock (LOCK) missing_unlock: Returning without unlocking dev->vma_mutex. Fixes: c20139c2922 ("tu: Enable bufferDeviceAddressCaptureReplay") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23490>
2023-06-06dzn: Fix qpool->queries_lock double lockVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Double lock (LOCK) double_lock: mtx_lock locks qpool->queries_lock while it is locked. Fixes: a012b219640 ("microsoft: Initial vulkan-on-12 driver") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23455>
2023-06-05pvr: Fix signed comparisonVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Unsigned compared against 0 (NO_EFFECT) unsigned_compare: This less-than-zero comparison of an unsigned value is never true. val < 0U. unsigned_conversion: val is converted to an unsigned type because it's compared to an unsigned constant. Fixes: 480bdff4b52 ("pvr: Add support to process transfer and blit cmds") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23416>
2023-06-03nv50: Fix memory leak in error pathVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable memobj going out of scope leaks the storage it points to. Fixes: a1571333804 ("nvc0/nv50: support and enable EXT_memory_object*") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23417>
2023-06-01freedreno/a6xx: Fix memory leak on error path.Vinson Lee1-1/+3
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable fd6_ctx going out of scope leaks the storage it points to. Fixes: de3b34df973 ("freedreno: Add a6xx backend") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Rob Clark <robclark@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23289>
2023-05-31r600/sfn: Initialize BlockScheduler member m_chip_family.Vinson Lee1-1/+2
Fix defect reported by Coverity Scan. Uninitialized scalar field (UNINIT_CTOR) uninit_member: Non-static class member m_chip_family is not initialized in this constructor nor in any functions that it calls. Fixes: e57643cf548 ("r600/sfn: Add handling for R600 indirect access alias handling") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23290>
2023-05-08r600/sfn: Fix iterator useGert Wollny1-1/+1
Reported by Coverity 1529462 Fixes: e57643cf5488fc7ca2619f62997527b1f546cd38 r600/sfn: Add handling for R600 indirect access alias Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22903>
2023-03-01intel/mi: use 64bit constant for bitshiftDylan Baker1-1/+1
Coverity complains that we could end up rolling over on a 32bit platform, which isn't really true because of the assertion, but there's also no harm in ensuring that we have exactly the same behavior for both 32 bit and 64 bit platforms. CID: 1515989 Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21572>
2023-02-28iris: consider bufmgr creation to have failed if `dup`ing of the fd failsDylan Baker1-0/+3
Coverity points out that we can pass a negative value to `close()`, which results in an unchecked error. While this is technically true, it really isn't a problem as `close()` is speced to return -1 in that case (which we ignore). However, what is true is that if we fail to dup the fd (the only case where we could end up with a negative value), then we're in an unrecoverable error state anyway, and should go to the error cleanup code. CID: 1521539 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21568>
2023-01-15radv: Fix memory leak.Vinson Lee1-0/+2
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable page going out of scope leaks the storage it points to. Fixes: 8d0e6c02c70 ("radv: Add RMV tracing utilities") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20711>
2023-01-08spirv2dxil: Fix memory leak on error path.Vinson Lee1-0/+1
Fix resource leak reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable file_contents going out of scope leaks the storage it points to. Fixes: 531d17c3342 ("spirv2dxil: Support linking multiple shaders") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20576>
2022-12-27anv: fix potential integer overflowLionel Landwerlin1-1/+1
The loop going from 0 to max_draw_count multiplies the value which could potentially overflow. Fixes Coverity CID 1517852 Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes: 3596a8ea7a ("anv: factor out some indirect draw count entry points") Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20436>
2022-12-17r600/sfn: Fix test for possible dest slotGert Wollny1-1/+2
Fixes Coverity CID 1517721 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20367>
2022-11-28freedreno/rddecompiler: Fix memory leak.Vinson Lee1-0/+1
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable stream_data going out of scope leaks the storage it points to. Fixes: a7773c3c4c7 ("freedreno/rddecompiler: Add shader disasm/asm support") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20028>
2022-11-22intel/perf: Fix memory leak.Vinson Lee1-0/+2
Fix defect with Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable pass_array going out of scope leaks the storage it points to. Fixes: d4cbb665067 ("intel/perf: support more than 64 queries") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19888>
2022-11-21asahi: Fix memory leak on error path.Vinson Lee1-1/+3
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable nresource going out of scope leaks the storage it points to. Fixes: 7522f4f7147 ("asahi: Make resource creation code modifier-aware") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19889>
2022-11-20asahi: Fix memory leak on error path.Vinson Lee1-1/+3
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable rsc going out of scope leaks the storage it points to. Fixes: 01964625eb2 ("asahi: Implement agx_resource_from_handle") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19887>
2022-10-20r600/sfn: Initialize TestInstrFromString member m_instr_factory.Vinson Lee1-1/+1
Fix defect reported by Coverity Scan. Uninitialized pointer field (UNINIT_CTOR) uninit_member: Non-static class member m_instr_factory is not initialized in this constructor nor in any functions that it calls. Fixes: e840645bb79 ("r600/sfn:explicitly initialize the memory pool") Suggested-by: Gert Wollny <gert.wollny@collabora.com> Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19098>
2022-10-19zink: Remove duplicate variable zm.Vinson Lee1-1/+1
Fix defect reported by Coverity Scan. Evaluation order violation (EVALUATION_ORDER) write_write_typo: In zm = zm = create_shader_module_for_stage_optimal(ctx, screen, prog->shaders[i], prog, i, state), zm is written twice with the same value. Fixes: 325c703624a ("zink: add 'optimal_keys' handling for shader keys") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19086>
2022-09-23radv: Fix file descriptor leak.Vinson Lee1-3/+3
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable file going out of scope leaks the storage it points to. Fixes: 57498067540 ("radv: Add Radeon Raytracing Analyzer trace dumping utilities") Suggested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18660>