Commit f5bd4ad8 by Maxim Ostapenko Committed by Jakub Jelinek

re PR testsuite/63299 (ASan reported alloc-dealloc-mismatch in g++.old-deja/g++.jason/init3.C)

	PR testsuite/63299
	* g++.old-deja/g++.jason/init3.C (My_string::~My_string): Use delete[]
	instead of delete.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r240268
parent b912f962
2016-09-20 Maxim Ostapenko <m.ostapenko@samsung.com>
Jakub Jelinek <jakub@redhat.com>
PR testsuite/63299
* g++.old-deja/g++.jason/init3.C (My_string::~My_string): Use delete[]
instead of delete.
2016-09-20 Jakub Jelinek <jakub@redhat.com> 2016-09-20 Jakub Jelinek <jakub@redhat.com>
PR c++/77626 PR c++/77626
......
...@@ -10,7 +10,7 @@ class My_string { ...@@ -10,7 +10,7 @@ class My_string {
public: public:
My_string(const char* string); My_string(const char* string);
My_string(const My_string &); My_string(const My_string &);
~My_string() { delete str; } ~My_string() { delete [] str; }
char* char_p() { return str; } char* char_p() { return str; }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment