sensord: fix the bug that it releases static variable 94/64094/3
authorkibak.yoon <kibak.yoon@samsung.com>
Wed, 30 Mar 2016 04:37:17 +0000 (13:37 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 30 Mar 2016 04:39:59 +0000 (21:39 -0700)
Change-Id: Ic27ab5bcb886fe82c36f75e3970929485c0f3119
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/server/sensor_loader.cpp

index 9066d95..8182905 100644 (file)
@@ -104,6 +104,7 @@ bool sensor_loader::load_sensor_devices(const string &path, void* &handle)
 
        dlerror();
 
+       /* TODO: The out-param of the create function should be const */
        create_t create_devices = (create_t) dlsym(_handle, "create");
        if (!create_devices) {
                _E("Failed to find symbols in %s", path.c_str());
@@ -128,7 +129,6 @@ bool sensor_loader::load_sensor_devices(const string &path, void* &handle)
 
        handle = _handle;
 
-       delete _devices;
        return true;
 }