summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-13 21:55:17 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-13 21:55:17 +0200
commit4798cb386e7a436a2071b4101df8a2f8e4c1d21c (patch)
tree24b13227d18bc373f47958aed5971fccee332192
parent005037e2546fffbcfa827790d277548f225e7507 (diff)
downloadmblaze-4798cb386e7a436a2071b4101df8a2f8e4c1d21c.tar.gz
mblaze-4798cb386e7a436a2071b4101df8a2f8e4c1d21c.tar.xz
mblaze-4798cb386e7a436a2071b4101df8a2f8e4c1d21c.zip
blaze822: allow freeing of null pointers
-rw-r--r--blaze822.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/blaze822.c b/blaze822.c
index befdd6a..5ea82c6 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -395,6 +395,8 @@ blaze822_mem(char *src, size_t len)
 void
 blaze822_free(struct message *mesg)
 {
+	if (!mesg)
+		return;
 	free(mesg->msg);
 	free(mesg->bodychunk);
 	free(mesg);