Mesa (mesa_7_6_branch): st/egl: Fix memory leak in egl_tracker.c.

Vinson Lee vlee at kemper.freedesktop.org
Sun Dec 6 01:16:05 PST 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: 7005f7cd1a9947e75bf772897d9055e3fe467c3d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7005f7cd1a9947e75bf772897d9055e3fe467c3d

Author: Vinson Lee <vlee at vmware.com>
Date:   Fri Nov 20 16:33:25 2009 -0800

st/egl: Fix memory leak in egl_tracker.c.
(cherry picked from commit 052b127842af3372fd768eae8e29b240a696a12a)

---

 src/gallium/state_trackers/egl/egl_tracker.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/egl/egl_tracker.c b/src/gallium/state_trackers/egl/egl_tracker.c
index 5140755..4548b4f 100644
--- a/src/gallium/state_trackers/egl/egl_tracker.c
+++ b/src/gallium/state_trackers/egl/egl_tracker.c
@@ -85,11 +85,11 @@ drm_get_device_id(struct drm_device *device)
 	}
 
 	ret = fgets(path, sizeof( path ), file);
+	fclose(file);
 	if (!ret)
 		return;
 
 	sscanf(path, "%x", &device->deviceID);
-	fclose(file);
 }
 
 static void



More information about the mesa-commit mailing list