diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2022-12-23 13:04:19 -0800 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2022-12-23 13:04:19 -0800 |
commit | 28f1a767db8ef94f54ee79a2f87b72615adf10dc (patch) | |
tree | bddab1040769101cd1bef8443f8af304a48bd978 /libsframe | |
parent | 995bc59782363e7634fe3034aa9363528cb8b2e5 (diff) | |
download | gdb-28f1a767db8ef94f54ee79a2f87b72615adf10dc.zip gdb-28f1a767db8ef94f54ee79a2f87b72615adf10dc.tar.gz gdb-28f1a767db8ef94f54ee79a2f87b72615adf10dc.tar.bz2 |
libsframe: testsuite: fix memory leaks in testcases
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.
Diffstat (limited to 'libsframe')
-rw-r--r-- | libsframe/testsuite/libsframe.decode/be-flipping.c | 3 | ||||
-rw-r--r-- | libsframe/testsuite/libsframe.decode/frecnt-1.c | 3 | ||||
-rw-r--r-- | libsframe/testsuite/libsframe.decode/frecnt-2.c | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/libsframe/testsuite/libsframe.decode/be-flipping.c b/libsframe/testsuite/libsframe.decode/be-flipping.c index d915f9b..378537e 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 49861ed..bffa2ef 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 7c140d8..cbb72fe 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; |