Commit fe61bb68 by Jacques Germishuys Committed by Carlos Martín Nieto

Ensure git_index_entry is not NULL before trying to free it

parent ae0cfacc
...@@ -292,6 +292,9 @@ static void index_entry_reuc_free(git_index_reuc_entry *reuc) ...@@ -292,6 +292,9 @@ static void index_entry_reuc_free(git_index_reuc_entry *reuc)
static void index_entry_free(git_index_entry *entry) static void index_entry_free(git_index_entry *entry)
{ {
if (!entry)
return;
memset(&entry->id, 0, sizeof(entry->id)); memset(&entry->id, 0, sizeof(entry->id));
git__free(entry); git__free(entry);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment