mesa: destroy window upon exit
diff --git a/progs/demos/texcyl.c b/progs/demos/texcyl.c
index c04d500..e3b0303 100644
--- a/progs/demos/texcyl.c
+++ b/progs/demos/texcyl.c
@@ -27,6 +27,8 @@
 #define LINEAR_FILTER 21
 #define QUIT 100
 
+static GLint Win = -1;
+
 static GLuint CylinderObj = 0;
 static GLboolean Animate = GL_TRUE;
 
@@ -159,6 +161,7 @@
          glutIdleFunc(NULL);
       break;
       case 27:
+         glutDestroyWindow(Win);
          exit(0);
          break;
    }
@@ -263,7 +266,7 @@
 
    glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 
-   glutCreateWindow(argv[0] );
+   Win = glutCreateWindow(argv[0] );
 
    Init(argc, argv);