plugin: display: Add check NULL dereference 68/296768/2
authorYunhee Seo <yuni.seo@samsung.com>
Fri, 4 Aug 2023 04:41:00 +0000 (13:41 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Tue, 8 Aug 2023 02:33:15 +0000 (11:33 +0900)
Fix static analysis NULL dereference issue.

Change-Id: I5cca401e4cd9a1b52e19e30dbfbebd747c6a3aed
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
plugins/wearable/display/core.c

index 4f883c1..02468b9 100644 (file)
@@ -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,