load_metadata_internal: don't leak GBytes
Found by valgrind memcheck. g_variant_new_from_bytes takes a ref to the bytes, so we need to release the original ref. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #556 Approved by: cgwalters
This commit is contained in:
parent
24af123c53
commit
8ae03d6497
|
|
@ -2593,7 +2593,7 @@ load_metadata_internal (OstreeRepo *self,
|
|||
}
|
||||
else
|
||||
{
|
||||
GBytes *data = glnx_fd_readall_bytes (fd, cancellable, error);
|
||||
g_autoptr(GBytes) data = glnx_fd_readall_bytes (fd, cancellable, error);
|
||||
if (!data)
|
||||
goto out;
|
||||
ret_variant = g_variant_new_from_bytes (ostree_metadata_variant_type (objtype),
|
||||
|
|
|
|||
Loading…
Reference in New Issue