summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/rebase.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 77deebc65c..868bcd1446 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1592,8 +1592,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
branch_name = options.head_name;
} else {
- free(options.head_name);
- options.head_name = NULL;
+ FREE_AND_NULL(options.head_name);
branch_name = "HEAD";
}
if (get_oid("HEAD", &options.orig_head))