diff --git a/include/llvm/ADT/OwningPtr.h b/include/llvm/ADT/OwningPtr.h index 95d7db17b91..033acb76350 100644 --- a/include/llvm/ADT/OwningPtr.h +++ b/include/llvm/ADT/OwningPtr.h @@ -96,7 +96,7 @@ public: if (P == Ptr) return; T *Tmp = Ptr; Ptr = P; - delete Tmp; + delete [] Tmp; } /// take - Reset the owning pointer to null and return its pointer. This does