On 18.02.22 12:38, Aaron Lauterer wrote:
> Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com>
> ---
> 
> thanks @Dominik who realized that we did not free this buffer in all
> situations.
> 

note that the status string is normally only allocated in the error case,
where we freed it already, so actual impact shouldn't be that big; still
definitively more correct this way ;)

>  RADOS.xs | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/RADOS.xs b/RADOS.xs
> index 7eca024..1eb0b5a 100644
> --- a/RADOS.xs
> +++ b/RADOS.xs
> @@ -145,6 +145,10 @@ CODE:
>      RETVAL = newSVpv(outbuf, outbuflen);
>  
>      rados_buffer_free(outbuf);
> +
> +    if (outs != NULL) {

fyi: I made all calls to rados_buffer_free unconditional as the code there
checks already for null-ness (not that it'd matter much, free(NULL) is a no-op)
and it makes librados' built-in tracing more complete.

> +     rados_buffer_free(outs);

fyi: above had a tab in a file that uses space only indentation.

> +    }
>  }
>  OUTPUT: RETVAL
>  

applied, thanks!



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to