HomeClusterLabs Projects

Refactor: libcrmcommon: Change the type of tls_session...

Description

Refactor: libcrmcommon: Change the type of tls_session...

...in pcmk__remote_s, along with anywhere that passes that around.

A gnutls_session_t is already a pointer:

typedef struct gnutls_session_int *gnutls_session_t;

So we're essentially treating it as a double pointer everywhere.
Treating it as a regular pointer means we can also get rid of the
unnecessary call to gnutls_malloc since we no longer need to allocate
the extra space for a pointer-to-a-pointer. It also means we can get
rid of the gnutls_free calls since those would now be double frees.

This problem was found by coverity complaining about dereferencing an
explicit NULL.

Details

Provenance
clumensAuthored on Fri, Dec 6, 10:23 AM
Parents
rP701eac03ccd8: Refactor: libs: Move tls-specific code from remote.c to tls.c.
Branches
Unknown
Tags
Unknown