summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Engestrom <eric.engestrom@imgtec.com>2017-07-07 11:23:46 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2017-09-07 13:51:51 +0100
commit7a7844bf5ade915268fe7f9b292908c6cd75f3ba (patch)
treeb3877b890af88104b90c01a567ebb76e63b913b4
parent7ef9680caa8c223a09beb637e26fd3471128e6ba (diff)
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 <eric.engestrom@imgtec.com> Acked-by: Walter Harms <wharms@bfs.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-rw-r--r--src/process.c2
1 files changed, 1 insertions, 1 deletions
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;