From a58215869ecc8f653378500b8d9d62fb534327ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Mon, 19 Nov 2007 15:23:50 +0000 Subject: [PATCH] clear memory allocation --- subscriptions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subscriptions.c b/subscriptions.c index c89bdc28..8c88e319 100644 --- a/subscriptions.c +++ b/subscriptions.c @@ -128,7 +128,7 @@ subscription_create(th_channel_t *ch, unsigned int weight, const char *name, { th_subscription_t *s; - s = malloc(sizeof(th_subscription_t)); + s = calloc(1, sizeof(th_subscription_t)); s->ths_callback = cb; s->ths_opaque = opaque; s->ths_title = strdup(name);