From 75690d56b26ce3f8a1c3ba822f4223eab009fde6 Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Wed, 24 Sep 2014 18:44:38 +0000 Subject: Fix some nits raised by Timur for r1385. R=ivanpe@chromium.org Review URL: https://breakpad.appspot.com/1734002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1387 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/linux/handler/exception_handler.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc index db2f1e62..7cad7756 100644 --- a/src/client/linux/handler/exception_handler.cc +++ b/src/client/linux/handler/exception_handler.cc @@ -149,9 +149,8 @@ void InstallAlternateStackLocked() { // one is too small. if (sys_sigaltstack(NULL, &old_stack) == -1 || !old_stack.ss_sp || old_stack.ss_size < kSigStackSize) { - new_stack.ss_sp = malloc(kSigStackSize); + new_stack.ss_sp = calloc(1, kSigStackSize); new_stack.ss_size = kSigStackSize; - memset(new_stack.ss_sp, 0, kSigStackSize); if (sys_sigaltstack(&new_stack, NULL) == -1) { free(new_stack.ss_sp); @@ -188,7 +187,7 @@ void RestoreAlternateStackLocked() { stack_installed = false; } -// The global exception handler stack. This is need because there may exist +// The global exception handler stack. This is needed because there may exist // multiple ExceptionHandler instances in a process. Each will have itself // registered in this stack. std::vector* g_handler_stack_ = NULL; -- cgit v1.2.1