mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Fix memleak in cmd_join
Free `room` string in case we allocated it ourselves. Regards https://github.com/profanity-im/profanity/issues/1019
This commit is contained in:
parent
3ce27b47ad
commit
1746f5f8a8
@ -3656,6 +3656,11 @@ cmd_join(ProfWin *window, const char *const command, gchar **args)
|
|||||||
jid_destroy(room_arg);
|
jid_destroy(room_arg);
|
||||||
account_free(account);
|
account_free(account);
|
||||||
|
|
||||||
|
if (account->muc_service) {
|
||||||
|
// then we allocated the memory ourself (see above)
|
||||||
|
free(room);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user