diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2012-06-05 15:29:25 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2012-06-05 15:29:25 +0000 |
commit | e9a30385c7aad4f79d732fdb4a5fad4e9f689c7e (patch) | |
tree | 0ac49e778eee36103eb1c9f44ccc234442d44bb8 /epan/wslua | |
parent | fe5f076b5c3b269485bcf780b77ae88b445b0d49 (diff) |
Fix Coverity 702396: tvbr is ep_ allocated so it can't be NULL.
svn path=/trunk/; revision=43116
Diffstat (limited to 'epan/wslua')
-rw-r--r-- | epan/wslua/wslua_tree.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/epan/wslua/wslua_tree.c b/epan/wslua/wslua_tree.c index f626125c44..88270d32aa 100644 --- a/epan/wslua/wslua_tree.c +++ b/epan/wslua/wslua_tree.c @@ -243,16 +243,10 @@ static int TreeItem_add_item_any(lua_State *L, gboolean little_endian) { lua_remove(L,1); } - } else if (tvbr) { - if (lua_gettop(L)) { - const gchar* s = lua_tostring(L,1); - item = proto_tree_add_text(tree_item->tree, tvbr->tvb->ws_tvb, tvbr->offset, tvbr->len,"%s",s); - lua_remove(L,1); - } } else { if (lua_gettop(L)) { const gchar* s = lua_tostring(L,1); - item = proto_tree_add_text(tree_item->tree, lua_tvb, 0, 0,"%s",s); + item = proto_tree_add_text(tree_item->tree, tvbr->tvb->ws_tvb, tvbr->offset, tvbr->len,"%s",s); lua_remove(L,1); } } |