Skip to content

Commit dedfde1

Browse files
committed
Fix error handling in file_open_ipc_handle()
Fix error handling in file_open_ipc_handle(). It fixes the Coverity issue no. 469239. Signed-off-by: Lukasz Dorau <[email protected]>
1 parent 3d38be5 commit dedfde1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/provider/provider_file_memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ static umf_result_t file_open_ipc_handle(void *provider, void *providerIpcData,
582582
}
583583

584584
fd = os_file_open(file_ipc_data->path);
585-
if (fd <= 0) {
585+
if (fd == -1) {
586586
LOG_PERR("opening the file to be mapped (%s) failed",
587587
file_ipc_data->path);
588588
return UMF_RESULT_ERROR_INVALID_ARGUMENT;

0 commit comments

Comments
 (0)