summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h
index 3e33bc0605..b730b415f0 100644
--- a/src/widgets/widgets/qwidgetlinecontrol_p.h
+++ b/src/widgets/widgets/qwidgetlinecontrol_p.h
@@ -110,6 +110,12 @@ public:
~QWidgetLineControl()
{
+ // If this control is used for password input, we don't want the
+ // password data to stay in the process memory, therefore we need
+ // to zero it out
+ if (m_echoMode != QLineEdit::Normal)
+ m_text.fill('\0');
+
delete [] m_maskData;
}