X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fir%2Ftrace.c;h=158f2b8bbc2e6d13ea8555ecb95a8cff0011d306;hb=8bdcb82e988e2cbdc063880ff6a2c6a550789495;hp=32de5bb5f0d74929faffe4c68b05e0cabe84ec40;hpb=7dab6d2d22f6cae426472048087ac834682d52e9;p=babeltrace.git diff --git a/formats/ctf/ir/trace.c b/formats/ctf/ir/trace.c index 32de5bb5..158f2b8b 100644 --- a/formats/ctf/ir/trace.c +++ b/formats/ctf/ir/trace.c @@ -879,16 +879,17 @@ BT_HIDDEN struct bt_ctf_field_type *get_field_type(enum field_type_alias alias) { unsigned int alignment, size; - struct bt_ctf_field_type *field_type; + struct bt_ctf_field_type *field_type = NULL; if (alias >= NR_FIELD_TYPE_ALIAS) { - return NULL; + goto end; } alignment = field_type_aliases_alignments[alias]; size = field_type_aliases_sizes[alias]; field_type = bt_ctf_field_type_integer_create(size); bt_ctf_field_type_set_alignment(field_type, alignment); +end: return field_type; }