projects
/
platform
/
core
/
uifw
/
lottie-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7244dc8
)
stb: ++safety.
author
Hermet Park
<hermetpark@gmail.com>
Tue, 9 Jul 2019 12:29:08 +0000
(21:29 +0900)
committer
Hermet Park
<hermetpark@gmail.com>
Wed, 10 Jul 2019 01:59:36 +0000
(10:59 +0900)
make it safe not to leave potential dangling pointers.
src/vector/stb/stb_image.h
patch
|
blob
|
history
diff --git
a/src/vector/stb/stb_image.h
b/src/vector/stb/stb_image.h
index b8ab0553749ed644847940cc7a2582610f3cad91..b27f26e3a3984b91d54a7449943ee84ee4d5edd1 100644
(file)
--- a/
src/vector/stb/stb_image.h
+++ b/
src/vector/stb/stb_image.h
@@
-580,7
+580,8
@@
typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
#ifndef STBI_MALLOC
#define STBI_MALLOC(sz) malloc(sz)
#define STBI_REALLOC(p,newsz) realloc(p,newsz)
-#define STBI_FREE(p) free(p)
+#define STBI_FREE(p) free(p); \
+ p = NULL
#endif
#ifndef STBI_REALLOC_SIZED