Skip to content

Commit

Permalink
Natively allocate rpmal struct itself
Browse files Browse the repository at this point in the history
  • Loading branch information
pmatilai committed May 7, 2024
1 parent 6b81489 commit 869cd54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rpmal.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static void rpmalFreeIndex(rpmal al)

rpmal rpmalCreate(rpmts ts, int delta)
{
rpmal al = (rpmal)xcalloc(1, sizeof(*al));
rpmal al = new rpmal_s {};

al->pool = rpmstrPoolLink(rpmtsPool(ts));
al->delta = delta;
Expand Down Expand Up @@ -133,7 +133,7 @@ rpmal rpmalFree(rpmal al)
al->alloced = 0;

rpmalFreeIndex(al);
al = _free(al);
delete al;
return NULL;
}

Expand Down

0 comments on commit 869cd54

Please sign in to comment.