diff options
Diffstat (limited to 'net/tipc/subscr.c')
-rw-r--r-- | net/tipc/subscr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index e19b4bcd67ec..c51600ba5f4a 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c | |||
@@ -393,12 +393,11 @@ static void subscr_named_msg_event(void *usr_handle, | |||
393 | 393 | ||
394 | /* Create subscriber object */ | 394 | /* Create subscriber object */ |
395 | 395 | ||
396 | subscriber = kmalloc(sizeof(struct subscriber), GFP_ATOMIC); | 396 | subscriber = kzalloc(sizeof(struct subscriber), GFP_ATOMIC); |
397 | if (subscriber == NULL) { | 397 | if (subscriber == NULL) { |
398 | warn("Subscriber rejected, no memory\n"); | 398 | warn("Subscriber rejected, no memory\n"); |
399 | return; | 399 | return; |
400 | } | 400 | } |
401 | memset(subscriber, 0, sizeof(struct subscriber)); | ||
402 | INIT_LIST_HEAD(&subscriber->subscription_list); | 401 | INIT_LIST_HEAD(&subscriber->subscription_list); |
403 | INIT_LIST_HEAD(&subscriber->subscriber_list); | 402 | INIT_LIST_HEAD(&subscriber->subscriber_list); |
404 | subscriber->ref = tipc_ref_acquire(subscriber, &subscriber->lock); | 403 | subscriber->ref = tipc_ref_acquire(subscriber, &subscriber->lock); |