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

Commit 0e6dfdd6 authored by Scott Bauer's avatar Scott Bauer Committed by android-build-merger
Browse files

Read the correct amount of attributes

am: dd9a21ae

Change-Id: I153a91a1aba1a78837c397d4ee01bea2d1696e4e
parents 49035703 dd9a21ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1550,7 +1550,7 @@ bool bta_gattc_cache_load(tBTA_GATTC_CLCB *p_clcb)

    attr = osi_malloc(sizeof(tBTA_GATTC_NV_ATTR) * num_attr);

    if (fread(attr, sizeof(tBTA_GATTC_NV_ATTR), 0xFF, fd) != num_attr) {
    if (fread(attr, sizeof(tBTA_GATTC_NV_ATTR), num_attr, fd) != num_attr) {
        APPL_TRACE_ERROR("%s: can't read GATT attributes: %s", __func__, fname);
        goto done;
    }