nfs: expert...() shouldn't be called under 'if(tree)'

Change-Id: I4f8c55ea4194d1246ea19368e0f5890ad1248f47
Reviewed-on: https://code.wireshark.org/review/5697
Reviewed-by: Bill Meier <wmeier@newsguy.com>
This commit is contained in:
Bill Meier 2014-12-09 23:48:46 -05:00
parent dff05c9057
commit c449b43a63
1 changed files with 7 additions and 3 deletions

View File

@ -2243,9 +2243,6 @@ dissect_fhandle_data_CELERRA_VNX(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tr
guint32 obj_id;
guint32 ro_node;
if (!tree)
return;
fhlen = tvb_reported_length(tvb);
/* Display the entire file handle */
@ -2257,6 +2254,10 @@ dissect_fhandle_data_CELERRA_VNX(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tr
{
proto_item *obj_item;
proto_tree *obj_tree;
if (!tree)
return;
obj_item = proto_tree_add_item(tree, hf_nfs_fh_obj, tvb, offset+0, 16, ENC_NA );
obj_tree = proto_item_add_subtree(obj_item, ett_nfs_fh_obj);
@ -2298,6 +2299,9 @@ dissect_fhandle_data_CELERRA_VNX(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tr
the *export* info followed by 16 bytes containing the *file/dir* info.
*/
if (!tree)
return;
/* "Named Attribute ID" or "Object ID" (bytes 0 thru 3) */
obj_id = tvb_get_letohl(tvb, offset+0);
if (obj_id <= 0 || obj_id > 9) obj_id = 1;