[Mesa-dev] [PATCH mesa] amdgpu/addrlib: add missing va_end() after va_copy()

Eric Engestrom eric.engestrom at imgtec.com
Tue Sep 19 09:56:10 UTC 2017


According to the man page:
> Each invocation of va_copy() must be matched by a corresponding
> invocation of va_end() in the same function.

Spotted by Coverity.

CID: 1418113
Fixes: e7fc664b91a5d886c270 "winsys/amdgpu: add addrlib - texture
                             addressing and alignment calculator"
Cc: Marek Olšák <marek.olsak at amd.com>
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
 src/amd/addrlib/core/addrobject.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/amd/addrlib/core/addrobject.cpp b/src/amd/addrlib/core/addrobject.cpp
index dcdb1bffc2..390ddd9127 100644
--- a/src/amd/addrlib/core/addrobject.cpp
+++ b/src/amd/addrlib/core/addrobject.cpp
@@ -229,6 +229,7 @@ VOID Object::DebugPrint(
 
         m_client.callbacks.debugPrint(&debugPrintInput);
 
+        va_end(debugPrintInput.ap);
         va_end(ap);
     }
 #endif
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list