Message ID | aef5ffd30af02f906e64c6fc5c432de695cbf164.1455888929.git.riku.voipio@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 54ce14a..dac5518 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -318,8 +318,8 @@ static void fd_trans_register(int fd, TargetFdTrans *trans) if (fd >= target_fd_max) { oldmax = target_fd_max; target_fd_max = ((fd >> 6) + 1) << 6; /* by slice of 64 entries */ - target_fd_trans = g_realloc(target_fd_trans, - target_fd_max * sizeof(TargetFdTrans)); + target_fd_trans = g_renew(TargetFdTrans *, + target_fd_trans, target_fd_max); memset((void *)(target_fd_trans + oldmax), 0, (target_fd_max - oldmax) * sizeof(TargetFdTrans *)); }