Blame SOURCES/wireshark-0024-covscan.patch

4a42e1
diff --git a/tshark.c b/tshark.c
4a42e1
index 00c28db781..e02b61b663 100644
4a42e1
--- a/tshark.c
4a42e1
+++ b/tshark.c
4a42e1
@@ -1977,10 +1977,10 @@ real_main(int argc, char *argv[])
4a42e1
       /* Activate the export PDU tap */
4a42e1
       comment = g_strdup_printf("Dump of PDUs from %s", cf_name);
4a42e1
       err = exp_pdu_open(&exp_pdu_tap_data, exp_fd, comment);
4a42e1
+      g_free(comment);
4a42e1
       if (err != 0) {
4a42e1
           cfile_dump_open_failure_message("TShark", exp_pdu_filename, err,
4a42e1
                                           WTAP_FILE_TYPE_SUBTYPE_PCAPNG);
4a42e1
-          g_free(comment);
4a42e1
           exit_status = INVALID_EXPORT;
4a42e1
           goto clean_exit;
4a42e1
       }
4a42e1
diff --git a/ui/export_pdu_ui_utils.c b/ui/export_pdu_ui_utils.c
4a42e1
index a567a61991..c9e40b7a24 100644
4a42e1
--- a/ui/export_pdu_ui_utils.c
4a42e1
+++ b/ui/export_pdu_ui_utils.c
4a42e1
@@ -43,8 +43,8 @@ exp_pdu_file_open(exp_pdu_t *exp_pdu_tap_data)
4a42e1
 
4a42e1
     comment = g_strdup_printf("Dump of PDUs from %s", cfile.filename);
4a42e1
     err = exp_pdu_open(exp_pdu_tap_data, import_file_fd, comment);
4a42e1
+    g_free(comment);
4a42e1
     if (err != 0) {
4a42e1
-        g_free(comment);
4a42e1
         cfile_dump_open_failure_alert_box(capfile_name ? capfile_name : "temporary file",
4a42e1
                                           err, WTAP_FILE_TYPE_SUBTYPE_PCAPNG);
4a42e1
         goto end;
4a42e1
diff --git a/ui/tap_export_pdu.c b/ui/tap_export_pdu.c
4a42e1
index 25232f0452..d3302a5aca 100644
4a42e1
--- a/ui/tap_export_pdu.c
4a42e1
+++ b/ui/tap_export_pdu.c
4a42e1
@@ -82,7 +82,7 @@ export_pdu_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const
4a42e1
 }
4a42e1
 
4a42e1
 int
4a42e1
-exp_pdu_open(exp_pdu_t *exp_pdu_tap_data, int fd, char *comment)
4a42e1
+exp_pdu_open(exp_pdu_t *exp_pdu_tap_data, int fd, const char *comment)
4a42e1
 {
4a42e1
 
4a42e1
     int   err;
4a42e1
@@ -103,7 +103,6 @@ exp_pdu_open(exp_pdu_t *exp_pdu_tap_data, int fd, char *comment)
4a42e1
 
4a42e1
     /* options */
4a42e1
     wtap_block_add_string_option(shb_hdr, OPT_COMMENT, comment, strlen(comment));
4a42e1
-    g_free(comment);
4a42e1
 
4a42e1
     /*
4a42e1
      * UTF-8 string containing the name of the operating system used to create
4a42e1
diff --git a/ui/tap_export_pdu.h b/ui/tap_export_pdu.h
4a42e1
index ea5c4077e1..9ae2dea65f 100644
4a42e1
--- a/ui/tap_export_pdu.h
4a42e1
+++ b/ui/tap_export_pdu.h
4a42e1
@@ -41,7 +41,7 @@ char *exp_pdu_pre_open(const char *tap_name, const char *filter,
4a42e1
 *
4a42e1
 * @return 0 on success or a wtap error code.
4a42e1
 */
4a42e1
-int exp_pdu_open(exp_pdu_t *data, int fd, char *comment);
4a42e1
+int exp_pdu_open(exp_pdu_t *data, int fd, const char *comment);
4a42e1
 
4a42e1
 /* Stops the PDUs export. */
4a42e1
 int exp_pdu_close(exp_pdu_t *exp_pdu_tap_data);
4a42e1
diff --git a/ui/cli/tap-wspstat.c b/ui/cli/tap-wspstat.c
4a42e1
index 22862cdaf8..fd6f3ad427 100644
4a42e1
--- a/ui/cli/tap-wspstat.c
4a42e1
+++ b/ui/cli/tap-wspstat.c
4a42e1
@@ -252,9 +252,9 @@ wspstat_init(const char *opt_arg, void *userdata _U_)
4a42e1
 		/* error, we failed to attach to the tap. clean up */
4a42e1
 		g_free(sp->pdu_stats);
4a42e1
 		g_free(sp->filter);
4a42e1
-		g_free(sp);
4a42e1
 		g_hash_table_foreach( sp->hash, (GHFunc) wsp_free_hash_table, NULL ) ;
4a42e1
 		g_hash_table_destroy( sp->hash );
4a42e1
+		g_free(sp);
4a42e1
 		fprintf(stderr, "tshark: Couldn't register wsp,stat tap: %s\n",
4a42e1
 				error_string->str);
4a42e1
 		g_string_free(error_string, TRUE);
4a42e1
diff --git a/epan/dissectors/packet-isobus-vt.c b/epan/dissectors/packet-isobus-vt.c
4a42e1
index 1f9fa98..79f1c1f 100644
4a42e1
--- a/epan/dissectors/packet-isobus-vt.c
4a42e1
+++ b/epan/dissectors/packet-isobus-vt.c
4a42e1
@@ -1546,16 +1546,8 @@ dissect_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, enum vt_directio
4a42e1
             }
4a42e1
             else
4a42e1
             {
4a42e1
-                if(status == 0)
4a42e1
-                {
4a42e1
-                    col_append_fstr(pinfo->cinfo, COL_INFO, "Status of Auxiliary Input %s was successfully changed to enabled",
4a42e1
-                        get_object_id_string(auxiliary_input_object_id));
4a42e1
-                }
4a42e1
-                else
4a42e1
-                {
4a42e1
-                    col_append_fstr(pinfo->cinfo, COL_INFO, "Status of Auxiliary Input %s was successfully changed to enabled",
4a42e1
-                        get_object_id_string(auxiliary_input_object_id));
4a42e1
-                }
4a42e1
+                col_append_fstr(pinfo->cinfo, COL_INFO, "Status of Auxiliary Input %s was successfully changed to enabled",
4a42e1
+                    get_object_id_string(auxiliary_input_object_id));
4a42e1
             }
4a42e1
         }
4a42e1
     }
4a42e1
diff --git a/epan/dfilter/dfilter.c b/epan/dfilter/dfilter.c
4a42e1
index a975f84..3e440b3 100644
4a42e1
--- a/epan/dfilter/dfilter.c
4a42e1
+++ b/epan/dfilter/dfilter.c
4a42e1
@@ -221,6 +221,7 @@ dfilter_compile(const gchar *text, dfilter_t **dfp, gchar **err_msg)
4a42e1
 	}
4a42e1
 
4a42e1
 	if ( !( expanded_text = dfilter_macro_apply(text, err_msg) ) ) {
4a42e1
+		*dfp = NULL;
4a42e1
 		return FALSE;
4a42e1
 	}
4a42e1