Improve code safety 10/291710/1 accepted/tizen/unified/20230421.103346
authorLukasz Oleksak <l.oleksak@samsung.com>
Thu, 20 Apr 2023 12:27:39 +0000 (14:27 +0200)
committerLukasz Oleksak <l.oleksak@samsung.com>
Thu, 20 Apr 2023 12:27:39 +0000 (14:27 +0200)
Change-Id: Ic8b3a449a70075d6c8778f0d2498599c1b3d3ebb

registryd/deviceeventcontroller.c

index a045d44..fc4f7de 100644 (file)
@@ -1957,6 +1957,12 @@ handle_dec_method_from_idle (DBusConnection *bus, DBusMessage *message, void *us
   DBusHandlerResult result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
   DBusMessage *reply = NULL;
 
   DBusHandlerResult result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
   DBusMessage *reply = NULL;
 
+  //TIZEN_ONLY(20230420) Improve code safety
+  if (member == NULL || iface  == NULL)
+    {
+      return;
+    }
+
   if (!strcmp (iface, SPI_DBUS_INTERFACE_DEC))
     {
       result = DBUS_HANDLER_RESULT_HANDLED;
   if (!strcmp (iface, SPI_DBUS_INTERFACE_DEC))
     {
       result = DBUS_HANDLER_RESULT_HANDLED;