diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 14:42:40 +0000 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 14:42:40 +0000 |
commit | 0de07f4189cbd191a765c60ed3d7c72f72112e68 (patch) | |
tree | 83781a0df06c9110c6f3db12caad23ea00832b53 /xlators/nfs/server/src/nfs-fops.c | |
parent | c28972ea53cc7cdb91c7aac01754dd7f0b66e1a7 (diff) | |
parent | 9f45d0f6212d6d5c96dafc4aba73d9d12b39c3d6 (diff) |
Merge branch 'upstream' into merge
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Conflicts:
api/src/glfs-fops.c
libglusterfs/src/syncop.c
libglusterfs/src/syncop.h
Change-Id: I8c3fa7a20fb167d9e6bc2749e177c0c8b366827b
Diffstat (limited to 'xlators/nfs/server/src/nfs-fops.c')
-rw-r--r-- | xlators/nfs/server/src/nfs-fops.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c index 60a5a9a84..14bc0f33b 100644 --- a/xlators/nfs/server/src/nfs-fops.c +++ b/xlators/nfs/server/src/nfs-fops.c @@ -317,6 +317,9 @@ nfs_gfid_dict (inode_t *inode) uuid_t rootgfid = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}; dyngfid = GF_CALLOC (1, sizeof (uuid_t), gf_common_mt_char); + if (dyngfid == NULL) + return (NULL); + uuid_generate (newgfid); if (uuid_compare (inode->gfid, rootgfid) == 0) @@ -327,16 +330,17 @@ nfs_gfid_dict (inode_t *inode) dictgfid = dict_new (); if (!dictgfid) { gf_log (GF_NFS, GF_LOG_ERROR, "Failed to create gfid dict"); - goto out; + GF_FREE (dyngfid); + return (NULL); } ret = dict_set_bin (dictgfid, "gfid-req", dyngfid, sizeof (uuid_t)); if (ret < 0) { + GF_FREE (dyngfid); dict_unref (dictgfid); - dictgfid = NULL; + return (NULL); } -out: return dictgfid; } |