branch: split validate_new_branchname() into two
[gitweb.git] / upload-pack.c
index 7efff2fbfd76380fd448d53173f8295d7c9c9d87..e25f725c0feaa57c9a09c976628217c99dfb5652 100644 (file)
@@ -888,7 +888,7 @@ static void receive_needs(void)
                }
 
        shallow_nr += shallows.nr;
-       free(shallows.objects);
+       object_array_clear(&shallows);
 }
 
 /* return non-zero if the ref is hidden, otherwise 0 */
@@ -965,11 +965,10 @@ static int find_symref(const char *refname, const struct object_id *oid,
 {
        const char *symref_target;
        struct string_list_item *item;
-       struct object_id unused;
 
        if ((flag & REF_ISSYMREF) == 0)
                return 0;
-       symref_target = resolve_ref_unsafe(refname, 0, unused.hash, &flag);
+       symref_target = resolve_ref_unsafe(refname, 0, NULL, &flag);
        if (!symref_target || (flag & REF_ISSYMREF) == 0)
                die("'%s' is a symref but it is not?", refname);
        item = string_list_append(cb_data, refname);