From fd18b7455c154a51b91c45c5216c9ecc047b4227 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 2 Nov 2013 22:10:32 +0100 Subject: [PATCH] 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. --- src/editor.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/editor.c b/src/editor.c index 4ec82fd8..37bade45 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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 */