Make to_traceframe_info return a unique_ptr
[deliverable/binutils-gdb.git] / gdb / tracefile-tfile.c
index cc77b6c610846db16e44667f007ccec09018fb6c..727570cf9beabb9ab0b0e95e67e6091ee7123518 100644 (file)
@@ -1088,12 +1088,13 @@ build_traceframe_info (char blocktype, void *data)
   return 0;
 }
 
-static struct traceframe_info *
+static traceframe_info_up
 tfile_traceframe_info (struct target_ops *self)
 {
-  traceframe_info *info = new traceframe_info;
+  traceframe_info_up info (new traceframe_info);
+
+  traceframe_walk_blocks (build_traceframe_info, 0, info.get ());
 
-  traceframe_walk_blocks (build_traceframe_info, 0, info);
   return info;
 }
 
This page took 0.02402 seconds and 4 git commands to generate.