From 55a59b944a913832e54b4818b41046bda0b6be66 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Tue, 9 Dec 2014 21:19:25 +1100 Subject: Make fsp_freemsg() behave if passed a NULL pointer Signed-off-by: Stewart Smith --- hw/fsp/fsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw') diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index c1eb53a..6a86352 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -250,7 +250,7 @@ void __fsp_freemsg(struct fsp_msg *msg) void fsp_freemsg(struct fsp_msg *msg) { - if (msg->resp) + if (msg && msg->resp) __fsp_freemsg(msg->resp); __fsp_freemsg(msg); } -- cgit v1.1