We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 646bf48 commit 198dd93Copy full SHA for 198dd93
fs/shm/shmfs.c
@@ -387,11 +387,19 @@ static int shmfs_unmap_area(FAR struct task_group_s *group,
387
/* Unmap the memory from user virtual address space */
388
389
ret = up_shmdt((uintptr_t)vaddr, npages);
390
+ if (ret < 0)
391
+ {
392
+ return ret;
393
+ }
394
- /* Add the virtual memory back to the shared memory pool */
395
+ /* Free the virtual address space */
396
397
vm_release_region(get_group_mm(group), vaddr, length);
398
}
399
+ else
400
401
+ return -EINVAL;
402
403
#endif
404
405
return ret;
0 commit comments