From 83bb51af69f5391d622b44b7121057513a4cf831 Mon Sep 17 00:00:00 2001 From: Irek Fakhrutdinov Date: Mon, 6 Dec 2021 07:15:19 -0500 Subject: [PATCH] Check for null before accessing a field Signed-off-by: Irek Fakhrutdinov --- c/zis/server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/c/zis/server.c b/c/zis/server.c index 25e85dd89..4530220e6 100644 --- a/c/zis/server.c +++ b/c/zis/server.c @@ -573,7 +573,9 @@ static int installServices(ZISContext *context, ZISPlugin *plugin, zowelog(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_DEBUG, "Anchor found @ 0x%p\n", anchor); - zowedump(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_DEBUG, anchor, anchor->size); + if (anchor) { + zowedump(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_DEBUG, anchor, anchor->size); + } if (anchor && !isServiceAnchorCompatible(service, anchor)) { discardServiceAnchor(anchor);