lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
List overview
Plugins-Commits
May 2024
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
plugins-commits@lists.geany.org
1 participants
34 discussions
Start a n
N
ew thread
[geany/geany-plugins] f118d1: cppcheck: Undefine GEANY_PRIVATE
by Colomban Wendling
10 May '24
10 May '24
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Tue, 30 Apr 2024 20:39:44 UTC Commit: f118d198b6e5b2010f2f9ff9045cd415442ada46
https://github.com/geany/geany-plugins/commit/f118d198b6e5b2010f2f9ff9045cd…
Log Message: ----------- cppcheck: Undefine GEANY_PRIVATE Plugins mustn't use this, so cppcheck doesn't need to go down this path. Modified Paths: -------------- build/cppcheck.mk Modified: build/cppcheck.mk 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -6,6 +6,7 @@ check-cppcheck: $(srcdir) -q --template=gcc --error-exitcode=2 \ --library=$(top_srcdir)/build/cppcheck-geany-plugins.cfg \ -I$(GEANY_INCLUDEDIR)/geany \ + -UGEANY_PRIVATE \ -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ $(filter -j%,$(MAKEFLAGS)) \ $(AM_CPPCHECKFLAGS) $(CPPCHECKFLAGS) \ -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] 451a33: cppcheck: Use cppcheck's own gtk support
by Colomban Wendling
10 May '24
10 May '24
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Tue, 30 Apr 2024 20:39:44 UTC Commit: 451a33e75eb940b5d3072f98f66f3114be21c655
https://github.com/geany/geany-plugins/commit/451a33e75eb940b5d3072f98f66f3…
Log Message: ----------- cppcheck: Use cppcheck's own gtk support It's a lot more comprehensive (although it still lacks a few details) and allows finding more logic errors. Modified Paths: -------------- build/cppcheck-geany-plugins.cfg build/cppcheck.mk Modified: build/cppcheck-geany-plugins.cfg 2 lines changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -6,6 +6,4 @@ <define name="G_GSSIZE_FORMAT" value=""li""/> <define name="G_GINT64_MODIFIER" value=""l""/> <define name="G_DIR_SEPARATOR_S" value=""/""/> - <define name="G_DEFINE_TYPE(TN, t_n, T_P)" value=""/> - <define name="G_DEFINE_BOXED_TYPE(TypeName,type_name,copy_func,free_func)" value=""/> </def> Modified: build/cppcheck.mk 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -4,6 +4,7 @@ if HAVE_CPPCHECK check-cppcheck: $(srcdir) $(CPPCHECK) \ -q --template=gcc --error-exitcode=2 \ + --library=gtk \ --library=$(top_srcdir)/build/cppcheck-geany-plugins.cfg \ -I$(GEANY_INCLUDEDIR)/geany \ -UGEANY_PRIVATE \ -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] af0276: cppcheck: Define the common plugin defines to their actual values
by Colomban Wendling
10 May '24
10 May '24
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Tue, 30 Apr 2024 20:39:44 UTC Commit: af0276752a9d6f51ae7e59b100eaa564dd08d6e1
https://github.com/geany/geany-plugins/commit/af0276752a9d6f51ae7e59b100eaa…
Log Message: ----------- cppcheck: Define the common plugin defines to their actual values Modified Paths: -------------- build/cppcheck-geany-plugins.cfg build/cppcheck.mk Modified: build/cppcheck-geany-plugins.cfg 2 lines changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -1,7 +1,5 @@ <?xml version="1.0"?> <def format="2"> - <!-- Geany-Plugins macros --> - <define name="PLUGIN" value=""foo""/> <!-- GLib macros --> <define name="G_GSSIZE_FORMAT" value=""li""/> <define name="G_GINT64_MODIFIER" value=""l""/> Modified: build/cppcheck.mk 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -10,6 +10,7 @@ check-cppcheck: $(srcdir) -UGEANY_PRIVATE \ -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ $(filter -j%,$(MAKEFLAGS)) \ + $(LOCAL_AM_CFLAGS) \ $(AM_CPPCHECKFLAGS) $(CPPCHECKFLAGS) \ $(srcdir) -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] aee2f4: Merge pull request #1346 from b4n/cppcheck-ci
by Colomban Wendling
10 May '24
10 May '24
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: GitHub <noreply(a)github.com> Date: Fri, 10 May 2024 20:19:18 UTC Commit: aee2f4d5aeffed8ece77b8e25f7c6ce17657c021
https://github.com/geany/geany-plugins/commit/aee2f4d5aeffed8ece77b8e25f7c6…
Log Message: ----------- Merge pull request #1346 from b4n/cppcheck-ci Enhance cppcheck usage, fix CI and fix reported errors Modified Paths: -------------- .github/workflows/build.yml addons/src/ao_tasks.c build/cppcheck-geany-plugins.cfg build/cppcheck.mk geanyctags/src/geanyctags.c geanygendoc/src/ggd-options.c geanyprj/src/Makefile.am geanyprj/src/utils.c geniuspaste/src/geniuspaste.c git-changebar/src/gcb-plugin.c markdown/src/conf.c scope/src/Makefile.am scope/src/debug.c treebrowser/src/Makefile.am treebrowser/src/treebrowser.c vimode/src/cmd-runner.c workbench/src/sidebar.c workbench/src/wb_project.c workbench/src/workbench.c Modified: .github/workflows/build.yml 3 lines changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -21,6 +21,7 @@ concurrency: env: CFLAGS: -g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration CONFIGURE_FLAGS: --disable-silent-rules + CPPCHECKFLAGS: --check-level=exhaustive CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_COMPRESS: true CCACHE_MAXSIZE: 1G @@ -190,7 +191,7 @@ jobs: - name: Run distcheck run: | cd _build - make -j ${{ env.JOBS }} distcheck DISTCHECK_CONFIGURE_FLAGS="${{ env.CONFIGURE_FLAGS }}"; + make -j ${{ env.JOBS }} distcheck DISTCHECK_CONFIGURE_FLAGS="${{ env.CONFIGURE_FLAGS }} --disable-cppcheck"; - name: ccache statistics if: ${{ env.DEBUG == '1' }} Modified: addons/src/ao_tasks.c 11 lines changed, 7 insertions(+), 4 deletions(-) =================================================================== @@ -636,18 +636,21 @@ static void free_update_tasks_for_doc_arguments(gpointer data) static void update_tasks_for_doc(AoTasks *t, GeanyDocument *doc, gboolean clear) { - AoTasksUpdateTasksForDocArguments *arguments = g_slice_alloc(sizeof *arguments); - arguments->t = t; - arguments->doc = doc; - arguments->clear = clear; + AoTasksUpdateTasksForDocArguments *arguments; if (!DOC_VALID(doc)) return; + arguments = g_slice_alloc(sizeof *arguments); + arguments->t = t; + arguments->doc = doc; + arguments->clear = clear; + /* Check for task tokens in an idle callback to wait until Geany applied Scintilla highlighting * styles as we need them to be set before checking for tasks. */ g_idle_add_full(G_PRIORITY_LOW, update_tasks_for_doc_idle_cb, arguments, free_update_tasks_for_doc_arguments); + /* cppcheck-suppress memleak symbolName=arguments */ } Modified: build/cppcheck-geany-plugins.cfg 4 lines changed, 0 insertions(+), 4 deletions(-) =================================================================== @@ -1,11 +1,7 @@ <?xml version="1.0"?> <def format="2"> - <!-- Geany-Plugins macros --> - <define name="PLUGIN" value=""foo""/> <!-- GLib macros --> <define name="G_GSSIZE_FORMAT" value=""li""/> <define name="G_GINT64_MODIFIER" value=""l""/> <define name="G_DIR_SEPARATOR_S" value=""/""/> - <define name="G_DEFINE_TYPE(TN, t_n, T_P)" value=""/> - <define name="G_DEFINE_BOXED_TYPE(TypeName,type_name,copy_func,free_func)" value=""/> </def> Modified: build/cppcheck.mk 6 lines changed, 6 insertions(+), 0 deletions(-) =================================================================== @@ -3,9 +3,15 @@ if HAVE_CPPCHECK check-cppcheck: $(srcdir) $(CPPCHECK) \ + --inline-suppr \ -q --template=gcc --error-exitcode=2 \ + --library=gtk \ --library=$(top_srcdir)/build/cppcheck-geany-plugins.cfg \ -I$(GEANY_INCLUDEDIR)/geany \ + -UGEANY_PRIVATE \ + -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ + $(filter -j%,$(MAKEFLAGS)) \ + $(LOCAL_AM_CFLAGS) \ $(AM_CPPCHECKFLAGS) $(CPPCHECKFLAGS) \ $(srcdir) Modified: geanyctags/src/geanyctags.c 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -162,6 +162,8 @@ static void spawn_cmd(const gchar *cmd, const gchar *dir) msgwin_msg_add(COLOR_BLACK, -1, NULL, "%s", out); } + /* cppcheck-suppress mismatchAllocDealloc symbolName=argv + * argv is built manually, but is a valid GStrv */ g_strfreev(argv); g_free(working_dir); g_free(out); Modified: geanygendoc/src/ggd-options.c 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -202,6 +202,7 @@ ggd_opt_group_add_entry (GgdOptGroup *group, g_array_append_val (group->prefs, entry); + /* cppcheck-suppress memleak symbolName=entry.key */ return &g_array_index (group->prefs, GgdOptEntry, group->prefs->len -1); } Modified: geanyprj/src/Makefile.am 3 lines changed, 0 insertions(+), 3 deletions(-) =================================================================== @@ -23,7 +23,4 @@ unittests_CFLAGS = $(GEANY_CFLAGS) -DUNITTESTS 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; Modified: geniuspaste/src/geniuspaste.c 5 lines changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -381,6 +381,8 @@ static gchar *pastebin_get_language(const Pastebin *pastebin, gchar *lang = g_key_file_get_string(pastebin->config, PASTEBIN_GROUP_LANGUAGES, geany_ft_name, NULL); + /* cppcheck-suppress memleak symbolName=lang + * obvious cppcheck bug */ return lang ? lang : pastebin_get_default(pastebin, "language", ""); } @@ -750,6 +752,9 @@ static void show_msgbox(GtkMessageType type, GtkButtonsType buttons, /* run the dialog */ gtk_dialog_run(GTK_DIALOG(dlg)); gtk_widget_destroy(dlg); + + g_free(markup); + /* cppcheck-suppress memleak symbolName=dlg */ } static void debug_log_message_body(SoupMessage *msg, Modified: git-changebar/src/gcb-plugin.c 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -566,6 +566,7 @@ get_cached_blob_contents_async (const gchar *path, } g_async_queue_push (G_queue, job); + /* cppcheck-suppress memleak symbolName=job */ } } Modified: markdown/src/conf.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -233,7 +233,7 @@ markdown_config_get_string_key(MarkdownConfig *conf, const gchar *group, GError *error = NULL; out_str = g_key_file_get_string(conf->priv->kf, group, key, &error); - if (error) { + if (!out_str) { g_debug("Config read failed: %s", error->message); g_error_free(error); error = NULL; out_str = g_strdup(default_value); @@ -451,7 +451,7 @@ markdown_config_save(MarkdownConfig *conf) /*g_debug("Saving: %s\n%s", conf->priv->filename, contents);*/ - if (error) { + if (!contents) { g_warning("Error getting config data as string: %s", error->message); g_error_free(error); error = NULL; return success; Modified: scope/src/Makefile.am 2 lines changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -60,8 +60,6 @@ scope_la_CFLAGS = $(AM_CFLAGS) $(VTE_CFLAGS) \ -Wno-shadow \ -I$(top_srcdir)/utils/src -AM_CPPCHECKFLAGS = -DGETTEXT_PACKAGE="geany-plugins" - include $(top_srcdir)/build/cppcheck.mk if UNITTESTS Modified: scope/src/debug.c 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -207,6 +207,8 @@ static void create_send_source(void) g_source_set_callback(send_source, (GSourceFunc) send_commands_cb, NULL, send_source_destroy_cb); send_source_id = g_source_attach(send_source, NULL); + /* cppcheck-suppress memleak symbolName=send_source + * the source is attached and managed through its ID */ } #define HAS_SPAWN_LEAVE_STDIN_OPEN 0 @@ -347,6 +349,8 @@ static void gdb_finalize(void) if (send_channel) { g_io_channel_shutdown(send_channel, FALSE, NULL); + /* cppcheck-suppress doubleFree symbolName=send_channel + * erroneously thinks g_io_channel_shutdown() frees the channel */ g_io_channel_unref(send_channel); send_channel = NULL; Modified: treebrowser/src/Makefile.am 3 lines changed, 0 insertions(+), 3 deletions(-) =================================================================== @@ -10,7 +10,4 @@ treebrowser_la_CFLAGS = $(AM_CFLAGS) $(GIO_CFLAGS) \ treebrowser_la_LIBADD = $(COMMONLIBS) $(GIO_LIBS) \ $(top_builddir)/utils/src/libgeanypluginutils.la -AM_CPPCHECKFLAGS = --suppress='deallocDealloc:$(srcdir)/treebrowser.c' -AM_CPPCHECKFLAGS += --suppress='doubleFree:$(srcdir)/treebrowser.c' - include $(top_srcdir)/build/cppcheck.mk Modified: treebrowser/src/treebrowser.c 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -1121,6 +1121,7 @@ on_menu_create_new_object(GtkMenuItem *menuitem, const gchar *type) } g_free(uri_new); } + /* cppcheck-suppress doubleFree symbolName=uri */ g_free(uri); } @@ -1192,6 +1193,7 @@ on_menu_refresh(GtkMenuItem *menuitem, gpointer *user_data) } } treebrowser_browse(uri, target_iter); + /* cppcheck-suppress doubleFree symbolName=uri */ g_free(uri); } else Modified: vimode/src/cmd-runner.c 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -707,6 +707,8 @@ static gboolean process_cmd(CmdDef *cmds, CmdContext *ctx, gboolean ins_mode) } else if (!consumed && ctx->kpl) { + /* cppcheck-suppress deallocuse symbolName=kpl + * Not sure how cppcheck gets this wrong here, but all seem OK */ g_free(ctx->kpl->data); ctx->kpl = g_slist_delete_link(ctx->kpl, ctx->kpl); } Modified: workbench/src/sidebar.c 6 lines changed, 6 insertions(+), 0 deletions(-) =================================================================== @@ -213,6 +213,8 @@ static void sidebar_create_branch(gint level, const gchar *abs_base_dir, GSList FILEVIEW_COLUMN_ICON, icon_dir, FILEVIEW_COLUMN_NAME, last_dir_name, FILEVIEW_COLUMN_DATA_ID, DATA_ID_SUB_DIRECTORY, + /* cppcheck-suppress leakNoVarFunctionCall + * type is gpointer, but admittedly I don't see where it's freed? */ FILEVIEW_COLUMN_ASSIGNED_DATA_POINTER, g_strdup(full), -1); @@ -235,6 +237,8 @@ static void sidebar_create_branch(gint level, const gchar *abs_base_dir, GSList FILEVIEW_COLUMN_ICON, icon_dir, FILEVIEW_COLUMN_NAME, last_dir_name, FILEVIEW_COLUMN_DATA_ID, DATA_ID_SUB_DIRECTORY, + /* cppcheck-suppress leakNoVarFunctionCall + * type is gpointer, but admittedly I don't see where it's freed? */ FILEVIEW_COLUMN_ASSIGNED_DATA_POINTER, g_strdup(full), -1); g_free(full); @@ -440,6 +444,8 @@ static void sidebar_add_file (WB_PROJECT *prj, WB_PROJECT_DIR *root, const gchar FILEVIEW_COLUMN_ICON, icon, FILEVIEW_COLUMN_NAME, name, FILEVIEW_COLUMN_DATA_ID, dataid, + /* cppcheck-suppress leakNoVarFunctionCall + * type is gpointer, but admittedly I don't see where it's freed? */ FILEVIEW_COLUMN_ASSIGNED_DATA_POINTER, g_strdup(filepath), -1); Modified: workbench/src/wb_project.c 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -691,6 +691,7 @@ static guint wb_project_dir_rescan_int(WB_PROJECT *prj, WB_PROJECT_DIR *root) if (path) { + /* cppcheck-suppress leakNoVarFunctionCall -- key is freed automatically */ g_hash_table_add(root->file_table, g_strdup(path)); filenum++; } @@ -757,6 +758,7 @@ static void wb_project_dir_add_file_int(WB_PROJECT *prj, WB_PROJECT_DIR *root, c } /* Update file table and counters. */ + /* cppcheck-suppress leakNoVarFunctionCall -- key is freed automatically */ g_hash_table_add(root->file_table, g_strdup(filepath)); if (g_file_test(filepath, G_FILE_TEST_IS_DIR)) { @@ -818,6 +820,7 @@ static void wb_project_dir_update_tags(WB_PROJECT_DIR *root) gchar *locale_path = utils_get_locale_from_utf8(utf8_path); g_ptr_array_add(files, g_strdup(key)); + /* cppcheck-suppress leakNoVarFunctionCall -- key is freed automatically */ g_hash_table_add(root->file_table, g_strdup(utf8_path)); g_free(locale_path); } @@ -960,6 +963,7 @@ static void wb_project_dir_regenerate_tags(WB_PROJECT_DIR *root, G_GNUC_UNUSED g } /* Add all files to the file-table (files and dirs)! */ + /* cppcheck-suppress leakNoVarFunctionCall -- key is freed automatically */ g_hash_table_add(file_table, g_strdup(key)); } g_hash_table_destroy(root->file_table); Modified: workbench/src/workbench.c 4 lines changed, 3 insertions(+), 1 deletions(-) =================================================================== @@ -833,6 +833,8 @@ gboolean workbench_load(WORKBENCH *wb, const gchar *filename, GError **error) return FALSE; } + g_free (contents); + if (g_key_file_has_key (kf, "General", "filetype", NULL) && g_key_file_has_key (kf, "General", "version", NULL)) { @@ -854,6 +856,7 @@ gboolean workbench_load(WORKBENCH *wb, const gchar *filename, GError **error) g_set_error (error, 0, 0, _("File %s is not a valid workbench file!"), filename); + g_key_file_free (kf); return FALSE; } workbench_set_filename(wb, filename); @@ -964,7 +967,6 @@ gboolean workbench_load(WORKBENCH *wb, const gchar *filename, GError **error) } g_key_file_free(kf); - g_free (contents); success = TRUE; } else if (error != NULL) -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
← Newer
1
2
3
4
Older →
Jump to page:
1
2
3
4
Results per page:
10
25
50
100
200