From e7bff3de50fc79ba82cf20d3414ee6abdde57f81 Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Fri, 4 Aug 2023 13:41:00 +0900 Subject: [PATCH] plugin: display: Add check NULL dereference Fix static analysis NULL dereference issue. Change-Id: I5cca401e4cd9a1b52e19e30dbfbebd747c6a3aed Signed-off-by: Yunhee Seo --- plugins/wearable/display/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wearable/display/core.c b/plugins/wearable/display/core.c index 4f883c1..02468b9 100644 --- a/plugins/wearable/display/core.c +++ b/plugins/wearable/display/core.c @@ -948,7 +948,7 @@ static void sec_dsim_uevent_changed(struct udev_device *dev) if (!fnmatch(SEC_DSIM_PATH, devpath, 0)) { action = udev_device_get_action(dev); - if (!strcmp(action, UDEV_CHANGE)) { + if (action && !strcmp(action, UDEV_CHANGE)) { ret = gdbus_signal_emit(NULL, DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY, -- 2.7.4