don't leak memory

This commit is contained in:
Monsta 2014-11-03 13:58:45 +03:00 committed by infirit
parent 4a79fb544f
commit d01f58c9f7
5 changed files with 10 additions and 4 deletions

View File

@ -107,6 +107,7 @@ pluma_debug_message (PlumaDebugSection section,
{
#ifdef ENABLE_PROFILING
gdouble seconds;
g_return_if_fail (timer != NULL);
#endif
va_list args;
@ -119,8 +120,6 @@ pluma_debug_message (PlumaDebugSection section,
va_end (args);
#ifdef ENABLE_PROFILING
g_return_if_fail (timer != NULL);
seconds = g_timer_elapsed (timer, NULL);
g_print ("[%f (%f)] %s:%d (%s) %s\n",
seconds, seconds - last, file, line, function, msg);

View File

@ -169,6 +169,7 @@ _pluma_plugin_info_new (const gchar *file)
else
{
g_warning ("Could not find 'Module' in %s", file);
g_free (str);
goto error;
}
@ -198,6 +199,7 @@ _pluma_plugin_info_new (const gchar *file)
{
/* default to the C loader */
info->loader = g_strdup("c");
g_free (str);
}
/* Get Name */

View File

@ -293,6 +293,8 @@ _pluma_style_scheme_manager_install_scheme (GtkSourceStyleSchemeManager *manager
g_message ("Cannot install style scheme:\n%s",
error->message);
g_free (dirname);
g_free (styles_dir);
return NULL;
}

View File

@ -1380,6 +1380,8 @@ pluma_utils_drop_get_uris (GtkSelectionData *selection_data)
uri_list[p++] = uri;
}
g_strfreev (uris);
if (*uri_list == NULL)
{
g_free(uri_list);

View File

@ -610,6 +610,7 @@ main (int argc, char *argv[])
g_print(_("%s\nRun '%s --help' to see a full list of available command line options.\n"),
error->message, argv[0]);
g_error_free (error);
g_option_context_free (context);
return 1;
}