[PATCH libICE 2/3] Make sure error_message is a free-able string
Eric Engestrom
eric.engestrom at imgtec.com
Fri Jul 7 10:23:47 UTC 2017
Similar to the previous commit, assigning a static string would crash
upon freeing.
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
src/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/process.c b/src/process.c
index 1d7c07a..1ee1ceb 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1797,7 +1797,7 @@ ProcessConnectionReply (
errorReply->type = ICE_CONNECTION_ERROR;
errorReply->error_message =
- "Received bad version index in Connection Reply";
+ strdup("Received bad version index in Connection Reply");
}
else
{
@@ -2300,7 +2300,7 @@ ProcessProtocolReply (
errorReply->type = ICE_PROTOCOL_ERROR;
errorReply->error_message =
- "Received bad version index in Protocol Reply";
+ strdup("Received bad version index in Protocol Reply");
}
else
{
--
Cheers,
Eric
More information about the xorg-devel
mailing list