From c81568d4319c7ee11e70d82375c85467d36bb7d9 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Sat, 12 Oct 2002 04:13:30 +0000 Subject: [PATCH] Only free if data was allocated by us. --- lib/xstep.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/xstep.c b/lib/xstep.c index e826780..7ca484d 100644 --- a/lib/xstep.c +++ b/lib/xstep.c @@ -1,4 +1,4 @@ -/* Xstep.c perform one SASL authentication step in the X +/* xstep.c perform one SASL authentication step * Copyright (C) 2002 Simon Josefsson * * This file is part of libgsasl. @@ -144,8 +144,10 @@ _gsasl_session_step_base64 (Gsasl_session_ctx *xctx, } } - free(output); - free(input); + if (output != NULL) + free(output); + if (input != NULL) + free(input); return res; } -- 2.11.4.GIT