Diff between 19e628877ea2b5b82f2d66cd14e9c4e2f6d3d1de and 975df07aa01a3332a82dde17f5c49d17119ecee7
Changed Files
| File | Additions | Deletions | Status |
| tools/btgatt-client.c | +4 | -0 | modified |
Full Patch
diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
index e2e0537..62c4d3e 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -457,6 +457,10 @@ static void cmd_read_multiple(struct client *cli, char *cmd_str)
}
value = malloc(sizeof(uint16_t) * argc);
+ if (!value) {
+ printf("Failed to construct value\n");
+ return;
+ }
for (i = 0; i < argc; i++) {
value[i] = strtol(argv[i], &endptr, 0);