mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-26 02:40:43 -06:00
[c++options] Fix leak.
This commit is contained in:
parent
abdd4d9ed7
commit
92071e8844
@ -1261,9 +1261,7 @@ const char*
|
||||
gnc_option_db_lookup_string_value(GncOptionDB* odb, const char* section, const char* name)
|
||||
{
|
||||
auto value{odb->lookup_string_option(section, name)};
|
||||
if (value.empty())
|
||||
return nullptr;
|
||||
return strdup(value.c_str());
|
||||
return value.empty() ? nullptr : strdup(value.c_str());
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user