commit - 85467924748b0e27f0105bde280878a149df9fc8
commit + 6df9defae8435fe7d577ea00350be7db66ee5d2b
blob - 76eb2dde64f751aa977e37a5be06c8601f1fc0e3
blob + f347f506f5945b7404cc0c48620474bfe6f179a5
--- lib/pack.c
+++ lib/pack.c
size_t prefix_len = strlen(id_str_prefix);
struct got_packidx_object_id *oid;
uint32_t i = 0;
-
- STAILQ_INIT(matched_ids);
if (prefix_len < 2)
return got_error_path(id_str_prefix, GOT_ERR_BAD_OBJ_ID_STR);
err = got_object_qid_alloc_partial(&qid);
if (err)
- break;
+ return err;
memcpy(qid->id.sha1, oid->sha1, SHA1_DIGEST_LENGTH);
STAILQ_INSERT_TAIL(matched_ids, qid, entry);
oid = &packidx->hdr.sorted_ids[++i];
}
- if (err)
- got_object_id_queue_free(matched_ids);
- return err;
+ return NULL;
}
static void