From 7a7844bf5ade915268fe7f9b292908c6cd75f3ba Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 7 Jul 2017 11:23:46 +0100 Subject: Make sure errorStr is a free-able string If the `errorClass` isn't handled by the switch, `errorStr`'s initial value would be a pointer to some static memory with an empty string, and freeing it would most likely crash. Let's set it to NULL instead, as is done in other similar places. Signed-off-by: Eric Engestrom Acked-by: Walter Harms Reviewed-by: Emil Velikov --- src/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index c2ce8a1..9efc81b 100644 --- a/src/process.c +++ b/src/process.c @@ -715,7 +715,7 @@ ProcessError ( { _IceProtocolError *errorReply = &(((_IceReply *) (replyWait->reply))->protocol_error); - char *errorStr = ""; + char *errorStr = NULL; const char *prefix; char *temp; -- cgit v1.2.1