> > "emsg" is leaked in some cases when running rpmbuild, because "emsg"
> > may be alloced and be set when checkDep returns RPMRC_OK.
> 
> If emsg is allocated when checkDep() returns without an error, then perhaps 
> _that_ should be fixed instead I think. What's the case where that happens, I 
> didn't see anything immediately obvious there?
When `checkSep(EVR, '-', emsg)` or `checkSep(EVR, ':', emsg)` or 
`checkEpoch(EVR, emsg)` returns RPMRC_FAIL, and 
`_wrong_version_format_terminate_build` is defined as 0, the checkDep() will 
returns RPMRC_OK and emsg is set.
```
if (checkSep(EVR, '-', emsg) != RPMRC_OK ||
            checkSep(EVR, ':', emsg) != RPMRC_OK ||
            checkEpoch(EVR, emsg) != RPMRC_OK) {

            if (rpmExpandNumeric("%{?_wrong_version_format_terminate_build}"))
                return RPMRC_FAIL;
        }
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293#issuecomment-1327336296
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2293/c1327336...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to