Skip to content

Make muc_nick return a const char* const#2014

Merged
jubalh merged 1 commit intoprofanity-im:masterfrom
ventosus:issue#2013
Jan 26, 2025
Merged

Make muc_nick return a const char* const#2014
jubalh merged 1 commit intoprofanity-im:masterfrom
ventosus:issue#2013

Conversation

@ventosus
Copy link

In the documentation of the muc_nick function we can read:

The nickname is owned by the chat room and should not be modified or freed

We should reflect that in the return type and strdup the value for the plugin API.

Fixes: #2013

@jubalh
Copy link
Member

jubalh commented Jan 20, 2025

@ventosus can you make the coding style change?

In the documentation of the `muc_nick` function we can read:

> The nickname is owned by the chat room and should not be modified or freed

We should reflect that in the return type and `strdup` the value for the
plugin API.

Fixes: profanity-im#2013
@ventosus
Copy link
Author

@ventosus can you make the coding style change?

Done.

@jubalh jubalh merged commit 329ca8a into profanity-im:master Jan 26, 2025
6 checks passed
@jubalh
Copy link
Member

jubalh commented Jan 26, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

return value of prof_get_current_nick cannot be freed

2 participants