gboolean ret;
GParamSpec *pspec;
- GValue *value = g_malloc0(sizeof(GValue));
+ GValue *value = g_new0 (GValue, 1);
gboolean (*parse_func) (GKeyFile *keyfile, const gchar *group_name, const gchar *key, GValue *value, GError **error);
/* Get the pspec for this property */
//failure:
g_critical (_("Unable to find a value for controller property: %s\n"), property);
+ g_free (value);
return FALSE;
success:
gboolean ret;
GParamSpec *pspec;
- GValue *value = g_malloc0(sizeof(GValue));
+ GValue *value = g_new0(GValue, 1);
gboolean (*parse_func) (GKeyFile *keyfile, const gchar *group_name, const gchar *key, GValue *value, GError **error);
/* Get the pspec for this property */
//failure:
g_critical (_("Unable to find a value for window property: %s\n"), property);
+ g_free (value);
return FALSE;
success:
gboolean ret;
GParamSpec *pspec;
- GValue *value = g_malloc0(sizeof(GValue));
+ GValue *value = g_new0 (GValue, 1);
gboolean (*parse_func) (GKeyFile *keyfile, const gchar *group_name, const gchar *key, GValue *value, GError **error);
/* Get the pspec for this property */
//failure:
g_critical (_("Unable to find a value for terminal property: %s\n"), property);
+ g_free (value);
return FALSE;
success: