diff options
Diffstat (limited to 'xlators/performance/io-cache/src')
-rw-r--r-- | xlators/performance/io-cache/src/ioc-inode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c index c131a48f2..ab1d7b600 100644 --- a/xlators/performance/io-cache/src/ioc-inode.c +++ b/xlators/performance/io-cache/src/ioc-inode.c @@ -48,8 +48,14 @@ str_to_ptr (char *string) char * ptr_to_str (void *ptr) { + int ret = 0; char *str = NULL; - asprintf (&str, "%p", ptr); + ret = asprintf (&str, "%p", ptr); + if (-1 == ret) { + gf_log ("ioc", GF_LOG_ERROR, + "asprintf failed while converting ptr to str"); + return NULL; + } return str; } |