summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-01-29 00:27:26 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-01-29 00:27:26 +0100
commitb0271f3a2b8f26cf7d7165d2e4c8fabec1a0584b (patch)
treeb2d4a8da120b6e371c35ab8b01787783df0c529a
parent2dc5981034e66ab04c314f1586399e33aba9c484 (diff)
downloadenlightenment-b0271f3a2b8f26cf7d7165d2e4c8fabec1a0584b.tar.gz
cpuclock: NULL status if its freed
This fixes a lot of valgrind warnings when using the editors.
-rw-r--r--src/modules/sysinfo/cpuclock/cpuclock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/sysinfo/cpuclock/cpuclock.c b/src/modules/sysinfo/cpuclock/cpuclock.c
index ef2e1b5e78..9faf21ec63 100644
--- a/src/modules/sysinfo/cpuclock/cpuclock.c
+++ b/src/modules/sysinfo/cpuclock/cpuclock.c
@@ -734,7 +734,7 @@ _cpuclock_cb_frequency_check_notify(void *data,
(status->cur_max_frequency != inst->cfg->cpuclock.status->cur_max_frequency) ||
(status->can_set_frequency != inst->cfg->cpuclock.status->can_set_frequency)))
freq_changed = EINA_TRUE;
- _cpuclock_status_free(inst->cfg->cpuclock.status);
+ E_FREE_FUNC(inst->cfg->cpuclock.status, _cpuclock_status_free);
inst->cfg->cpuclock.status = status;
if (freq_changed)
{
@@ -798,7 +798,7 @@ _cpuclock_removed_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_data)
if (inst->cfg->cpuclock.governor)
eina_stringshare_del(inst->cfg->cpuclock.governor);
- if (inst->cfg->cpuclock.status) _cpuclock_status_free(inst->cfg->cpuclock.status);
+ E_FREE_FUNC(inst->cfg->cpuclock.status, _cpuclock_status_free);
evas_object_event_callback_del_full(inst->o_main, EVAS_CALLBACK_DEL, sysinfo_cpuclock_remove, data);
@@ -822,7 +822,7 @@ sysinfo_cpuclock_remove(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
if (inst->cfg->cpuclock.governor)
eina_stringshare_del(inst->cfg->cpuclock.governor);
- if (inst->cfg->cpuclock.status) _cpuclock_status_free(inst->cfg->cpuclock.status);
+ E_FREE_FUNC(inst->cfg->cpuclock.status, _cpuclock_status_free);
}
static void