From 0ef50c64fd2aaa21bec240f9490aa6af001762c0 Mon Sep 17 00:00:00 2001
From: Murai Takashi <tmurai01@gmail.com>
Date: Tue, 20 Dec 2016 05:49:19 +0900
Subject: [PATCH 41/41] DirMenu.cpp: fix memory leak.
---
src/kits/tracker/DirMenu.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/kits/tracker/DirMenu.cpp b/src/kits/tracker/DirMenu.cpp
index eb61459..e9eb894 100644
a
|
b
|
BDirMenu::Populate(const BEntry* startEntry, BWindow* originatingWindow,
|
95 | 95 | Model model(startEntry); |
96 | 96 | ThrowOnInitCheckError(&model); |
97 | 97 | |
98 | | ModelMenuItem* menu = new ModelMenuItem(&model, this, true, true); |
| 98 | ModelMenuItem* menu = NULL; |
99 | 99 | |
100 | | if (fMenuBar) |
| 100 | if (fMenuBar) { |
| 101 | menu = new ModelMenuItem(&model, this, true, true); |
101 | 102 | fMenuBar->AddItem(menu); |
| 103 | } |
102 | 104 | |
103 | 105 | BEntry entry(*startEntry); |
104 | 106 | |