From 7483a2666e7499fc7022bb747e30cd0cdd210db6 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 25 Sep 2008 12:12:59 +0000 Subject: [PATCH] fixed leaks. CID 906 and 907 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27737 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/hey.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/bin/hey.cpp b/src/bin/hey.cpp index bc81553439..bbaea7928b 100644 --- a/src/bin/hey.cpp +++ b/src/bin/hey.cpp @@ -942,8 +942,10 @@ print_message(BMessage *message) { BList textlist; add_message_contents(&textlist, message, 0); - - printf("BMessage(%s):\n", get_datatype_string(message->what)); + + char *whatString = get_datatype_string(message->what); + printf("BMessage(%s):\n", whatString); + free(whatString); for (int32 i=0;i