From 39faad63007be7b20e9e9cb9c1d9a04dbdd41262 Mon Sep 17 00:00:00 2001
From: Murai Takashi <tmurai01@gmail.com>
Date: Sun, 28 Jul 2013 09:24:49 +0900
Subject: [PATCH] Fix double free
---
src/kits/storage/Mime.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/kits/storage/Mime.cpp b/src/kits/storage/Mime.cpp
index 8058be2..d89e6f5 100644
a
|
b
|
get_named_icon(const char* name, BBitmap* icon, icon_size which)
|
311 | 311 | size_t size; |
312 | 312 | type_code type; |
313 | 313 | status_t status = get_named_icon(name, &data, &size, &type); |
314 | | if (status == B_OK) |
| 314 | if (status == B_OK) { |
315 | 315 | status = BIconUtils::GetVectorIcon(data, size, icon); |
| 316 | delete[] data; |
| 317 | } |
316 | 318 | |
317 | | delete[] data; |
318 | 319 | return status; |
319 | 320 | } |
320 | 321 | |