Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 063094e1 authored by Enrico Granata's avatar Enrico Granata
Browse files

Check the fd handle before attempting to use it in GNSS HAL

Bug: 171851344
Test: run vts -a x86 -m vts_ibase_test -t VtsHalBaseV1_0TargetTest#Debug
Change-Id: Ieee0977812fe6a9a9ca4bb2fe9ab61899b4d0df5
parent 2c51ab2e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -689,6 +689,10 @@ Return<void> GnssTemplate<T_IGnss>::help(const hidl_handle& fd) {
template <class T_IGnss>
Return<void> GnssTemplate<T_IGnss>::debug(const hidl_handle& fd,
                                          const hidl_vec<hidl_string>& options) {
    if (fd == nullptr || fd->numFds == 0) {
        return Void();
    }

    if (options.size() == 0) {
        return help(fd);
    } else if (options[0] == "location") {