aboutsummaryrefslogtreecommitdiffstats
path: root/epan/srt_table.c
AgeCommit message (Collapse)AuthorFilesLines
2017-10-15Remove superfluous null-checks before strdup/freeAhmad Fatoum1-5/+1
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-09-11srt_table.c: free table dynamic memory when calling free_srt_table()Pascal Quantin1-0/+1
Change-Id: I21c259aa0649bcfac5e345f4e41ad1beea0446c1 Reviewed-on: https://code.wireshark.org/review/23455 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-09Don't duplicate memory for key values when passing into wmem_tree_insert_string.Michael Mann1-1/+1
Change-Id: Ib9d8f23faa7a9f83a975396a1be8f85078223feb Reviewed-on: https://code.wireshark.org/review/20024 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-08Switch rtd and srt tables to use wmem_tree_t instead of (sorted) GSList.Michael Mann1-38/+9
Change-Id: I54fec10801eb8f359414f34bf705767964c9725e Reviewed-on: https://code.wireshark.org/review/20017 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-04srt_table: add cleanup function.Dario Lombardo1-0/+6
Change-Id: I8d1e9d587f7d47a9064d7b2e0c89f31dc41854ea Reviewed-on: https://code.wireshark.org/review/19946 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-02Use g_slist_find_custom instead of g_slist_nth when just looking for item in ↵Michael Mann1-9/+14
list. Change-Id: Ida3c5d5826f0ca01a25052a67f1460ff4686008f Reviewed-on: https://code.wireshark.org/review/19513 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-26srt: rename shadow variableDario Lombardo1-3/+3
Change-Id: I69bda25f79b6b46bdb288e32133847a853b614e0 Reviewed-on: https://code.wireshark.org/review/16101 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-1/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23More pinfo->fd->abs_ts to pinfo->abs_ts.Guy Harris1-1/+1
Change-Id: I70db0a345cc4c5c57c454371deb4f92f9ac4b9ac Reviewed-on: https://code.wireshark.org/review/13501 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-28Don't cast away constness unnecessarily.Guy Harris1-2/+2
Compare functions for various collection data types don't need to modify what they're comparing, so keep everything const. Change-Id: I1c2cff6954b1a8c5ade74943934324d0bd8f523c Reviewed-on: https://code.wireshark.org/review/12884 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-25Bugfix parsing filters out of SRT tables with parameters.Michael Mann1-5/+1
Change-Id: I5f9315b144333be789f8555f4128371994d4245b Reviewed-on: https://code.wireshark.org/review/9141 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-21srt_table: fix conversion shortens 64-bit value into a 32-bit valueAlexis La Goutte1-1/+1
Change-Id: I62d04fc2c02c393fd15bccbdfe194c557665dc0e Reviewed-on: https://code.wireshark.org/review/8999 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-21Further refactor SRT stats.Michael Mann1-0/+322
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK. SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic. CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone. Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc Reviewed-on: https://code.wireshark.org/review/8894 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>