aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsl/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 5ea57d53a88..3a0f812f237 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -232,7 +232,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) {
@@ -243,6 +243,7 @@ load_text_file(void *ctx, const char *file_name)
} while (total_read < size);
text[total_read] = '\0';
+error:;
}
fclose(fp);