Skip to contentSkip to conversation

Fix: check return value of bt_context_create

PATCH New Julien Desfossez 2 participants 2 messages Aug 21, 2012 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20120821120531.GA13784@Krystal

#1 lore raw

PATCH 1/1 Fix: check return value of bt_context_create

---
 converter/babeltrace.c |    3 +++
 1 file changed, 3 insertions(+)
converter/babeltrace.c +3 -0
index f5541d2..c9007c3 100644
@@ -549,6 +549,9 @@ int main(int argc, char **argv)
 	}
 
 	ctx = bt_context_create();
+	if (!ctx) {
+		goto error_td_read;
+	}
 
 	ret = bt_context_add_traces_recursive(ctx, opt_input_path,
 			opt_input_format, NULL);
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 1 line · * Julien Desfossez ([email protected]) wrote:

Merged, thanks!

Mathieu

Quoted 21 lines
---
 converter/babeltrace.c |    3 +++
 1 file changed, 3 insertions(+)
converter/babeltrace.c +3 -0
index f5541d2..c9007c3 100644
@@ -549,6 +549,9 @@ int main(int argc, char **argv)
 	}
 
 	ctx = bt_context_create();
+	if (!ctx) {
+		goto error_td_read;
+	}
 
 	ret = bt_context_add_traces_recursive(ctx, opt_input_path,
 			opt_input_format, NULL);
Signature · 1 line
1.7.10.4
Signature · 4 lines
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com