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

Commit 8b640ffa authored by Rahul Chaudhry's avatar Rahul Chaudhry
Browse files

bootable/recovery: cleanup compiler warnings (potential leak of memory)

bootable/recovery/applypatch/imgdiff.cpp:195:5: warning: Potential leak
of memory pointed to by 'img' [clang-analyzer-unix.Malloc]

Bug: 26936282
Test: WITH_TIDY=1 WITH_STATIC_ANALYZER=1 mm
Change-Id: Ie79c780233ddfebf85686a24df3bf2561f831580
parent 3aadbbac
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ unsigned char* ReadZip(const char* filename,
  if (fread(img, 1, sz, f) != sz) {
    printf("failed to read \"%s\" %s\n", filename, strerror(errno));
    fclose(f);
    free(img);
    return NULL;
  }
  fclose(f);