In the Linux kernel, the following vulnerability has been resolved: libceph: make freechooseargmap() resilient to partial allocation freechooseargmap() may dereference a NULL pointer if its caller fails after a partial allocation. For example, in decodechooseargs(), if allocation of argmap->args fails, execution jumps to the fail label and freechooseargmap() is called. Since argmap->size is updated to a non-zero value before memory allocation, freechooseargmap() will iterate over argmap->args and dereference a NULL pointer. To prevent this potential NULL pointer dereference and make freechooseargmap() more resilient, add checks for pointers before iterating.