From d1e28a78c769b3a6e0ef8e556abf7d1311eee152 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Sun, 2 Aug 2009 04:57:32 -0300
Subject: [PATCH 70/74] jtrans_rollback(): Handle jtrans_new() failures

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 libjio/trans.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libjio/trans.c b/libjio/trans.c
index 2d196c7..16ca3d6 100644
--- a/libjio/trans.c
+++ b/libjio/trans.c
@@ -400,6 +400,9 @@ ssize_t jtrans_rollback(struct jtrans *ts)
 	struct operation *op, *curop, *lop;
 
 	newts = jtrans_new(ts->fs, 0);
+	if (newts == NULL)
+		return -1;
+
 	newts->flags = ts->flags;
 	newts->numops = ts->numops;
 
-- 
1.6.2.2.646.gb214

