idpf: fix potential memory leak on kcalloc() failure
In case of failing on rss_data->rss_key allocation the function is freeing vport without freeing earlier allocated q_vector_idxs. Fix it. Move from freeing in error branch to goto scheme. Fixes: d4d55871 ("idpf: initialize interrupts and enable vport") Reviewed-by:Pavan Kumar Linga <pavan.kumar.linga@intel.com> Reviewed-by:
Aleksandr Loktionov <aleksandr.loktionov@intel.com> Suggested-by:
Pavan Kumar Linga <pavan.kumar.linga@intel.com> Signed-off-by:
Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Reviewed-by:
Simon Horman <horms@kernel.org> Tested-by:
Samuel Salin <Samuel.salin@intel.com> Signed-off-by:
Tony Nguyen <anthony.l.nguyen@intel.com>
Loading
Please register or sign in to comment