From: Harry van Haaren <harry.van.haaren@intel.com>
To: dev@dpdk.org
Cc: Harry van Haaren <harry.van.haaren@intel.com>,
pbhagavatula@caviumnetworks.com
Subject: [dpdk-dev] [PATCH] event/sw: fix memory leak if self test fails
Date: Tue, 23 Jan 2018 13:15:39 +0000 [thread overview]
Message-ID: <1516713339-156017-1-git-send-email-harry.van.haaren@intel.com> (raw)
If the self test is run and a test fails, the allocated
memory would was not freed. The passing case already freed
this memory correctly.
Fixes: 5e6eb5ccd788 ("event/sw: make test standalone")
Coverity ID: 257044
Cc: pbhagavatula@caviumnetworks.com
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
---
drivers/event/sw/sw_evdev_selftest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c
index 8c2eef5..dbfa29b 100644
--- a/drivers/event/sw/sw_evdev_selftest.c
+++ b/drivers/event/sw/sw_evdev_selftest.c
@@ -3236,6 +3236,7 @@ test_sw_eventdev(void)
printf("SW Eventdev Selftest Successful.\n");
return 0;
test_fail:
+ free(t);
printf("SW Eventdev Selftest Failed.\n");
return -1;
}
--
2.7.4
reply other threads:[~2018-01-23 13:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1516713339-156017-1-git-send-email-harry.van.haaren@intel.com \
--to=harry.van.haaren@intel.com \
--cc=dev@dpdk.org \
--cc=pbhagavatula@caviumnetworks.com \
/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 NNTP newsgroup(s).