Plug a possible memory leak
There is no need to check doc->real_path since the usage is NULL-safe, and if it actually is empty or NULL it isn't a bug in the caller itself anyway, and this could leak.
This commit is contained in:
parent
6a19a4488d
commit
fd18b7455c
@ -4861,8 +4861,6 @@ static void on_document_save(GObject *obj, GeanyDocument *doc)
|
||||
{
|
||||
gchar *f = g_build_filename(app->configdir, "snippets.conf", NULL);
|
||||
|
||||
g_return_if_fail(!EMPTY(doc->real_path));
|
||||
|
||||
if (utils_str_equal(doc->real_path, f))
|
||||
{
|
||||
/* reload snippets */
|
||||
|
Loading…
x
Reference in New Issue
Block a user