From: Jonas Fonseca Date: Mon, 28 Aug 2006 00:31:29 GMT Subject: [PATCH] parse_object: check if buffer is non-NULL before freeing it Message-ID: <20060828003129.GE20904@diku.dk> Two code paths may cause this and other places in the source have the courtesy to do the check. Signed-off-by: Jonas Fonseca --- object.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/object.c b/object.c index 9281300..c08347f 100644 --- a/object.c +++ b/object.c @@ -173,7 +173,8 @@ struct object *parse_object(const unsign } else { obj = NULL; } - free(buffer); + if (buffer) + free(buffer); return obj; } return NULL; -- 1.4.2.g2f76-dirty -- Jonas Fonseca