Index: src/platform-solaris.cc |
diff --git a/src/platform-solaris.cc b/src/platform-solaris.cc |
index 1fa652d9ee957b15256d2f01ac84dd02937b87c5..0d9547b8bd9cc113af9b0d37ef2616457aab7b3b 100644 |
--- a/src/platform-solaris.cc |
+++ b/src/platform-solaris.cc |
@@ -233,14 +233,12 @@ void OS::LogSharedLibraryAddresses() { |
int OS::StackWalk(Vector<OS::StackFrame> frames) { |
int frames_size = frames.length(); |
- void** addresses = NewArray<void*>(frames_size); |
+ ScopedVector<void*> addresses(frames_size); |
- int frames_count = backtrace(addresses, frames_size); |
+ int frames_count = backtrace(addresses.start(), frames_size); |
- char** symbols; |
- symbols = backtrace_symbols(addresses, frames_count); |
+ char** symbols = backtrace_symbols(addresses.start(), frames_count); |
if (symbols == NULL) { |
- DeleteArray(addresses); |
return kStackWalkError; |
} |
@@ -255,7 +253,6 @@ int OS::StackWalk(Vector<OS::StackFrame> frames) { |
frames[i].text[kStackWalkMaxTextLen - 1] = '\0'; |
} |
- DeleteArray(addresses); |
free(symbols); |
return frames_count; |