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:
Colomban Wendling 2013-11-02 22:10:32 +01:00
parent 6a19a4488d
commit fd18b7455c

View File

@ -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 */