Skip to content
Myr

Merge branch 'fix-double-free' of https://github.com/philippwiesemann/stb into working

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents 90dc93a, b3653cc · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:stb.h+1 added-1 removed
10063 unmodified lines
10064 fclose(f);10065 if (p == NULL) return NULL;10066 if (p[0] != 0x57 || p[1] != 0xBc || p[2] || p[3]) { free(p); return NULL; }10067 q = (char *) malloc(stb_decompress_length(p)+1);10068 if (!q) { free(p); free(p); return NULL; }10068 if (!q) { free(p); return NULL; }10069 *len = stb_decompress((unsigned char *) q, p, n);10070 if (*len) q[*len] = 0;10071 free(p);10072 return q;
4021 unmodified lines