aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/firewire/nosy-dump.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/firewire/nosy-dump.c b/tools/firewire/nosy-dump.c
index f93b776370b6..3179c711bd65 100644
--- a/tools/firewire/nosy-dump.c
+++ b/tools/firewire/nosy-dump.c
@@ -150,6 +150,8 @@ subaction_create(uint32_t *data, size_t length)
150 150
151 /* we put the ack in the subaction struct for easy access. */ 151 /* we put the ack in the subaction struct for easy access. */
152 sa = malloc(sizeof *sa - sizeof sa->packet + length); 152 sa = malloc(sizeof *sa - sizeof sa->packet + length);
153 if (!sa)
154 exit(EXIT_FAILURE);
153 sa->ack = data[length / 4 - 1]; 155 sa->ack = data[length / 4 - 1];
154 sa->length = length; 156 sa->length = length;
155 memcpy(&sa->packet, data, length); 157 memcpy(&sa->packet, data, length);
@@ -180,6 +182,8 @@ link_transaction_lookup(int request_node, int response_node, int tlabel)
180 } 182 }
181 183
182 t = malloc(sizeof *t); 184 t = malloc(sizeof *t);
185 if (!t)
186 exit(EXIT_FAILURE);
183 t->request_node = request_node; 187 t->request_node = request_node;
184 t->response_node = response_node; 188 t->response_node = response_node;
185 t->tlabel = tlabel; 189 t->tlabel = tlabel;