Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package editorconfig-core-c for
openSUSE:Factory checked in at 2021-07-02 13:26:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/editorconfig-core-c (Old)
and /work/SRC/openSUSE:Factory/.editorconfig-core-c.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "editorconfig-core-c"
Fri Jul 2 13:26:21 2021 rev:9 rq:902701 version:0.12.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/editorconfig-core-c/editorconfig-core-c.changes
2020-11-09 13:56:16.556112691 +0100
+++
/work/SRC/openSUSE:Factory/.editorconfig-core-c.new.2625/editorconfig-core-c.changes
2021-07-02 13:26:27.489230282 +0200
@@ -1,0 +2,7 @@
+Sun Jun 27 10:57:57 UTC 2021 - Herbert Graeber <[email protected]>
+
+- editorconfig-core-c 0.12.5:
+ * Fix memory leak which would occur if no .editorconfig files were found
+ in the file's ancestry or if an error occurred while ingesting values.
+
+-------------------------------------------------------------------
Old:
----
editorconfig-core-c-0.12.4.tar.gz
New:
----
editorconfig-core-c-0.12.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ editorconfig-core-c.spec ++++++
--- /var/tmp/diff_new_pack.WMszfK/_old 2021-07-02 13:26:28.401223206 +0200
+++ /var/tmp/diff_new_pack.WMszfK/_new 2021-07-02 13:26:28.405223175 +0200
@@ -1,7 +1,7 @@
#
# spec file for package editorconfig-core-c
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: editorconfig-core-c
-Version: 0.12.4
+Version: 0.12.5
Release: 0
Summary: EditorConfig core library written in C
License: BSD-2-Clause AND BSD-3-Clause
++++++ editorconfig-core-c-0.12.4.tar.gz -> editorconfig-core-c-0.12.5.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-core-c-0.12.4/CMakeLists.txt
new/editorconfig-core-c-0.12.5/CMakeLists.txt
--- old/editorconfig-core-c-0.12.4/CMakeLists.txt 2020-08-29
22:25:44.000000000 +0200
+++ new/editorconfig-core-c-0.12.5/CMakeLists.txt 2021-06-17
10:16:40.000000000 +0200
@@ -29,7 +29,7 @@
cmake_minimum_required(VERSION 3.5.1)
cmake_policy(VERSION 3.5.1)
-project(editorconfig VERSION "0.12.4" LANGUAGES C)
+project(editorconfig VERSION "0.12.5" LANGUAGES C)
set(PROJECT_VERSION_SUFFIX "")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-core-c-0.12.4/src/lib/editorconfig.c
new/editorconfig-core-c-0.12.5/src/lib/editorconfig.c
--- old/editorconfig-core-c-0.12.4/src/lib/editorconfig.c 2020-08-29
22:25:44.000000000 +0200
+++ new/editorconfig-core-c-0.12.5/src/lib/editorconfig.c 2021-06-17
10:16:40.000000000 +0200
@@ -384,6 +384,20 @@
}
/*
+ * Free the memory used by an array of strings that was created by
+ * get_filenames().
+ */
+static void free_filenames(char **filenames)
+{
+ if (filenames != NULL) {
+ for (char** filename = filenames; *filename != NULL; filename++) {
+ free(*filename);
+ }
+ free(filenames);
+ }
+}
+
+/*
* version number comparison
*/
static int editorconfig_compare_version(
@@ -564,7 +578,7 @@
if (eh->name_value_count == 0) { /* no value is set, just return 0. */
free(hfp.full_filename);
- free(config_files);
+ free_filenames(config_files);
return 0;
}
eh->name_values = hfp.array_name_value.name_values;
@@ -573,17 +587,12 @@
sizeof(editorconfig_name_value) * eh->name_value_count);
if (eh->name_values == NULL) {
free(hfp.full_filename);
+ free_filenames(config_files);
return EDITORCONFIG_PARSE_MEMORY_ERROR;
}
cleanup:
-
- if (config_files != NULL) {
- for (config_file = config_files; *config_file != NULL; config_file++) {
- free(*config_file);
- }
- free(config_files);
- }
+ free_filenames(config_files);
free(hfp.full_filename);
free(hfp.editorconfig_file_dir);