From 12e55963e36beca3a4d305f338060bbfce0cfc9d Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Sun, 16 Feb 2020 20:08:11 +0900 Subject: Fix memory leak of lock error messages Signed-off-by: OBATA Akio (cherry picked from commit d0ad6c0960052d1de75d38117d2474ee2d0a4a57) --- src/delete-carddav-object.c | 2 ++ src/modify-carddav-object.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/delete-carddav-object.c b/src/delete-carddav-object.c index f838c7a..ec5ef5a 100644 --- a/src/delete-carddav-object.c +++ b/src/delete-carddav-object.c @@ -265,6 +265,7 @@ gboolean carddav_delete(carddav_settings* settings, carddav_error* error) { } g_free(url); g_free(lock_token); + g_free(lock_error.str); if (result) { g_free(settings->file); settings->file = NULL; @@ -454,6 +455,7 @@ gboolean carddav_delete_by_uri(carddav_settings* settings, carddav_error* error) } g_free(url); g_free(lock_token); + g_free(lock_error.str); if (result) { g_free(settings->file); settings->file = NULL; diff --git a/src/modify-carddav-object.c b/src/modify-carddav-object.c index a6a9c84..81d4602 100644 --- a/src/modify-carddav-object.c +++ b/src/modify-carddav-object.c @@ -266,6 +266,7 @@ gboolean carddav_modify(carddav_settings* settings, carddav_error* error) { } g_free(url); g_free(lock_token); + g_free(lock_error.str); if (result) { g_free(settings->file); settings->file = NULL; @@ -460,6 +461,7 @@ gboolean carddav_modify_by_uri(carddav_settings* settings, carddav_error* error) } g_free(url); g_free(lock_token); + g_free(lock_error.str); if (result) { g_free(settings->file); settings->file = NULL; -- cgit v1.2.1