about summary refs log tree commit diff
path: root/frida_mode/test/testinstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'frida_mode/test/testinstr.c')
-rw-r--r--frida_mode/test/testinstr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/frida_mode/test/testinstr.c b/frida_mode/test/testinstr.c
index 2c3d5144..37d47f91 100644
--- a/frida_mode/test/testinstr.c
+++ b/frida_mode/test/testinstr.c
@@ -78,6 +78,13 @@ int main(int argc, char **argv) {
     }
 
     buf = malloc(len);
+    if (buf == NULL) {
+
+      perror("malloc");
+      break;
+
+    }
+
     n_read = read(fd, buf, len);
     if (n_read != len) {