Message ID | 1455095279-3070-1-git-send-email-write.harmandeep@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Harmandeep, Thanks for this patch. On Wed, 2016-02-10 at 14:37 +0530, Harmandeep Kaur wrote: > In general, I think it would be best if the subject is a bit more "explicative", and if you add a few words of changelog, here, above the S-o-b. In this case, this could be something like this. Subject: "libxc: fix leak in xc_offline_page error path" Changelog: " Avoid leaking the mapping of the m2p in one of the possible failure cases. Coverity CID 1351225 " > Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com> > That being said, this case is very simple, so I'll leave it to the tools maintainers to tell whether they want something like what I described above in place or not. The code looks ok to me, so, with or without the subject/changelog improvements: Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com> Regards, Dario
On Wed, 2016-02-10 at 10:28 +0100, Dario Faggioli wrote: > Hi Harmandeep, > > Thanks for this patch. > > On Wed, 2016-02-10 at 14:37 +0530, Harmandeep Kaur wrote: > > > In general, I think it would be best if the subject is a bit more > "explicative", and if you add a few words of changelog, here, above the > S-o-b. > > In this case, this could be something like this. > > Subject: "libxc: fix leak in xc_offline_page error path" > > Changelog: " > Avoid leaking the mapping of the m2p in one of the possible failure > cases. > > Coverity CID 1351225 > " > > > Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com> > > > That being said, this case is very simple, so I'll leave it to the > tools maintainers to tell whether they want something like what I > described above in place or not. I was going to comment the same, so yes please. The subject and commit message should describe the actual change and the CID should simply be referenced as Dario has in his example. > > The code looks ok to me, so, with or without the subject/changelog > improvements: > > Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com> > > Regards, > Dario
Dario Faggioli writes ("Re: [PATCH] libxc: Fix CID 1351225 resource leak"): > That being said, this case is very simple, so I'll leave it to the > tools maintainers to tell whether they want something like what I > described above in place or not. I agree that what you suggest would be better. The committer could fold in your suggestions at the time of commit, but it would be nicer to have a formal v2 with an updated commit message. > Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com> Thanks. Ian.
diff --git a/tools/libxc/xc_offline_page.c b/tools/libxc/xc_offline_page.c index bc91d51..3248a34 100644 --- a/tools/libxc/xc_offline_page.c +++ b/tools/libxc/xc_offline_page.c @@ -504,7 +504,7 @@ int xc_exchange_page(xc_interface *xch, int domid, xen_pfn_t mfn) if ( xc_map_domain_meminfo(xch, domid, &minfo) ) { PERROR("Could not map domain's memory information\n"); - return -1; + goto failed; } /* For translation macros */
Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com> --- tools/libxc/xc_offline_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)