OSDN Git Service

patch-ids.c: use hashmap correctly
[git-core/git.git] / branch.c
index 985316e..36541d0 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -1,5 +1,6 @@
 #include "git-compat-util.h"
 #include "cache.h"
+#include "config.h"
 #include "branch.h"
 #include "refs.h"
 #include "remote.h"
@@ -24,8 +25,7 @@ static int find_tracked_branch(struct remote *remote, void *priv)
                } else {
                        free(tracking->spec.src);
                        if (tracking->src) {
-                               free(tracking->src);
-                               tracking->src = NULL;
+                               FREE_AND_NULL(tracking->src);
                        }
                }
                tracking->spec.src = NULL;