Fix: handle packet_seek errors
[babeltrace.git] / converter / babeltrace-log.c
index db7f60f1d2b60b2eeccf114ab24e2965a5641caa..c478b004d71cf1ecf844c339db46db6fa912c3eb 100644 (file)
@@ -282,7 +282,8 @@ void trace_string(char *line, struct ctf_stream_pos *pos, size_t len)
                if (!ctf_move_pos(&dummy, tlen * CHAR_BIT))
                        packet_filled = 1;
                if (packet_filled || ctf_pos_packet(&dummy)) {
-                       ctf_pos_pad_packet(pos);
+                       if (ctf_pos_pad_packet(pos))
+                               goto error;
                        write_packet_header(pos, s_uuid);
                        write_packet_context(pos);
                        if (attempt++ == 1) {
This page took 0.023197 seconds and 4 git commands to generate.