Simplify usage of roster_get_display_name()

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2023-12-09 15:08:47 +01:00
parent 3c939264b3
commit dc0f2acb9a
8 changed files with 14 additions and 84 deletions

View File

@@ -452,7 +452,7 @@ python_api_get_name_from_roster(PyObject* self, PyObject* args)
char* barejid_str = python_str_or_unicode_to_string(barejid);
allow_python_threads();
char* name = roster_get_display_name(barejid_str);
char* name = strdup(roster_get_display_name(barejid_str));
free(barejid_str);
disable_python_threads();
if (name) {