Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com>
---
 src/glsl/main.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index aa188b1..755bc9a 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -221,7 +221,7 @@ load_text_file(void *ctx, const char *file_name)
                        if (bytes < size - total_read) {
                                free(text);
                                text = NULL;
-                               break;
+                               goto error;
                        }
 
                        if (bytes == 0) {
@@ -232,6 +232,7 @@ load_text_file(void *ctx, const char *file_name)
                } while (total_read < size);
 
                text[total_read] = '\0';
+error:
        }
 
        fclose(fp);
-- 
1.8.1.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to