[libvirt] [PATCH] Document the need to free vir*Ptr objects

Eric Blake eblake at redhat.com
Tue Jul 8 12:51:06 UTC 2014


On 07/08/2014 02:28 AM, Ján Tomko wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=994731
> ---
>  docs/api.html.in | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/docs/api.html.in b/docs/api.html.in
> index eae7657..68ffa0b 100644
> --- a/docs/api.html.in
> +++ b/docs/api.html.in
> @@ -159,6 +159,10 @@
>          </ul>
>        </li>
>      </ul>
> +    <p>Note: functions returning vir*Ptr (like the virDomainLookup functions)
> +    allocate memory which needs to be freed by the caller by the corresponding
> +    vir*Free function (e.g. virDomainFree for a virDomainPtr object).

ACK for adding an up-front notice, but I also think we should document
this per-function in src/libvirt.c.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140708/54090014/attachment-0001.sig>


More information about the libvir-list mailing list