summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-gtp.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2016-01-31 11:41:35 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2016-02-02 08:25:31 +0000
commita0722e3b9a573d2f64fc90b54f53001efed70710 (patch)
tree67c3556ab748e7aa13b2ff83a937e92e60df0c6a /epan/dissectors/packet-gtp.c
parent90d63e37ba6ec7ddfed339abeee864af15b3e313 (diff)
downloadwireshark-a0722e3b9a573d2f64fc90b54f53001efed70710.tar.gz
GTP: Fix Dereference of null pointer found by Clang analyzer
Change-Id: Idfa4d114f39c3fe9a84f9b551488127c51aa66aa Reviewed-on: https://code.wireshark.org/review/13621 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gloria Pozuelo <gloria.pozuelo@bics.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gtp.c')
-rw-r--r--epan/dissectors/packet-gtp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c
index 532b344e3e..669a30c3e4 100644
--- a/epan/dissectors/packet-gtp.c
+++ b/epan/dissectors/packet-gtp.c
@@ -8845,14 +8845,14 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
offset = offset + (*gtpopt[i].decode) (tvb, offset, pinfo, gtp_tree, args);
}
- if (g_gtp_session && !PINFO_FD_VISITED(pinfo)) {
+ if (args && !PINFO_FD_VISITED(pinfo)) {
/* We insert the lists inside the table*/
fill_map(args->teid_list, args->ip_list, pinfo->num);
}
/*Use sequence number to track Req/Resp pairs*/
if (has_SN) {
guint8 cause_aux = 128; /* Cause accepted by default. Only used when args is NULL */
- if (g_gtp_session) {
+ if (args) {
cause_aux = args->last_cause;
}
gcrp = gtp_match_response(tvb, pinfo, gtp_tree, seq_no, gtp_hdr->message, gtp_info, cause_aux);
@@ -8862,7 +8862,7 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
}
}
- if (g_gtp_session) {
+ if (args) {
track_gtp_session(tvb, pinfo, gtp_tree, gtp_hdr, args->teid_list, args->ip_list, args->last_teid, args->last_ip);
}
proto_item_set_end(ti, tvb, offset);