commit - f831532b96ca120d766ce7c8ee00fdd5a0d7b415
commit + fa2f6902709b3373f9da09bd711b660eeaf6e48c
blob - 3942b1d52d713c06359f5bdf4d50f89f4592e602
blob + c4a7d146e41afbc61b3b681580c31e2f26ea95ac
--- lib/commit_graph.c
+++ lib/commit_graph.c
qid->id = got_object_id_dup(id);
if (qid->id == NULL) {
const struct got_error *err = got_error_from_errno();
- free(qid);
+ got_object_qid_free(qid);
return err;
}
while (!SIMPLEQ_EMPTY(&node->child_ids)) {
struct got_object_qid *child = SIMPLEQ_FIRST(&node->child_ids);
SIMPLEQ_REMOVE_HEAD(&node->child_ids, entry);
- free(child);
+ got_object_qid_free(child);
}
while (!SIMPLEQ_EMPTY(&node->parent_ids)) {
struct got_object_qid *pid = SIMPLEQ_FIRST(&node->parent_ids);
SIMPLEQ_REMOVE_HEAD(&node->parent_ids, entry);
- free(pid);
+ got_object_qid_free(pid);
}
free(node);
}
{
const struct got_error *err = NULL;
struct got_commit_graph_node *node, *existing_node;
- struct got_object_qid *qid;
+ struct got_object_qid *pid;
*new_node = NULL;
memcpy(&node->id, commit_id, sizeof(node->id));
SIMPLEQ_INIT(&node->parent_ids);
SIMPLEQ_INIT(&node->child_ids);
- SIMPLEQ_FOREACH(qid, &commit->parent_ids, entry) {
- err = add_vertex(&node->parent_ids, qid->id);
+ SIMPLEQ_FOREACH(pid, &commit->parent_ids, entry) {
+ err = add_vertex(&node->parent_ids, pid->id);
if (err) {
free_node(node);
return err;
blob - eb8d9b42d58aed00b8c4a6384f1b0797512230ef
blob + d026b2cd18dd125bead7b6b9764257a26fb6bd59
--- lib/object.c
+++ lib/object.c
(*qid)->id = got_object_id_dup(id);
if ((*qid)->id == NULL) {
err = got_error_from_errno();
- free(*qid);
+ got_object_qid_free(*qid);
*qid = NULL;
return err;
}
qid->id = malloc(sizeof(*qid->id));
if (qid->id == NULL) {
err = got_error_from_errno();
- free(qid);
+ got_object_qid_free(qid);
return err;
}
while (!SIMPLEQ_EMPTY(&commit->parent_ids)) {
qid = SIMPLEQ_FIRST(&commit->parent_ids);
SIMPLEQ_REMOVE_HEAD(&commit->parent_ids, entry);
- free(qid->id);
- free(qid);
+ got_object_qid_free(qid);
}
free(commit->tree_id);