Make r_strbuf_fini() safer (#16115)
This commit is contained in:
parent
3a4d7365fd
commit
d573241c47
|
@ -308,5 +308,7 @@ R_API void r_strbuf_free(RStrBuf *sb) {
|
||||||
R_API void r_strbuf_fini(RStrBuf *sb) {
|
R_API void r_strbuf_fini(RStrBuf *sb) {
|
||||||
if (sb) {
|
if (sb) {
|
||||||
R_FREE (sb->ptr);
|
R_FREE (sb->ptr);
|
||||||
|
sb->len = 0;
|
||||||
|
sb->buf[0] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue