[gnome-commander/GSettings] Uses g_strdup for string allocation, frees char array
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/GSettings] Uses g_strdup for string allocation, frees char array
- Date: Sun, 13 Dec 2015 20:36:25 +0000 (UTC)
commit d8d3279334cd2d5e7054c23a30e63eb044c9c528
Author: Uwe Scholz <uwescholz src gnome org>
Date: Fri Dec 11 14:05:41 2015 +0100
Uses g_strdup for string allocation, frees char array
src/main.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/main.cc b/src/main.cc
index b8f7ec9..62c7bac 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -133,7 +133,7 @@ int main (int argc, char *argv[])
GNOME_PARAM_NONE);
if (debug_flags && strchr(debug_flags,'a'))
- debug_flags = "cdfgiklmnpstuvwyzx";
+ debug_flags = g_strdup("cdfgiklmnpstuvwyzx");
gdk_rgb_init ();
gnome_vfs_init ();
@@ -199,6 +199,7 @@ int main (int argc, char *argv[])
g_object_unref (app);
g_object_unref (program);
+ g_free (debug_flags);
DEBUG ('c', "dirs total: %d remaining: %d\n", created_dirs_cnt, created_dirs_cnt - deleted_dirs_cnt);
DEBUG ('c', "files total: %d remaining: %d\n", created_files_cnt, created_files_cnt - deleted_files_cnt);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]