Skip to content

Commit

Permalink
Fix device list crash (Issue #296)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Oct 12, 2023
1 parent 745e43c commit dd58909
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changes in PAPPL
Changes in v1.4.2
-----------------

- Fixed potential crash while listing devices (Issue #296)
- Fixed potential deadlock issue (Issue #297)


Expand Down
2 changes: 1 addition & 1 deletion pappl/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ _papplDeviceInfoCallback(
// Make copies of the strings...
d->device_info = strdup(device_info);
d->device_uri = strdup(device_uri);
d->device_id = strdup(device_id);
d->device_id = strdup(device_id ? device_id : "");

if (d->device_info && d->device_uri && d->device_id)
{
Expand Down

0 comments on commit dd58909

Please sign in to comment.