treat 0 as valid file descriptor
The descriptor is openned in rpmpkgOpen, and we treat 0 as valid file descriptor. Here we should do the same or fail earlier.
This commit is contained in:
parent
b0795abfd1
commit
be64821b90
|
@ -734,7 +734,7 @@ static int rpmpkgAddSlotPage(rpmpkgdb pkgdb)
|
|||
|
||||
static int rpmpkgGetLock(rpmpkgdb pkgdb, int type)
|
||||
{
|
||||
if (!pkgdb->fd)
|
||||
if (pkgdb->fd < 0)
|
||||
return RPMRC_FAIL;
|
||||
if (flock(pkgdb->fd, type))
|
||||
return RPMRC_FAIL;
|
||||
|
|
Loading…
Reference in New Issue