decode_select: do not allocate unused memory
* desc.c (decode_select): On entering syscall, do not allocate memory in non-verbose mode.
This commit is contained in:
parent
73e98805dd
commit
2fc5d80858
4
desc.c
4
desc.c
@ -338,7 +338,7 @@ decode_select(struct tcb *tcp, long *args, enum bitness_t bitness)
|
||||
if (entering(tcp)) {
|
||||
tprintf("%d", (int) args[0]);
|
||||
|
||||
if (fdsize > 0) {
|
||||
if (verbose(tcp) && fdsize > 0) {
|
||||
fds = malloc(fdsize);
|
||||
if (!fds)
|
||||
die_out_of_memory();
|
||||
@ -349,7 +349,7 @@ decode_select(struct tcb *tcp, long *args, enum bitness_t bitness)
|
||||
tprints(", NULL");
|
||||
continue;
|
||||
}
|
||||
if (!verbose(tcp) || !fds) {
|
||||
if (!fds) {
|
||||
tprintf(", %#lx", arg);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user