From e759c4e7a8f02ccb557d9349d0fa751e7ea5d839 Mon Sep 17 00:00:00 2001
From: RElesgoe <xboi209@gmail.com>
Date: Sun, 28 Aug 2016 02:53:31 -0700
Subject: [PATCH] Fix memory leak in customicons_stash_get_list()

---
 src/bnetd/icons.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/bnetd/icons.cpp b/src/bnetd/icons.cpp
index 06d3e85..4173bf2 100644
--- a/src/bnetd/icons.cpp
+++ b/src/bnetd/icons.cpp
@@ -536,13 +536,11 @@ namespace pvpgn
 						}
 
 
-						char const * val = (return_alias) 
-							? xstrdup(var->key)
-							: xstrdup(var->value);
+						std::string val = (return_alias) ? var->key: var->value;
 
 						if (!output.empty())
 							output += ", ";
-						output += std::string(val);
+						output += val;
 					}
 					break;
 				}