glsl: Change loop_analysis to not look like a resource leak
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 10 Jul 2012 23:26:33 +0000 (16:26 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 8 Feb 2013 05:18:42 +0000 (21:18 -0800)
commit82691f12931a022560f8054c8c8e240cd6b2fff4
treeee69e3bcfe13b9625bd01926d781b328bad84f8b
parent04f0d6cc2235ba50f7525446004f634e03632eeb
glsl: Change loop_analysis to not look like a resource leak

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@intel.com>
Cc: Dave Airlie <airlied@freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57753
src/glsl/loop_analysis.cpp
src/glsl/loop_analysis.h