[grilo/wip/hadess/net-double-free: 2/4] net: Fix double-free when using GrlNet in Python




commit d71284bf50da22ae8869ffe09ae7abd2dab0be77
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Aug 26 14:44:07 2021 +0200

    net: Fix double-free when using GrlNet in Python
    
    grl_net_wc_request_finish() claims to have a "transfer full" content
    argument but it actually returns a pointer to a variable inside the
    GrlNetWc object, leading to possible double-frees.

 libs/net/grl-net-wc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c
index 5ff1d177..2d68f93e 100644
--- a/libs/net/grl-net-wc.c
+++ b/libs/net/grl-net-wc.c
@@ -948,7 +948,7 @@ grl_net_wc_request_with_headers_hash_async (GrlNetWc *self,
  * @self: a #GrlNetWc instance
  * @result: The result of the request
  * @content: (out) (array length=length) (element-type guint8) (allow-none)
- * (transfer full): The contents of the resource
+ * (transfer none): The contents of the resource
  * @length: (out) (allow-none): The length of the contents or %NULL if it is not
  * needed
  * @error: return location for a #GError, or %NULL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]