[libvirt] [PATCH] libvirt: remove link to outdated mailing list post

Daniel P. Berrangé posted 1 patch 4 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190705134248.19879-1-berrange@redhat.com
Test syntax-check passed
src/libvirt-host.c | 3 ---
1 file changed, 3 deletions(-)
[libvirt] [PATCH] libvirt: remove link to outdated mailing list post
Posted by Daniel P. Berrangé 4 years, 9 months ago
The virConnectGetType() method has an unfortunate signature, returning a
static string that must not be freed by the caller. The remote driver,
however, gets this string dynamically over an RPC call, which raised a
design discussion on the mailing list. Eventually the problem was
resolved by having the remote driver cache the returned string
internally and free it when the connection was closed.

The link to the mailing list is thus talking about a problem that does
not actually exist in the final implementation, and at best serves to
confuse the reader into thinking there might be a memory leak.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/libvirt-host.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/libvirt-host.c b/src/libvirt-host.c
index 2978825d22..e5c4e5f72a 100644
--- a/src/libvirt-host.c
+++ b/src/libvirt-host.c
@@ -98,9 +98,6 @@ virConnectSupportsFeature(virConnectPtr conn, int feature)
  * hypervisor, use virConnectGetCapabilities().
  *
  * Returns NULL in case of error, a static zero terminated string otherwise.
- *
- * See also:
- * http://www.redhat.com/archives/libvir-list/2007-February/msg00096.html
  */
 const char *
 virConnectGetType(virConnectPtr conn)
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] libvirt: remove link to outdated mailing list post
Posted by Ján Tomko 4 years, 9 months ago
On Fri, Jul 05, 2019 at 02:42:48PM +0100, Daniel P. Berrangé wrote:
>The virConnectGetType() method has an unfortunate signature, returning a
>static string that must not be freed by the caller. The remote driver,
>however, gets this string dynamically over an RPC call, which raised a
>design discussion on the mailing list. Eventually the problem was
>resolved by having the remote driver cache the returned string
>internally and free it when the connection was closed.
>
>The link to the mailing list is thus talking about a problem that does
>not actually exist in the final implementation, and at best serves to
>confuse the reader into thinking there might be a memory leak.
>
>Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>---
> src/libvirt-host.c | 3 ---
> 1 file changed, 3 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list