From 5cc439c2c24859accf8a94d8a91879ad6d967ea4 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 24 Aug 2010 13:07:44 +0200 Subject: concat_path_file: make it a C function, not C++ Signed-off-by: Denys Vlasenko --- lib/plugins/RHTSupport.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/plugins/RHTSupport.cpp') diff --git a/lib/plugins/RHTSupport.cpp b/lib/plugins/RHTSupport.cpp index d13ff467..26582048 100644 --- a/lib/plugins/RHTSupport.cpp +++ b/lib/plugins/RHTSupport.cpp @@ -202,17 +202,19 @@ string CReporterRHticket::Report(const map_crash_data_t& pCrashData, basename++; else basename = content; - string xml_name = concat_path_file("content", basename); + char *xml_name = concat_path_file("content", basename); reportfile_add_binding_from_namedfile(file, /*on_disk_filename */ content, /*binding_name */ it->first.c_str(), - /*recorded_filename*/ xml_name.c_str(), + /*recorded_filename*/ xml_name, /*binary */ 1); - if (tar_append_file(tar, (char*)content, (char*)(xml_name.c_str())) != 0) + if (tar_append_file(tar, (char*)content, xml_name) != 0) { retval = "can't create temporary file in "LOCALSTATEDIR"/run/abrt"; + free(xml_name); goto ret; } + free(xml_name); } } } -- cgit