]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.2166: Memory leak in Configure Script when checking GTK v9.0.2166
authorZdenek Dohnal <zdohnal@redhat.com>
Thu, 14 Dec 2023 19:22:49 +0000 (20:22 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 14 Dec 2023 19:22:49 +0000 (20:22 +0100)
Problem:  Memory leak in Configure Script when checking GTK
Solution: Free the allocated memory

If the memory is not freed, GTK GUI VIM cannot be build with address
sanitizer for debugging purposes - configure script will report missing
GTK, because the testing file compilation fails due reported memory
leak.

closes: #13672

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/auto/configure
src/configure.ac
src/version.c

index 8582298ca8ca4f44c83077ae749520175d5490ef..70ebb33c4dc1557f904401148a6726ae323cf9e2 100755 (executable)
@@ -10136,9 +10136,12 @@ system ("touch conf.gtktest");
 tmp_version = g_strdup("$min_gtk_version");
 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
    printf("%s, bad version string\n", "$min_gtk_version");
+   g_free(tmp_version);
    exit(1);
  }
 
+g_free(tmp_version);
+
 if ((gtk_major_version > major) ||
     ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
     ((gtk_major_version == major) && (gtk_minor_version == minor) &&
index 2ee9b01827a07a0354b165f01ea1f0ed8d193b92..ebe0d08f6edb8cb39ddd0dc1334768b555419854 100644 (file)
@@ -2700,9 +2700,12 @@ system ("touch conf.gtktest");
 tmp_version = g_strdup("$min_gtk_version");
 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
    printf("%s, bad version string\n", "$min_gtk_version");
+   g_free(tmp_version);
    exit(1);
  }
 
+g_free(tmp_version);
+
 if ((gtk_major_version > major) ||
     ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
     ((gtk_major_version == major) && (gtk_minor_version == minor) &&
index 6c9bb4506212d0d2774b324c3eb08982d5a9c8c4..a2623b8c4395d0058b0c110744957ba1fd0d1653 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2166,
 /**/
     2165,
 /**/