aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src/registry/reg_restore.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2010-10-14 14:54:40 +0200
committerBjörn-Egil Dahlberg <[email protected]>2010-10-14 14:54:46 +0200
commit2bebb735e8e17272458f98c8f91c87f9e436c242 (patch)
treedcb9bb26edca6e403ec683971037df7a5170c052 /lib/erl_interface/src/registry/reg_restore.c
parentc7f811b03aca427fbea0cac5307b81fa19bddbc1 (diff)
parent98a1edfa08dea2a7509415ecd8b2e4d283573c25 (diff)
downloadotp-2bebb735e8e17272458f98c8f91c87f9e436c242.tar.gz
otp-2bebb735e8e17272458f98c8f91c87f9e436c242.tar.bz2
otp-2bebb735e8e17272458f98c8f91c87f9e436c242.zip
Merge branch 'ms/fix-zero-byte-allocation' into dev
* ms/fix-zero-byte-allocation: registry: fix zero byte allocation OTP-8893
Diffstat (limited to 'lib/erl_interface/src/registry/reg_restore.c')
-rw-r--r--lib/erl_interface/src/registry/reg_restore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/erl_interface/src/registry/reg_restore.c b/lib/erl_interface/src/registry/reg_restore.c
index 27918d2364..aeb33c784a 100644
--- a/lib/erl_interface/src/registry/reg_restore.c
+++ b/lib/erl_interface/src/registry/reg_restore.c
@@ -266,7 +266,7 @@ int ei_reg_restore(int fd, ei_reg *reg, const char *mntab)
/* make sure receive buffer can handle largest expected message */
len = maxkey + maxobj + 512;
if (len > EISMALLBUF)
- if (!(dbuf = malloc(index))) {
+ if (!(dbuf = malloc(len))) {
ei_send_exit(fd,&self,&mnesia,"cannot allocate space for incoming data");
return -1;
}