ecore-drm: Fixed null pointer free
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Tue, 24 Mar 2015 13:11:07 +0000 (09:11 -0400)
committerChris Michael <cp.michael@samsung.com>
Tue, 24 Mar 2015 13:11:07 +0000 (09:11 -0400)
Summary:
Fixed null pointer free
         when sd_session_get_seat() fails, it does not allocate string.

Reviewers: zmike, cedric, raster, gwanglim, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2219

src/lib/ecore_drm/ecore_drm_logind.c

index 47974b5..c590cf1 100644 (file)
@@ -202,7 +202,6 @@ _ecore_drm_logind_connect(Ecore_Drm_Device *dev)
    if (sd_session_get_seat(dev->session, &seat) < 0)
      {
         ERR("Could not get systemd seat: %m");
-        free(seat);
         return EINA_FALSE;
      }
    else if (strcmp(dev->seat, seat))