From 451dfee3c7d87ce5c7955448310ee68cbfe7eebf Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Thu, 2 Feb 2023 00:05:17 +0000 Subject: [PATCH] Set output value in error case We want to set the contents of "out_size_num_byte", and not the pointer value, in the error case. Bug: 266757931 Change-Id: I02edddcbcc4fc80dbb61efe8dc7c45bd3ce1c904 Test: TreeHugger --- fs_mgr/libfs_avb/avb_ops.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_mgr/libfs_avb/avb_ops.cpp b/fs_mgr/libfs_avb/avb_ops.cpp index 088749d94..a119bfcde 100644 --- a/fs_mgr/libfs_avb/avb_ops.cpp +++ b/fs_mgr/libfs_avb/avb_ops.cpp @@ -195,7 +195,7 @@ AvbIOResult FsManagerAvbOps::GetSizeOfPartition(const char* partition, } int err = ioctl(fd, BLKGETSIZE64, out_size_num_byte); if (err) { - out_size_num_byte = 0; + *out_size_num_byte = 0; return AVB_IO_RESULT_ERROR_IO; } return AVB_IO_RESULT_OK;