summaryrefslogtreecommitdiff
path: root/src/lib/eeze
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-04-18 00:26:24 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-04-18 00:30:04 +0900
commit6ccae99bd1efb013c3401857405e0b65fe9102f1 (patch)
tree55adf67596783dd15b3d0a1c904af1e1a8874f0b /src/lib/eeze
parent8a19bb4b29ce0500e1da8ffcbb9c1ce030d9a0c0 (diff)
let's fix eeze sensors to not segv on shutdown.. dup registered fake
(udev registered it as fake)... and in the process i found that we probably double free as sensor is calloced in the module and AGAIN in eeze sensor core... oh and symbols probably might lak from modules.. so static them up yo.
Diffstat (limited to 'src/lib/eeze')
-rw-r--r--src/lib/eeze/eeze_sensor.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/eeze/eeze_sensor.c b/src/lib/eeze/eeze_sensor.c
index 3af42937e9..43da8be23f 100644
--- a/src/lib/eeze/eeze_sensor.c
+++ b/src/lib/eeze/eeze_sensor.c
@@ -131,9 +131,6 @@ eeze_sensor_module_register(const char *name, Eeze_Sensor_Module *mod)
131 131
132 if (!mod) return EINA_FALSE; 132 if (!mod) return EINA_FALSE;
133 133
134 module = calloc(1, sizeof(Eeze_Sensor_Module));
135 if (!module) return EINA_FALSE;
136
137 module = mod; 134 module = mod;
138 135
139 if (!module->init) return EINA_FALSE; 136 if (!module->init) return EINA_FALSE;
@@ -155,6 +152,8 @@ eeze_sensor_module_unregister(const char *name)
155 Eeze_Sensor_Module *module = NULL; 152 Eeze_Sensor_Module *module = NULL;
156 153
157 module = eina_hash_find(g_handle->modules, name); 154 module = eina_hash_find(g_handle->modules, name);
155 if (!module) return EINA_FALSE;
156
158 if (module->shutdown) 157 if (module->shutdown)
159 module->shutdown(); 158 module->shutdown();
160 159