From 58b5b81cb34b97095ab8f333e4f9fcd0e61732e9 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 29 Sep 2010 00:44:47 -0500 Subject: [PATCH] cas: fixed new[] .. free() mismatch (in OOM path) Found by cppchecker, http://cppcheck.sf.net/ --- src/cas/generic/casStrmClient.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cas/generic/casStrmClient.cc b/src/cas/generic/casStrmClient.cc index 0ed326075..4ecb290b0 100644 --- a/src/cas/generic/casStrmClient.cc +++ b/src/cas/generic/casStrmClient.cc @@ -91,7 +91,7 @@ casStrmClient::casStrmClient ( this->pUserName = new ( std::nothrow ) char [1u]; if ( ! this->pUserName ) { - free ( this->pHostName ); + delete [] this->pHostName; throw std::bad_alloc(); } *this->pUserName= '\0';