diff options
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
| -rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index eaa11376f71..ee01ab19581 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -6837,6 +6837,10 @@ glusterfs_glh_realpath (glusterfs_handle_t handle, const char *path,                          if (S_ISLNK (stbuf.st_mode)) {                                  buf = calloc (1, path_max); +                                if (buf == NULL) { +                                        errno = ENOMEM; +                                        goto err; +                                }                                  if (++num_links > MAXSYMLINKS)                                  {  | 
