From acd4feeca0f95f47b6193bc099688ca3c017f242 Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Wed, 6 May 2020 14:34:15 +0900 Subject: [PATCH] Fix memory leak of lock error messages Signed-off-by: OBATA Akio (cherry picked from commit e4fca762b010f5a9367134d00070daf835e68762) --- src/delete-caldav-object.c | 2 ++ src/modify-caldav-object.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/delete-caldav-object.c b/src/delete-caldav-object.c index f55eae3..c634e47 100644 --- a/src/delete-caldav-object.c +++ b/src/delete-caldav-object.c @@ -283,6 +283,7 @@ gboolean caldav_delete(caldav_settings* settings, caldav_error* error) { } g_free(url); g_free(lock_token); + g_free(lock_error.str); if (result) { g_free(settings->file); settings->file = NULL; @@ -518,6 +519,7 @@ gboolean caldav_tasks_delete(caldav_settings* settings, caldav_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-caldav-object.c b/src/modify-caldav-object.c index 67bdb54..026d317 100644 --- a/src/modify-caldav-object.c +++ b/src/modify-caldav-object.c @@ -284,6 +284,7 @@ gboolean caldav_modify(caldav_settings* settings, caldav_error* error) { } g_free(url); g_free(lock_token); + g_free(lock_error.str); if (result) { g_free(settings->file); settings->file = NULL; @@ -521,6 +522,7 @@ gboolean caldav_tasks_modify(caldav_settings* settings, caldav_error* error) { } g_free(url); g_free(lock_token); + g_free(lock_error.str); if (result) { g_free(settings->file); settings->file = NULL;