Commit Diff


commit - 4ac84380561c5b7df321cd582a226756c67cc3cf
commit + 76e9b2be1f8f5b50f3092fbf99f110eb4d635543
blob - 2939eb86d5d15604e2db22bc6b9ead63f5c4c4e8
blob + 30fd8dac2a9ebda45c8c557421c0ebd952fe3acf
--- lib/send.c
+++ lib/send.c
@@ -176,11 +176,10 @@ insert_sendable_ref(struct got_pathlist_head *refs, co
 
 	err = got_pathlist_insert(NULL, refs, refname, id);
 done:
-	if (err != NULL) {
-		if (ref)
-			got_ref_close(ref);
+	if (ref)
+		got_ref_close(ref);
+	if (err)
 		free(id);
-	}
 	return err;
 }
 
@@ -437,7 +436,7 @@ got_send_pack(const char *remote_name, struct got_path
 	}
 
 	/*
-	 * Also prepare the array of our object IDs which
+	 * Prepare the array of our object IDs which
 	 * will be needed for generating a pack file.
 	 */
 	TAILQ_FOREACH(pe, &have_refs, entry) {