diff options
author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2018-05-18 00:00:00 +0000 |
---|---|---|
committer | Daiki Ueno <dueno@src.gnome.org> | 2018-10-19 13:10:15 +0200 |
commit | 5a217c5cae721afef1273e3d272552e467f7440e (patch) | |
tree | 4202c3102eb031ea050dfee3e9032c35eb15896d | |
parent | 0838b3316b45b7886051fb5ba770306a30030c90 (diff) | |
download | libsecret-5a217c5cae721afef1273e3d272552e467f7440e.tar.gz |
Secret item schema name is optional
Initialize the schema_name so that NULL is returned when the schema name
is absent, instead of an uninitialized memory. Mark return value as
nullable to indicate this for introspection and documentation.
-rw-r--r-- | libsecret/secret-item.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsecret/secret-item.c b/libsecret/secret-item.c index da4740a..ca5e432 100644 --- a/libsecret/secret-item.c +++ b/libsecret/secret-item.c @@ -1745,12 +1745,12 @@ secret_item_set_secret_sync (SecretItem *self, * Gets the name of the schema that this item was stored with. This is also * available at the <literal>xdg:schema</literal> attribute. * - * Returns: (transfer full): the schema name + * Returns: (nullable) (transfer full): the schema name */ gchar * secret_item_get_schema_name (SecretItem *self) { - gchar *schema_name; + gchar *schema_name = NULL; GVariant *variant; g_return_val_if_fail (SECRET_IS_ITEM (self), NULL); |