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

Commit 85785b55 authored by George Burgess IV's avatar George Burgess IV Committed by android-build-merger
Browse files

Merge "Fix a memory leak." am: 1715678a

am: 8f9c005f

Change-Id: I29afa8d1394feb57574ed527cda102405571fd65
parents 60cb82e8 8f9c005f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1028,7 +1028,11 @@ bool ShaderProgram::SetAttributeValues(ProgramVar var,
  attrib.values = data_cpy;
  attrib.owned_data = data_cpy; // Marks this for deletion later on

  return StoreAttribute(attrib);
  if (StoreAttribute(attrib))
    return true;
  // If storing this failed, then it won't be deleted on its own.
  delete[] data_cpy;
  return false;
}

bool ShaderProgram::StoreAttribute(VertexAttrib attrib) {