mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
Plug a mem leak in g_environ_unsetenv
==9458== 10 bytes in 1 blocks are definitely lost in loss record 16 of 39 ==9458== at 0x402AD89: malloc (vg_replace_malloc.c:236) ==9458== by 0x4221A1F: vasprintf (vasprintf.c:78) ==9458== by 0x40C6065: g_vasprintf (gprintf.c:314) ==9458== by 0x409D894: g_strdup_vprintf (gstrfuncs.c:509) ==9458== by 0x409D8C9: g_strdup_printf (gstrfuncs.c:535) ==9458== by 0x40672E9: g_environ_setenv (genviron.c:156) ==9458== by 0x80490E7: test_environ_array (environment.c:78) ==9458== by 0x40A3DB5: test_case_run (gtestutils.c:1662) ==9458== by 0x40A40B2: g_test_run_suite_internal (gtestutils.c:1715) ==9458== by 0x40A417C: g_test_run_suite_internal (gtestutils.c:1726) ==9458== by 0x40A42F9: g_test_run_suite (gtestutils.c:1771) ==9458== by 0x40A3441: g_test_run (gtestutils.c:1319) ==9458== by 0x80493F1: main (environment.c:108) Bug #669412.
This commit is contained in:
parent
26a5af83d4
commit
2f4b46e378
@ -198,6 +198,9 @@ g_environ_unsetenv (gchar **envp,
|
||||
*f = *e;
|
||||
f++;
|
||||
}
|
||||
else
|
||||
g_free (*e);
|
||||
|
||||
e++;
|
||||
}
|
||||
*f = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user