aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/reliable.h
diff options
context:
space:
mode:
authorArne Schwabe2020-10-23 13:34:29 +0200
committerGert Doering2020-10-24 21:44:59 +0200
commit2c8a9877617727438cdd874ecd38c04adebf53ad (patch)
tree4aec83758af0dbe811b4f5f8d06b61167dad6126 /src/openvpn/reliable.h
parent0d5aab889b0209cab9bb65f8bebf2adab5b1ff52 (diff)
downloadopenvpn-2c8a9877617727438cdd874ecd38c04adebf53ad.zip
openvpn-2c8a9877617727438cdd874ecd38c04adebf53ad.tar.gz
Align reliable_free with other free methods to accept NULL
The semantic of most free methods is to free a pointer and all its contents and also free the pointer itself. Align reliable_free to this semantic. Also clean up the other free uses in key_state_free. Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20201023113431.26691-3-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21215.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/reliable.h')
-rw-r--r--src/openvpn/reliable.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/openvpn/reliable.h b/src/openvpn/reliable.h
index 688c65c..a84d429 100644
--- a/src/openvpn/reliable.h
+++ b/src/openvpn/reliable.h
@@ -192,7 +192,9 @@ bool reliable_ack_write(struct reliable_ack *ack,
void reliable_init(struct reliable *rel, int buf_size, int offset, int array_size, bool hold);
/**
- * Free allocated memory associated with a reliable structure.
+ * Free allocated memory associated with a reliable structure and the pointer
+ * itself.
+ * Does nothing if rel is NULL.
*
* @param rel The reliable structured to clean up.
*/