File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1515 * Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved.
1616 * Copyright (c) 2012 Los Alamos National Security, LLC.
1717 * All rights reserved.
18+ * Copyright (c) 2016 Intel, Inc. All rights reserved.
1819 * $COPYRIGHT$
1920 *
2021 * Additional copyrights may follow
@@ -181,6 +182,7 @@ static void backend_fatal_aggregate(char *type,
181182 const char * const unknown_error_code = "Error code: %d (no associated error message)" ;
182183 const char * const unknown_error = "Unknown error" ;
183184 const char * const unknown_prefix = "[?:?]" ;
185+ bool generated = false;
184186
185187 // these do not own what they point to; they're
186188 // here to avoid repeating expressions such as
@@ -211,6 +213,8 @@ static void backend_fatal_aggregate(char *type,
211213 err_msg = NULL ;
212214 opal_output (0 , "%s" , "Could not write to err_msg" );
213215 opal_output (0 , unknown_error_code , * error_code );
216+ } else {
217+ generated = true;
214218 }
215219 }
216220 }
@@ -256,7 +260,9 @@ static void backend_fatal_aggregate(char *type,
256260 }
257261
258262 free (prefix );
259- free (err_msg );
263+ if (generated ) {
264+ free (err_msg );
265+ }
260266}
261267
262268/*
You can’t perform that action at this time.
0 commit comments