From 0cd9dfe815b4c7445a32ea0442fe72c43949ec0c Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 7 Jun 2021 13:14:05 -0600 Subject: [PATCH] repo: Use g_new for OstreeRepoAutoLock GSlice is effectively deprecated and has little to no advantage over using the system allocator on Linux. --- src/libostree/ostree-repo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 8fe3812dc0..b90e1c1374 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -678,7 +678,7 @@ ostree_repo_auto_lock_push (OstreeRepo *self, if (!ostree_repo_lock_push (self, lock_type, cancellable, error)) return NULL; - OstreeRepoAutoLock *auto_lock = g_slice_new (OstreeRepoAutoLock); + OstreeRepoAutoLock *auto_lock = g_new (OstreeRepoAutoLock, 1); auto_lock->repo = self; auto_lock->lock_type = lock_type; return auto_lock; @@ -707,7 +707,7 @@ ostree_repo_auto_lock_cleanup (OstreeRepoAutoLock *auto_lock) errno = errsv; - g_slice_free (OstreeRepoAutoLock, auto_lock); + g_free (auto_lock); } }