Fix small memory leak
g_file_open_tmp() requires the caller to free the filename.
This commit is contained in:
parent
b8d07b8be2
commit
e5eafea128
@ -604,6 +604,7 @@ KeyEditor::print () const
|
|||||||
if (err) {
|
if (err) {
|
||||||
error << string_compose (_("Could not save bindings to file (%1)"), err->message) << endmsg;
|
error << string_compose (_("Could not save bindings to file (%1)"), err->message) << endmsg;
|
||||||
g_error_free (err);
|
g_error_free (err);
|
||||||
|
g_free (file_name);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -613,4 +614,5 @@ KeyEditor::print () const
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
PBD::open_uri (string_compose ("file:///%1", file_name));
|
PBD::open_uri (string_compose ("file:///%1", file_name));
|
||||||
|
g_free (file_name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user