<p>Dear all:</p>
<p> </p>
<p>Gentle ping on this patch.</p>
<p> </p>
<p>Thanks<br>----</p>
<div id="cs2c_mail_sigature"></div>
<p> </p>
<div id="re" style="margin-left: 0.5em; padding-left: 0.5em; border-left: 1px solid green;"><br><br><br>
<div style="background-color: #f5f7fa;"><strong>主 题:</strong><span id="subject">[PATCH] drm/qxl: prevent memory leak</span> <br><strong>日 期:</strong><span id="date">2023-03-22 16:58</span> <br><strong>发件人:</strong><span id="from">zhouzongmin@kylinos.cn</span> <br><strong>收件人:</strong><span id="to" style="word-break: break-all;">airlied;Gerd Hoffmann;Dave Airlie;Daniel Vetter;</span></div>
<br>
<div id="content">
<div class="viewer_part" style="position: relative; overflow: hidden;">
<div>The allocated memory for qdev->dumb_heads should be released<br>in qxl_destroy_monitors_object before qxl suspend.<br>otherwise,qxl_create_monitors_object will be called to<br>reallocate memory for qdev->dumb_heads after qxl resume,<br>it will cause memory leak.<br><br>Signed-off-by: Zongmin Zhou<br>---<br>drivers/gpu/drm/qxl/qxl_display.c | 3 +++<br>1 file changed, 3 insertions(+)<br><br>diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c<br>index 6492a70e3c39..404b0483bb7c 100644<br>--- a/drivers/gpu/drm/qxl/qxl_display.c<br>+++ b/drivers/gpu/drm/qxl/qxl_display.c<br>@@ -1229,6 +1229,9 @@ int qxl_destroy_monitors_object(struct qxl_device *qdev)<br>if (!qdev->monitors_config_bo)<br>return 0;<br><br>+ kfree(qdev->dumb_heads);<br>+ qdev->dumb_heads = NULL;<br>+<br>qdev->monitors_config = NULL;<br>qdev->ram_header->monitors_config = 0;<br><br>-- <br>2.34.1<br><br><br>No virus found<br>Checked by Hillstone Network AntiVirus</div>
</div>
</div>
</div>