diff options
author | Evan Huus <eapache@gmail.com> | 2012-09-23 21:02:32 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2012-09-23 21:02:32 +0000 |
commit | 69905db57c6b56b50b0fad355c3b262839deb01c (patch) | |
tree | c78bedd7dd0002a0df062d4058e620e20e69ddfd /epan | |
parent | 7dd916459e2ea350dbb1e1fb5dc3fb7d5bb383a8 (diff) |
Move potential dereference until *after* the null-check.
Caught by cppcheck.
svn path=/trunk/; revision=45081
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-dtls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c index af78039e45..af485b0c26 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -595,12 +595,12 @@ decrypt_dtls_record(tvbuff_t *tvb, packet_info *pinfo, guint32 offset, /* if we can decrypt and decryption have success * add decrypted data to this packet info */ - ssl_debug_printf("decrypt_dtls_record: app_data len %d, ssl state %X\n", - record_length, ssl->state); if (!ssl || (!save_plaintext && !(ssl->state & SSL_HAVE_SESSION_KEY))) { ssl_debug_printf("decrypt_dtls_record: no session key\n"); return ret; } + ssl_debug_printf("decrypt_dtls_record: app_data len %d, ssl state %X\n", + record_length, ssl->state); /* retrieve decoder for this packet direction */ if (ssl_packet_from_server(ssl, dtls_associations, pinfo) != 0) { |