summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ward <patrick@endlessm.com>2014-01-15 12:08:13 -0800
committerPatrick Ward <patrick@endlessm.com>2014-01-15 12:08:13 -0800
commitdab602398544df129f9aa451d270cf19a1aa12a7 (patch)
treec36a5f8683888059ba11c4b36096fe98aa2d96ee
parent7844fc96bbf1d446923fc4e6cd1b3981104e6b0a (diff)
Fix invalid free on gchar pointer
The priv->current_background_css_props variable is sometimes assigned to a const gchar. Changing the const gchar to a malloc'd gchar pointer allows the existing g_free to free priv->current_background_css_props normally without checking for const values. [endlessm/eos-sdk#478]
-rw-r--r--endless/eoswindow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index c06b1a7..42b3cae 100644
--- a/endless/eoswindow.c
+++ b/endless/eoswindow.c
@@ -274,7 +274,7 @@ format_background_css (EosPageManager *pm,
// transparent. So any css styling of EosWindow will "show through" the
// pages.
if (background_uri == NULL)
- return TRANSPARENT_FRAME_CSS_PROPERTIES;
+ return g_strdup (TRANSPARENT_FRAME_CSS_PROPERTIES);
return g_strdup_printf (BACKGROUND_FRAME_CSS_PROPERTIES_TEMPLATE,
background_uri,
background_size,