We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1cf7a5 commit b50a8b0Copy full SHA for b50a8b0
net/openvswitch/meter.c
@@ -69,9 +69,7 @@ static struct dp_meter_instance *dp_meter_instance_alloc(const u32 size)
69
{
70
struct dp_meter_instance *ti;
71
72
- ti = kvzalloc(sizeof(*ti) +
73
- sizeof(struct dp_meter *) * size,
74
- GFP_KERNEL);
+ ti = kvzalloc(struct_size(ti, dp_meters, size), GFP_KERNEL);
75
if (!ti)
76
return NULL;
77
0 commit comments