Fix memory leak with multiple %lang-s in one line

We permit two equivalent forms of specifying a list of languages per
file:

  %lang(xx,yy,zz) /path/to/file
  %lang(xx) %lang(yy) %lang(zz) /path/to/file

The leak was when parsing the second form.

Found by Coverity.
This commit is contained in:
Michal Domonkos 2021-06-21 17:51:14 +02:00 committed by Florian Festi
parent 9c093c4f09
commit 590b2fc062
1 changed files with 2 additions and 0 deletions

View File

@ -777,6 +777,8 @@ static rpmRC parseForLang(char * buf, FileEntry cur)
if (*pe == ',') pe++; /* skip , if present */
}
q = _free(q);
}
rc = RPMRC_OK;