kmemdup_nul(9)

kmemdup_nul9

Create a nul-terminated string from unterminated data

Usage

char * kmemdup_nul(const char * s, size_t len, gfp_t gfp);

Arguments

s

The data to stringify

len

The size of the data

gfp

the GFP mask used in the kmalloc call when allocating memory

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.