Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Thu, 02 May 2024 21:52:06 UTC Commit: 60fc995a15acd06b9dfc443ab56e4c5412915254 https://github.com/geany/geany-plugins/commit/60fc995a15acd06b9dfc443ab56e4c...
Log Message: ----------- geanyprj: Fix memory leak detected by cppcheck
Modified Paths: -------------- geanyprj/src/Makefile.am geanyprj/src/utils.c
Modified: geanyprj/src/Makefile.am 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -24,6 +24,5 @@ unittests_LDADD = @GEANY_LIBS@ $(INTLLIBS) @CHECK_LIBS@ endif
AM_CPPCHECKFLAGS = --suppress='constStatement:*' -AM_CPPCHECKFLAGS += --suppress='memleak:utils.c:72'
include $(top_srcdir)/build/cppcheck.mk
Modified: geanyprj/src/utils.c 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -69,7 +69,10 @@ gchar *normpath(const gchar *filename) return g_strdup("."); v = g_strsplit_set(filename, "/\", -1); if (!g_strv_length(v)) + { + g_strfreev(v); return g_strdup("."); + }
out = g_malloc0(sizeof(gchar *) * (g_strv_length(v) + 2)); pout = out;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org