summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2021-05-01 01:05:39 +0100
committerRichard Hughes <richard@hughsie.com>2021-05-01 15:35:21 +0100
commit047d8b82eb0e9a415cb3669108525f476a3fb663 (patch)
tree1a482e2143185cbfd7a58f98125bae492c58de32 /lib
parentc32ae111760bb91b7f76b98deaefe060aae29c4c (diff)
pk-client: Fix a leak on calling set_locale() a second time
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/packagekit-glib2/pk-client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index 13666b0a5..24ba378df 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -4748,6 +4748,7 @@ pk_client_set_locale (PkClient *client, const gchar *locale)
if (g_strcmp0 (client->priv->locale, locale) == 0)
return;
+ g_free (client->priv->locale);
client->priv->locale = g_strdup (locale);
g_object_notify (G_OBJECT (client), "locale");
}