diff options
author | Karel Klic <kklic@redhat.com> | 2010-08-24 12:30:29 +0200 |
---|---|---|
committer | Karel Klic <kklic@redhat.com> | 2010-08-24 12:30:29 +0200 |
commit | 67f573ae08826bc06db8511b422c5238ebe74944 (patch) | |
tree | 49c2a4954f23f8206dba86776b3a9aa01318864b | |
parent | 14abf4481f0fb60c0141d9ab32d8a73d4f974875 (diff) | |
download | abrt-67f573ae08826bc06db8511b422c5238ebe74944.tar.gz abrt-67f573ae08826bc06db8511b422c5238ebe74944.tar.xz abrt-67f573ae08826bc06db8511b422c5238ebe74944.zip |
strbuf_free(NULL) should not crash
-rw-r--r-- | lib/utils/strbuf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/strbuf.c b/lib/utils/strbuf.c index 9ad74714..f0962541 100644 --- a/lib/utils/strbuf.c +++ b/lib/utils/strbuf.c @@ -56,6 +56,9 @@ struct strbuf *strbuf_new() void strbuf_free(struct strbuf *strbuf) { + if (!strbuf) + return; + free(strbuf->buf); free(strbuf); } |