mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-10-12 17:32:00 -05:00
[c++options] Fix leak.
This commit is contained in:
1 parent
abdd4d9ed7
commit
92071e8844
1 file changed
+1
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user