[PATCH] Plug memory leak in read_object_with_reference()
[git.git] / sha1_file.c
index a17a6d1..a4bf067 100644 (file)
@@ -1165,6 +1165,7 @@ void *read_object_with_reference(const unsigned char *sha1,
                        free(buffer);
                        return NULL;
                }
+               free(buffer);
                /* Now we have the ID of the referred-to object in
                 * actual_sha1.  Check again. */
        }