]> git.ipfire.org Git - thirdparty/cups.git/commit
scheduler/ipp.c: Allocate device_uri via cupsdSetString() 420/head
authorZdenek Dohnal <zdohnal@redhat.com>
Wed, 22 Jun 2022 07:23:45 +0000 (09:23 +0200)
committerZdenek Dohnal <zdohnal@redhat.com>
Wed, 22 Jun 2022 07:23:45 +0000 (09:23 +0200)
commit020609ad9eb84ab5a4c602ff604b2f208a6cdb8d
tree09667b5d44b4ee226257e17770deeda477d36a35
parent7b4e1c8775c2793faf2d59dc306f84dcdf80b9fd
scheduler/ipp.c: Allocate device_uri via cupsdSetString()

If a driverless printer has .local in its URI, we resolve the
URI and save the resolved one as new device URI. The problem was that
a local pointer was assigned to the structure which is passed to the
function as parameter, so the pointer became invalid once the execution
left the create_local_bg_thread() function.

We need to allocate the device URI via cupsdSetString() - the string is
then freed when the printer is deleted or cupsd shuts down.

Fixes #419.
CHANGES.md
scheduler/ipp.c