From d6fd35d090480cb07421d3aedcee0a3266a3ef03 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 15 Jan 2018 20:05:18 +0000 Subject: [PATCH 06/11] DBusCredentials: Add _dbus_clear_credentials() Not to be confused with _dbus_credentials_clear(), which does something different (this is a little unfortunate, but the fact that they take different types should clarify which is which). Signed-off-by: Simon McVittie --- dbus/dbus-credentials.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dbus/dbus-credentials.h b/dbus/dbus-credentials.h index d44acb5d..c560768e 100644 --- a/dbus/dbus-credentials.h +++ b/dbus/dbus-credentials.h @@ -105,6 +105,13 @@ DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_credentials_to_string_append (DBusCredentials *credentials, DBusString *string); +static inline void +_dbus_clear_credentials (DBusCredentials **pointer_to_creds) +{ + _dbus_clear_pointer_impl (DBusCredentials, pointer_to_creds, + _dbus_credentials_unref); +} + DBUS_END_DECLS #endif /* DBUS_CREDENTIALS_H */ -- 2.15.1