]> git.proxmox.com Git - mirror_frr.git/commit
lib: avoid double-free in zmq wrapper callbacks
authorMark Stapp <mjs.ietf@gmail.com>
Mon, 9 Aug 2021 15:57:17 +0000 (11:57 -0400)
committerMark Stapp <mjs.ietf@gmail.com>
Thu, 19 Aug 2021 17:31:33 +0000 (13:31 -0400)
commit8fd5502b0c2e628b875fdaf1a0ca467f8ba07ce4
treeec1d1a62ec8ca61b7476f4d6f83d92699a26f9ad
parentcf2182c013e57fbcb98ff0f42be7f0d1542c51df
lib: avoid double-free in zmq wrapper callbacks

There were paths where the zmq wrapper lib could call user
callbacks that would free the internal context struct, but the
context was then used in the lib code. Use a boolean to avoid
freeing the context within an application callback.

Restore logic that frees the context within the 'cancel' api.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
lib/frr_zmq.c
lib/frr_zmq.h