@@ -87,6 +87,7 @@ typedef struct {
87
87
* Private functions
88
88
*/
89
89
static void construct (opal_object_t * stream );
90
+ static void destruct (opal_object_t * stream );
90
91
static int do_open (int output_id , opal_output_stream_t * lds );
91
92
static int open_file (int i );
92
93
static void free_descriptor (int output_id );
@@ -120,7 +121,7 @@ static bool syslog_opened = false;
120
121
#endif
121
122
static char * redirect_syslog_ident = NULL ;
122
123
123
- OBJ_CLASS_INSTANCE (opal_output_stream_t , opal_object_t , construct , NULL );
124
+ OBJ_CLASS_INSTANCE (opal_output_stream_t , opal_object_t , construct , destruct );
124
125
125
126
/*
126
127
* Setup the output stream infrastructure
@@ -536,6 +537,15 @@ static void construct(opal_object_t *obj)
536
537
stream -> lds_want_file_append = false;
537
538
stream -> lds_file_suffix = NULL ;
538
539
}
540
+ static void destruct (opal_object_t * obj )
541
+ {
542
+ opal_output_stream_t * stream = (opal_output_stream_t * ) obj ;
543
+
544
+ if ( NULL != stream -> lds_file_suffix ) {
545
+ free (stream -> lds_file_suffix );
546
+ stream -> lds_file_suffix = NULL ;
547
+ }
548
+ }
539
549
540
550
/*
541
551
* Back-end of open() and reopen(). Necessary to have it as a
0 commit comments