diff --git a/projects/clr/rocclr/runtime/device/device.cpp b/projects/clr/rocclr/runtime/device/device.cpp index 8246e2072d..f69726e36c 100644 --- a/projects/clr/rocclr/runtime/device/device.cpp +++ b/projects/clr/rocclr/runtime/device/device.cpp @@ -1550,6 +1550,7 @@ bool ClBinary::setElfOut(unsigned char eclass, const char* outFile) if ( (elfOut_ == NULL) || elfOut_->hasError() ) { if (elfOut_) { delete elfOut_; + elfOut_ = NULL; } LogError("Creating ouput ELF object failed"); return false;