qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject [8/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue 162685 (Dereference null pointer)
Date Wed, 04 Oct 2017 14:48:52 GMT
DISPATCH-847 - Fixed Coverity issue 162685 (Dereference null pointer)


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/abc1db84
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/abc1db84
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/abc1db84

Branch: refs/heads/master
Commit: abc1db841855f4758de3d4d93352e1638151a956
Parents: eb877c8
Author: Ted Ross <tross@redhat.com>
Authored: Wed Oct 4 10:38:04 2017 -0400
Committer: Ted Ross <tross@redhat.com>
Committed: Wed Oct 4 10:38:04 2017 -0400

----------------------------------------------------------------------
 src/container.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/abc1db84/src/container.c
----------------------------------------------------------------------
diff --git a/src/container.c b/src/container.c
index c44d397..d6b7ced 100644
--- a/src/container.c
+++ b/src/container.c
@@ -323,7 +323,11 @@ static void writable_handler(qd_container_t *container, pn_connection_t
*conn, q
 void qd_container_handle_event(qd_container_t *container, pn_event_t *event)
 {
     pn_connection_t *conn = pn_event_connection(event);
-    qd_connection_t *qd_conn = conn ? pn_connection_get_context(conn) : NULL;
+
+    if (!conn)
+        return;
+
+    qd_connection_t *qd_conn = pn_connection_get_context(conn);
     pn_session_t    *ssn = NULL;
     pn_link_t       *pn_link = NULL;
     qd_link_t       *qd_link = NULL;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message