[ASAN] bootconfig: Drop a pointless strdup in parser
Not entirely sure how this was leaking, but anyways it showed up in ASAN, and it's pointless to strdup here. Closes: #598 Approved by: jlebon
This commit is contained in:
parent
d83d5b4a29
commit
161193966c
|
|
@ -28,7 +28,7 @@ struct _OstreeBootconfigParser
|
||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
|
|
||||||
gboolean parsed;
|
gboolean parsed;
|
||||||
char *separators;
|
const char *separators;
|
||||||
|
|
||||||
GHashTable *options;
|
GHashTable *options;
|
||||||
GPtrArray *lines;
|
GPtrArray *lines;
|
||||||
|
|
@ -235,7 +235,6 @@ ostree_bootconfig_parser_finalize (GObject *object)
|
||||||
|
|
||||||
g_hash_table_unref (self->options);
|
g_hash_table_unref (self->options);
|
||||||
g_ptr_array_unref (self->lines);
|
g_ptr_array_unref (self->lines);
|
||||||
g_free (self->separators);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (ostree_bootconfig_parser_parent_class)->finalize (object);
|
G_OBJECT_CLASS (ostree_bootconfig_parser_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
@ -261,6 +260,6 @@ ostree_bootconfig_parser_new (void)
|
||||||
OstreeBootconfigParser *self = NULL;
|
OstreeBootconfigParser *self = NULL;
|
||||||
|
|
||||||
self = g_object_new (OSTREE_TYPE_BOOTCONFIG_PARSER, NULL);
|
self = g_object_new (OSTREE_TYPE_BOOTCONFIG_PARSER, NULL);
|
||||||
self->separators = g_strdup (" \t");
|
self->separators = " \t";
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue