From 91da63d3d3fd680c805dd1a1b78df5b8731a8173 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 28 Mar 2015 15:41:58 +0100 Subject: properly handle return codes Signed-off-by: John Crispin --- trace/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'trace') diff --git a/trace/trace.c b/trace/trace.c index c6f32d7..12f0ee6 100644 --- a/trace/trace.c +++ b/trace/trace.c @@ -214,7 +214,8 @@ int main(int argc, char **argv, char **envp) uloop_done(); if (!json) - asprintf(&json, "/tmp/%s.%u.json", basename(*argv), child); + if (asprintf(&json, "/tmp/%s.%u.json", basename(*argv), child) < 0) + ERROR("failed to allocate output path: %s\n", strerror(errno)); print_syscalls(policy, json); -- cgit v1.2.3