diff mbox

[27/37] qjson: free str

Message ID 20160719085432.4572-28-marcandre.lureau@redhat.com
State New
Headers show

Commit Message

Marc-André Lureau July 19, 2016, 8:54 a.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Release the qstring allocated in qjson_new().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 migration/qjson.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Eric Blake July 20, 2016, 12:25 p.m. UTC | #1
On 07/19/2016 02:54 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Release the qstring allocated in qjson_new().
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  migration/qjson.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

> diff --git a/migration/qjson.c b/migration/qjson.c
> index 5cae55a..f345904 100644
> --- a/migration/qjson.c
> +++ b/migration/qjson.c
> @@ -109,5 +109,6 @@ void qjson_finish(QJSON *json)
>  
>  void qjson_destroy(QJSON *json)
>  {
> +    QDECREF(json->str);
>      g_free(json);
>  }
>
diff mbox

Patch

diff --git a/migration/qjson.c b/migration/qjson.c
index 5cae55a..f345904 100644
--- a/migration/qjson.c
+++ b/migration/qjson.c
@@ -109,5 +109,6 @@  void qjson_finish(QJSON *json)
 
 void qjson_destroy(QJSON *json)
 {
+    QDECREF(json->str);
     g_free(json);
 }