[Spice-commits] server/image-encoders.cpp

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 19 09:51:42 UTC 2020


 server/image-encoders.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7edd55d95be7d03f5022ced9ff4bd3e99df9e4e4
Author: Uri Lublin <uril at redhat.com>
Date:   Sun May 17 18:18:28 2020 +0300

    image_encoders_free_glz_drawables: enc is never NULL
    
    It is called from 2 places.
    1. display-channel.cpp:
       dcc_get_encoders always returns a non-null pointer.
    2. image-encoders.cpp: image_encoders_release_glz
       <- image_encoders_free (where enc is not checked)
       <- dcc.c:image_encoders_free
       where non-null pointer is passed.
    
    Signed-off-by: Uri Lublin <uril at redhat.com>

diff --git a/server/image-encoders.cpp b/server/image-encoders.cpp
index 7e019c27..801e3e8d 100644
--- a/server/image-encoders.cpp
+++ b/server/image-encoders.cpp
@@ -630,7 +630,7 @@ void image_encoders_free_glz_drawables_to_free(ImageEncoders* enc)
 void image_encoders_free_glz_drawables(ImageEncoders *enc)
 {
     RingItem *ring_link;
-    GlzSharedDictionary *glz_dict = enc ? enc->glz_dict : NULL;
+    GlzSharedDictionary *glz_dict = enc->glz_dict;
 
     if (!glz_dict) {
         return;


More information about the Spice-commits mailing list