Make r_strbuf_fini() safer (#16115)

This commit is contained in:
Paul I 2020-03-03 14:41:19 +03:00 committed by GitHub
parent 3a4d7365fd
commit d573241c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -308,5 +308,7 @@ R_API void r_strbuf_free(RStrBuf *sb) {
R_API void r_strbuf_fini(RStrBuf *sb) {
if (sb) {
R_FREE (sb->ptr);
sb->len = 0;
sb->buf[0] = '\0';
}
}