[glib/mcatanzaro/ghmac-leak] ghmac: fix leak on error path




commit 38cba1138fd7485e11be6bd7b56ac83f69cd1b02
Author: Michael Catanzaro <mcatanzaro redhat com>
Date:   Thu Jul 1 11:26:40 2021 -0500

    ghmac: fix leak on error path

 glib/ghmac.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/glib/ghmac.c b/glib/ghmac.c
index 49fd272f0..10e9f337a 100644
--- a/glib/ghmac.c
+++ b/glib/ghmac.c
@@ -118,6 +118,7 @@ g_hmac_new (GChecksumType  digest_type,
       block_size = 128; /* RFC 4868 */
       break;
     default:
+      g_checksum_free (checksum);
       g_return_val_if_reached (NULL);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]