Hi! > From: Martyna Szapar <martyna.szapar@xxxxxxxxx> > > [ Upstream commit 0b63644602cfcbac849f7ea49272a39e90fa95eb ] > > Added freeing the old allocation of vf->qvlist_info in function > i40e_config_iwarp_qvlist before overwriting it with > the new allocation. Ok, but this also other error paths: > --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c > +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c > @@ -449,16 +450,19 @@ static int i40e_config_iwarp_qvlist(stru > "Incorrect number of iwarp vectors %u. Maximum %u allowed.\n", > qvlist_info->num_vectors, > msix_vf); > - goto err; > + ret = -EINVAL; > + goto err_out; > } And it is no longer freeing data qvlist_info() in this path. Is that correct? Should it goto err_free instead? > @@ -512,10 +518,11 @@ static int i40e_config_iwarp_qvlist(stru > } > > return 0; > -err: > +err_free: > kfree(vf->qvlist_info); > vf->qvlist_info = NULL; > - return -EINVAL; > +err_out: > + return ret; > } Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: PGP signature