mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-25 01:34:34 +03:00
repo: Use g_new for OstreeRepoAutoLock
GSlice is effectively deprecated and has little to no advantage over using the system allocator on Linux.
This commit is contained in:
parent
5523aee082
commit
0cd9dfe815
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user