Fix: iterator.c BT_SEEK_RESTORE: check return value
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 17 Aug 2012 01:09:33 +0000 (21:09 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 17 Aug 2012 01:09:33 +0000 (21:09 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/iterator.c

index f5f413e2ee6038105889c251047619bd152a6383..2dbd77c0df1ee1de769401f5e05e7102fd2b7142 100644 (file)
@@ -240,7 +240,10 @@ int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *iter_pos)
                                stream_pos->cur_index,
                                stream_pos->offset, stream->real_timestamp);
 
-                       stream_read_event(saved_pos->file_stream);
+                       ret = stream_read_event(saved_pos->file_stream);
+                       if (ret != 0) {
+                               goto error;
+                       }
 
                        /* Add to heap */
                        ret = heap_insert(iter->stream_heap,
This page took 0.032654 seconds and 4 git commands to generate.