Skip to content

Commit

Permalink
shader.c: Fix bad free
Browse files Browse the repository at this point in the history
We were freeing the file instead of freeing the buffer, oops.
  • Loading branch information
zid committed Mar 11, 2024
1 parent 5b81da9 commit e30f00e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shader.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ static const char *load_txt(const char *name)
s = malloc(len+1);
if(fread(s, 1, len, f) != len)
{
free(f);
fclose(f);
free(s);
return NULL;
}

Expand Down

0 comments on commit e30f00e

Please sign in to comment.