ted-ross commented on a change in pull request #817:
URL: https://github.com/apache/qpid-dispatch/pull/817#discussion_r467222688



##########
File path: src/router_core/modules/mobile_sync/mobile.c
##########
@@ -206,6 +206,15 @@ static void 
qcm_mobile_sync_compose_diff_hint_list(qdrm_mobile_sync_t *msync, qd
 
 static qd_message_t 
*qcm_mobile_sync_compose_differential_mau(qdrm_mobile_sync_t *msync, const char 
*address)
 {
+    //
+    // DISPATCH-1738: If the router is shutting down, the qd_dispatch_free() 
in dispatch.c frees the qd->router_id and
+    // sets the core->router_id to zero. When the core is shutting down, the 
core->router_id will be zero
+    // and we don't want to proceed with this function. We return here in 
order to prevent the use after free error on
+    // msync->core->router_id down below in the function.
+    //
+    if (! msync->core->router_id)
+        return 0;
+

Review comment:
       Can you blank the ID and area at the end of qd_dispatch_free rather than 
the beginning?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to