|
@@ -1849,7 +1849,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
|
|
|
if (state == IP_VS_STATE_MASTER) {
|
|
|
struct ipvs_master_sync_state *ms;
|
|
|
|
|
|
- ipvs->ms = kzalloc(count * sizeof(ipvs->ms[0]), GFP_KERNEL);
|
|
|
+ ipvs->ms = kcalloc(count, sizeof(ipvs->ms[0]), GFP_KERNEL);
|
|
|
if (!ipvs->ms)
|
|
|
goto out;
|
|
|
ms = ipvs->ms;
|
|
@@ -1862,7 +1862,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
|
|
|
ms->ipvs = ipvs;
|
|
|
}
|
|
|
} else {
|
|
|
- array = kzalloc(count * sizeof(struct task_struct *),
|
|
|
+ array = kcalloc(count, sizeof(struct task_struct *),
|
|
|
GFP_KERNEL);
|
|
|
if (!array)
|
|
|
goto out;
|