diff --git a/src/add-ons/kernel/file_systems/userlandfs/private/RequestAllocator.cpp b/src/add-ons/kernel/file_systems/userlandfs/private/RequestAllocator.cpp
index 0316b56..a20be1b 100644
a
|
b
|
status_t
|
264 | 264 | RequestAllocator::AllocateData(Address& address, const void* data, int32 size, |
265 | 265 | int32 align, bool deferredInit) |
266 | 266 | { |
267 | | void* destination; |
268 | | status_t error = AllocateAddress(address, size, align, &destination, |
269 | | deferredInit); |
270 | | if (error != B_OK) |
271 | | return error; |
272 | | if (size > 0) |
273 | | memcpy(destination, data, size); |
| 267 | status_t error = B_OK; |
| 268 | if (data) { |
| 269 | void* destination; |
| 270 | error = AllocateAddress(address, size, align, &destination, |
| 271 | deferredInit); |
| 272 | if (error != B_OK) |
| 273 | return error; |
| 274 | if (size > 0) |
| 275 | memcpy(destination, data, size); |
| 276 | } else |
| 277 | address.SetTo(-1, 0, 0); |
274 | 278 | return error; |
275 | 279 | } |
276 | 280 | |