[atspi] Add null check for free 71/174971/2
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 5 Apr 2018 11:55:25 +0000 (20:55 +0900)
committerjunsu choi <jsuya.choi@samsung.com>
Fri, 6 Apr 2018 05:23:13 +0000 (05:23 +0000)
   if value plug_id is not null, eina_str_split_full can return null
   so, split value need to check for null

Change-Id: Iebc6164a654d3873b77b754161914abf3e163b5f

src/lib/elm_atspi_bridge.c

index 42115745a2d43d485a055ec80ca86dc2fe50402e..a5ddfb1372ebb040d1da65b5b7dd7d9105c8f7e5 100644 (file)
@@ -2754,9 +2754,11 @@ _elm_atspi_bridge_plug_id_split(const char *plug_id, char **bus, char **path)
              ret = EINA_TRUE;
           }
      }
-
-   free(split[0]);
-   free(split);
+   if (split)
+     {
+        free(split[0]);
+        free(split);
+     }
    return ret;
 }