1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

strbuf: accept NULL for strbuf_cleanup()

This commit is contained in:
Yu Watanabe 2018-08-22 21:50:50 +09:00
parent 3d05193e67
commit f73fc95ea5

View File

@ -66,6 +66,9 @@ void strbuf_complete(struct strbuf *str) {
/* clean up everything */
void strbuf_cleanup(struct strbuf *str) {
if (!str)
return;
strbuf_complete(str);
free(str->buf);
free(str);