Commit 2b56da58 authored by Ian Craggs's avatar Ian Craggs Committed by GitHub

Merge pull request #232 from guilhermeferreira/fix-double-free

Fix double free at Log_terminate()
parents f11fbfac 6b398fc1
......@@ -221,10 +221,14 @@ void Log_terminate()
fclose(trace_destination);
trace_destination = NULL;
}
if (trace_destination_name)
if (trace_destination_name) {
free(trace_destination_name);
if (trace_destination_backup_name)
trace_destination_name = NULL;
}
if (trace_destination_backup_name) {
free(trace_destination_backup_name);
trace_destination_backup_name = NULL;
}
start_index = -1;
next_index = 0;
trace_output_level = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment