[Mesa-dev] [PATCH] glsl: Change loop_analysis to not look like a resource leak

Kenneth Graunke kenneth at whitecape.org
Thu Jan 31 08:26:48 PST 2013


On 01/30/2013 11:27 AM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Previously the loop_state was allocated in the loop_analysis
> constructor, but not freed in the (nonexistent) destructor.  Moving
> the allocation of the loop_state makes this code appear less sketchy.
>
> Either way, there is no actual leak.  The loop_state is freed by the
> single caller of analyze_loop_variables.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: Dave Airlie <airlied at freedesktop.org>
> Cc: Matt Turner <mattst88 at gmail.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57753
> ---
>   src/glsl/loop_analysis.cpp | 13 ++++++-------
>   src/glsl/loop_analysis.h   |  2 +-
>   2 files changed, 7 insertions(+), 8 deletions(-)

Oh, Coverity.

This patch shouldn't matter, but it shouldn't hurt, so...meh.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list