summaryrefslogtreecommitdiffstats
path: root/src/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialogs')
-rw-r--r--src/dialogs/qprintdialog.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dialogs/qprintdialog.cpp b/src/dialogs/qprintdialog.cpp
index 764c480f..72e84e1d 100644
--- a/src/dialogs/qprintdialog.cpp
+++ b/src/dialogs/qprintdialog.cpp
@@ -796,7 +796,9 @@ static char * parseCupsOutput( TQListView * printers )
cups_dest_t * d;
TQLibrary lib( "cups" );
typedef int (*CupsGetDests)(cups_dest_t **dests);
+ typedef void (*CupsFreeDests)(int num_dents, cups_dest_t *dests);
CupsGetDests _cupsGetDests = (CupsGetDests)lib.resolve( "cupsGetDests" );
+ CupsFreeDests _cupsFreeDests = (CupsFreeDests)lib.resolve( "cupsFreeDests" );
if ( _cupsGetDests ) {
nd = _cupsGetDests( &d );
if ( nd < 1 )
@@ -810,6 +812,9 @@ static char * parseCupsOutput( TQListView * printers )
defaultPrinter = tqstrdup( d[n].instance );
n++;
}
+ if ( _cupsFreeDests ) {
+ _cupsFreeDests(nd, d);
+ }
}
return defaultPrinter;
}