summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/BackTrace.cc1
-rw-r--r--src/common/cmdparse.cc2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/common/BackTrace.cc b/src/common/BackTrace.cc
index ebbb33c0145..6cace65ab6d 100644
--- a/src/common/BackTrace.cc
+++ b/src/common/BackTrace.cc
@@ -55,6 +55,7 @@ void BackTrace::print(std::ostream& out)
}
out << " " << (i-skip+1) << ": (" << function << end << std::endl;
//fprintf(out, " %s:%s\n", stack.strings[i], function);
+ free(foo);
} else {
// didn't find the mangled name, just print the whole line
out << " " << (i-skip+1) << ": " << strings[i] << std::endl;
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);
}