fix memory leakage in openfpga title
This commit is contained in:
parent
6daee8c2c8
commit
5a04da2082
|
@ -8,7 +8,7 @@
|
||||||
* Generate a string of openfpga title introduction
|
* Generate a string of openfpga title introduction
|
||||||
* This is mainly used when launching OpenFPGA shell
|
* This is mainly used when launching OpenFPGA shell
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
const char* create_openfpga_title() {
|
std::string create_openfpga_title() {
|
||||||
std::string title;
|
std::string title;
|
||||||
|
|
||||||
title += std::string("\n");
|
title += std::string("\n");
|
||||||
|
@ -49,5 +49,5 @@ const char* create_openfpga_title() {
|
||||||
title += std::string("THE SOFTWARE.\n");
|
title += std::string("THE SOFTWARE.\n");
|
||||||
title += std::string("\n");
|
title += std::string("\n");
|
||||||
|
|
||||||
return title.c_str();
|
return title;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
* Function declaration
|
* Function declaration
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
const char* create_openfpga_title();
|
std::string create_openfpga_title();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -48,7 +48,7 @@ int main(int argc, char** argv) {
|
||||||
*/
|
*/
|
||||||
openfpga::Shell<OpenfpgaContext> shell("OpenFPGA");
|
openfpga::Shell<OpenfpgaContext> shell("OpenFPGA");
|
||||||
|
|
||||||
shell.add_title(create_openfpga_title());
|
shell.add_title(create_openfpga_title().c_str());
|
||||||
|
|
||||||
/* Add vpr commands */
|
/* Add vpr commands */
|
||||||
openfpga::add_vpr_commands(shell);
|
openfpga::add_vpr_commands(shell);
|
||||||
|
|
Loading…
Reference in New Issue