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 <eric.engest...@imgtec.com> --- src/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index 4100a83..1d7c07a 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; -- Cheers, Eric _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel