On 8/29/25 1:39 PM, ALOK TIWARI wrote: > > >> +static void calculate_flow_sizes(struct ethtool_rx_flow_spec *fs, >> + * header for each type of header in the match critea, and each >> header > > typo critea -> criteria > >> + * providing the mask for matching against. >> + */
>> + calculate_flow_sizes(fs, &key_size, &classifier_size, &num_hdrs); >> + >> + key = kzalloc(key_size, GFP_KERNEL); >> + if (!key) >> + return -ENOMEM; >> + >> + /* >> + * virio_net_ff_obj_ff_classifier is already included in the > > virio_net_ff_obj_ff_classifier -> virtio_net_ff_obj_ff_classifier > >> + * classifier_size. >> + */ >> + c = kzalloc(classifier_size + >> + sizeof(struct virtnet_classifier) - >> + sizeof(struct virtio_net_resource_obj_ff_classifier), >> + GFP_KERNEL); >> + if (!c) >> + return -ENOMEM; > > kfree(key) before returning -ENOMEM > > > Thanks, > Alok > Thanks Alok. Applied those changes for v2.