Fix memory leak of lock error messages

Signed-off-by: OBATA Akio <obache@wizdas.com>
pull/5/head
OBATA Akio 5 years ago committed by TDE Gitea
parent b3bb3dbd4b
commit d0ad6c0960

@ -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;

@ -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;

Loading…
Cancel
Save