summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-02-16 20:08:11 +0900
committerSlávek Banko <slavek.banko@axis.cz>2020-04-06 17:49:50 +0200
commit12e55963e36beca3a4d305f338060bbfce0cfc9d (patch)
tree7b8876b36e4528922e15371d8e89dad9aef12154
parent4a419d7a0a4384c4c61932788d300ee53633ebc4 (diff)
downloadlibcarddav-12e55963e36beca3a4d305f338060bbfce0cfc9d.tar.gz
libcarddav-12e55963e36beca3a4d305f338060bbfce0cfc9d.zip
Fix memory leak of lock error messages
Signed-off-by: OBATA Akio <obache@wizdas.com> (cherry picked from commit d0ad6c0960052d1de75d38117d2474ee2d0a4a57)
-rw-r--r--src/delete-carddav-object.c2
-rw-r--r--src/modify-carddav-object.c2
2 files changed, 4 insertions, 0 deletions
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;