projects
/
mikachu
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2bc7e15
)
Exit action failed to free options struct
author
Mikael Magnusson
<mikachu@gmail.com>
Fri, 19 Feb 2010 22:24:52 +0000
(23:24 +0100)
committer
Mikael Magnusson
<mikachu@gmail.com>
Fri, 19 Feb 2010 22:26:59 +0000
(23:26 +0100)
openbox/actions/exit.c
patch
|
blob
|
history
diff --git
a/openbox/actions/exit.c
b/openbox/actions/exit.c
index
567926e
..
f447830
100644
(file)
--- a/
openbox/actions/exit.c
+++ b/
openbox/actions/exit.c
@@
-10,11
+10,12
@@
typedef struct {
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
static gboolean run_func(ObActionsData *data, gpointer options);
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
static gboolean run_func(ObActionsData *data, gpointer options);
+static void free_func(gpointer options);
void action_exit_startup(void)
{
void action_exit_startup(void)
{
- actions_register("Exit", setup_func,
NULL
, run_func, NULL, NULL);
- actions_register("SessionLogout", setup_func,
NULL
, run_func, NULL, NULL);
+ actions_register("Exit", setup_func,
free_func
, run_func, NULL, NULL);
+ actions_register("SessionLogout", setup_func,
free_func
, run_func, NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@
-31,6
+32,12
@@
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
return o;
}
+static void free_func(gpointer options)
+{
+ if (options)
+ g_free(options);
+}
+
static void do_exit(void)
{
if (session_connected())
static void do_exit(void)
{
if (session_connected())