[file-roller] Revert "Revert "Fix fr_application_local_command_line memory leak""
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] Revert "Revert "Fix fr_application_local_command_line memory leak""
- Date: Sun, 18 Sep 2016 07:46:01 +0000 (UTC)
commit 23656af9c157222697261eab8524bc1e53a76c0d
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Sep 18 09:39:05 2016 +0200
Revert "Revert "Fix fr_application_local_command_line memory leak""
This reverts commit 75c8032b4fd0cd347437422bb80cbe9b6a89de71.
Respect the hard code freeze.
src/fr-application.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/fr-application.c b/src/fr-application.c
index 06d86a1..92e2fc9 100644
--- a/src/fr-application.c
+++ b/src/fr-application.c
@@ -641,21 +641,19 @@ fr_application_local_command_line (GApplication *application,
char ***arguments,
int *exit_status)
{
- char **local_argv;
int local_argc;
GOptionContext *context;
GError *error = NULL;
gboolean handled_locally = FALSE;
- local_argv = g_strdupv (*arguments);
- local_argc = g_strv_length (local_argv);
+ local_argc = g_strv_length (*arguments);
- program_argv0 = local_argv[0];
+ program_argv0 = *arguments[0];
*exit_status = 0;
context = fr_application_create_option_context ();
g_option_context_set_ignore_unknown_options (context, TRUE);
- if (! g_option_context_parse (context, &local_argc, &local_argv, &error)) {
+ if (! g_option_context_parse (context, &local_argc, arguments, &error)) {
*exit_status = EXIT_FAILURE;
g_critical ("Failed to parse arguments: %s", error->message);
g_clear_error (&error);
@@ -668,7 +666,6 @@ fr_application_local_command_line (GApplication *application,
}
g_option_context_free (context);
- g_strfreev (local_argv);
return handled_locally;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]