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 7a918f12a5df..ddade7388aa0 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c | |||
@@ -350,7 +350,7 @@ static void subscr_subscribe(struct tipc_subscr *s, | |||
350 | 350 | ||
351 | /* Allocate subscription object */ | 351 | /* Allocate subscription object */ |
352 | 352 | ||
353 | sub = kmalloc(sizeof(*sub), GFP_ATOMIC); | 353 | sub = kzalloc(sizeof(*sub), GFP_ATOMIC); |
354 | if (!sub) { | 354 | if (!sub) { |
355 | warn("Subscription rejected, no memory\n"); | 355 | warn("Subscription rejected, no memory\n"); |
356 | subscr_terminate(subscriber); | 356 | subscr_terminate(subscriber); |
@@ -359,7 +359,6 @@ static void subscr_subscribe(struct tipc_subscr *s, | |||
359 | 359 | ||
360 | /* Initialize subscription object */ | 360 | /* Initialize subscription object */ |
361 | 361 | ||
362 | memset(sub, 0, sizeof(*sub)); | ||
363 | sub->seq.type = htohl(s->seq.type, subscriber->swap); | 362 | sub->seq.type = htohl(s->seq.type, subscriber->swap); |
364 | sub->seq.lower = htohl(s->seq.lower, subscriber->swap); | 363 | sub->seq.lower = htohl(s->seq.lower, subscriber->swap); |
365 | sub->seq.upper = htohl(s->seq.upper, subscriber->swap); | 364 | sub->seq.upper = htohl(s->seq.upper, subscriber->swap); |