[ltt-dev] [PATCH] ltt-ascii: Fix buggy error handling
Balaji Rao
balajirrao at gmail.com
Sat Mar 6 13:39:35 EST 2010
Hi Mathieu,
Fix ltt_relay_iter_open_channel to cleanup correctly on error.
Thanks,
Balaji
--
Signed-off-by: Balaji Rao <balaji at raobalaji.com>
diff --git a/ltt/ltt-ascii.c b/ltt/ltt-ascii.c
index eeb7033..08925ea 100644
--- a/ltt/ltt-ascii.c
+++ b/ltt/ltt-ascii.c
@@ -423,8 +423,11 @@ static int ltt_relay_iter_open_channel(struct ltt_relay_iter *iter,
}
update_cpu_iter(citer, citer->hdr_offset);
}
- if (!iter->nr_refs)
- return -ENODATA; /* no data available */
+ if (!iter->nr_refs) {
+ ret = -ENODATA;
+ goto error;
+ }
+
return 0;
error:
More information about the lttng-dev
mailing list