eeze: add null check condition in eeze scanner module.

Summary:
Add null check condition for dev calloc in eeze scanner module
@fix

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
vivek 2014-12-22 15:05:28 +01:00 committed by Cedric BAIL
parent af43bc67e4
commit 62a6db2dac
1 changed files with 1 additions and 0 deletions

View File

@ -353,6 +353,7 @@ cb_stor_chg(const char *device, Eeze_Udev_Event ev, void *data EINA_UNUSED, Eeze
}
eina_stringshare_del(str);
dev = calloc(1, sizeof(Eeze_Scanner_Device));
if (!dev) return;
dev->device = eina_stringshare_add(device);
dev->poller = ecore_poller_add(ECORE_POLLER_CORE, 32,
(Ecore_Task_Cb)cdrom_timer, dev);