From 1e8da5fd150b0b340d5ab1ef8ea95ec77b7cba75 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 12 Sep 2008 10:26:05 +0000 Subject: [PATCH] fAppName was leaked (CID 6). Also moved the initialization of fText to the end of the function, so that we avoid a BString::Adopt() call git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27447 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/shared/AboutWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/shared/AboutWindow.cpp b/src/kits/shared/AboutWindow.cpp index 6cb9fcd84f..df5c78225d 100644 --- a/src/kits/shared/AboutWindow.cpp +++ b/src/kits/shared/AboutWindow.cpp @@ -20,7 +20,6 @@ BAboutWindow::BAboutWindow(char *appName, int32 firstCopyrightYear, const char **authors, char *extraInfo) { fAppName = new BString(appName); - fText = new BString(); // Get current year time_t tp; @@ -42,13 +41,14 @@ BAboutWindow::BAboutWindow(char *appName, int32 firstCopyrightYear, text << "\n" << extraInfo << "\n"; } - fText->Adopt(text); + fText = new BString(text); } BAboutWindow::~BAboutWindow() { delete fText; + delete fAppName; }