Fix: relayd: possible NULL ptr deref, memory leak, accept fd leak
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Sep 2012 02:03:47 +0000 (22:03 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 26 Sep 2012 02:13:37 +0000 (22:13 -0400)
commit4b7f17b22c323c74554f7026304aa6c00a1ee434
tree62eb859c880318b45aa44d5aa292a081b1579a59
parent14eabff9e7acbef80ffbd5dd0aac312b681375f2
Fix: relayd: possible NULL ptr deref, memory leak, accept fd leak

- relay_cmd was not freed on error.
- newsock is a pointer. A pointer is always > 0. (unsigned comparison)
- if / else if  could lead to newsock to be dereferenced while NULL.
- missing lttcomm_destroy_sock on newsock on setsockopt error.
  Memory and FD leak.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/main.c
This page took 0.033873 seconds and 4 git commands to generate.