<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class=""><br class="">
</div>
Reviewed-By: George Kyriazis <<a href="mailto:george.kyriazis@intel.com" class="">george.kyriazis@intel.com</a>>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Apr 12, 2018, at 8:49 PM, Vlad Golovkin <<a href="mailto:vlad.golovkin.mail@gmail.com" class="">vlad.golovkin.mail@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Zeroing memory after calloc is not necessary. This also allows to avoid<br class="">
possible crash when allocation fails, because memset is called before<br class="">
checking screen for NULL.<br class="">
---<br class="">
src/gallium/drivers/swr/swr_screen.cpp | 1 -<br class="">
1 file changed, 1 deletion(-)<br class="">
<br class="">
diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp<br class="">
index 880a177c39..4e43ac55fb 100644<br class="">
--- a/src/gallium/drivers/swr/swr_screen.cpp<br class="">
+++ b/src/gallium/drivers/swr/swr_screen.cpp<br class="">
@@ -1130,7 +1130,6 @@ struct pipe_screen *<br class="">
swr_create_screen_internal(struct sw_winsys *winsys)<br class="">
{<br class="">
struct swr_screen *screen = CALLOC_STRUCT(swr_screen);<br class="">
- memset(screen, 0, sizeof(struct swr_screen));<br class="">
<br class="">
if (!screen)<br class="">
return NULL;<br class="">
-- <br class="">
2.14.1<br class="">
<br class="">
_______________________________________________<br class="">
mesa-dev mailing list<br class="">
<a href="mailto:mesa-dev@lists.freedesktop.org" class="">mesa-dev@lists.freedesktop.org</a><br class="">
https://lists.freedesktop.org/mailman/listinfo/mesa-dev<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>