X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Fbitfield.c;h=03d3bbcbafd31aca219ea988289b3f6e6f84517c;hp=b21fdc917355fc675d05e856cba8906b5d1b6583;hb=448d3cc7640830015850cc6287532d4c194fe690;hpb=0a46062b3916eda6f871b5d80c4b97dcb3804d37 diff --git a/types/bitfield.c b/types/bitfield.c index b21fdc91..03d3bbcb 100644 --- a/types/bitfield.c +++ b/types/bitfield.c @@ -19,6 +19,7 @@ */ #include +#include #include /* @@ -83,9 +84,6 @@ struct type_class_bitfield *bitfield_type_new(const char *name, struct type_class_integer *int_class; int ret; - /* - * Freed when type is unregistered. - */ bitfield_class = g_new(struct type_class_bitfield, 1); int_class = &bitfield_class->p; int_class->p.name = g_quark_from_string(name); @@ -106,6 +104,5 @@ struct type_class_bitfield *bitfield_type_new(const char *name, void bitfield_type_free(struct type_class_bitfield *bitfield_class) { - if (!bitfield_class->name) - g_free(bitfield_class); + g_free(bitfield_class); }