提交 53ccdd3f 编写于 作者: P peterz

6893704: Potential memory leak in gtk2_interface.c

Reviewed-by: stayer
上级 8a7d025b
......@@ -637,13 +637,13 @@ gboolean gtk2_load()
if (gtk_modules_env && strstr (gtk_modules_env, "atk-bridge") ||
gtk_modules_env && strstr (gtk_modules_env, "gail"))
{
gchar *tmp_env = strdup (gtk_modules_env);
/* the new env will be smaller than the old one */
gchar *s, *new_env = malloc (sizeof(ENV_PREFIX)+strlen (gtk_modules_env));
if (new_env != NULL )
{
/* careful, strtok modifies its args */
gchar *tmp_env = strdup (gtk_modules_env);
strcpy(new_env, ENV_PREFIX);
/* strip out 'atk-bridge' and 'gail' */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册