progs/fp: close file (bug 26559)
[mesa.git] / progs / fp / fp-tri.c
index a39818726bdeabc7f801a04c30ca018d1025cff4..e45a799a00eb639d47c367616c7fd99538d1853d 100644 (file)
@@ -73,7 +73,7 @@ static void Init( void )
    GLuint Texture;
    GLint errno;
    GLuint prognum;
-   char buf[4096];
+   char buf[50000];
    GLuint sz;
    FILE *f;
 
@@ -188,6 +188,7 @@ static void Init( void )
    }
 
    glClearColor(.1, .3, .5, 0);
+   fclose(f);
 }
 
 static void Reshape(int width, int height)
@@ -208,7 +209,7 @@ static void Key(unsigned char key, int x, int y)
       case 27:
        exit(1);
       default:
-       return;
+       break;
     }
 
     glutPostRedisplay();