Skip to content

Commit

Permalink
Fix a tiny memory leak
Browse files Browse the repository at this point in the history
Found by fuzzing rpmReadPackageFile() with libfuzzer under ASAN.
  • Loading branch information
DemiMarie authored and pmatilai committed Mar 4, 2021
1 parent 827ab9a commit 9747a6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/headerutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ static void providePackageNVR(Header h)
rpmds hds, nvrds;

/* Generate provides for this package name-version-release. */
if (!(name && pEVR))
if (!(name && pEVR)) {
free(pEVR);
return;
}

/*
* Rpm prior to 3.0.3 does not have versioned provides.
Expand Down

0 comments on commit 9747a6a

Please sign in to comment.