[all-commits] [llvm/llvm-project] 0217d1: [mlir] Fix leak in case of failed parse

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Mon Mar 28 20:04:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0217d1178b9f0ed21103a0f4c9d8c77fe60f0d38
      https://github.com/llvm/llvm-project/commit/0217d1178b9f0ed21103a0f4c9d8c77fe60f0d38
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2022-03-28 (Mon, 28 Mar 2022)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  [mlir] Fix leak in case of failed parse

A Block is optionally allocated & leaks in case of failed parse. Inline the
function and ensure Block gets freed unless parse is successful.

Differential Revision: https://reviews.llvm.org/D122112




More information about the All-commits mailing list