From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com
Subject: [dpdk-dev] [PATCH] test: add missing cleanup to one of the failure paths
Date: Thu, 8 Nov 2018 11:44:16 +0000 [thread overview]
Message-ID: <9c2fc1a970820a780ecf050bb8b669d9bcd64e7b.1541677243.git.anatoly.burakov@intel.com> (raw)
One of the failure paths were not updated to clean up on exit,
most likely due to rebase error. Fix the failure path to clean
up instead of simply exiting.
Fixes: 3f9e31d71d63 ("test: clean up on exit")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
test/test/test.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/test/test.c b/test/test/test.c
index 24df6299e..12fabd0ba 100644
--- a/test/test/test.c
+++ b/test/test/test.c
@@ -102,8 +102,10 @@ main(int argc, char **argv)
/* merge argc/argv and the environment args */
all_argc = argc + eargc;
all_argv = malloc(sizeof(*all_argv) * (all_argc + 1));
- if (all_argv == NULL)
- return -1;
+ if (all_argv == NULL) {
+ ret = -1;
+ goto out;
+ }
for (i = 0; i < argc; i++)
all_argv[i] = argv[i];
--
2.17.1
next reply other threads:[~2018-11-08 11:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 11:44 Anatoly Burakov [this message]
2018-11-14 3:58 ` Thomas Monjalon
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=9c2fc1a970820a780ecf050bb8b669d9bcd64e7b.1541677243.git.anatoly.burakov@intel.com \
--to=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.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 NNTP newsgroup(s).