files-reg: Resource leak (RESOURCE_LEAK)

CID 302712 (#1 of 1): Resource leak (RESOURCE_LEAK)
 Variable build_id going out of scope leaks the storage it points to.

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2020-09-28 07:05:49 +00:00 committed by Andrei Vagin
parent da5a4d6e57
commit 4e7e26b702

View file

@ -1619,6 +1619,7 @@ static int store_validation_data_build_id(RegFileEntry *rfe, int lfd,
if (!rfe->build_id) {
pr_warn("Build-ID (For validation) could not be set for file %s\n",
rfe->name);
xfree(build_id);
return -1;
}