summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/sd_watchdog/sd_watchdog.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/sd_watchdog/sd_watchdog.c b/modules/sd_watchdog/sd_watchdog.c
index 95981446..bdf6f51f 100644
--- a/modules/sd_watchdog/sd_watchdog.c
+++ b/modules/sd_watchdog/sd_watchdog.c
@@ -23,16 +23,10 @@ static void keepalive_ping(uv_timer_t *timer)
KR_EXPORT
int sd_watchdog_init(struct kr_module *module)
{
- static kr_layer_api_t layer = { 0 };
- layer.data = module;
- module->layer = &layer;
- module->props = NULL;
-
- struct watchdog_config *conf = malloc(sizeof(*conf));
+ struct watchdog_config *conf = calloc(1, sizeof(*conf));
if (!conf) {
return kr_error(ENOMEM);
}
- memset(conf, 0, sizeof(*conf));
module->data = conf;
/* Check if watchdog is enabled */