mesa/main: Fix tmp_row memory leak in texstore_rgba_integer.
authorSiavash Eliasi <siavashserver@gmail.com>
Sat, 15 Nov 2014 19:02:13 +0000 (22:32 +0330)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 18 Nov 2014 22:55:39 +0000 (14:55 -0800)
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/main/texstore.c

index f913e42d31564e4efdd789c98310dacf3b1bdf51..f858cef5061db947cb948cefa8561f428b973533 100644 (file)
@@ -1667,8 +1667,10 @@ texstore_rgba_integer(TEXSTORE_PARAMS)
 
    assert(is_array && !normalized);
 
-   if (!is_array)
+   if (!is_array) {
+      free(tmp_row);
       return GL_FALSE;
+   }
 
    invert_swizzle(dst2rgba, rgba2dst);
    compute_component_mapping(GL_RGBA, baseInternalFormat, base2rgba);