summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--refs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index 21ed46534a..1d6dece426 100644
--- a/refs.c
+++ b/refs.c
@@ -3338,6 +3338,9 @@ void ref_transaction_free(struct ref_transaction *transaction)
{
int i;
+ if (!transaction)
+ return;
+
for (i = 0; i < transaction->nr; i++)
free(transaction->updates[i]);