builtin rebase: use FREE_AND_NULL
[gitweb.git] / builtin / rebase.c
index 77deebc65c6bd7fbe6261b91cfb78c7ec3f85c2d..868bcd1446d7723adab422a86d1f1914899d1f52 100644 (file)
@@ -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))