http://www.jwz.org/xscreensaver/xscreensaver-5.13.tar.gz
[xscreensaver] / hacks / glx / tube.c
index a21682501fb63f0a86fcda4c14c6e826a122f421..f218d4a3aa891d32d136c8ffeb47c4b4c4f2148f 100644 (file)
@@ -1,4 +1,4 @@
-/* tube, Copyright (c) 2001-2010 Jamie Zawinski <jwz@jwz.org>
+/* tube, Copyright (c) 2001-2011 Jamie Zawinski <jwz@jwz.org>
  * Utility functions to create tubes and cones in GL.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -28,6 +28,7 @@
 
 typedef struct { GLfloat x, y, z; } XYZ;
 
+
 static int
 unit_tube (int faces, int smooth, int caps_p, int wire_p)
 {
@@ -181,6 +182,8 @@ unit_tube (int faces, int smooth, int caps_p, int wire_p)
         glDrawArrays ((wire_p ? GL_LINE_LOOP : GL_TRIANGLE_FAN), 0, out);
       }
 
+  free(array);
+
   return polys;
 }