summaryrefslogtreecommitdiff
path: root/fastboot/fastboot.cpp
diff options
context:
space:
mode:
authorGreg Kaiser <gkaiser@google.com>2021-03-19 09:10:18 -0700
committerGreg Kaiser <gkaiser@google.com>2021-03-19 09:10:18 -0700
commitf4c6ce4a1052f55eaa94f28951f884d689af1571 (patch)
tree60a500b99d43b73183dbbad4c37b855969c75cfb /fastboot/fastboot.cpp
parent5463f859b3e1197a00ed25d4dd4b2c1b2410aa61 (diff)
fastboot driver: Avoid use after std::move()
Test: TreeHugger Change-Id: I2857f6d6384c8c80809f21202dbbbfc9ed71beeb
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r--fastboot/fastboot.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 94efeea36..e1bf98468 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -995,7 +995,7 @@ static void rewrite_vbmeta_buffer(struct fastboot_buffer* buf, bool vbmeta_in_bo
die("Failed writing to modified vbmeta");
}
buf->fd = std::move(fd);
- lseek(fd, 0, SEEK_SET);
+ lseek(buf->fd, 0, SEEK_SET);
}
static bool has_vbmeta_partition() {
@@ -1063,7 +1063,7 @@ static void copy_boot_avb_footer(const std::string& partition, struct fastboot_b
}
buf->fd = std::move(fd);
buf->sz = partition_size;
- lseek(fd, 0, SEEK_SET);
+ lseek(buf->fd, 0, SEEK_SET);
}
static void flash_buf(const std::string& partition, struct fastboot_buffer *buf)