st/egl: Fix memory leak in egl_tracker.c.
authorVinson Lee <vlee@vmware.com>
Sat, 21 Nov 2009 00:33:25 +0000 (16:33 -0800)
committerVinson Lee <vlee@vmware.com>
Sun, 6 Dec 2009 09:15:24 +0000 (01:15 -0800)
(cherry picked from commit 052b127842af3372fd768eae8e29b240a696a12a)

src/gallium/state_trackers/egl/egl_tracker.c

index 5140755001c51e47f790a69dc42737de7563f3c7..4548b4fd27cb2d0de51ae507ce19421f1eae9e40 100644 (file)
@@ -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