[geany/geany] c07481: Fix 2 unlikely memory leaks

Colomban Wendling git-noreply at xxxxx
Thu Nov 7 21:57:40 UTC 2013


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Thu, 07 Nov 2013 21:57:40 UTC
Commit:      c074817b8b2bd63b8f2881a7b79636dd15febf4d
             https://github.com/geany/geany/commit/c074817b8b2bd63b8f2881a7b79636dd15febf4d

Log Message:
-----------
Fix 2 unlikely memory leaks


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

Modified: src/build.c
4 files changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -2413,7 +2413,7 @@ static void build_load_menu_grp(GKeyFile *config, GeanyBuildCommand **dst, gint
 	{
 		gchar *label;
 		if (cmd >= 100)
-			return; /* ensure no buffer overflow */
+			break; /* ensure no buffer overflow */
 		sprintf(cmdbuf, "%02u", cmd);
 		set_key_grp(key, groups[grp]);
 		set_key_cmd(key, cmdbuf);
@@ -2630,7 +2630,7 @@ static guint build_save_menu_grp(GKeyFile *config, GeanyBuildCommand *src, gint
 		{
 			static gchar cmdbuf[4] = "   ";
 			if (cmd >= 100)
-				return count; /* ensure no buffer overflow */
+				break; /* ensure no buffer overflow */
 			sprintf(cmdbuf, "%02u", cmd);
 			set_key_grp(key, groups[grp]);
 			set_key_cmd(key, cmdbuf);



--------------
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