summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-10-21 09:21:57 -0700
committerSage Weil <sage@inktank.com>2013-10-21 09:21:57 -0700
commit687ecd8bf961c2b0e628251691056aff5581a7e3 (patch)
tree7f1dae4d6f58e763c12f22d29a4e6e2a5bc66511
parentddfe67fe2aacd2a6d57476dc086f3b8bb519297e (diff)
downloadceph-687ecd8bf961c2b0e628251691056aff5581a7e3.tar.gz
common/cmdparse: fix memory leak
demangle is allocating with malloc() in this case. Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/common/cmdparse.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/cmdparse.cc b/src/common/cmdparse.cc
index 16c62349c40..3ca3bbd0cb4 100644
--- a/src/common/cmdparse.cc
+++ b/src/common/cmdparse.cc
@@ -225,4 +225,6 @@ handle_bad_get(CephContext *cct, string k, const char *tname)
ostringstream oss;
bt.print(oss);
lderr(cct) << oss << dendl;
+ if (status == 0)
+ free((char *)typestr);
}