summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/android/dx50/button-dx50.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/android/dx50/button-dx50.c')
-rw-r--r--firmware/target/hosted/android/dx50/button-dx50.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/target/hosted/android/dx50/button-dx50.c b/firmware/target/hosted/android/dx50/button-dx50.c
index 5ab58ce420..250b448491 100644
--- a/firmware/target/hosted/android/dx50/button-dx50.c
+++ b/firmware/target/hosted/android/dx50/button-dx50.c
@@ -89,12 +89,14 @@ static int open_device(const char *device, int print_flags)
89 new_ufds = realloc(ufds, sizeof(ufds[0]) * (nfds + 1)); 89 new_ufds = realloc(ufds, sizeof(ufds[0]) * (nfds + 1));
90 if(new_ufds == NULL) { 90 if(new_ufds == NULL) {
91 fprintf(stderr, "out of memory\n"); 91 fprintf(stderr, "out of memory\n");
92 close(fd);
92 return -1; 93 return -1;
93 } 94 }
94 ufds = new_ufds; 95 ufds = new_ufds;
95 new_device_names = realloc(device_names, sizeof(device_names[0]) * (nfds + 1)); 96 new_device_names = realloc(device_names, sizeof(device_names[0]) * (nfds + 1));
96 if(new_device_names == NULL) { 97 if(new_device_names == NULL) {
97 fprintf(stderr, "out of memory\n"); 98 fprintf(stderr, "out of memory\n");
99 close(fd);
98 return -1; 100 return -1;
99 } 101 }
100 device_names = new_device_names; 102 device_names = new_device_names;