Commit c2282767 authored by Rémi Duraffort's avatar Rémi Duraffort

QT4_extenssions: replace qstrdup by strdup.

In fact qstrdup use new but the resulting memory can be deallocated by some C code.
parent 146abcd7
......@@ -388,9 +388,9 @@ void ExtensionDialog::SyncInput( QObject *object )
|| p_widget->type == EXTENSION_WIDGET_PASSWORD );
/* Synchronize psz_text with the new value */
QLineEdit *widget = static_cast< QLineEdit* >( p_widget->p_sys_intf );
char *psz_text = qstrdup( qtu( widget->text() ) );
char *psz_text = widget->text().isNull() ? NULL : strdup( qtu( widget->text() ) );
free( p_widget->psz_text );
p_widget->psz_text = psz_text;
p_widget->psz_text = psz_text;
if( lockedHere )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment