clear memory allocation
This commit is contained in:
parent
0b3027e65b
commit
a58215869e
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue