From: Mathieu Desnoyers Date: Tue, 15 Dec 2020 14:01:38 +0000 (-0500) Subject: Fix: stream fd leaks on error X-Git-Tag: v2.13.0-rc1~394 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=118c051e465a0bffe22bb5bc57943f54c4afdc86;hp=118c051e465a0bffe22bb5bc57943f54c4afdc86;p=lttng-ust.git Fix: stream fd leaks on error Use a regular pattern for all commands: If the command callback takes ownership of a pointer or file descriptor, it sets them to NULL or -1. Therefore, the caller can always try to free the pointer, or close it if it is greater or equal to 0. This eliminates memory and fd leaks on error. Change-Id: I447129ab1672ce4fc6cf3c0baf18dbf27bfcfaf8 Signed-off-by: Mathieu Desnoyers ---