Commit 1d31a280 1d31a280d7be7590c25f1ca7a74460097b3a7ebd by Sergey Poznyakoff

(_memory_truncate): Bugfix.

1 parent 86e0a310
......@@ -129,9 +129,9 @@ _memory_truncate (stream_t stream, off_t len)
free (mfs->ptr);
mfs->ptr = NULL;
}
else
else if (len != mfs->size)
{
char *tmp = realloc (mfs, len);
char *tmp = realloc (mfs->ptr, len);
if (tmp == NULL)
return ENOMEM;
mfs->ptr = tmp;
......