Fix printer reference count

This commit is contained in:
Armin Novak 2021-11-15 15:33:31 +01:00 committed by akallabeth
parent 239a3872d2
commit 8c74de191c

View File

@ -1042,10 +1042,11 @@ printer_DeviceServiceEntry
goto fail;
}
if ((error = printer_register(pEntryPoints, printer)))
error = printer_register(pEntryPoints, printer);
printer->ReleaseRef(printer);
if (error)
{
WLog_ERR(TAG, "printer_register failed with error %" PRIu32 "!", error);
printer->ReleaseRef(printer);
goto fail;
}
}