wireshark/epan
Ahmad Fatoum 9d49e13166 Remove superfluous null-checks before strdup/free
NULL checks were removed for following free functions:

- g_free "If mem is NULL it simply returns"
  https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free

- g_slist_free(_full)? "NULL is considered to be the empty list"
  https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html

- g_strfreev "If str_array is NULL, this function simply returns."
  https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev

- g_slice_free "If mem is NULL, this macro does nothing."
  https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free

- g_match_info_free "not NULL... otherwise does nothing"
  https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free

- dfilter_free defined in Wireshark code. Returns early when passed NULL
  epan/dfilter/dfilter.c

They were also removed around calls to g_strdup where applicable:

- g_strdup "If str is NULL it returns NULL."
  https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup

Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04
Reviewed-on: https://code.wireshark.org/review/23406
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 12:38:51 +00:00
..
compress
crypt Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
dfilter Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
dissectors Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
ftypes CMake: Allow user build flags to override default build flags 2017-10-13 21:32:18 +00:00
wmem CMake: Allow user build flags to override default build flags 2017-10-13 21:32:18 +00:00
wslua Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
.editorconfig
CMakeLists.txt CMake: Allow user build flags to override default build flags 2017-10-13 21:32:18 +00:00
Makefile.am Unsplit "m2m" plugin (wimax mac-to-mac encapsulation) 2017-10-01 16:05:05 +00:00
addr_and_mask.c
addr_and_mask.h
addr_resolv.c manuf.tmpl: mark comments 2017-09-02 19:41:49 +00:00
addr_resolv.h Extract the "long name" out of the manuf file and use it for some resolution 2017-08-24 05:00:06 +00:00
address.h address(.h): fix typo adresses => addresses 2017-06-11 21:31:04 +00:00
address_types.c addr_types: replace DISSECTOR_ASSERT() with g_assert() 2017-06-24 10:33:18 +00:00
address_types.h
afn.c afn(.c): fix indent (align field) 2017-03-12 10:11:00 +00:00
afn.h afn(.h) fix indent 2017-03-12 10:11:28 +00:00
aftypes.c
aftypes.h A bunch of "{Mac} OS X" -> "macOS" changes. 2017-04-05 19:16:22 +00:00
app_mem_usage.c
app_mem_usage.h
arcnet_pids.h
arptypes.h Netlink: update some values used in netlink 2017-03-22 09:51:23 +00:00
asm_utils.c plugins: config.h must not be included by public headers 2017-09-06 08:10:56 +00:00
asm_utils.h
asm_utils_win32_x86.asm
asn1.c
asn1.h
ax25_pids.h
bridged_pids.h
capture_dissectors.c
capture_dissectors.h Put all the capture dissector structures into epan/capture_dissectors.h. 2017-04-21 19:26:33 +00:00
charsets.c Fix SURROGATE_VALUE() to match what RFC 2781 says. 2017-06-16 18:41:00 +00:00
charsets.h
chdlctypes.h
circuit.c
circuit.h
color_filters.c Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
color_filters.h Put the non-filter part of epan/color_filters.h into wsutil/color.h. 2017-06-10 02:56:31 +00:00
column-info.h
column-utils.c Rename routines to clarify what they do. 2017-04-12 04:56:49 +00:00
column-utils.h
column.c Instroduce col_finalize(), to allow creating column_info based not only on preferences. 2017-10-04 03:48:12 +00:00
column.h Instroduce col_finalize(), to allow creating column_info based not only on preferences. 2017-10-04 03:48:12 +00:00
conv_id.h
conversation.c
conversation.h
conversation_debug.h
conversation_table.c Fix endpoints statistics optional filter parsing 2017-03-31 19:25:20 +00:00
conversation_table.h conversation_table: Export all functions for external plugin use 2017-10-03 11:21:21 +00:00
crc6-tvb.c
crc6-tvb.h
crc8-tvb.c
crc8-tvb.h
crc10-tvb.c
crc10-tvb.h
crc16-tvb.c
crc16-tvb.h
crc32-tvb.c
crc32-tvb.h
decode_as.c Add support for dissector tables of type FT_NONE. 2017-09-16 11:12:52 +00:00
decode_as.h Have register_decode_as_next_proto create dissector table. 2017-09-16 11:12:29 +00:00
diam_dict.h
diam_dict.l Disable flex-generated [-Wsign-compare] warnings 2017-09-19 10:06:07 +00:00
disabled_protos.c Fix routine name. 2017-04-09 02:43:26 +00:00
disabled_protos.h Pull all the "load settings" calls into a epan_load_settings() routine. 2017-04-09 22:40:30 +00:00
dissector_filters.c Fix filter for "Next Packet in Conversation" 2017-06-20 20:34:23 +00:00
dissector_filters.h Fix filter for "Next Packet in Conversation" 2017-06-20 20:34:23 +00:00
doxygen.cfg.in
dtd.h plugins: config.h must not be included by public headers 2017-09-06 08:10:56 +00:00
dtd_grammar.lemon Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
dtd_parse.h
dtd_parse.l Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
dtd_preparse.l Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
dvb_chartbl.c
dvb_chartbl.h
dwarf.c dwarf.c: Fix potential too large shift 2017-04-20 23:13:50 +00:00
dwarf.h
eap.h
eapol_keydes_types.h
epan-int.h
epan.c Rename "ws_version_info.h", also .c 2017-09-26 17:32:08 +00:00
epan.h Add function to return version number at run-time 2017-09-03 20:12:39 +00:00
epan_dissect.h
etypes.h packet-brcm-tag: Add Broadcom tag dissection 2017-09-25 11:48:32 +00:00
ex-opt.c
ex-opt.h
except.c
except.h plugins: config.h must not be included by public headers 2017-09-06 08:10:56 +00:00
exceptions.h
exntest.c
expert.c Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
expert.h
export_object.c
export_object.h
exported_pdu.c
exported_pdu.h plugins: config.h must not be included by public headers 2017-09-06 08:10:56 +00:00
filter_expressions.c Filter expressions: Rename UAT field to make it more obvious what it does 2017-07-09 19:58:36 +00:00
filter_expressions.h Add support for comments for a display filter button 2017-06-26 02:48:58 +00:00
follow.c Add follow "types" by protocol short name, not filter name 2017-02-16 07:53:49 +00:00
follow.h
frame_data.c
frame_data.h Optimize frame_data layout. 2017-03-31 20:29:37 +00:00
frame_data_sequence.c Fix the calculation of the number of levels in the radix tree. 2017-03-04 04:35:42 +00:00
frame_data_sequence.h
funnel.c
funnel.h
garrayfix.h
geoip_db.c Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
geoip_db.h
golay.c
golay.h
guid-utils.c
guid-utils.h
iana_charsets.c
iana_charsets.h
iax2_codec_type.h
in_cksum.c
in_cksum.h
ip_opts.h Make IP options into a dissector table. 2017-02-23 03:34:30 +00:00
ipproto.c
ipproto.h Remove IP "dummy" protocol number 2017-09-01 03:37:40 +00:00
ipv4.c
ipv4.h
ipv6.h
lapd_sapi.h
llcsaps.h
media_params.c
media_params.h
next_tvb.c
next_tvb.h
nlpid.h
oids.c Clean up handling of enabled/disabled protocols/heuristic dissectors. 2017-04-08 20:40:08 +00:00
oids.h
oids_test.c
osi-utils.c osi-utils: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang 2017-04-04 17:00:49 +00:00
osi-utils.h Fix some dissection errors. 2017-03-31 21:48:25 +00:00
oui.c Update some Cisco URLs. 2017-03-23 04:13:23 +00:00
oui.h Update some Cisco URLs. 2017-03-23 04:13:23 +00:00
packet.c packet.c: fix a control flow issue reported by Coverity (CID 1418671) 2017-10-09 04:35:28 +00:00
packet.h Add support for dissector tables of type FT_NONE. 2017-09-16 11:12:52 +00:00
packet_info.h
params.h
plugin_if.c Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
plugin_if.h plugins: config.h must not be included by public headers 2017-09-06 08:10:56 +00:00
ppptypes.h
prefs-int.h Qt: Provide both file save and open preferences 2017-04-17 10:51:10 +00:00
prefs.c Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
prefs.h Qt: add preference to restore display filter after Follow Stream 2017-10-04 03:59:38 +00:00
print.c Tshark: Optional packet summary for Elasticsearch 2017-10-15 00:58:42 +00:00
print.h Tshark: Optional packet summary for Elasticsearch 2017-10-15 00:58:42 +00:00
print.ps
print_stream.c print_stream.c: Fix compile error on Windows regression 2017-06-12 06:01:24 +00:00
print_stream.h print_stream: add a new print_line_color() method 2017-06-11 13:36:06 +00:00
proto.c Add ptvcursor APIs that return the values it retrieves 2017-10-13 06:45:37 +00:00
proto.h Change FI_VARINT to account for FI_BITS_XXX flags 2017-10-10 11:19:19 +00:00
proto_data.c
proto_data.h
ps.h
ptvcursor.h Add ptvcursor APIs that return the values it retrieves 2017-10-13 06:45:37 +00:00
radius_dict.l Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
range.c We really only need one range_foreach routine. 2017-08-08 22:06:27 +00:00
range.h We really only need one range_foreach routine. 2017-08-08 22:06:27 +00:00
reassemble.c Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
reassemble.h
reassemble_test.c
reedsolomon.c
reedsolomon.h
req_resp_hdrs.c
req_resp_hdrs.h
rtd_table.c
rtd_table.h
rtp_pt.h
sctpppids.h [SCTP] Update SCTP Payload Protocol Identifiers from IANA registry. 2017-09-11 12:44:35 +00:00
sequence_analysis.c Add Flow Graph functionality to TShark 2017-09-22 04:49:48 +00:00
sequence_analysis.h Have sequence analysis properly use filters from taps. 2017-09-23 03:42:14 +00:00
show_exception.c
show_exception.h
slow_protocol_subtypes.h
sminmpec.h Parse enterprise-numbers at run time 2017-06-26 22:40:50 +00:00
srt_table.c Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
srt_table.h
stat_groups.h
stat_tap_ui.c sharkd: output JSON for new_stat_ API. 2017-05-15 09:16:51 +00:00
stat_tap_ui.h sharkd: output JSON for new_stat_ API. 2017-05-15 09:16:51 +00:00
stats_tree.c stats tree: (trivial) reformat assignments 2017-10-01 15:11:51 +00:00
stats_tree.h simplify some include file paths 2017-10-01 15:10:19 +00:00
stats_tree_priv.h
stream.c
stream.h
strutil.c
strutil.h
t35.c t35: fix conflicting entry in its value_string 2017-04-27 14:59:13 +00:00
t35.h
tap-voip.h
tap.c Remove superfluous null-checks before strdup/free 2017-10-15 12:38:51 +00:00
tap.h
tfs.c MAC LTE: upgrade dissector to v14.3.0 2017-08-02 17:34:19 +00:00
tfs.h MAC LTE: upgrade dissector to v14.3.0 2017-08-02 17:34:19 +00:00
time_fmt.h
timestamp.c
timestamp.h
timestats.c
timestats.h
to_str-int.h
to_str.c
to_str.h Don't use uint_to_str_back when you need guint32_to_str_buf. 2017-07-09 19:54:35 +00:00
tvbparse.c
tvbparse.h
tvbtest.c
tvbuff-int.h
tvbuff.c Add ENC_VARINT_PROTOBUF 2017-10-09 11:31:19 +00:00
tvbuff.h Add ENC_VARINT_PROTOBUF 2017-10-09 11:31:19 +00:00
tvbuff_base64.c
tvbuff_composite.c
tvbuff_real.c
tvbuff_subset.c
tvbuff_zlib.c
uat-int.h Qt: Drag/Drop Filter buttons to order 2017-06-28 15:09:03 +00:00
uat.c Use UAT model for I/O graph 2017-08-07 17:25:02 +00:00
uat.h Use UAT model for I/O graph 2017-08-07 17:25:02 +00:00
uat_load.l Disable flex-generated [-Wsign-compare] warnings 2017-09-19 10:06:07 +00:00
unit_strings.c Dissector: SolarEdge inverter monitoring protocol 2017-10-02 04:14:31 +00:00
unit_strings.h Dissector: SolarEdge inverter monitoring protocol 2017-10-02 04:14:31 +00:00
value_string.c Fix buffer overrun in try_bytesprefix_to_str 2017-03-13 21:46:38 +00:00
value_string.h Fix buffer overrun in try_bytesprefix_to_str 2017-03-13 21:46:38 +00:00
x264_prt_id.h
xdlc.c packet-lapd.c: Replace heuristic UDP dissector with "deterministic" one with prefs. 2017-06-08 20:22:33 +00:00
xdlc.h packet-lapd.c: Replace heuristic UDP dissector with "deterministic" one with prefs. 2017-06-08 20:22:33 +00:00