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:
parent
3d05193e67
commit
f73fc95ea5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user