Actions
Bug #13796
openlibuuid: map_state() leaks file when mmap() fails
Status:
New
Priority:
Normal
Assignee:
-
Category:
lib - userland libraries
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
When mmap()
fails in map_state()
the fd
is not closed and leaks at line 273:
269 data = (shared_buffer_t *)mmap(NULL, sizeof (shared_buffer_t), 270 PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 271 272 if (data == MAP_FAILED) 273 return (-1); 274 275 (void) mutex_init(&data->lock, USYNC_PROCESS|LOCK_ROBUST, 0); 276 277 (void) close(fd);
Actions