Completely remove an unused variable, don't just comment it out
[obnox/wireshark/wip.git] / tap-protocolinfo.c
index 45ec4dcf7acaa0ef036813fae3cd25d3a57448cd..588f8fb77597c7ea26ff9e2de3b22dbb5239df87 100644 (file)
@@ -123,15 +123,13 @@ protocolinfo_init(const char *optarg, void* userdata _U_)
                rs->filter=NULL;
        }
 
-       error_string=register_tap_listener("frame", rs, rs->filter, NULL, protocolinfo_packet, NULL);
+       error_string=register_tap_listener("frame", rs, rs->filter, TL_REQUIRES_PROTO_TREE, NULL, protocolinfo_packet, NULL);
        if(error_string){
                /* error, we failed to attach to the tap. complain and clean up */
                fprintf(stderr, "tshark: Couldn't register proto,colinfo tap: %s\n",
                    error_string->str);
                g_string_free(error_string, TRUE);
-               if(rs->filter){
-                       g_free(rs->filter);
-               }
+               g_free(rs->filter);
                g_free(rs);
 
                exit(1);