summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2014-01-29 10:29:04 -0500
committerRay Strode <rstrode@redhat.com>2014-01-29 10:29:04 -0500
commit3863f54e5efe8c3f929dc93ea026a17d5855a786 (patch)
tree06310dc3229717ca1986d1bf2333ba1735c81542
parentc501cca967ba8e27bde0f955d406613338f115f0 (diff)
downloadaccountsservice-3863f54e5efe8c3f929dc93ea026a17d5855a786.tar.gz
user: fix memory leak in save_extra_data function
The save_extra_data function serializes a key file assocated with the user to disk. It fails to free the in memory buffer, however. This commit fixes that. see downstream bug https://bugzilla.redhat.com/show_bug.cgi?id=1003033
-rw-r--r--src/user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/user.c b/src/user.c
index 1698eeb..a720fb7 100644
--- a/src/user.c
+++ b/src/user.c
@@ -437,6 +437,7 @@ save_extra_data (User *user)
NULL);
g_file_set_contents (filename, data, -1, &error);
g_free (filename);
+ g_free (data);
}
if (error) {
g_warning ("Saving data for user %s failed: %s",