From: Sage Weil Date: Mon, 21 Oct 2013 16:21:57 +0000 (-0700) Subject: common/cmdparse: fix memory leak X-Git-Tag: v0.72-rc1~29^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=687ecd8bf961c2b0e628251691056aff5581a7e3;p=ceph.git common/cmdparse: fix memory leak demangle is allocating with malloc() in this case. Signed-off-by: Sage Weil --- diff --git a/src/common/cmdparse.cc b/src/common/cmdparse.cc index 16c62349c403..3ca3bbd0cb46 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); }