diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-08-24 17:14:45 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-08-29 17:18:28 +0200 |
commit | a0122363e4da9e147f7eb1e40ed9ab692aa4823d (patch) | |
tree | f756d9380cea5f2dee9724ee0a90fd9a0799cb13 /vcl | |
parent | c83aec1d026b9567e7e6d982e4d19f3a566b66d2 (diff) |
vcl: fix double-free of ErrorInfo
The only value that ErrorHandler::GetErrorString() adds over
ErrorStringFactory::CreateString() is that it will delete the pInfo a
2nd time, because the ErrorInfo::GetErrorInfo() returns the same object
twice.
This may fix it, but it's generally hard to tell what this
brain damaged error handling code will do.
(regression from 1167df7df59e37fddef0c40c4d27cb2e82e10922)
Change-Id: I22f446bee669cae8c5288bcc2f1e1d0299f5b384
(cherry picked from commit 41fb6822cbc2f82333ea54db816f60616f827e49)
Reviewed-on: https://gerrit.libreoffice.org/41537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/errinf.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/errinf.cxx b/vcl/source/window/errinf.cxx index 06b004b6e2fd..32948d77bf1c 100644 --- a/vcl/source/window/errinf.cxx +++ b/vcl/source/window/errinf.cxx @@ -152,7 +152,7 @@ DialogMask ErrorHandler::HandleError(sal_uInt32 nErrCodeId, DialogMask nFlags) } OUString aErr; - if (ErrorHandler::GetErrorString(nErrCodeId, aErr)) + if (ErrorStringFactory::CreateString(pInfo, aErr)) { if(!rData.pDsp) { |