diff options
author | Bastien Nocera <hadess@hadess.net> | 2014-06-24 16:45:38 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2014-06-24 16:45:38 +0200 |
commit | b1aeed994884602b3601a7f4b98419c65be9009c (patch) | |
tree | e7ef80471c1124c808bd01b3aace1ab15f6851f6 | |
parent | bab2431c1e7406860179267faa54f35ad82131fe (diff) | |
download | upower-b1aeed994884602b3601a7f4b98419c65be9009c.tar.gz |
daemon: Fix possible UpHistoryItem leak on failure
-rw-r--r-- | src/up-history.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/up-history.c b/src/up-history.c index 795b093..4ed55fc 100644 --- a/src/up-history.c +++ b/src/up-history.c @@ -532,6 +532,8 @@ up_history_array_from_file (GPtrArray *list, const gchar *filename) ret = up_history_item_set_from_string (item, parts[i]); if (ret) g_ptr_array_add (list, item); + else + g_object_unref (item); } out: |