Fix memory leak in GL marshalling.