From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: Indu Bhagat <indu.bhagat@oracle.com>
Subject: [PATCH 2/2] libsframe: testsuite: fix memory leaks in testcases
Date: Thu, 22 Dec 2022 14:54:57 -0800 [thread overview]
Message-ID: <20221222225457.1095930-3-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20221222225457.1095930-1-indu.bhagat@oracle.com>
ChangeLog:
* libsframe/testsuite/libsframe.decode/be-flipping.c: Free
SFrame buffer.
* libsframe/testsuite/libsframe.decode/frecnt-1.c: Likewise.
* libsframe/testsuite/libsframe.decode/frecnt-2.c: Likewise.
---
libsframe/testsuite/libsframe.decode/be-flipping.c | 3 +++
libsframe/testsuite/libsframe.decode/frecnt-1.c | 3 +++
libsframe/testsuite/libsframe.decode/frecnt-2.c | 3 +++
3 files changed, 9 insertions(+)
diff --git a/libsframe/testsuite/libsframe.decode/be-flipping.c b/libsframe/testsuite/libsframe.decode/be-flipping.c
index d915f9bb278..378537e4e10 100644
--- a/libsframe/testsuite/libsframe.decode/be-flipping.c
+++ b/libsframe/testsuite/libsframe.decode/be-flipping.c
@@ -104,6 +104,9 @@ main (void)
err = sframe_decoder_get_funcdesc (dctx, 0, &nfres, &fsize, &fstart, &finfo);
TEST ("be-flipping: Decoder get FDE", err == 0);
TEST ("be-flipping: Decoder FRE count", nfres == 5);
+
+ free (sf_buf);
+ sf_buf = NULL;
sframe_decoder_free (&dctx);
return 0;
diff --git a/libsframe/testsuite/libsframe.decode/frecnt-1.c b/libsframe/testsuite/libsframe.decode/frecnt-1.c
index 49861ed4f5c..bffa2ef37fb 100644
--- a/libsframe/testsuite/libsframe.decode/frecnt-1.c
+++ b/libsframe/testsuite/libsframe.decode/frecnt-1.c
@@ -89,6 +89,9 @@ main (void)
TEST ("frecnt-1: Decoder get FDE", err == 0);
TEST ("frecnt-1: Decoder FRE count", nfres == 4);
+ free (sf_buf);
+ sf_buf = NULL;
+
sframe_decoder_free (&dctx);
return 0;
diff --git a/libsframe/testsuite/libsframe.decode/frecnt-2.c b/libsframe/testsuite/libsframe.decode/frecnt-2.c
index 7c140d88c3a..cbb72fe5f08 100644
--- a/libsframe/testsuite/libsframe.decode/frecnt-2.c
+++ b/libsframe/testsuite/libsframe.decode/frecnt-2.c
@@ -94,6 +94,9 @@ main (void)
TEST ("frecnt-2: Decode get FRE", nfres == 4);
}
+ free (sf_buf);
+ sf_buf = NULL;
+
sframe_decoder_free (&dctx);
return 0;
--
2.37.2
next prev parent reply other threads:[~2022-12-22 22:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 22:54 [PATCH 0/2] libsframe: fix some memory leaks Indu Bhagat
2022-12-22 22:54 ` [PATCH 1/2] libsframe: fix a memory leak in sframe_decode Indu Bhagat
2022-12-22 22:54 ` Indu Bhagat [this message]
2022-12-23 9:55 ` [PATCH 0/2] libsframe: fix some memory leaks Nick Clifton
2022-12-23 15:35 ` Indu Bhagat
2022-12-23 15:39 ` Nick Clifton
2022-12-23 14:22 ` libsframe builder (Was: [PATCH 0/2] libsframe: fix some memory leaks) Mark Wielaard
2022-12-23 14:41 ` Frank Ch. Eigler
2022-12-23 16:06 ` Mark Wielaard
2022-12-23 15:24 ` Indu Bhagat
2022-12-23 16:13 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221222225457.1095930-3-indu.bhagat@oracle.com \
--to=indu.bhagat@oracle.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).