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

Commit 61d135b7 authored by Martin Brabham's avatar Martin Brabham Committed by android-build-team Robot
Browse files

Revert "[DO NOT MERGE] btif: Avoid resource leak in error case"

This reverts commit 095da0f6.
(cherry picked from commit f6833ec3e953a8ff8ebd275899aecdda172eaa0f)

Change-Id: Id085386129497cf437172a71fc078ab6beaa73fa
parent 5a109815
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -588,10 +588,7 @@ static std::string hash_file(const char* filename) {
  const int bufSize = 400 * 10;  // initial file is ~400B
  std::byte* buffer = (std::byte*) osi_calloc(bufSize);
  int bytesRead = 0;
  if (!buffer) {
    fclose(fp);
    return "";
  }
  if (!buffer) return "";
  while ((bytesRead = fread(buffer, 1, bufSize, fp))) {
    SHA256_Update(&sha256, buffer, bytesRead);
  }