From e5975e6e1800570403400f3802214695e3ebcd07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Turnel?= Date: Wed, 3 Jan 2018 15:48:49 +0100 Subject: [PATCH] Fix locale buffer not reset when needed --- coreapi/chat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coreapi/chat.c b/coreapi/chat.c index 16367cc87..bafd67912 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -1628,6 +1628,10 @@ const char *linphone_chat_message_get_text(LinphoneChatMessage *msg) { int linphone_chat_message_set_text(LinphoneChatMessage *msg, const char* text) { if (msg->message) ms_free(msg->message); + if (msg->locale_message) { + ms_free(msg->locale_message); + msg->locale_message = NULL; + } if (text) msg->message = ms_strdup(text); else