RuntimeShader: Invoke va_end()
We locally cache our return value so we can call va_end() prior
to returning.
Test: TreeHugger
Change-Id: Ieb453512a39e8f229db006a31ce8e7e7ec69e882
diff --git a/libs/hwui/jni/Shader.cpp b/libs/hwui/jni/Shader.cpp
index ad3fd55..1dc5cd9 100644
--- a/libs/hwui/jni/Shader.cpp
+++ b/libs/hwui/jni/Shader.cpp
@@ -269,8 +269,9 @@
static inline int ThrowIAEFmt(JNIEnv* env, const char* fmt, ...) {
va_list args;
va_start(args, fmt);
- return jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException", fmt, args);
+ int ret = jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException", fmt, args);
va_end(args);
+ return ret;
}
static void RuntimeShader_updateUniforms(JNIEnv* env, jobject, jlong shaderBuilder,