Skip to content

Commit 82af56a

Browse files
ksztyberEugeneKochetov
authored andcommitted
lut: return SPDK_LUT_INVALID_VALUE when key isn't valid
This is the value that's returned in other places when the key is invalid. It fixes segfaults in fsdev_aio when an invalid fobject is received. Change-Id: I1d910ae749481a68c9e9f5065bb4bbfe72eb6082 Signed-off-by: Konrad Sztyber <[email protected]>
1 parent 62f97b8 commit 82af56a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/lut.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ spdk_lut_get(struct spdk_lut *lut, uint64_t key)
220220
return (void *)(uint64_t)addr.value;
221221
}
222222

223-
return NULL;
223+
return SPDK_LUT_INVALID_VALUE;
224224
}
225225

226226
int

0 commit comments

Comments
 (0)