Skip to content

Commit

Permalink
patch 9.0.2166: Memory leak in Configure Script when checking GTK
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zdohnal authored and chrisbra committed Dec 14, 2023
1 parent a8f7f92 commit 549f8c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/auto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down
3 changes: 3 additions & 0 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2166,
/**/
2165,
/**/
Expand Down

0 comments on commit 549f8c0

Please sign in to comment.