From: Mika Laitio Date: Thu, 10 Mar 2011 17:57:29 +0000 (+0200) Subject: memory leak fix X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=14952f0047c37298f20c5c084c60a8be344cb446;p=libplpbus.git memory leak fix Signed-off-by: Mika Laitio --- diff --git a/src/plpbus/BusMessage.cc b/src/plpbus/BusMessage.cc index ea81741..12b35c6 100644 --- a/src/plpbus/BusMessage.cc +++ b/src/plpbus/BusMessage.cc @@ -55,7 +55,7 @@ int BusMessage::add_string_parameter(string arg_name_param, string value_param) length = seq->length(); item = new DataItem(); item->name = strdup(arg_name_param.c_str()); - item->value <<= strdup(value_param.c_str()); + item->value <<= value_param.c_str(); seq->length(length + 1); (*seq)[length] = *item; }