Fix: handle invalid ops pointer in relayd_close()
authorDavid Goulet <dgoulet@efficios.com>
Tue, 23 Apr 2013 16:34:24 +0000 (12:34 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 23 Apr 2013 16:34:24 +0000 (12:34 -0400)
commit6d4c7a40b1050245ed51c198189d47b4b3183c43
tree6f8e1f1a87c37a74d665951a35f00cb9359221cb
parent12d7ac5a18a321c45480b2df3a1edba603f1cec1
Fix: handle invalid ops pointer in relayd_close()

Add a lttcomm socket ops pointer check before calling the close
operation of the socket. This can happen if the socket object was
allocated but NOT created.

Furthermore, a fallback is added if no ops pointer is found, the
close(3) system call is used.

This commit also fixes the fact that relayd_close could have been called
on a socket with an invalid operation pointer during the relayd object
creation process in an error path.

Fixes #429

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer.c
src/common/relayd/relayd.c
This page took 0.027138 seconds and 4 git commands to generate.