From 996cf20fa9e93c5cc33fb8a86ad6b9b26c108d63 Mon Sep 17 00:00:00 2001 From: olszomal Date: Wed, 29 May 2024 14:17:10 +0200 Subject: [PATCH] Fixed msi dirent memory leak --- msi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/msi.c b/msi.c index 441b9d5..f2e2312 100644 --- a/msi.c +++ b/msi.c @@ -731,6 +731,8 @@ static MSI_CTX *msi_ctx_get(char *indata, uint32_t filesize) if (!msi_dirent_new(msi, root, NULL, &(dirent))) { printf("Failed to parse MSI_DIRENT struct\n"); msi_file_free(msi); + if (dirent) + msi_dirent_free(dirent); return NULL; /* FAILED */ } msi_ctx = OPENSSL_zalloc(sizeof(MSI_CTX));