[geany/geany] fd18b7: Plug a possible memory leak

Colomban Wendling git-noreply at xxxxx
Sat Nov 2 21:10:32 UTC 2013


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sat, 02 Nov 2013 21:10:32 UTC
Commit:      fd18b7455c154a51b91c45c5216c9ecc047b4227
             https://github.com/geany/geany/commit/fd18b7455c154a51b91c45c5216c9ecc047b4227

Log Message:
-----------
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.


Modified Paths:
--------------
    src/editor.c

Modified: src/editor.c
2 files changed, 0 insertions(+), 2 deletions(-)
===================================================================
@@ -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 */



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list