From a5f43b95364e76436df25349f5f7b07e532e8e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Tue, 31 May 2011 13:48:44 +0200 Subject: [PATCH] Config file open: don't free memory that doesn't belong to us MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On error, it would free the configuration object even though it didn't own that memory, which would cause a double-free. This fixes the first part of Issue #210 Signed-off-by: Carlos Martín Nieto --- src/config_file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/config_file.c b/src/config_file.c index ace7cc8ff..216c07417 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -261,7 +261,6 @@ static int config_open(git_config_file *cfg) cleanup: cvar_list_free(&b->var_list); gitfo_free_buf(&b->reader.buffer); - free(cfg); return git__rethrow(error, "Failed to open config"); }